Package com.vdocipher.aegis.ui.view
Class VdoPlayerUIFragment
-
- 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.cast.CastSessionAvailabilityListener
public class VdoPlayerUIFragment extends Fragment implements CastSessionAvailabilityListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
VdoPlayerUIFragment.OnSaveOfflineListenerV2
public interface
VdoPlayerUIFragment.OnSaveOfflineListener
-
Constructor Summary
Constructors Constructor Description VdoPlayerUIFragment()
-
Method Summary
Modifier and Type Method Description void
onCreate(@Nullable() Bundle savedInstanceState)
void
onInflate(@NonNull() Context context, @NonNull() AttributeSet attrs, @Nullable() Bundle savedInstanceState)
View
onCreateView(@NonNull() LayoutInflater inflater, @Nullable() ViewGroup container, Bundle savedInstanceState)
void
onViewCreated(@NonNull() View view, @Nullable() Bundle savedInstanceState)
void
onViewStateRestored(@Nullable() Bundle savedInstanceState)
void
onStart()
void
onStop()
void
onSaveInstanceState(@NonNull() Bundle outState)
void
onConfigurationChanged(Configuration newConfig)
void
onBackPressed()
void
initialize(PlayerHost.InitializationListener initializationListener)
void
setAspectRatio(float widthToHeightRatio)
Set aspect ratio for the fragment view. 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
onResume()
void
onPause()
void
onCastSessionAvailable()
Called when a cast session is available. void
onCastSessionUnavailable()
Called when the cast session is not available. void
addOnSavedOfflineListener(VdoPlayerUIFragment.OnSaveOfflineListener onSaveOfflineListener)
void
addOnSavedOfflineListenerV2(VdoPlayerUIFragment.OnSaveOfflineListenerV2 onSaveOfflineListenerV2)
Set callback to listen save offline event and provide persistent Token to download video. void
onPictureInPictureModeChanged(boolean isInPictureInPictureMode)
void
setPictureInPictureSupport(boolean supportsPictureInPicture)
Set support for picture in picture mode. void
enterFullScreen()
Set support for fullscreen mode of the player. void
exitFullScreen()
Set support to exit form fullscreen mode of the player. void
setBackPressCalled()
Set support to handle back press. void
setFullscreenActionListener(FullScreenActionListener fullScreenActionListener)
-
-
Method Detail
-
onInflate
void onInflate(@NonNull() Context context, @NonNull() AttributeSet attrs, @Nullable() Bundle savedInstanceState)
-
onCreateView
@Nullable() View onCreateView(@NonNull() LayoutInflater inflater, @Nullable() ViewGroup container, Bundle savedInstanceState)
-
onViewCreated
void onViewCreated(@NonNull() View view, @Nullable() Bundle savedInstanceState)
-
onViewStateRestored
void onViewStateRestored(@Nullable() Bundle savedInstanceState)
-
onStart
void onStart()
-
onStop
void onStop()
-
onSaveInstanceState
void onSaveInstanceState(@NonNull() Bundle outState)
-
onConfigurationChanged
void onConfigurationChanged(Configuration newConfig)
-
onBackPressed
@Deprecated() void onBackPressed()
-
initialize
void initialize(PlayerHost.InitializationListener initializationListener)
-
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
-
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.
-
onResume
void onResume()
-
onPause
void onPause()
-
onCastSessionAvailable
void onCastSessionAvailable()
Called when a cast session is available.
-
onCastSessionUnavailable
void onCastSessionUnavailable()
Called when the cast session is not available.
-
addOnSavedOfflineListener
void addOnSavedOfflineListener(VdoPlayerUIFragment.OnSaveOfflineListener onSaveOfflineListener)
-
addOnSavedOfflineListenerV2
void addOnSavedOfflineListenerV2(VdoPlayerUIFragment.OnSaveOfflineListenerV2 onSaveOfflineListenerV2)
Set callback to listen save offline event and provide persistent Token to download video.
- Parameters:
onSaveOfflineListenerV2
- OnSaveOfflineListenerV2
-
onPictureInPictureModeChanged
void onPictureInPictureModeChanged(boolean isInPictureInPictureMode)
-
setPictureInPictureSupport
@Deprecated() void setPictureInPictureSupport(boolean supportsPictureInPicture)
Set support for picture in picture mode.
-
enterFullScreen
void enterFullScreen()
Set support for fullscreen mode of the player.
-
exitFullScreen
void exitFullScreen()
Set support to exit form fullscreen mode of the player.
-
setBackPressCalled
void setBackPressCalled()
Set support to handle back press.
-
setFullscreenActionListener
void setFullscreenActionListener(FullScreenActionListener fullScreenActionListener)
-
-
-
-