Package 

Interface VdoPlayer

  • All Implemented Interfaces:

    
    public interface VdoPlayer
    
                        

    Interface for controlling playback.

    The VdoPlayer instance returned in onInitializationSuccess can be used to load media and control playback.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface VdoPlayer.PlaybackEventListener

      Interface for callbacks related to playback events.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • getPlaybackState

         abstract int getPlaybackState()

        Returns the current state of the player.

      • setPlayWhenReady

         abstract void setPlayWhenReady(boolean playWhenReady)

        Sets whether playback should proceed when getPlaybackState == STATE_READY.

        If the player is already in the ready state then this method can be used to pause and resume playback.

        Parameters:
        playWhenReady - Whether playback should proceed when ready.
      • load

         abstract void load(VdoInitParams vdoParams)

        Immediately starts loading a media for the player to play.

        Parameters:
        vdoParams - parameters for the playback
      • retry

         abstract void retry()

        Attempt to prepare the media while maintaining its playback state.

      • getCurrentTime

         abstract long getCurrentTime()

        Gets the current playback time of the video from the beginning.

      • getBufferedTime

         abstract long getBufferedTime()

        Gets the time till which video is buffered

      • getDuration

         abstract long getDuration()

        Gets the duration of the current video.

      • isSpeedControlSupported

         abstract boolean isSpeedControlSupported()

        Returns if the current player supports changing the playback speed.

      • setPlaybackSpeed

         abstract void setPlaybackSpeed(float speed)

        Sets the playback speed. Passing 0 or a negative value will reset player to use default playback speed of 1. onPlaybackSpeedChanged will be called when the currently active playback speed changes.

        Parameters:
        speed - factor by which playback speed should be changed
      • getPlaybackSpeed

         abstract float getPlaybackSpeed()

        Returns the currently active playback speed.

      • release

         abstract void release()

        Release system resources used by this VdoPlayer.

        A new VdoPlayer instance must be created to play/stream another video.

      • seekTo

         abstract void seekTo(long timeInMillis)

        Seeks to a particular time in the video.

        Parameters:
        timeInMillis - time in milliseconds
      • stop

         abstract void stop()

        Stops the currently loaded video.

      • setSelectedTracks

         abstract void setSelectedTracks(Array<Track> tracks)

        Sets a fixed (non-adaptive) selection of tracks. The provided array must contain Track objects returned by the player, and also must contain only single Track corresponding to a Track.TYPE_* constant. Only the first track in the array corresponding to a Track.TYPE_* constant will be acknowledged.

        Parameters:
        tracks - the tracks to select
      • isAdaptive

         abstract boolean isAdaptive()

        Returns if the current playback is adaptive.

      • getPlaybackProperty

         abstract Object getPlaybackProperty(String propertyName)

        Returns values of additional properties specific to current playback session. Returned values need to be cast to their expected types before use.

        Get the value for propertyName TOTAL_PLAYED, TOTAL_COVERED

        Parameters:
        propertyName - name of desired property
      • searchInSelectedSubtitle

         abstract void searchInSelectedSubtitle(String searchText, SubtitleSearchListener subtitleSearchListener)

        Search in selected subtitle and seek to matching cues.

        Parameters:
        searchText - text to search in subtitle file.
        subtitleSearchListener - SubtitleSearchListener Callback for search result and errors com.vdocipher.aegis.player.internal.subtitle.SubtitleSearchListener.Error.
      • setAutoResumeCallback

         abstract void setAutoResumeCallback(AutoResumeCallback autoResumeCallback)

        Set callback to provide event when video start resume from saved seek position

        Parameters:
        autoResumeCallback - AutoResumeCallback Callback for autoResumeCallbackcom.vdocipher.aegis.player.internal.util.AutoResumeCallback.