Bug 176349 - getUserMedia fails with OverconstrainedError for { video: { width: 320 } }
Summary: getUserMedia fails with OverconstrainedError for { video: { width: 320 } }
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-04 22:38 PDT by Andrew Morris
Modified: 2018-09-09 16:51 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Morris 2017-09-04 22:38:15 PDT
This constraint:

{ video: { width: 320 } }

Should be interpreted as width is ideally 320, it doesn't have to be exact. But Safari says this is overconstrained even though it can do e.g. 640x480 which would satisfy it. In fact being explicit about ideal fails in the same way:

{ video: { width: { ideal: 320 } } }

Tested on Sierra + Safari Beta, Sierra + Safari Tech Preview 38, and iOS beta 9 + Safari.
Comment 1 Adam 2017-11-21 15:48:06 PST
This seems to be resolved now actually. Can't reproduce this issue anymore.
Comment 2 Ben 2017-12-02 06:55:12 PST
GUM with video constraints still fails on iOS 11.2.
Comment 3 MH 2017-12-07 13:42:57 PST
I confirm this bug.

There is test pen
https://codepen.io/hejral/pen/eeaKrx?editors=1011

which works, and another which do not
https://codepen.io/hejral/pen/RjzovG?editors=1011

And yes, with "playsinline" this works also for iPhone ;-)
With no playsinline this works everywhere else.

I must agree with comment "The fact that you need to add playsinline is still a bug."
Comment 4 MH 2017-12-07 13:51:28 PST
WebRTC demo with | constraints = { video: { width:320,height:240 } }

output is:

mediaDevices: Error -> Invalid constraint

see also:

https://bugs.webkit.org/show_bug.cgi?id=176843
Comment 5 Adam 2018-09-09 16:51:29 PDT
This is now only happening for me on iOS, not on Mac OS.