RemoteSessionPlayer

public abstract class RemoteSessionPlayer
extends SessionPlayer

java.lang.Object
   ↳ androidx.media2.common.SessionPlayer
     ↳ androidx.media2.session.RemoteSessionPlayer


Base interface for all remote media players that want media session and playback happens on the remote device through MediaRouter.

If you use this to the MediaSession, session would dispatch incoming volume change event to the player instead of changing device stream volume.

Summary

Nested classes

class RemoteSessionPlayer.Callback

A callback class to receive notifications for events on the remote session player. 

Constants

int VOLUME_CONTROL_ABSOLUTE

The volume control uses an absolute value.

int VOLUME_CONTROL_FIXED

The volume is fixed and can not be modified.

int VOLUME_CONTROL_RELATIVE

The volume control uses relative adjustment via adjustVolume(int).

Inherited constants

Public constructors

RemoteSessionPlayer()

Public methods

abstract Future<SessionPlayer.PlayerResult> adjustVolume(int direction)

Adjusts player volume with the direction.

abstract int getMaxVolume()

Gets the maximum volume that can be used in setVolume(int).

abstract int getVolume()

Gets the current volume of this player to this player.

abstract int getVolumeControlType()

Gets the volume type.

abstract Future<SessionPlayer.PlayerResult> setVolume(int volume)

Sets the volume of the audio of the media to play, expressed as a linear multiplier on the audio samples.

Inherited methods