GUAC-1170: Use AudioContext if available, in favor of webkitAudioContext.

This commit is contained in:
Michael Jumper
2015-04-27 11:45:50 -07:00
parent fa69246668
commit 04303d8eec

View File

@@ -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();
}