mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-882: Wrap calls to new Audio() within try/catch.
This commit is contained in:
@@ -187,7 +187,18 @@ GuacUI.Audio = new (function() {
|
||||
// Build array of supported audio formats
|
||||
codecs.forEach(function(mimetype) {
|
||||
|
||||
var audio = new Audio();
|
||||
// Attempt to get audio element for mimetype testing
|
||||
var audio = null;
|
||||
try {
|
||||
audio = new Audio();
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
// Skip testing if audio is not available
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
var support_level = audio.canPlayType(mimetype);
|
||||
|
||||
// Trim semicolon and trailer
|
||||
|
Reference in New Issue
Block a user