mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00
Deprecate ExoPlayer DeviceComponent.
PiperOrigin-RevId: 391499955
This commit is contained in:
parent
2e2e5e9feb
commit
dfb9ac11e9
@ -394,42 +394,39 @@ public interface ExoPlayer extends Player {
|
|||||||
List<Cue> getCurrentCues();
|
List<Cue> getCurrentCues();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The device component of an {@link ExoPlayer}. */
|
/**
|
||||||
|
* @deprecated Use {@link Player} instead, as the {@link DeviceComponent} methods are a part of
|
||||||
|
* the {@link Player} interface.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
interface DeviceComponent {
|
interface DeviceComponent {
|
||||||
|
|
||||||
/** Gets the device information. */
|
/** @deprecated Use {@link Player#getDeviceInfo()} instead. */
|
||||||
|
@Deprecated
|
||||||
DeviceInfo getDeviceInfo();
|
DeviceInfo getDeviceInfo();
|
||||||
|
|
||||||
/**
|
/** @deprecated Use {@link Player#getDeviceVolume()} instead. */
|
||||||
* Gets the current volume of the device.
|
@Deprecated
|
||||||
*
|
|
||||||
* <p>For devices with {@link DeviceInfo#PLAYBACK_TYPE_LOCAL local playback}, the volume
|
|
||||||
* returned by this method varies according to the current {@link C.StreamType stream type}. The
|
|
||||||
* stream type is determined by {@link AudioAttributes#usage} which can be converted to stream
|
|
||||||
* type with {@link Util#getStreamTypeForAudioUsage(int)}.
|
|
||||||
*
|
|
||||||
* <p>For devices with {@link DeviceInfo#PLAYBACK_TYPE_REMOTE remote playback}, the volume of
|
|
||||||
* the remote device is returned.
|
|
||||||
*/
|
|
||||||
int getDeviceVolume();
|
int getDeviceVolume();
|
||||||
|
|
||||||
/** Gets whether the device is muted or not. */
|
/** @deprecated Use {@link Player#isDeviceMuted()} instead. */
|
||||||
|
@Deprecated
|
||||||
boolean isDeviceMuted();
|
boolean isDeviceMuted();
|
||||||
|
|
||||||
/**
|
/** @deprecated Use {@link Player#setDeviceVolume(int)} instead. */
|
||||||
* Sets the volume of the device.
|
@Deprecated
|
||||||
*
|
|
||||||
* @param volume The volume to set.
|
|
||||||
*/
|
|
||||||
void setDeviceVolume(int volume);
|
void setDeviceVolume(int volume);
|
||||||
|
|
||||||
/** Increases the volume of the device. */
|
/** @deprecated Use {@link Player#increaseDeviceVolume()} instead. */
|
||||||
|
@Deprecated
|
||||||
void increaseDeviceVolume();
|
void increaseDeviceVolume();
|
||||||
|
|
||||||
/** Decreases the volume of the device. */
|
/** @deprecated Use {@link Player#decreaseDeviceVolume()} instead. */
|
||||||
|
@Deprecated
|
||||||
void decreaseDeviceVolume();
|
void decreaseDeviceVolume();
|
||||||
|
|
||||||
/** Sets the mute state of the device. */
|
/** @deprecated Use {@link Player#setDeviceMuted(boolean)} instead. */
|
||||||
|
@Deprecated
|
||||||
void setDeviceMuted(boolean muted);
|
void setDeviceMuted(boolean muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user