-
public interface VideoControlsCoreAn Interface that represents the core VideoControl functionality that the 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.
-
-
Method Summary
Modifier and Type Method Description abstract voidonAttachedToView(VideoView videoView)Called when the controls have been registered by the VideoView. abstract voidonDetachedFromView(VideoView videoView)Called when the controls have been cleaned up on the VideoView side in preparation for detachment. abstract voidshow()Shows the controls immediately abstract voidhide(boolean delayed)Hides the controls immediately if delayedis falseotherwise a delay determined by the implementation will be usedbefore the controls are hidden.abstract voidshowLoading(boolean initialLoad)Update the controls to indicate that the videois loading. abstract voidfinishLoading()Update the controls to indicate that the video is no longer loadingwhich will re-display the play/pause, progress, etc. abstract voidupdatePlaybackState(boolean isPlaying)Informs the controls that the playback state has changed. abstract voidsetDuration(long duration)Sets the video duration in Milliseconds to displayat the end of the progress bar abstract booleanisVisible()Returns trueif the VideoControlsCore are visible-
-
Method Detail
-
onAttachedToView
abstract void onAttachedToView(VideoView videoView)
Called when the controls have been registered by the VideoView.
- Parameters:
videoView- The VideoView that the controls are attached to
-
onDetachedFromView
abstract void onDetachedFromView(VideoView videoView)
Called when the controls have been cleaned up on the VideoView side in preparation for detachment.
- Parameters:
videoView- The VideoView that the controls are detaching from
-
show
abstract void show()
Shows the controls immediately
-
hide
abstract void hide(boolean delayed)
Hides the controls immediately if
delayedis falseotherwise a delay determined by the implementation will be usedbefore the controls are hidden. If the user is interacting withthe controls then we wait until after they are done to start thedelay.
-
showLoading
abstract void showLoading(boolean initialLoad)
Update the controls to indicate that the videois loading.
- Parameters:
initialLoad-trueif the loading is the initial state, not for seeking or buffering
-
finishLoading
abstract void finishLoading()
Update the controls to indicate that the video is no longer loadingwhich will re-display the play/pause, progress, etc. controls
-
updatePlaybackState
abstract void updatePlaybackState(boolean isPlaying)
Informs the controls that the playback state has changed. This willupdate to display the correct views, and manage progress polling.
- Parameters:
isPlaying- True if the media is currently playing
-
setDuration
abstract void setDuration(long duration)
Sets the video duration in Milliseconds to displayat the end of the progress bar
- Parameters:
duration- The duration of the video in milliseconds
-
isVisible
abstract boolean isVisible()
Returns
trueif the VideoControlsCore are visible
-
-
-
-