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

Convert pauseUpstream and resumeUpstream to regular class methods #830

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Aug 7, 2023

Until recently we were passing this.pauseUpstream directly to an event handler of track.on('mute', this.pauseUpstream). Since we don't do this anymore we can convert them to regular class methods, which allows us to call super.*Upstream in child classes. This is needed for a clean implementation of #829.

This does change binding behaviour when the method is passed around directly to e.g. event handlers, so it warrants a minor version bump.
This change aligns those APIs with how we define mute and unmute, those are regular class methods, too.

@changeset-bot
Copy link

changeset-bot bot commented Aug 7, 2023

🦋 Changeset detected

Latest commit: 29cd2fe

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 Minor

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

@lukasIO lukasIO requested a review from davidzhao August 7, 2023 09:12
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 75.14 KB (-0.02% 🔽)
dist/livekit-client.umd.js 80.52 KB (-0.01% 🔽)

@lukasIO lukasIO merged commit 891889c into main Aug 8, 2023
3 checks passed
@lukasIO lukasIO deleted the lukas/upstream-methods branch August 8, 2023 06:48
@github-actions github-actions bot mentioned this pull request Aug 7, 2023
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.

None yet

3 participants