-
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
Remove googConstraints from RTCPeerConnection constructor #1022
Conversation
🦋 Changeset detectedLatest commit: 1f6ffbc 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 |
size-limit report 📦
|
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.
lgtm. agreed this is safer from a compatibility standpoint
It seems to me that the issue might not have been in passing of deprecated googConstraints, but because of this line:
Which should really have been
Otherwise loggerOptions are passed as media constraints. The type for mediaConstraints is wide enough to support that, so ts error is not thrown. |
that's a good catch! that might have been the issue. Thanks for pointing that out. |
Nah, I'm sure we don't rely on googConstraints, but I still think that going without removal of media constraints is the best option, since we would be able to fix the bug with minimal testing effort. Thanks for fixing it in v1! |
These constraints have been deprecated in Chromium since M103 and should be simply ignored by Chrome since then.
Users reported errors however (coincidentally with Chrome 103) with the error message
Failed to construct 'RTCPeerConnection': Malformed constraints object.
Was not able to repro this error using Chrome 103.Given that this constraint was only ever used for enabling setting local network priority and has been ignored in Chrome for a long time, it seems like it should be ok to remove it entirely and therefore reducing error potential. Removing it will mean manually setting
networkPriority
will not have any effect on Chrome prior to version 103.Alternative would be to try/catch RTCPeerConnection instantiation.