Bug 244086

Summary: MediaStreamTrack.applyConstraints does not resolve when applying multiple constraints in parallel
Product: WebKit Reporter: tim.spitzer
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Major CC: webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Intel)   
OS: Other   

Description tim.spitzer 2022-08-18 06:41:02 PDT
MediaStreamTrack.applyContraints does not resolve properly when applying multiple constraints in parallel to a MediaStreamTrack on Safari 16. 

1) Open the example at https://stackblitz.com/edit/js-gmbvkl?file=index.js
2) See console

Actual results: The promises returned from applyConstraints get stuck in pending state, except for the last one which is rejected.

Expected results: The promises returned should either be rejected or resolved based on the supported video resolution. The browser should enqueue and process the resolution changes in order as called in Javascript.

Build Date & Hardware: Build 22-08-17 on Mac OS Version 13.0 Beta (22A5321d)
Additional Builds and Platforms: Also not working on iOS 16 Beta

Doesn't Occur on Safari 15, latest Firefox and Chrome, Mac OS Version 13.0 Beta (22A5321d)
Comment 1 Radar WebKit Bug Importer 2022-08-18 06:51:27 PDT
<rdar://problem/98829928>
Comment 2 youenn fablet 2022-08-18 08:04:22 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3450
Comment 3 EWS 2022-08-19 01:18:27 PDT
Committed 253588@main (340573c924b3): <https://commits.webkit.org/253588@main>

Reviewed commits have been landed. Closing PR #3450 and removing active labels.