PlaybackInfo
class PlaybackInfo
kotlin.Any | |
↳ | android.support.v4.media.session.MediaControllerCompat.PlaybackInfo |
Holds information about the way volume is handled for this session.
Summary
Constants | |
---|---|
static Int |
The session uses local playback. |
static Int |
The session uses remote playback. |
Public methods | |
---|---|
Int |
Gets the maximum volume that may be set for this session. |
Int |
Gets the current volume for this session. |
Int |
Gets the stream this is currently controlling volume on. |
Int |
Gets the type of volume handling, either local or remote. |
Int |
Gets the type of volume control that can be used. |
Constants
PLAYBACK_TYPE_REMOTE
static val PLAYBACK_TYPE_REMOTE: Int
The session uses remote playback.
Value: 2
Public methods
getMaxVolume
fun getMaxVolume(): Int
Gets the maximum volume that may be set for this session.
Return | |
---|---|
Int: The maximum allowed volume where this session is playing. |
getCurrentVolume
fun getCurrentVolume(): Int
Gets the current volume for this session.
Return | |
---|---|
Int: The current volume where this session is playing. |
getAudioStream
fun getAudioStream(): Int
Gets the stream this is currently controlling volume on. When the volume type is PlaybackInfo#PLAYBACK_TYPE_REMOTE
this value does not have meaning and should be ignored.
Return | |
---|---|
Int: The stream this session is playing on. |
getPlaybackType
fun getPlaybackType(): Int
Gets the type of volume handling, either local or remote. One of:
Return | |
---|---|
Int: The type of volume handling this session is using. |
getVolumeControl
fun getVolumeControl(): Int
Gets the type of volume control that can be used. One of:
VolumeProviderCompat#VOLUME_CONTROL_ABSOLUTE
VolumeProviderCompat#VOLUME_CONTROL_RELATIVE
VolumeProviderCompat#VOLUME_CONTROL_FIXED
Return | |
---|---|
Int: The type of volume control that may be used with this session. |
Interfaces
Classes
- ParcelableVolumeInfo
- MediaControllerCompat
- MediaControllerCompat.Callback
- MediaControllerCompat.PlaybackInfo
- MediaControllerCompat.TransportControls
- MediaSessionCompat
- MediaSessionCompat.Callback
- MediaSessionCompat.QueueItem
- MediaSessionCompat.Token
- PlaybackStateCompat
- PlaybackStateCompat.Builder
- PlaybackStateCompat.CustomAction
- PlaybackStateCompat.CustomAction.Builder