mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
FS-8401 [verto_communicator] - Added Speaker selection in settings modal and video page.
This commit is contained in:
18
html5/verto/verto_communicator/js/3rd-party/attachSinkId.js
vendored
Normal file
18
html5/verto/verto_communicator/js/3rd-party/attachSinkId.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
function attachSinkId(element, sinkId) {
|
||||
if (typeof element.sinkId !== 'undefined') {
|
||||
element.setSinkId(sinkId)
|
||||
.then(function() {
|
||||
console.log('Success, audio output device attached:', sinkId);
|
||||
})
|
||||
.catch(function(error) {
|
||||
var errorMessage = error;
|
||||
if (error.name === 'SecurityError') {
|
||||
errorMessage = 'You need to use HTTPS for selecting audio output ' +
|
||||
'device: ' + error;
|
||||
}
|
||||
console.error(errorMessage);
|
||||
});
|
||||
} else {
|
||||
console.warn('Browser does not support output device selection.');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user