| Code-Review | +1 |
// If permission descriptors are already set, we do not need to update them.
if (!permission_descriptors_.empty()) {
return;
}When does this happen? Could you explain in the comment?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
// If permission descriptors are already set, we do not need to update them.
if (!permission_descriptors_.empty()) {
return;
}When does this happen? Could you explain in the comment?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi Joey, I realized there was a flaw in my logic with the constraints.
I have fixed it and added WPT to ensure the code works as intended end to end
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
// If permission descriptors are already set, we do not need to update them.
// This would be the case for legacy mode when the 'type' attribute is set.
// We do not want to update the permission descriptors in this case as type
// attribute is supposed to take precedence.So when we aren't in legacy mode, this method will never be called twice with different parameters?
It just seems error prone to have this method sort of silently not update permission_descriptors_
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// If permission descriptors are already set, we do not need to update them.
// This would be the case for legacy mode when the 'type' attribute is set.
// We do not want to update the permission descriptors in this case as type
// attribute is supposed to take precedence.So when we aren't in legacy mode, this method will never be called twice with different parameters?
It just seems error prone to have this method sort of silently not update permission_descriptors_
Yeah we don't allow changing the constraints. This might change in the future though.
The check is already enforced in the IDL method here:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_element_constraints.cc;l=133;drc=1a28294cae4ea62bb770dba758c8af95e41a59cf
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// If permission descriptors are already set, we do not need to update them.
// This would be the case for legacy mode when the 'type' attribute is set.
// We do not want to update the permission descriptors in this case as type
// attribute is supposed to take precedence.Ravjit UppalSo when we aren't in legacy mode, this method will never be called twice with different parameters?
It just seems error prone to have this method sort of silently not update permission_descriptors_
Yeah we don't allow changing the constraints. This might change in the future though.
The check is already enforced in the IDL method here:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediastream/user_media_element_constraints.cc;l=133;drc=1a28294cae4ea62bb770dba758c8af95e41a59cf
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/58916.
When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.
WPT Export docs:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[CoCE] Usermedia element should infer its type from its constraints
Usermedia element relied on the type attribute to decide if it will have
camera and/or microphone capabilities. Now it is also possible to infer
the type from the MediaStreamConstraints set on the element.
This only happens when the type attribute is missing, because type
attribute takes precedence.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/58916
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |