Skip to content

Commit

Permalink
Correct track replacement when resuming local track upstream (#1157)
Browse files Browse the repository at this point in the history
* Correct track replacement when resuming upstream

- This should prevent replacing the processed track with the unprocessed
  track, if a track processor was applied while the track upstream was
  paused.

* Create kind-nails-battle.md

---------

Co-authored-by: lukasIO <mail@lukasseiler.de>
  • Loading branch information
kyleparrott and lukasIO authored Jun 13, 2024
1 parent 0cded35 commit 161e98d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/kind-nails-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Fix resumeUpstream with local track processors enabled
2 changes: 1 addition & 1 deletion src/room/track/LocalTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export default abstract class LocalTrack<
this.emit(TrackEvent.UpstreamResumed, this);

// this operation is noop if mediastreamtrack is already being sent
await this.sender.replaceTrack(this._mediaStreamTrack);
await this.sender.replaceTrack(this.mediaStreamTrack);
} finally {
unlock();
}
Expand Down

0 comments on commit 161e98d

Please sign in to comment.