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 interface
VdoPlayerView.Callback
-
Field Summary
Fields Modifier and Type Field Description public final static String
VDO_PLAYER_VIEW_ID
public final static String
VDO_PLAYER_ANNOTATION
public final static String
VDO_PLAYER_ANNOTATION_FILTER
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
disableAlbumArt()
void
setAlbumArt(@Nullable() String albumArtUrl, @Nullable() Uri albumArtUri)
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
hideShutterView()
void
showShutterView()
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)
void
resume()
PlaybackState
getLastPlaybackState()
void
packUp()
Internally releases the player without using the public release api, so it can be restored. void
releasePlayer()
Release exo player instance and saved data. void
pausePlayer()
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
-
-
-
-