Skip to content

Commit

Permalink
Stop repeating when destroying
Browse files Browse the repository at this point in the history
  • Loading branch information
infojunkie committed Aug 1, 2024
1 parent 78559ec commit cc88fed
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions dist/musicxml-player.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* musicxml-player v0.17.1
* musicxml-player v0.17.2
* (c) Karim Ratib <[email protected]> (https://github.com/infojunkie)
* Released under the GPL-3.0-only License.
*/
Expand Down Expand Up @@ -12547,7 +12547,7 @@ const timingObjectConstructor = createTimingObjectConstructor(createCalculateTim
// @todo Expose an isSupported flag which checks for performance.now() support.

var name = "musicxml-player";
var version = "0.17.1";
var version = "0.17.2";
var description = "A simple JavaScript component that loads and plays MusicXML files in the browser using Web Audio and Web MIDI.";
var main = "dist/musicxml-player.esm.js";
var type = "module";
Expand Down Expand Up @@ -12774,6 +12774,7 @@ class Player {
* Destroy the instance by freeing all resources and disconnecting observers.
*/
destroy() {
this._repeatCounter = 0;
this._timingObject.removeEventListener('change', this._timingObjectListener);
this._sheet.remove();
this._observer.disconnect();
Expand Down
2 changes: 1 addition & 1 deletion dist/musicxml-player.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/types/Player.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "musicxml-player",
"version": "0.17.1",
"version": "0.17.2",
"description": "A simple JavaScript component that loads and plays MusicXML files in the browser using Web Audio and Web MIDI.",
"main": "dist/musicxml-player.esm.js",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions src/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export class Player implements IMidiOutput {
* Destroy the instance by freeing all resources and disconnecting observers.
*/
destroy(): void {
this._repeatCounter = 0;
this._timingObject.removeEventListener(
'change',
this._timingObjectListener,
Expand Down

0 comments on commit cc88fed

Please sign in to comment.