Enum AudioFocusMode
- All Implemented Interfaces:
Serializable,Comparable<AudioFocusMode>
Defines how
PlayerConfig.audioAttributes participate in
Android audio-focus management. Audio attributes are always applied to audio output, regardless
of the selected mode.
The deprecated SdkConsts.AUDIO_ATTRIBUTES_FOCUS_DISABLED takes
precedence over this mode: when it is used as the audio attributes, audio focus is not managed
even if MANAGED is selected.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AudioFocusModeReturns the enum constant of this type with the specified name.static AudioFocusMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MANAGED
The SDK uses the audio attributes to request focus and apply focus changes to playback.Focus is only managed for the audio usages that Android supports for automatic handling, namely
AudioAttributes.USAGE_MEDIA,AudioAttributes.USAGE_GAMEandAudioAttributes.USAGE_UNKNOWN. Other usages are rejected when the configuration is built. -
DISABLED
The audio attributes affect output only; the SDK does not request audio focus.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-