Callback
open class Callback : SessionPlayer.PlayerCallback
kotlin.Any | ||
↳ | androidx.media2.common.SessionPlayer.PlayerCallback | |
↳ | androidx.media2.session.RemoteSessionPlayer.Callback |
A callback class to receive notifications for events on the remote session player. See registerPlayerCallback(Executor, PlayerCallback)
to register this callback.
This is registered by MediaSession
to notify volume changes to the MediaController
.
Summary
Public constructors |
|
---|---|
<init>() A callback class to receive notifications for events on the remote session player. |
Public methods |
|
---|---|
open Unit |
onVolumeChanged(@NonNull player: RemoteSessionPlayer, volume: Int) Called to indicate that the volume has changed. |
Inherited functions |
|
---|---|
Public constructors
<init>
Callback()
A callback class to receive notifications for events on the remote session player. See registerPlayerCallback(Executor, PlayerCallback)
to register this callback.
This is registered by MediaSession
to notify volume changes to the MediaController
.
Public methods
onVolumeChanged
open fun onVolumeChanged(@NonNull player: RemoteSessionPlayer, volume: Int): Unit
Called to indicate that the volume has changed.
Parameters | |
---|---|
player |
RemoteSessionPlayer: the player that has changed volume. |
volume |
RemoteSessionPlayer: the new volume |
See Also