Back to Exoplayer

DeviceInfo (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/DeviceInfo.html

latest7.8 KB
Original Source

Package com.google.android.exoplayer2

Class DeviceInfo

  • java.lang.Object

    • com.google.android.exoplayer2.DeviceInfo
  • All Implemented Interfaces:Bundleable


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDeviceInfoextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Information about the playback device.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | DeviceInfo.Builder | Deprecated.

Builder for DeviceInfo. | | static interface | DeviceInfo.PlaybackType | Deprecated.

Types of playback. |

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable

Bundleable.Creator<T extends Bundleable>

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static Bundleable.Creator<DeviceInfo> | CREATOR | Deprecated.

Object that can restore DeviceInfo from a Bundle. | | int | maxVolume | Deprecated.

The maximum volume that the device supports, or 0 if unspecified. | | int | minVolume | Deprecated.

The minimum volume that the device supports. | | static int | PLAYBACK_TYPE_LOCAL | Deprecated.

Playback happens on the local device (e.g. | | static int | PLAYBACK_TYPE_REMOTE | Deprecated.

Playback happens outside of the device (e.g. | | @com.google.android.exoplayer2.DeviceInfo.PlaybackType int | playbackType | Deprecated.

The type of playback. | | String | routingControllerId | Deprecated.

The routing controller id of the associated MediaRouter2.RoutingController, or null if unset or playbackType is PLAYBACK_TYPE_LOCAL. | | static DeviceInfo | UNKNOWN | Deprecated.

Unknown DeviceInfo. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | DeviceInfo​(@com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType, int minVolume, int maxVolume) | Deprecated. Use DeviceInfo.Builder instead.

|

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | equals​(Object obj) | Deprecated. | | int | hashCode() | Deprecated. | | Bundle | toBundle() | Deprecated.

Returns a Bundle representing the information stored in this object. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

PLAYBACK_TYPE_LOCAL

public static final int PLAYBACK_TYPE_LOCAL

Deprecated.

Playback happens on the local device (e.g. phone). See Also:Constant Field Values

- 

PLAYBACK_TYPE_REMOTE

public static final int PLAYBACK_TYPE_REMOTE

Deprecated.

Playback happens outside of the device (e.g. a cast device). See Also:Constant Field Values

- 

UNKNOWN

public static final[DeviceInfo](DeviceInfo.html "class in com.google.android.exoplayer2")UNKNOWN

Deprecated.

Unknown DeviceInfo.

- 

playbackType

public final @com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType

Deprecated.

The type of playback.

- 

minVolume

@IntRange(from=0L)
public final int minVolume

Deprecated.

The minimum volume that the device supports.

- 

maxVolume

@IntRange(from=0L)
public final int maxVolume

Deprecated.

The maximum volume that the device supports, or 0 if unspecified.

- 

routingControllerId

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")routingControllerId

Deprecated.

The routing controller id of the associated MediaRouter2.RoutingController, or null if unset or playbackType is PLAYBACK_TYPE_LOCAL.

This id allows mapping this device information to a routing controller, which provides information about the media route and allows controlling its volume.

- 

CREATOR

public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[DeviceInfo](DeviceInfo.html "class in com.google.android.exoplayer2")> CREATOR

Deprecated.

Object that can restore DeviceInfo from a Bundle.

Constructor Detail

- 

DeviceInfo

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public DeviceInfo​(@com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType,
                  @IntRange(from=0L)
                  int minVolume,
                  @IntRange(from=0L)
                  int maxVolume)

Deprecated. Use DeviceInfo.Builder instead.

Method Detail

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Deprecated. Overrides:equals in class Object

- 

hashCode

public int hashCode()

Deprecated. Overrides:hashCode in class Object

- 

toBundle

public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()

Deprecated.

Description copied from interface: Bundleable

Returns a Bundle representing the information stored in this object. Specified by:toBundle in interface Bundleable