Interface: AudioSettings
Defined in: types/desktop-engine.d.ts:4351
DesktopEngine.audioSettings (API 9): the sound as the user set it for this item of content in the app, read only. undefined without the audio permission.
The app's volume and mute are above everything the content plays: what's heard is the content's mix, kept to full scale, times volume, and nothing while it's muted. The volumes the content sets in its code (Audio.volume, GainNodes, a Video's volume) only balance its own sounds below that. Both apply from the start, before index.js runs, and change without restarting the content: the values are right from index.js's first line.
The app also mutes content for reasons it isn't told, e.g. while another app plays sound, while an app is full screen or the displays sleep, by the user's playback rules: muted stays false then.
Extends
Properties
muted
readonly muted: boolean;Defined in: types/desktop-engine.d.ts:4356
The user muted it: all content, or this item in its details. Content that plays sound starts muted until the user turns its sound on. While it's muted, e.g. skip loading sounds, or show that it's silent
onchange
onchange: ((this, event) => void) | null;Defined in: types/desktop-engine.d.ts:4360
muted or volume changed
volume
readonly volume: number;Defined in: types/desktop-engine.d.ts:4358
The volume the user set for the item, 0...1; it starts at the manifest's audio.volume, or 1
Methods
addEventListener()
addEventListener<K>(
type,
listener,
options?
): void;Defined in: types/desktop-engine.d.ts:4865
Type Parameters
| Type Parameter |
|---|
K extends "change" |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (this, event) => void |
options? | AddEventListenerOptions |
Returns
void
Inherited from
dispatchEvent()
dispatchEvent(event): boolean;Defined in: types/desktop-engine.d.ts:4868
Returns false when a listener called preventDefault() on a cancelable event
Parameters
| Parameter | Type |
|---|---|
event | Event |
Returns
boolean
Inherited from
removeEventListener()
removeEventListener<K>(type, listener): void;Defined in: types/desktop-engine.d.ts:4866
Type Parameters
| Type Parameter |
|---|
K extends "change" |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (this, event) => void |
Returns
void
