Package com.castlabs.sdk.googlecast

# Class RemotePlayerState

java.lang.Object
com.castlabs.sdk.googlecast.RemotePlayerState

public final class RemotePlayerState extends Object
This class represents the remote player state. You can get an instance of it with the `GoogleCastManager.getCurrentPlayerState(com.google.android.gms.cast.framework.SessionManager)` method. It provides methods to get the track list of any type (audio, subtitles, qualities) as well as the currently selected one.

Since:
  4.0.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AudioTrack`
  `getAudioTrack()`
  Gets the currently selected audio track.
  `List<AudioTrack>`
  `getAudioTracks()`
  Gets the list of all available audio tracks.
  `SubtitleTrack`
  `getSubtitleTrack()`
  Gets the currently selected subtitle track.
  `List<SubtitleTrack>`
  `getSubtitleTracks()`
  Gets the list of all available subtitle tracks.
  `List<VideoTrackQuality>`
  `getVideoQualities()`
  Gets the list of available video qualities for the current video track.
  `VideoTrackQuality`
  `getVideoQuality()`
  Gets the currently selected video quality.
  `VideoTrack`
  `getVideoTrack()`
  Gets the currently selected video track.
  `List<VideoTrack>`
  `getVideoTracks()`
  Gets the list of all available video tracks.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getAudioTracks

    @NonNull public List<AudioTrack> getAudioTracks()
    Gets the list of all available audio tracks.
    Returns:
      A list of the currently registered audio tracks

  - ### getAudioTrack

    @Nullable public AudioTrack getAudioTrack()
    Gets the currently selected audio track.
    Returns:
      The currently active audio track.

  - ### getVideoTracks

    @NonNull public List<VideoTrack> getVideoTracks()
    Gets the list of all available video tracks.
    Returns:
      A list of the currently registered video tracks

  - ### getVideoTrack

    @Nullable public VideoTrack getVideoTrack()
    Gets the currently selected video track.
    Returns:
      The currently active video track.

  - ### getVideoQualities

    @NonNull public List<VideoTrackQuality> getVideoQualities()
    Gets the list of available video qualities for the current video track.
    Returns:
      A list of the currently available video qualities

  - ### getVideoQuality

    @Nullable public VideoTrackQuality getVideoQuality()
    Gets the currently selected video quality.
    Returns:
      The currently active video quality track or null if ABR is active

  - ### getSubtitleTracks

    @NonNull public List<SubtitleTrack> getSubtitleTracks()
    Gets the list of all available subtitle tracks.
    Returns:
      A list of the currently registered subtitles

  - ### getSubtitleTrack

    @Nullable public SubtitleTrack getSubtitleTrack()
    Gets the currently selected subtitle track.
    Returns:
      The currently active subtitle track or null if no subtitle track is active