From f08dbacdb2d052a0c8093c11ec477b877cd3bc6b Mon Sep 17 00:00:00 2001 From: Stephen Young Date: Tue, 26 May 2015 13:49:09 -0600 Subject: [PATCH] GUAC-1212: Add try/catch block to creation of AudioContext --- guacamole-common-js/src/main/webapp/modules/AudioChannel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/AudioChannel.js b/guacamole-common-js/src/main/webapp/modules/AudioChannel.js index cd8cae83d..a18060636 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioChannel.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioChannel.js @@ -71,12 +71,14 @@ Guacamole.AudioChannel = function() { // Define context if available if (window.AudioContext) { - Guacamole.AudioChannel.context = new AudioContext(); + try {Guacamole.AudioChannel.context = new AudioContext();} + catch (e){} } // Fallback to Webkit-specific AudioContext implementation else if (window.webkitAudioContext) { - Guacamole.AudioChannel.context = new webkitAudioContext(); + try {Guacamole.AudioChannel.context = new webkitAudioContext();} + catch (e){} } /**