Package 

Interface VideoControlsCore


  • 
    public interface VideoControlsCore
    
                        

    An 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 void onAttachedToView(VideoView videoView) Called when the controls have been registered by the VideoView.
      abstract void onDetachedFromView(VideoView videoView) Called when the controls have been cleaned up on the VideoView side in preparation for detachment.
      abstract void show() Shows the controls immediately
      abstract void hide(boolean delayed) Hides the controls immediately if delayed is falseotherwise a delay determined by the implementation will be usedbefore the controls are hidden.
      abstract void showLoading(boolean initialLoad) Update the controls to indicate that the videois loading.
      abstract void finishLoading() Update the controls to indicate that the video is no longer loadingwhich will re-display the play/pause, progress, etc.
      abstract void updatePlaybackState(boolean isPlaying) Informs the controls that the playback state has changed.
      abstract void setDuration(long duration) Sets the video duration in Milliseconds to displayat the end of the progress bar
      abstract boolean isVisible() Returns true if the VideoControlsCore are visible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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 delayed is 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 - true if 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