File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -309,9 +309,9 @@ MIDI.Player = MIDI.Player || {};
309309 api = hash . substr ( 1 ) ;
310310 } else if ( supports . webmidi ) {
311311 api = 'webmidi' ;
312- } else if ( window . AudioContext ) { // Chrome
312+ } else if ( window . AudioContext || window . webkitAudioContext ) {
313313 api = 'webaudio' ;
314- } else if ( window . Audio ) { // Firefox
314+ } else if ( window . Audio ) {
315315 api = 'audiotag' ;
316316 }
317317
@@ -995,7 +995,7 @@ var stopAudio = function() {
995995
996996( function ( root ) { 'use strict' ;
997997
998- window . AudioContext && ( function ( ) {
998+ ( window . AudioContext || window . webkitAudioContext ) && ( function ( ) {
999999 var audioContext = null ; // new AudioContext();
10001000 var useStreamingBuffer = false ; // !!audioContext.createMediaElementSource;
10011001 var midi = root . WebAudio = { api : 'webaudio' } ;
@@ -1385,9 +1385,9 @@ var stopAudio = function() {
13851385 midi . connect = function ( opts ) {
13861386 root . setDefaultPlugin ( midi ) ;
13871387 var errFunction = function ( err ) { // well at least we tried!
1388- if ( window . AudioContext ) { // Chrome
1388+ if ( window . AudioContext || window . webkitAudioContext ) {
13891389 opts . api = 'webaudio' ;
1390- } else if ( window . Audio ) { // Firefox
1390+ } else if ( window . Audio ) {
13911391 opts . api = 'audiotag' ;
13921392 } else { // no support
13931393 return ;
You can’t perform that action at this time.
0 commit comments