Merge pull request #190 from stephenryoungster/master
GUAC-1212: Add try/catch block to creation of AudioContext
This commit is contained in:
commit
7293dab3e1
1 file changed
+4
-2
@@ -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){}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user