public interface VideoControlsCore
VideoView uses to inform the controls of updated states, etc.
Note: To preserve backwards compatibility this is being called *Core,
On the next major release we should rename this to VideoControls and
call the abstract class something else.| Modifier and Type | Method and Description |
|---|---|
void |
finishLoading()
Update the controls to indicate that the video is no longer loading
which will re-display the play/pause, progress, etc.
|
void |
hide(boolean delayed)
Hides the controls immediately if
delayed is false
otherwise a delay determined by the implementation will be used
before the controls are hidden. |
boolean |
isVisible()
Returns
true if the VideoControlsCore are visible |
void |
onAttachedToView(VideoView videoView)
Called when the controls have been registered by the
VideoView. |
void |
onDetachedFromView(VideoView videoView)
Called when the controls have been cleaned up on the
VideoView
side in preparation for detachment. |
void |
setDuration(long duration)
Sets the video duration in Milliseconds to display
at the end of the progress bar
|
void |
show()
Shows the controls immediately
|
void |
showLoading(boolean initialLoad)
Update the controls to indicate that the video
is loading.
|
void |
updatePlaybackState(boolean isPlaying)
Informs the controls that the playback state has changed.
|
void onAttachedToView(VideoView videoView)
VideoView.videoView - The VideoView that the controls are attached tovoid onDetachedFromView(VideoView videoView)
VideoView
side in preparation for detachment.videoView - The VideoView that the controls are detaching fromvoid show()
void hide(boolean delayed)
delayed is false
otherwise a delay determined by the implementation will be used
before the controls are hidden. If the user is interacting with
the controls then we wait until after they are done to start the
delay.void showLoading(boolean initialLoad)
initialLoad - true if the loading is the initial state, not for seeking or bufferingvoid finishLoading()
void updatePlaybackState(boolean isPlaying)
isPlaying - True if the media is currently playingvoid setDuration(long duration)
duration - The duration of the video in millisecondsboolean isVisible()
true if the VideoControlsCore are visibletrue if the controls are visible