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 Details

    • getAudioTracks

      @NonNull public List<AudioTrack> getAudioTracks()
      Returns:
      A list of the currently registered audio tracks
    • getAudioTrack

      @Nullable public AudioTrack getAudioTrack()
      Returns:
      The currently active audio track.
    • getVideoTracks

      @NonNull public List<VideoTrack> getVideoTracks()
      Returns:
      A list of the currently registered video tracks
    • getVideoTrack

      @Nullable public VideoTrack getVideoTrack()
      Returns:
      The currently active video track.
    • getVideoQualities

      @NonNull public List<VideoTrackQuality> getVideoQualities()
      Returns:
      A list of the currently available video qualities
    • getVideoQuality

      @Nullable public VideoTrackQuality getVideoQuality()
      Returns:
      The currently active video quality track or null if ABR is active
    • getSubtitleTracks

      @NonNull public List<SubtitleTrack> getSubtitleTracks()
      Returns:
      A list of the currently registered subtitles
    • getSubtitleTrack

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