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

Mute track if ended event has been fired #498

Merged
merged 3 commits into from
Oct 28, 2022
Merged

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Oct 28, 2022

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.

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2022

🦋 Changeset detected

Latest commit: 207cadd

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

@@ -965,6 +965,7 @@ export default class LocalParticipant extends Participant {
this.unpublishTrack(track);
} else if (track.isUserProvided) {
await track.pauseUpstream();
await track.mute();
Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Member

Choose a reason for hiding this comment

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

sounds good!

@lukasIO lukasIO merged commit 9ce03bc into main Oct 28, 2022
@lukasIO lukasIO deleted the lukas/mute-when-ended branch October 28, 2022 16:55
@github-actions github-actions bot mentioned this pull request Oct 28, 2022
max-b pushed a commit to Invisv-Privacy/client-sdk-js that referenced this pull request Dec 5, 2022
…ck (livekit#498)

* mute track if ended event has been fired

* remove pauseUpstream on ended

* changeset
max-b pushed a commit to Invisv-Privacy/client-sdk-js that referenced this pull request Dec 5, 2022
…ck (livekit#498)

* mute track if ended event has been fired

* remove pauseUpstream on ended

* changeset
max-b pushed a commit to Invisv-Privacy/client-sdk-js that referenced this pull request Dec 9, 2022
…ck (livekit#498)

* mute track if ended event has been fired

* remove pauseUpstream on ended

* changeset
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.

Revoking camera access in browser mutes remote track but doesn't mute local track
2 participants