Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Player.prototype.load = function load(callback, soundfontUrl) {
if (this.loaded) {
callback();
return;
}
// TODO: should parse musicjson and load proper instruments, currently only support piano
MIDI.loadPlugin({
soundfontUrl: soundfontUrl,
instrument: 'acoustic_grand_piano',
callback: _callback.bind(this)
});
function _callback() {
this.loaded = true;
callback();
}
};