Skip to content

Commit

Permalink
emit restarted before stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed May 8, 2024
1 parent 113ac31 commit 9446c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/room/track/LocalTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,14 @@ export default abstract class LocalTrack<

await this.setMediaStreamTrack(newTrack);
this._constraints = constraints;
this.emit(TrackEvent.Restarted, this);
if (this.manuallyStopped) {
this.log.warn(
'track was stopped during a restart, stopping restarted track',
this.logContext,
);
this.stop();
}
this.emit(TrackEvent.Restarted, this);
return this;
} finally {
unlock();
Expand Down

0 comments on commit 9446c85

Please sign in to comment.