Interface Player

  • All Known Subinterfaces:
    ExoPlayer
    All Known Implementing Classes:
    BasePlayer, CastPlayer, ForwardingPlayer, LegacyMediaPlayerWrapper, SimpleBasePlayer, SimpleExoPlayer, StubExoPlayer, StubPlayer

    public interface Player
    A media player interface defining traditional high-level functionality, such as the ability to play, pause, seek and query properties of the currently playing media.

    All methods must be called from a single application thread unless indicated otherwise. Callbacks in registered listeners are called on the same thread.

    This interface includes some convenience methods that can be implemented by calling other methods in the interface. BasePlayer implements these convenience methods so inheriting BasePlayer is recommended when implementing the interface so that only the minimal set of required methods can be implemented.

    Some important properties of media players that implement this interface are:

    • They can provide a Timeline representing the structure of the media being played, which can be obtained by calling getCurrentTimeline().
    • They can provide a Tracks defining the currently available tracks and which are selected to be rendered, which can be obtained by calling getCurrentTracks().