diff --git a/pkg/earwurm/src/Earwurm.ts b/pkg/earwurm/src/Earwurm.ts index ef22d15..77a7b9b 100644 --- a/pkg/earwurm/src/Earwurm.ts +++ b/pkg/earwurm/src/Earwurm.ts @@ -197,9 +197,9 @@ export class Earwurm extends EmittenCommon { suspend() { if ( - this._state === 'closed' - || this._state === 'suspended' - || this._state === 'suspending' + this._state === 'closed' || + this._state === 'suspended' || + this._state === 'suspending' ) { return this; } diff --git a/pkg/earwurm/src/Sound.ts b/pkg/earwurm/src/Sound.ts index 35efeaf..c39b058 100644 --- a/pkg/earwurm/src/Sound.ts +++ b/pkg/earwurm/src/Sound.ts @@ -177,8 +177,8 @@ export class Sound extends EmittenCommon { // Not yet sure how to resolve this. this.#incrementLoop(); - const timeSince - = Math.max(this.context.currentTime - this.#timestamp, 0) * this.speed; + const timeSince = + Math.max(this.context.currentTime - this.#timestamp, 0) * this.speed; this.#progress.elapsed = clamp( 0, @@ -255,9 +255,9 @@ export class Sound extends EmittenCommon { this.emit('state', value); if (value === 'playing') { - this.#intervalId = this.hasProgressSub - ? requestAnimationFrame(this.#handleInterval) - : 0; + this.#intervalId = this.hasProgressSub ? + requestAnimationFrame(this.#handleInterval) : + 0; } // TODO: This should not be broken onto a separate line. else { @@ -275,9 +275,9 @@ export class Sound extends EmittenCommon { if (!this.loop) return; if ( - this.#progress.elapsed === this.duration - || this.#progress.remaining === 0 - || this.#progress.percentage === 100 + this.#progress.elapsed === this.duration || + this.#progress.remaining === 0 || + this.#progress.percentage === 100 ) { this.#progress.elapsed = 0; this.#progress.remaining = this.duration;