public final class

MediaController.PlaybackInfo

extends java.lang.Object

implements VersionedParcelable

 java.lang.Object

↳androidx.media2.MediaController.PlaybackInfo

Overview

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

Summary

Fields
public static final intPLAYBACK_TYPE_LOCAL

The session uses local playback.

public static final intPLAYBACK_TYPE_REMOTE

The session uses remote playback.

Methods
public booleanequals(java.lang.Object obj)

public AudioAttributesCompatgetAudioAttributes()

Get the audio attributes for this session.

public intgetControlType()

Get the type of volume control that can be used.

public intgetCurrentVolume()

Get the current volume for this session.

public intgetMaxVolume()

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

public intgetPlaybackType()

Get the type of playback which affects volume handling.

public inthashCode()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int PLAYBACK_TYPE_LOCAL

The session uses local playback.

public static final int PLAYBACK_TYPE_REMOTE

The session uses remote playback.

Methods

public int getPlaybackType()

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

Returns:

The type of playback this session is using

public AudioAttributesCompat getAudioAttributes()

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

Returns:

The attributes for this session

public int getControlType()

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

Returns:

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

public int getMaxVolume()

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

This is only meaningful when the playback type is MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE.

Returns:

The maximum allowed volume where this session is playing

public int getCurrentVolume()

Get the current volume for this session.

This is only meaningful when the playback type is MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE.

Returns:

The current volume where this session is playing

public int hashCode()

public boolean equals(java.lang.Object obj)