Required services
The API requires declaration of the system audio service:Types Used
Refer to Audio core typesAudioFocusAttributesAudioFocusStatusAudioFocusChange
Methods
requestAudioFocusAsync(attr)
Description
Requests audio focus in the session with the selected audio usage type.Return Value
Returns a promise resolving to a AudioFocusStatus type.Parameters
Example code
releaseAudioFocusAsync()
Description
Releases audio focus in the session.Return Value
Returns a promise resolving to aAudioFocusStatus type.

