-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,com.vdocipher.aegis.player.PlayerHost
public final class VdoPlayerSupportFragment extends Fragment implements PlayerHost
Support library based equivalent of VdoPlayerFragment.
A VdoPlayerSupportFragment hosts a VdoPlayer for media playback.
It can be dropped into your activity layout and initialized using initialize to obtain a VdoPlayer instance.
-
-
Field Summary
Fields Modifier and Type Field Description public int
videoStretchMode
public int
resizeMode
-
Constructor Summary
Constructors Constructor Description VdoPlayerSupportFragment()
-
Method Summary
Modifier and Type Method Description int
getVideoStretchMode()
Return currently set video stretch mode. void
setVideoStretchMode(int videoStretchMode)
Set stretch mode for video scaling inside the fragment layout. int
getResizeMode()
Returns the resize mode. void
setResizeMode(int resizeMode)
Sets the resize mode. void
onAttach(Context context)
void
onCreate(Bundle savedInstanceState)
View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void
onActivityCreated(Bundle savedInstanceState)
void
onViewStateRestored(Bundle savedInstanceState)
void
onStart()
void
onResume()
void
restore()
void
onPause()
void
onSaveInstanceState(Bundle outState)
void
onStop()
void
onDestroyView()
void
onDestroy()
void
onDetach()
void
setAspectRatio(float widthToHeightRatio)
Set aspect ratio for the fragment view. void
addInitializationListener(PlayerHost.InitializationListener initListener)
Register a listener for initialization callbacks from this PlayerHost void
removeInitializationListener(PlayerHost.InitializationListener initListener)
Remove a registered InitializationListener VdoPlayer
getPlayer()
Get the VdoPlayer hosted by this PlayerHost. void
initialize(PlayerHost.InitializationListener listener)
Initializes the PlayerHost with an InitializationListener to listen for initialization callbacks. SessionHandler
getNewCSHandler()
Call this methode when the player's onLoaded() called. -
-
Method Detail
-
getVideoStretchMode
@Deprecated() int getVideoStretchMode()
Return currently set video stretch mode.
-
setVideoStretchMode
@Deprecated() void setVideoStretchMode(int videoStretchMode)
Set stretch mode for video scaling inside the fragment layout.
- Parameters:
videoStretchMode
- one of PlayerHost.
-
getResizeMode
int getResizeMode()
Returns the resize mode.
-
setResizeMode
void setResizeMode(int resizeMode)
Sets the resize mode.
- Parameters:
resizeMode
- The resize mode.
-
onCreateView
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onActivityCreated
void onActivityCreated(Bundle savedInstanceState)
-
onViewStateRestored
void onViewStateRestored(Bundle savedInstanceState)
-
onStart
void onStart()
-
onResume
void onResume()
-
restore
void restore()
-
onPause
void onPause()
-
onSaveInstanceState
void onSaveInstanceState(Bundle outState)
-
onStop
void onStop()
-
onDestroyView
void onDestroyView()
-
onDestroy
void onDestroy()
-
onDetach
void onDetach()
-
setAspectRatio
void setAspectRatio(float widthToHeightRatio)
Set aspect ratio for the fragment view.
The dimension (width or height) that is fixed in layout will be kept and the other dimension will be increased or decreased to match the aspect ratio.
- Parameters:
widthToHeightRatio
- the desired aspect ratio
-
addInitializationListener
void addInitializationListener(PlayerHost.InitializationListener initListener)
Register a listener for initialization callbacks from this PlayerHost
- Parameters:
initListener
- listener for initialization callbacks
-
removeInitializationListener
void removeInitializationListener(PlayerHost.InitializationListener initListener)
Remove a registered InitializationListener
- Parameters:
initListener
- the listener to remove
-
getPlayer
VdoPlayer getPlayer()
Get the VdoPlayer hosted by this PlayerHost. This may only be called after an onInitializationSuccess callback following initialize
-
initialize
void initialize(PlayerHost.InitializationListener listener)
Initializes the PlayerHost with an InitializationListener to listen for initialization callbacks.
-
getNewCSHandler
SessionHandler getNewCSHandler()
Call this methode when the player's onLoaded() called.
-
-
-
-