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 |
|
---|---|
AudioAttributesCompat |
Get the audio attributes for this session. |
Int |
Gets the stream this is currently controlling volume on. |
Int |
Gets the current volume for this session. |
Int |
Gets the maximum volume that may be set for this session. |
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
getAudioAttributes
@NonNull fun getAudioAttributes(): AudioAttributesCompat
Get the audio attributes for this session. The attributes will affect volume handling for the session. When the volume type is PlaybackInfo#PLAYBACK_TYPE_REMOTE
these may be ignored by the remote volume handler.
Return | |
---|---|
AudioAttributesCompat: The attributes for this session. |
getAudioStream
fungetAudioStream(): Int
Deprecated: Use PlaybackInfo#getAudioAttributes()
instead.
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. |
getCurrentVolume
fun getCurrentVolume(): Int
Gets the current volume for this session.
Return | |
---|---|
Int: The current volume where this session is playing. |
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. |
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. |