mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1212: Add try/catch block to creation of AudioContext
This commit is contained in:
@@ -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){}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user