# MediaControllerCompat.PlaybackInfo

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-media-compat:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v4-media-session/MediaControllerCompat.PlaybackInfo#constants)\|[Methods](https://developer.android.com/reference/android/support/v4-media-session/MediaControllerCompat.PlaybackInfo#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4-media-session/MediaControllerCompat.PlaybackInfo#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4-media-session/MediaControllerCompat.PlaybackInfo#)  

# MediaControllerCompat.PlaybackInfo

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static
final

class
MediaControllerCompat.PlaybackInfo
`  
`

extends Object


``


`

|---|---------------------------------------------------------------------|
| java.lang.Object                                                       ||
| ↳ | android.support.v4.media.session.MediaControllerCompat.PlaybackInfo |

<br />

*** ** * ** ***

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

## Summary

|                                                                                           ### Constants                                                                                           ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [PLAYBACK_TYPE_LOCAL](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#PLAYBACK_TYPE_LOCAL) The session uses local playback.    |
| `int` | [PLAYBACK_TYPE_REMOTE](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#PLAYBACK_TYPE_REMOTE) The session uses remote playback. |

|                                                                                                     ### Public methods                                                                                                     ||
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int` | ` `[getAudioStream](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#getAudioStream())`() ` Gets the stream this is currently controlling volume on.    |
| ` int` | ` `[getCurrentVolume](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#getCurrentVolume())`() ` Gets the current volume for this session.               |
| ` int` | ` `[getMaxVolume](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#getMaxVolume())`() ` Gets the maximum volume that may be set for this session.       |
| ` int` | ` `[getPlaybackType](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#getPlaybackType())`() ` Gets the type of volume handling, either local or remote. |
| ` int` | ` `[getVolumeControl](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#getVolumeControl())`() ` Gets the type of volume control that can be used.       |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4-media-session/MediaControllerCompat.PlaybackInfo#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### PLAYBACK_TYPE_LOCAL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PLAYBACK_TYPE_LOCAL
```

The session uses local playback.

<br />

Constant Value: 1 (0x00000001)  

### PLAYBACK_TYPE_REMOTE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PLAYBACK_TYPE_REMOTE
```

The session uses remote playback.

<br />

Constant Value: 2 (0x00000002)

## Public methods

### getAudioStream

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getAudioStream ()
```

Gets the stream this is currently controlling volume on. When the volume type is[PLAYBACK_TYPE_REMOTE](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#PLAYBACK_TYPE_REMOTE)this value does not have meaning and should be ignored.

<br />

|                       Returns                        ||
|-------|-----------------------------------------------|
| `int` | The stream this session is playing on. <br /> |

### getCurrentVolume

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getCurrentVolume ()
```

Gets the current volume for this session.

<br />

|                             Returns                             ||
|-------|----------------------------------------------------------|
| `int` | The current volume where this session is playing. <br /> |

### getMaxVolume

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getMaxVolume ()
```

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

<br />

|                                 Returns                                 ||
|-------|------------------------------------------------------------------|
| `int` | The maximum allowed volume where this session is playing. <br /> |

### getPlaybackType

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getPlaybackType ()
```

Gets the type of volume handling, either local or remote. One of:

- [PLAYBACK_TYPE_LOCAL](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#PLAYBACK_TYPE_LOCAL)
- [PLAYBACK_TYPE_REMOTE](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo#PLAYBACK_TYPE_REMOTE)

<br />

<br />

|                             Returns                              ||
|-------|-----------------------------------------------------------|
| `int` | The type of volume handling this session is using. <br /> |

### getVolumeControl

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getVolumeControl ()
```

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

- [VOLUME_CONTROL_ABSOLUTE](https://developer.android.com/reference/android/support/v4/media/VolumeProviderCompat#VOLUME_CONTROL_ABSOLUTE)
- [VOLUME_CONTROL_RELATIVE](https://developer.android.com/reference/android/support/v4/media/VolumeProviderCompat#VOLUME_CONTROL_RELATIVE)
- [VOLUME_CONTROL_FIXED](https://developer.android.com/reference/android/support/v4/media/VolumeProviderCompat#VOLUME_CONTROL_FIXED)

<br />

<br />

|                                   Returns                                    ||
|-------|-----------------------------------------------------------------------|
| `int` | The type of volume control that may be used with this session. <br /> |

-

  ## Interfaces

  - [MediaSessionCompat.OnActiveChangeListener](https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.OnActiveChangeListener)
-

  ## Classes

  - [MediaButtonReceiver](https://developer.android.com/reference/android/support/v4/media/session/MediaButtonReceiver)
  - [MediaControllerCompat](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat)
  - [MediaControllerCompat.Callback](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.Callback)
  - [MediaControllerCompat.PlaybackInfo](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.PlaybackInfo)
  - [MediaControllerCompat.TransportControls](https://developer.android.com/reference/android/support/v4/media/session/MediaControllerCompat.TransportControls)
  - [MediaSessionCompat](https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat)
  - [MediaSessionCompat.Callback](https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Callback)
  - [MediaSessionCompat.QueueItem](https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.QueueItem)
  - [MediaSessionCompat.Token](https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token)
  - [ParcelableVolumeInfo](https://developer.android.com/reference/android/support/v4/media/session/ParcelableVolumeInfo)
  - [PlaybackStateCompat](https://developer.android.com/reference/android/support/v4/media/session/PlaybackStateCompat)
  - [PlaybackStateCompat.Builder](https://developer.android.com/reference/android/support/v4/media/session/PlaybackStateCompat.Builder)
  - [PlaybackStateCompat.CustomAction](https://developer.android.com/reference/android/support/v4/media/session/PlaybackStateCompat.CustomAction)
  - [PlaybackStateCompat.CustomAction.Builder](https://developer.android.com/reference/android/support/v4/media/session/PlaybackStateCompat.CustomAction.Builder)