Skip to content
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

keep mediastream id for migration #294

Merged
merged 2 commits into from
Jun 30, 2022
Merged

keep mediastream id for migration #294

merged 2 commits into from
Jun 30, 2022

Conversation

cnderrauber
Copy link
Contributor

mediastream.id might change during unmute/mute, when migration involved, the changed stream id might cause server side can't find the destination track or find a incorrect one, so keep it when Track construct and used in SyncState for migration

@cnderrauber cnderrauber requested review from davidzhao and lukasIO June 29, 2022 16:01
@changeset-bot
Copy link

changeset-bot bot commented Jun 29, 2022

🦋 Changeset detected

Latest commit: a4a55f6

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

@@ -47,6 +49,7 @@ export class Track extends (EventEmitter as new () => TypedEventEmitter<TrackEve
super();
this.kind = kind;
this._mediaStreamTrack = mediaTrack;
this._mediaStreamID = mediaTrack.id;
Copy link
Contributor

@lukasIO lukasIO Jun 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should _mediaStreamID also get set when replaceTrack is called or is it ok to always use the one which was used to create the track?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be ok to always use the create one, since replace track will not cause reneogtiation, so id in sdp is unchanged.

@cnderrauber cnderrauber merged commit d389fda into main Jun 30, 2022
@cnderrauber cnderrauber deleted the muted_migrate branch June 30, 2022 07:28
@github-actions github-actions bot mentioned this pull request Jun 30, 2022
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

Successfully merging this pull request may close these issues.

2 participants