-
Notifications
You must be signed in to change notification settings - Fork 166
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
Mute track if ended event has been fired #498
Conversation
🦋 Changeset detectedLatest commit: 207cadd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -965,6 +965,7 @@ export default class LocalParticipant extends Participant { | |||
this.unpublishTrack(track); | |||
} else if (track.isUserProvided) { | |||
await track.pauseUpstream(); | |||
await track.mute(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are muting the track, is pauseUpstream still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only reason I left it in is to not break the behaviour for people who have relied on those events to be emitted.
But realised just now, that it's marked as an internal event anyways, so should be safe to remove!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good!
…ck (livekit#498) * mute track if ended event has been fired * remove pauseUpstream on ended * changeset
…ck (livekit#498) * mute track if ended event has been fired * remove pauseUpstream on ended * changeset
…ck (livekit#498) * mute track if ended event has been fired * remove pauseUpstream on ended * changeset
fixes #496
Considering the fact that after the
ended
event we will not be able to reuse that track again ever, we might as well mute it to surface the fact that the local publication isn't currently active anymore.