public class

RemoteSessionPlayer.Callback

extends SessionPlayer.PlayerCallback

 java.lang.Object

androidx.media2.common.SessionPlayer.PlayerCallback

↳androidx.media2.session.RemoteSessionPlayer.Callback

Overview

A callback class to receive notifications for events on the remote session player. See SessionPlayer.registerPlayerCallback(Executor, SessionPlayer.PlayerCallback) to register this callback.

This is registered by MediaSession to notify volume changes to the MediaController.

Summary

Constructors
publicCallback()

Methods
public voidonVolumeChanged(RemoteSessionPlayer player, int volume)

Called to indicate that the volume has changed.

from SessionPlayer.PlayerCallbackonAudioAttributesChanged, onBufferingStateChanged, onCurrentMediaItemChanged, onPlaybackCompleted, onPlaybackSpeedChanged, onPlayerStateChanged, onPlaylistChanged, onPlaylistMetadataChanged, onRepeatModeChanged, onSeekCompleted, onShuffleModeChanged, onSubtitleData, onTrackDeselected, onTracksChanged, onTrackSelected, onVideoSizeChanged
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Callback()

Methods

public void onVolumeChanged(RemoteSessionPlayer player, int volume)

Called to indicate that the volume has changed.

Parameters:

player: the player that has changed volume.
volume: the new volume

See also: RemoteSessionPlayer.setVolume(int)