- TOC
Required services
The API requires declaration of the system audio service:Types Used
Refer to Audio core typesAudioFocusStatus
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Audio Focus Manager allows the creation and destruction of Audio Focus Sessions.
[wants]
[[wants.service]]
id = "com.amazon.audio.control"
AudioFocusStatus/*
returns AudioFocusSession object after promise resolves
*/
const session = AudioFocusManager.createAudioFocusSessionAsync()
.then((session) => {return session;}).catch((error) => console.log(error));
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| sessionObject | AudioFocusSession | Yes | AudioFocusSession object to destroy |
/*
Assume session is an AudioFocusSession object
Detroys session and returns a promise resolving to a AudioFocusStatus type
*/
const status = AudioFocusManager.destroyAudioFocusSessionAsync(session)
.then((status) => {return status;}).catch((error) => console.log(error));
/*
returns default AudioFocusSession object after promise resolves
*/
const session = AudioFocusManager.getDefaultAudioFocusSessionAsync()
.then((session) => {return session;}).catch((error) => console.log(error));
Was this page helpful?
Supported devices
