Interface MediaPlayerControl.MediaPlayerControlListener

  • Enclosing class:
    MediaPlayerControl

    public static interface MediaPlayerControl.MediaPlayerControlListener
    Invokes a callback when a media play message is received.
    • Method Detail

      • onNowPlayingRequestReceived

        void onNowPlayingRequestReceived​(java.lang.String playerId)
        When onNowPlayingRequestReceived(String) is called, MediaPlayerControl#sendNowPlaying() sends the requested playerInfo.
        Parameters:
        playerId - Unique identifier for the media player. If playerId is specified, only the specified player information is sent. If playerId is null, information is sent for all players.
      • onPlayRequestReceived

        void onPlayRequestReceived​(java.lang.String playerId)
      • onPauseRequestReceived

        void onPauseRequestReceived​(java.lang.String playerId)
      • onStopRequestReceived

        void onStopRequestReceived​(java.lang.String playerId)
      • onNextRequestReceived

        void onNextRequestReceived​(java.lang.String playerId)
      • onPreviousRequestReceived

        void onPreviousRequestReceived​(java.lang.String playerId)
      • onStepForwardRequestReceived

        void onStepForwardRequestReceived​(java.lang.String playerId)
      • onStepBackwardRequestReceived

        void onStepBackwardRequestReceived​(java.lang.String playerId)
      • onSeekToRequestReceived

        void onSeekToRequestReceived​(java.lang.String playerId,
                                     int position)
      • onSetVolumeRequestReceived

        void onSetVolumeRequestReceived​(java.lang.String playerId,
                                        int volume)
        Sets the volume for the media when onSetVolumeRequestReceived(String, int) is called.

        Parameters:
        playerId - Unique identifier for the media player.
        volume - Volume value is specified as 1 to 100.
      • onVolumeUpRequestReceived

        void onVolumeUpRequestReceived​(java.lang.String playerId,
                                       int step)
        Sets the media volume by step increments when onVolumeUpRequestReceived(String, int) is called.

        Parameters:
        playerId - Unique identifier for the media player.
        step - Step value is specified as 0 to 100.
      • onVolumeDownRequestReceived

        void onVolumeDownRequestReceived​(java.lang.String playerId,
                                         int step)
      • onSetSubtitleRequestReceived

        void onSetSubtitleRequestReceived​(java.lang.String playerId,
                                          java.lang.String subtitle,
                                          java.lang.String subtitleType)
        Sets the ISO 639-2 language code for the media subtitle when this method is called.
        Parameters:
        playerId - Unique identifier for the media player.
        subtitle - ISO-639-2 language code for the media subtitle.
        subtitleType - Type of subtitle
      • onSetSoundtrackRequestReceived

        void onSetSoundtrackRequestReceived​(java.lang.String playerId,
                                            java.lang.String soundtrack,
                                            java.lang.String soundtrackType)
        Sets the ISO 639-2 language code for the media soundtrack when this method is called.
        Parameters:
        playerId - Unique identifier for the media player.
        soundtrack - ISO-639-2 language code for the media soundtrack
        soundtrackType - Type of the soundtrack