-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks
,android.content.ComponentCallbacks2
,android.view.View.OnCreateContextMenuListener
,com.vdocipher.aegis.player.PlayerHost
@Deprecated() public final class VdoPlayerFragment extends Fragment implements PlayerHost
A VdoPlayerFragment 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
-
Constructor Summary
Constructors Constructor Description VdoPlayerFragment()
-
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. 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
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. -
-
Method Detail
-
getVideoStretchMode
int getVideoStretchMode()
Return currently set video stretch mode.
-
setVideoStretchMode
void setVideoStretchMode(int videoStretchMode)
Set stretch mode for video scaling inside the fragment layout.
- Parameters:
videoStretchMode
- one of PlayerHost.
-
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()
-
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.
-
-
-
-