Package com.castlabs.android.player

# Class AudioCapabilitiesManager

java.lang.Object
com.castlabs.android.player.AudioCapabilitiesManager

All Implemented Interfaces:
  `com.google.android.exoplayer2.audio.AudioCapabilitiesReceiver.Listener`

public class AudioCapabilitiesManager extends Object implements com.google.android.exoplayer2.audio.AudioCapabilitiesReceiver.Listener
Common access point to store and keep updated device audio capabilities. Especially useful for Android TV or Nexus Player where HDMI capabilities from one TV to another may change using the same player.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.google.android.exoplayer2.audio.AudioCapabilities`
  `getAudioCapabilities()`
  Returns the current audio capabilities of the device.
  `static AudioCapabilitiesManager`
  `getInstance(Context context)`
  Returns the singleton instance of the AudioCapabilitiesManager.
  `void`
  `onAudioCapabilitiesChanged(com.google.android.exoplayer2.audio.AudioCapabilities audioCapabilities)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static AudioCapabilitiesManager getInstance(Context context)
    Returns the singleton instance of the AudioCapabilitiesManager.
    Parameters:
      `context` - The context to use.
    Returns:
      The singleton instance of the AudioCapabilitiesManager.

  - ### getAudioCapabilities

    public com.google.android.exoplayer2.audio.AudioCapabilities getAudioCapabilities()
    Returns the current audio capabilities of the device.
    Returns:
      The current audio capabilities.

  - ### onAudioCapabilitiesChanged

    public void onAudioCapabilitiesChanged(com.google.android.exoplayer2.audio.AudioCapabilities audioCapabilities)
    Specified by:
      `onAudioCapabilitiesChanged` in interface `com.google.android.exoplayer2.audio.AudioCapabilitiesReceiver.Listener`