Last active
December 16, 2015 16:59
-
-
Save amiika/5466949 to your computer and use it in GitHub Desktop.
HTML AUDIO API SUPPORT TEST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
var context; | |
window.addEventListener('load', init, false); | |
function init() { | |
try { | |
audioContext = new AudioContext(); | |
alert('Web Audio API is supported!'); | |
} catch(e) { | |
try { | |
audioContext = new webkitAudioContext(); | |
alert('Web Audio API is supported with webkit!'); | |
} catch(e) { | |
alert('Web Audio API is not supported!'); | |
} | |
} | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment