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 false otherwise a delay determined by the implementation will be used before the controls are hidden.
      abstract void showLoading(boolean initialLoad) Update the controls to indicate that the video is loading.
      abstract void finishLoading() Update the controls to indicate that the video is no longer loading which 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 display at 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

      • onAttachedToView

         abstract void onAttachedToView(VideoView videoView)

        Called when the controls have been registered by the VideoView.

        Parameters:
        videoView - The 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 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 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.

      • showLoading

         abstract void showLoading(boolean initialLoad)

        Update the controls to indicate that the video is 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 loading which 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 will update 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 display at the end of the progress bar

        Parameters:
        duration - The duration of the video in milliseconds