Handling device change
Web SDK update an audio source during a live stream.
You can update an audio source during a live stream by using the updateAudioDevice
method. This method allows you to change devices mid-stream, such as changing laptop microphone to the headset microphone, without stopping or closing the connection. Under normal circumstances, this would access the audioStream
object from your StreamingAPIConnection instance.
connection.audioStream.updateAudioDevice(deviceId);
Check out the SDK Reference for more information about updateAudioDevice
Disable device change handling
You can disable device change handling for the Symbl class. If you set the symblConfig
flag disableOnDeviceChange=true
, any device change handling is disabled.
For example:
const symbl = new Symbl({
appId,
appSecret,
disableOnDeviceChange: true
});
For source code, see Release Web SDK v1.0.7 | github.com.
Override default device change method.
You can override the default device change method to accept a function as a parameter. Use the audioStream.setOnDeviceChange
method, and specify a function as a parameter. This overrides our default ondevicechange
logic.
For source code, see Release Web SDK v1.0.6 | github.com.
Updated almost 2 years ago