Class VdoPlayerView
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceVdoPlayerView.Callback
-
Field Summary
Fields Modifier and Type Field Description public final static StringVDO_PLAYER_VIEW_IDpublic final static StringVDO_PLAYER_ANNOTATIONpublic final static StringVDO_PLAYER_ANNOTATION_FILTERpublic intvideoStretchModepublic intresizeMode
-
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 intgetVideoStretchMode()Return currently set video stretch mode. voidsetVideoStretchMode(int videoStretchMode)Set stretch mode for video scaling inside the fragment layout. intgetResizeMode()Returns the resize mode. voidsetResizeMode(int resizeMode)Sets the resize mode. voiddisableAlbumArt()voidsetAlbumArt(@Nullable() String albumArtUrl, @Nullable() Uri albumArtUri)voidaddInitializationListener(PlayerHost.InitializationListener initListener)Register a listener for initialization callbacks from this PlayerHost voidremoveInitializationListener(PlayerHost.InitializationListener initListener)Remove a registered InitializationListener VdoPlayergetPlayer()Get the VdoPlayer hosted by this PlayerHost. voidhideShutterView()voidshowShutterView()voidinitialize(PlayerHost.InitializationListener listener)Initializes the PlayerHost with an InitializationListener to listen for initialization callbacks. voidsetAspectRatio(float widthToHeightRatio)Set aspect ratio for the fragment view. voidrestore(PlaybackState lastPlaybackState)voidresume()PlaybackStategetLastPlaybackState()voidpackUp()Internally releases the player without using the public release api, so it can be restored. voidreleasePlayer()Release exo player instance and saved data. voidpausePlayer()pause video -
-
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.
-
disableAlbumArt
void disableAlbumArt()
-
setAlbumArt
void setAlbumArt(@Nullable() String albumArtUrl, @Nullable() Uri albumArtUri)
-
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
- Returns:
VdoPlayer hosted by this PlayerHost
-
hideShutterView
void hideShutterView()
-
showShutterView
void showShutterView()
-
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)
-
resume
void resume()
-
getLastPlaybackState
PlaybackState getLastPlaybackState()
-
packUp
void packUp()
Internally releases the player without using the public release api, so it can be restored.
-
releasePlayer
void releasePlayer()
Release exo player instance and saved data.
-
pausePlayer
void pausePlayer()
pause video
-
-
-
-