FS-8401 refactor the sinkid function into verto lib

This commit is contained in:
Anthony Minessale
2015-11-18 14:43:29 -06:00
parent fb8d4a2b99
commit ae05a19edf
6 changed files with 59 additions and 52 deletions

View File

@@ -234,33 +234,6 @@ function do_speed_test(fn)
});
}
// Attach audio output device to video element using device/sink ID.
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);
// Jump back to first output device in the list as it's the default.
//audioOutputSelect.selectedIndex = 0;
});
} else {
console.warn('Browser does not support output device selection.');
}
}
function messageTextToJQ(body) {
// Builds a jQuery collection from body text, linkifies http/https links, imageifies http/https links to images, and doesn't allow script injection