Last active
December 16, 2015 16:59
-
-
Save amiika/5467098 to your computer and use it in GitHub Desktop.
MIDI 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> | |
window.addEventListener('load', init, false); | |
function init() { | |
function onMIDISuccess( midiAccess ) { | |
alert( "MIDI ready!" ); | |
} | |
function onMIDIFailure(msg) { | |
alert( "Failed to get MIDI access - " + msg ); | |
} | |
try { | |
navigator.getMIDIAccess( onMIDISuccess, onMIDIFailure ); | |
alert('MIDI API is supported!'); | |
} | |
catch(e) { | |
alert('MIDI API is not supported in this browser'); | |
} | |
} | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment