Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MSEdge
Created June 18, 2015 17:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MSEdge/b260e76373b789c9f6dc to your computer and use it in GitHub Desktop.
Save MSEdge/b260e76373b789c9f6dc to your computer and use it in GitHub Desktop.
audioContext.js
var isAudioContextSupported = function () {
// This feature is still prefixed in Safari
window.AudioContext = window.AudioContext || window.webkitAudioContext;
if(window.AudioContext){
return true;
}
else {
return false;
}
};
var audioContext;
if(isAudioContextSupported()) {
audioContext = new window.AudioContext();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment