Skip to content

Commit

Permalink
fix: Don't play howl if it's already playing
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeen committed Jul 19, 2023
1 parent e236642 commit 072e429
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ember-stereo/src/stereo-connections/howler.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,14 @@ export default class Howler extends BaseSound {
}

play({ position } = {}) {
this.isLoading = true;
this.debug('#play');
if (typeof position !== 'undefined') {
this._setPosition(position);
if (!this.howl.playing()) {
this.isLoading = true;
this.debug('#play');
if (typeof position !== 'undefined') {
this._setPosition(position);
}
this.howl.play();
}
this.howl.play();
}

pause() {
Expand Down

0 comments on commit 072e429

Please sign in to comment.