-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,com.vdocipher.aegis.player.PlayerHost
public class VdoPlayerView extends AutoSizeFrameLayout implements PlayerHost
-
-
Field Summary
Fields Modifier and Type Field Description public int
videoStretchMode
public int
resizeMode
-
Constructor Summary
Constructors Constructor Description VdoPlayerView(Context context)
VdoPlayerView(Context context, AttributeSet attributeSet)
VdoPlayerView(Context context, AttributeSet attributeSet, int defStyleAttr)
-
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
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. void
setAspectRatio(float widthToHeightRatio)
Set aspect ratio for the fragment view. void
restore(PlaybackState lastPlaybackState)
PlaybackState
getLastPlaybackState()
void
packUp()
Internally releases the player without using the public release api, so it can be restored. void
pausePlayer()
pause video SessionHandler
getNewCSHandler()
-
-
Constructor Detail
-
VdoPlayerView
VdoPlayerView(Context context)
-
VdoPlayerView
VdoPlayerView(Context context, AttributeSet attributeSet)
-
VdoPlayerView
VdoPlayerView(Context context, AttributeSet attributeSet, int defStyleAttr)
-
-
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.
-
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.
-
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
-
restore
void restore(PlaybackState lastPlaybackState)
-
getLastPlaybackState
PlaybackState getLastPlaybackState()
-
packUp
void packUp()
Internally releases the player without using the public release api, so it can be restored.
-
pausePlayer
void pausePlayer()
pause video
-
getNewCSHandler
SessionHandler getNewCSHandler()
-
-
-
-