Package com.google.android.exoplayer2

## Interface ExoPlayer.DeviceComponent

- All Known Implementing Classes:
    `SimpleExoPlayer`
  Enclosing interface:
    ExoPlayer

      public static interface ExoPlayer.DeviceComponent

  The device component of an `ExoPlayer`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addDeviceListener​(DeviceListener listener)` | Deprecated. Use `Player.addListener(Listener)`.
    `void` | `decreaseDeviceVolume()` | Decreases the volume of the device.
    `DeviceInfo` | `getDeviceInfo()` | Gets the device information.
    `int` | `getDeviceVolume()` | Gets the current volume of the device.
    `void` | `increaseDeviceVolume()` | Increases the volume of the device.
    `boolean` | `isDeviceMuted()` | Gets whether the device is muted or not.
    `void` | `removeDeviceListener​(DeviceListener listener)` | Deprecated. Use `Player.removeListener(Listener)`.
    `void` | `setDeviceMuted​(boolean muted)` | Sets the mute state of the device.
    `void` | `setDeviceVolume​(int volume)` | Sets the volume of the device.

- - ### Method Detail

    - #### addDeviceListener

          @Deprecated
          void addDeviceListener​(DeviceListener listener)

      Deprecated.
      Use `Player.addListener(Listener)`.
      Adds a listener to receive device events.

    - #### removeDeviceListener

          @Deprecated
          void removeDeviceListener​(DeviceListener listener)

      Deprecated.
      Use `Player.removeListener(Listener)`.
      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 current `stream type`. The stream type is determined by `AudioAttributes.usage` which can be converted to stream type with `Util.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.