mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
FS-8401 refactor the sinkid function into verto lib
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
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.');
|
||||
}
|
||||
}
|
@@ -96,7 +96,6 @@
|
||||
<script type="text/javascript" src="js/3rd-party/getScreenId.js"></script>
|
||||
<script type="text/javascript" src="js/3rd-party/md5.min.js"></script>
|
||||
<script type="text/javascript" src="js/3rd-party/volume-meter.js"></script>
|
||||
<script type="text/javascript" src="js/3rd-party/attachSinkId.js"></script>
|
||||
|
||||
<script type="text/javascript" src="src/vertoApp/vertoApp.module.js"></script>
|
||||
|
||||
|
@@ -36,7 +36,10 @@
|
||||
});
|
||||
|
||||
$rootScope.$on('changedSpeaker', function(event, speakerId) {
|
||||
attachSinkId(myVideo, speakerId);
|
||||
// This should provide feedback
|
||||
//setAudioPlaybackDevice(<id>[,<callback>[,<callback arg>]]);
|
||||
// if callback is set it will be called as callback(<bool success/fail>, <device name>, <arg if you supplied it>)
|
||||
verto.data.call.setAudioPlaybackDevice(speakerId);
|
||||
});
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user