Skip to content

Emit activeDeviceChanged when publishing local track #759

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

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Jun 29, 2023

In case we have not set an active device previously, at the latest we will know the currently used device in the LocalTrackPublished callback. So we can use it to override (and emit) the activeDeviceMap.

arguably a nicer solution would be if all activeDeviceSwitching was handles on the LocalParticipant instead of on the room. this would also allow to extract the active device as soon as the mediaStreamTrack has been acquired. But that'd be a bigger change.

@changeset-bot
Copy link

changeset-bot bot commented Jun 29, 2023

🦋 Changeset detected

Latest commit: 020a873

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

@lukasIO lukasIO requested a review from davidzhao June 29, 2023 12:17
@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2023

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 85.21 KB (+0.01% 🔺)
dist/livekit-client.umd.js 90.17 KB (-0.02% 🔽)

@lukasIO lukasIO merged commit e7b9d8b into main Jul 4, 2023
@lukasIO lukasIO deleted the lukas/active-device-on-publish branch July 4, 2023 14:13
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