Skip to content

playing event fires after endOfFile #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
simonwiles opened this issue Apr 16, 2021 · 2 comments
Open

playing event fires after endOfFile #73

simonwiles opened this issue Apr 16, 2021 · 2 comments

Comments

@simonwiles
Copy link

Player.on('playing', (currentTick) => console.log("playing"));
Player.on('endOfFile', () => console.log("endOfFile"));

I consistently get one playing event firing after the endOfFile event. Is this expected behaviour? Thanks!

@PetitDevil
Copy link

Same question.

@serg472
Copy link

serg472 commented Jul 12, 2022

A fix for this would be to change the implementation from:

if (!dryRun) this.triggerPlayerEvent('playing', {
  tick: this.tick
});

to:

if (!dryRun && this.isPlaying()) this.triggerPlayerEvent('playing', {
  tick: this.tick
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants