Closed
Bug 1279933
Opened 9 years ago
Closed 9 years ago
navigator.mediaDevices.getUserMedia should have 1 required argument
Categories
(Core :: WebRTC: Audio/Video, defect)
Core
WebRTC: Audio/Video
Tracking
()
RESOLVED
INVALID
People
(Reporter: foolip, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36
Steps to reproduce:
navigator.mediaDevices.getUserMedia.length or call navigator.mediaDevices.getUserMedia()
Actual results:
Function length is 0 and promise is rejected with "NotSupportedError: audio and/or video is required"
Expected results:
Fucntion length should be 1 and promise should be rejected with something about missing arguments.
Comment 1•9 years ago
|
||
I believe this is a mediacapture spec error. WebIDL spec [1] says:
"If the type of an argument is a dictionary type or a union type that has a dictionary type as one of its flattened member types, and that dictionary type and its ancestors have no required members, and the argument is either the final argument or is followed only by optional arguments, then the argument MUST be specified as optional."
The constraints dictionary has no required members afaik.
[1] https://heycam.github.io/webidl/#dfn-optional-argument-default-value
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Component: Device Permissions → WebRTC: Audio/Video
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Resolution: --- → INVALID
Reporter | ||
Comment 2•9 years ago
|
||
Yep, this was a spec issue:
https://github.com/w3c/mediacapture-main/issues/366
https://github.com/heycam/webidl/issues/130
You need to log in
before you can comment on or make changes to this bug.
Description
•