Package com.google.android.exoplayer2
Interface ExoPlayer.DeviceComponent
-
- All Known Implementing Classes:
SimpleExoPlayer
- Enclosing interface:
- ExoPlayer
public static interface ExoPlayer.DeviceComponentThe device component of anExoPlayer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddDeviceListener(DeviceListener listener)Deprecated.voiddecreaseDeviceVolume()Decreases the volume of the device.DeviceInfogetDeviceInfo()Gets the device information.intgetDeviceVolume()Gets the current volume of the device.voidincreaseDeviceVolume()Increases the volume of the device.booleanisDeviceMuted()Gets whether the device is muted or not.voidremoveDeviceListener(DeviceListener listener)Deprecated.voidsetDeviceMuted(boolean muted)Sets the mute state of the device.voidsetDeviceVolume(int volume)Sets the volume of the device.
-
-
-
Method Detail
-
addDeviceListener
@Deprecated void addDeviceListener(DeviceListener listener)
Deprecated.Adds a listener to receive device events.
-
removeDeviceListener
@Deprecated void removeDeviceListener(DeviceListener listener)
Deprecated.Removes a listener of device events.
-
getDeviceInfo
DeviceInfo getDeviceInfo()
Gets the device information.
-
getDeviceVolume
int getDeviceVolume()
Gets the current volume of the device.For devices with
local playback, the volume returned by this method varies according to the currentstream type. The stream type is determined byAudioAttributes.usagewhich can be converted to stream type withUtil.getStreamTypeForAudioUsage(int).For devices with
remote playback, the volume of the remote device is returned.
-
isDeviceMuted
boolean isDeviceMuted()
Gets whether the device is muted or not.
-
setDeviceVolume
void setDeviceVolume(int volume)
Sets the volume of the device.- Parameters:
volume- The volume to set.
-
increaseDeviceVolume
void increaseDeviceVolume()
Increases the volume of the device.
-
decreaseDeviceVolume
void decreaseDeviceVolume()
Decreases the volume of the device.
-
setDeviceMuted
void setDeviceMuted(boolean muted)
Sets the mute state of the device.
-
-