Merge pull request #190 from stephenryoungster/master

GUAC-1212: Add try/catch block to creation of AudioContext
This commit is contained in:
Mike Jumper
2015-07-08 10:53:19 -07:00

View File

@@ -71,12 +71,14 @@ Guacamole.AudioChannel = function() {
// Define context if available // Define context if available
if (window.AudioContext) { if (window.AudioContext) {
Guacamole.AudioChannel.context = new AudioContext(); try {Guacamole.AudioChannel.context = new AudioContext();}
catch (e){}
} }
// Fallback to Webkit-specific AudioContext implementation // Fallback to Webkit-specific AudioContext implementation
else if (window.webkitAudioContext) { else if (window.webkitAudioContext) {
Guacamole.AudioChannel.context = new webkitAudioContext(); try {Guacamole.AudioChannel.context = new webkitAudioContext();}
catch (e){}
} }
/** /**