fix bug in fallback
parent
41f90e8bb1
commit
d189452640
|
@ -38,7 +38,7 @@ MIDI.loadPlugin = function(conf) {
|
|||
// use the most appropriate plugin if not specified
|
||||
if (apis[conf.api]) {
|
||||
api = conf.api;
|
||||
} else if (apis[window.location.hash]) {
|
||||
} else if (apis[window.location.hash.substr(1)]) {
|
||||
api = window.location.hash.substr(1);
|
||||
} else if (navigator.requestMIDIAccess) {
|
||||
api = "webmidi";
|
||||
|
@ -148,10 +148,10 @@ connect.webaudio = function(filetype, instruments, conf) {
|
|||
/// Helpers
|
||||
|
||||
var apis = {
|
||||
"#webmidi": true,
|
||||
"#webaudio": true,
|
||||
"#audiotag": true,
|
||||
"#flash": true
|
||||
"webmidi": true,
|
||||
"webaudio": true,
|
||||
"audiotag": true,
|
||||
"flash": true
|
||||
};
|
||||
|
||||
var getPercent = function(event) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
--------------------------------------------
|
||||
MIDI.Plugin : 0.3.2 : 2013/01/24
|
||||
MIDI.Plugin : 0.3.2 : 2013/01/26
|
||||
--------------------------------------------
|
||||
https://github.com/mudcube/MIDI.js
|
||||
--------------------------------------------
|
||||
|
@ -8,10 +8,10 @@
|
|||
http://docs.oracle.com/javase/6/docs/api/javax/sound/midi/package-summary.html
|
||||
--------------------------------------------
|
||||
Technologies:
|
||||
MIDI.WebMIDIAPI
|
||||
MIDI.WebAudioAPI
|
||||
MIDI.WebMIDI
|
||||
MIDI.WebAudio
|
||||
MIDI.Flash
|
||||
MIDI.HTML5
|
||||
MIDI.AudioTag
|
||||
--------------------------------------------
|
||||
Helpers:
|
||||
MIDI.GeneralMIDI
|
||||
|
@ -126,7 +126,7 @@ var setPlugin = function(root) {
|
|||
if (window.AudioContext || window.webkitAudioContext) (function () {
|
||||
|
||||
var AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||
var root = MIDI.WebAudioAPI = {
|
||||
var root = MIDI.WebAudio = {
|
||||
api: "webaudio"
|
||||
};
|
||||
var ctx;
|
||||
|
|
Loading…
Reference in New Issue