livekit / client-sdk-js

LiveKit browser client SDK (javascript)
https://livekit.io
Apache License 2.0
334 stars 143 forks source link

Correct track replacement when resuming local track upstream #1157

Closed kyleparrott closed 2 months ago

kyleparrott commented 2 months ago

Currently if a track processor is applied to a video track while the track's upstream is paused (ie. pauseUpstream() has been called on it), the next call to resume upstream will replace the processed track with the plain, unprocessed track. This should correct that logic and prevent this incorrect replacement.

My app was performing the following steps when I ran into this behavior:

  1. Publish a video track to the room with no processors applied
  2. Pause the local video track's upstream
  3. Apply a Track processor to the local track
  4. Resume the local video track's upstream

I am pausing and resuming the track when I am making processor changes to prevent showing any "flashes" of unprocessed frames when changing between virtual background options.

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: dda287b3cae4d146d0f529349ba9d5b4372078fd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | livekit-client | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR