clearing the 'implicitEnd' event off the timeline

fixes #711
This commit is contained in:
Yotam Mann 2020-08-22 10:13:32 -04:00
parent ed8bb4ddcf
commit 826a51d594

View file

@ -159,6 +159,8 @@ export class Player extends Source<PlayerOptions> {
this._activeSources.delete(source);
if (this._activeSources.size === 0 && !this._synced &&
this._state.getValueAtTime(this.now()) === "started") {
// remove the 'implicitEnd' event and replace with an explicit end
this._state.cancel(this.now());
this._state.setStateAtTime("stopped", this.now());
}
}