From 04303d8eecc750fadc475a09c4984e0d41511d8e Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 27 Apr 2015 11:45:50 -0700 Subject: [PATCH] GUAC-1170: Use AudioContext if available, in favor of webkitAudioContext. --- .../src/main/webapp/modules/AudioChannel.js | 9 +++++++-- 1 file changed, 7 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 3eb1dca86..cd8cae83d 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioChannel.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioChannel.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Glyptodon LLC + * Copyright (C) 2015 Glyptodon LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -70,7 +70,12 @@ Guacamole.AudioChannel = function() { }; // Define context if available -if (window.webkitAudioContext) { +if (window.AudioContext) { + Guacamole.AudioChannel.context = new AudioContext(); +} + +// Fallback to Webkit-specific AudioContext implementation +else if (window.webkitAudioContext) { Guacamole.AudioChannel.context = new webkitAudioContext(); }