midi-audio-player 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,9 +29,15 @@ export default class MidiAudioPlayer extends MidiPlayer.Player {
29
29
  });
30
30
  }
31
31
 
32
+ async load(content) {
33
+ if(this.isPlaying()) this.stop();
34
+ this.#clearActiveNotes();
35
+ await this.loadArrayBuffer(content);
36
+ }
37
+
32
38
 
33
39
  async play(content = null) {
34
- if(content) await this.#load(content);
40
+ if(content) await this.load(content);
35
41
  await this.#audioCtx.resume();
36
42
  await super.play();
37
43
  }
@@ -98,13 +104,6 @@ export default class MidiAudioPlayer extends MidiPlayer.Player {
98
104
  }
99
105
  }
100
106
 
101
-
102
- async #load(content) {
103
- if(this.isPlaying()) this.stop();
104
- this.#clearActiveNotes();
105
- await this.loadArrayBuffer(content);
106
- }
107
-
108
107
  }
109
108
 
110
109
  // export { MidiAudioPlayer };