AudioFocus Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public enum AudioFocus
type AudioFocus =
- Inheritance
-
AudioFocus
Fields
| Name | Value | Description |
|---|---|---|
| LossTransientCanDuck | -3 | Used to indicate a transient loss of audio focus where the loser of the audio focus can lower its output volume if it wants to continue playing (also referred to as "ducking"), as the new focus owner doesn't require others to be silent. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| LossTransient | -2 | Used to indicate a transient loss of audio focus. |
| Loss | -1 | Used to indicate a loss of audio focus of unknown duration. |
| None | 0 | Used to indicate no audio focus has been gained or lost, or requested. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| Gain | 1 | Used to indicate a gain of audio focus, or a request of audio focus, of unknown duration. |
| GainTransient | 2 | Used to indicate a temporary gain or request of audio focus, anticipated to last a short amount of time. |
| GainTransientMayDuck | 3 | Used to indicate a temporary request of audio focus, anticipated to last a short amount of time, and where it is acceptable for other audio applications to keep playing after having lowered their output level (also referred to as "ducking"). Examples of temporary changes are the playback of driving directions where playback of music in the background is acceptable. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| GainTransientExclusive | 4 | Used to indicate a temporary request of audio focus, anticipated to last a short amount of time, during which no other applications, or system components, should play anything. Examples of exclusive and transient audio focus requests are voice memo recording and speech recognition, during which the system shouldn't play any notifications, and media playback should have paused. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.