Bug 219643 - applyConstraints() should update track correctly when no constraints passed at first
Summary: applyConstraints() should update track correctly when no constraints passed a...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-08 07:02 PST by Daria
Modified: 2021-07-06 04:34 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daria 2020-12-08 07:02:56 PST
Function applyConstraints() does not work as expected.

Where? 
- issue is only reproduced on Mac"16 (and probably on iOS.14 but needs to be check)
- only on Safari - works on other browsers

How?

Steps to reproduce:

1. Start video without any constraints.
2. Then try to apply new constraints (1080x720) using applyConstraints()
(it is easy to reproduce using https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints - at the bottom there is box with example so when video is started with empty object and then user tries to apply new constraints - camera starts blinking, there is black screen and then camera is off).

Expected result:

Constraints are applied properly and camera is on.

Actual result:

Error - "A MediaStreamTrack ended due to a capture failure"
Camera starts blinking, then video went black and camera is off. 

Additional thoughts: when user applies width: 600 and height: 400 it is working well.
Comment 1 Radar WebKit Bug Importer 2020-12-08 07:11:02 PST
<rdar://problem/72091581>
Comment 2 youenn fablet 2020-12-08 07:12:13 PST
I would hope this is fixed in latest Safari Tech Preview.
The issue might be that the change of preset takes more than 3 seconds, which is quite long and WebKit then assumes the capture failed.
Comment 3 Radar WebKit Bug Importer 2020-12-08 07:12:22 PST
<rdar://problem/72091622>
Comment 4 youenn fablet 2021-07-06 04:34:30 PDT
Closing, @Daria, please reopen if you can reproduce the issue.