fix bug in fallback
This commit is contained in:
parent
41f90e8bb1
commit
d189452640
2 changed files with 10 additions and 10 deletions
|
@ -38,7 +38,7 @@ MIDI.loadPlugin = function(conf) {
|
||||||
// use the most appropriate plugin if not specified
|
// use the most appropriate plugin if not specified
|
||||||
if (apis[conf.api]) {
|
if (apis[conf.api]) {
|
||||||
api = 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);
|
api = window.location.hash.substr(1);
|
||||||
} else if (navigator.requestMIDIAccess) {
|
} else if (navigator.requestMIDIAccess) {
|
||||||
api = "webmidi";
|
api = "webmidi";
|
||||||
|
@ -148,10 +148,10 @@ connect.webaudio = function(filetype, instruments, conf) {
|
||||||
/// Helpers
|
/// Helpers
|
||||||
|
|
||||||
var apis = {
|
var apis = {
|
||||||
"#webmidi": true,
|
"webmidi": true,
|
||||||
"#webaudio": true,
|
"webaudio": true,
|
||||||
"#audiotag": true,
|
"audiotag": true,
|
||||||
"#flash": true
|
"flash": true
|
||||||
};
|
};
|
||||||
|
|
||||||
var getPercent = function(event) {
|
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
|
https://github.com/mudcube/MIDI.js
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
@ -8,10 +8,10 @@
|
||||||
http://docs.oracle.com/javase/6/docs/api/javax/sound/midi/package-summary.html
|
http://docs.oracle.com/javase/6/docs/api/javax/sound/midi/package-summary.html
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
Technologies:
|
Technologies:
|
||||||
MIDI.WebMIDIAPI
|
MIDI.WebMIDI
|
||||||
MIDI.WebAudioAPI
|
MIDI.WebAudio
|
||||||
MIDI.Flash
|
MIDI.Flash
|
||||||
MIDI.HTML5
|
MIDI.AudioTag
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
Helpers:
|
Helpers:
|
||||||
MIDI.GeneralMIDI
|
MIDI.GeneralMIDI
|
||||||
|
@ -126,7 +126,7 @@ var setPlugin = function(root) {
|
||||||
if (window.AudioContext || window.webkitAudioContext) (function () {
|
if (window.AudioContext || window.webkitAudioContext) (function () {
|
||||||
|
|
||||||
var AudioContext = window.AudioContext || window.webkitAudioContext;
|
var AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||||
var root = MIDI.WebAudioAPI = {
|
var root = MIDI.WebAudio = {
|
||||||
api: "webaudio"
|
api: "webaudio"
|
||||||
};
|
};
|
||||||
var ctx;
|
var ctx;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue