public static interface Player.VideoComponent
Player.| Modifier and Type | Method and Description |
|---|---|
void |
addVideoListener(VideoListener listener)
Adds a listener to receive video events.
|
void |
clearVideoSurface()
Clears any
Surface, SurfaceHolder, SurfaceView or TextureView
currently set on the player. |
void |
clearVideoSurface(android.view.Surface surface)
Clears the
Surface onto which video is being rendered if it matches the one passed. |
void |
clearVideoSurfaceHolder(android.view.SurfaceHolder surfaceHolder)
Clears the
SurfaceHolder that holds the Surface onto which video is being
rendered if it matches the one passed. |
void |
clearVideoSurfaceView(android.view.SurfaceView surfaceView)
Clears the
SurfaceView onto which video is being rendered if it matches the one
passed. |
void |
clearVideoTextureView(android.view.TextureView textureView)
Clears the
TextureView onto which video is being rendered if it matches the one
passed. |
int |
getVideoScalingMode()
Returns the video scaling mode.
|
void |
removeVideoListener(VideoListener listener)
Removes a listener of video events.
|
void |
setVideoScalingMode(int videoScalingMode)
Sets the video scaling mode.
|
void |
setVideoSurface(android.view.Surface surface)
Sets the
Surface onto which video will be rendered. |
void |
setVideoSurfaceHolder(android.view.SurfaceHolder surfaceHolder)
Sets the
SurfaceHolder that holds the Surface onto which video will be
rendered. |
void |
setVideoSurfaceView(android.view.SurfaceView surfaceView)
Sets the
SurfaceView onto which video will be rendered. |
void |
setVideoTextureView(android.view.TextureView textureView)
Sets the
TextureView onto which video will be rendered. |
void setVideoScalingMode(int videoScalingMode)
videoScalingMode - The video scaling mode.int getVideoScalingMode()
void addVideoListener(VideoListener listener)
listener - The listener to register.void removeVideoListener(VideoListener listener)
listener - The listener to unregister.void clearVideoSurface()
Surface, SurfaceHolder, SurfaceView or TextureView
currently set on the player.void setVideoSurface(android.view.Surface surface)
Surface onto which video will be rendered. The caller is responsible for
tracking the lifecycle of the surface, and must clear the surface by calling setVideoSurface(null) if the surface is destroyed.
If the surface is held by a SurfaceView, TextureView or SurfaceHolder then it's recommended to use setVideoSurfaceView(SurfaceView), setVideoTextureView(TextureView) or setVideoSurfaceHolder(SurfaceHolder) rather
than this method, since passing the holder allows the player to track the lifecycle of the
surface automatically.
surface - The Surface.void clearVideoSurface(android.view.Surface surface)
Surface onto which video is being rendered if it matches the one passed.
Else does nothing.surface - The surface to clear.void setVideoSurfaceHolder(android.view.SurfaceHolder surfaceHolder)
SurfaceHolder that holds the Surface onto which video will be
rendered. The player will track the lifecycle of the surface automatically.surfaceHolder - The surface holder.void clearVideoSurfaceHolder(android.view.SurfaceHolder surfaceHolder)
SurfaceHolder that holds the Surface onto which video is being
rendered if it matches the one passed. Else does nothing.surfaceHolder - The surface holder to clear.void setVideoSurfaceView(android.view.SurfaceView surfaceView)
SurfaceView onto which video will be rendered. The player will track the
lifecycle of the surface automatically.surfaceView - The surface view.void clearVideoSurfaceView(android.view.SurfaceView surfaceView)
SurfaceView onto which video is being rendered if it matches the one
passed. Else does nothing.surfaceView - The texture view to clear.void setVideoTextureView(android.view.TextureView textureView)
TextureView onto which video will be rendered. The player will track the
lifecycle of the surface automatically.textureView - The texture view.void clearVideoTextureView(android.view.TextureView textureView)
TextureView onto which video is being rendered if it matches the one
passed. Else does nothing.textureView - The texture view to clear.