MediaController.PlaybackInfo

Added in 1.0.0
Deprecated in 1.3.0

class MediaController.PlaybackInfo : VersionedParcelable


Holds information about the way volume is handled for this session.

Summary

Constants

const Int

The session uses local playback.

const Int

The session uses remote playback.

Public functions

Boolean
equals(obj: Any?)
AudioAttributesCompat?

Gets the audio attributes for this session.

Int

Gets the type of volume control that can be used.

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 playback which affects volume handling.

Int

Constants

PLAYBACK_TYPE_LOCAL

Added in 1.0.0
Deprecated in 1.3.0
const val PLAYBACK_TYPE_LOCAL = 1: Int

The session uses local playback.

PLAYBACK_TYPE_REMOTE

Added in 1.0.0
Deprecated in 1.3.0
const val PLAYBACK_TYPE_REMOTE = 2: Int

The session uses remote playback.

Public functions

equals

fun equals(obj: Any?): Boolean

getAudioAttributes

Added in 1.0.0
Deprecated in 1.3.0
fun getAudioAttributes(): AudioAttributesCompat?

Gets the audio attributes for this session. The attributes will affect volume handling for the session. When the volume type is PLAYBACK_TYPE_REMOTE these may be ignored by the remote volume handler.

Returns
AudioAttributesCompat?

the attributes for this session

getControlType

Added in 1.0.0
Deprecated in 1.3.0
fun getControlType(): Int

Gets the type of volume control that can be used. One of:

Returns
Int

the type of volume control that may be used with this session

getCurrentVolume

Added in 1.0.0
Deprecated in 1.3.0
fun getCurrentVolume(): Int

Gets the current volume for this session.

This is only meaningful when the playback type is PLAYBACK_TYPE_REMOTE.

Returns
Int

the current volume where this session is playing

getMaxVolume

Added in 1.0.0
Deprecated in 1.3.0
fun getMaxVolume(): Int

Gets the maximum volume that may be set for this session.

This is only meaningful when the playback type is PLAYBACK_TYPE_REMOTE.

Returns
Int

the maximum allowed volume where this session is playing

getPlaybackType

Added in 1.0.0
Deprecated in 1.3.0
fun getPlaybackType(): Int

Gets the type of playback which affects volume handling. One of:

Returns
Int

the type of playback this session is using

hashCode

fun hashCode(): Int