Bug 228772 - getUserMedia() constraints incorrectly interpreted
Summary: getUserMedia() constraints incorrectly interpreted
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-04 05:29 PDT by milen
Modified: 2021-08-11 05:30 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 milen 2021-08-04 05:29:41 PDT
Tested with Safari 14.1.2 (mac mini 2018, macOS 11.5.1), Webcam Logitech C910

The issue can be reproduced with: https://jsfiddle.net/milen/srjkng6u/ 

The steps are: 

1) Click the button 'Add Cam HD'.

The expected result: the ideal video should be 1280x720 (16/9) and not smaller than 160x120.
The actual result: video is 160x90.

----
Safari incorrectly interprets these constraints

video: {
   width: {min: 160},
   height: {min: 120, ideal: 720},
   aspectRatio: {ideal: 16/9},
};

but this works fine

video: {
   height: {min: 120, ideal: 720},
   aspectRatio: {ideal: 16/9},
};

I don't expect just adding "width: {min: 160}" to mess up the HD constraints.
The above cases work fine in Chrome 92.
Comment 1 Radar WebKit Bug Importer 2021-08-11 05:30:16 PDT
<rdar://problem/81789664>