public final class

MediaController.PlaybackInfo

extends java.lang.Object

implements VersionedParcelable

 java.lang.Object

↳androidx.media2.session.MediaController.PlaybackInfo

Overview

Holds information about 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()

Gets the audio attributes for this session.

public intgetControlType()

Gets the type of volume control that can be used.

public intgetCurrentVolume()

Gets the current volume for this session.

public intgetMaxVolume()

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

public intgetPlaybackType()

Gets 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()

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

Returns:

the type of playback this session is using

public AudioAttributesCompat getAudioAttributes()

Gets 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()

Gets 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()

Gets 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()

Gets 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)