Tutorial: Work with audio outputs

Work with audio outputs

Get all available instances in the system:

console.log('audio outputs:', stbAudioManager.list);

Use the first available audio output:

var audio = stbAudioManager.list[0];

console.log('first audio output:', audio);

Audio output configuration:

audio.mute = false;
audio.volume = 100;

Establish connection between some audio source (player) and the given audio output:

audio.add(stbPlayerManager.list[1]);

Destroy the established connection:

audio.remove(stbPlayerManager.list[0]);

Get all audio sources linked to this audio output:

console.log('all audio sources linked to this audio output:', audio.list);

Remove all connected audio sources:

audio.clear();