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

Check if mediaDevices exists before using it on disconnect #191

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

caiiiycuk
Copy link
Contributor

No description provided.

@lukasIO
Copy link
Contributor

lukasIO commented Apr 6, 2022

@caiiiycuk thanks, would you mind changing the if clause to use optional chaining instead? navigator.mediaDevices?.removeEventListener.
To keep it consistent also for when subscribing to the event listener.
I didn't want to bother for a single line change yesterday, but as it is popping up in more places, it feels right to align with the coding style of the repo.

use optional chaining instead of if when checking mediaDevices
@caiiiycuk
Copy link
Contributor Author

Done

@lukasIO lukasIO merged commit 3100b2c into livekit:main Apr 6, 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