Bug 251906 - Use InvalidStateError if user gesture is missing for getDisplayMedia
Summary: Use InvalidStateError if user gesture is missing for getDisplayMedia
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
Keywords: InRadar
Depends on:
Reported: 2023-02-08 00:58 PST by beaufort.francois
Modified: 2024-03-05 02:43 PST (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description beaufort.francois 2023-02-08 00:58:42 PST
WebKit should raise InvalidStateError, not InvalidAccessError if user gesture is missing for getDisplayMedia according to the spec.

If the relevant global object of this does not have transient activation, return a promise rejected with a DOMException object whose name attribute has the value InvalidStateError.
From https://www.w3.org/TR/screen-capture/#mediadevices-additions
Comment 1 beaufort.francois 2023-02-08 01:01:10 PST
I believe this should fix it: https://github.com/WebKit/WebKit/compare/main...beaufortfrancois:WebKit:patch-1
Comment 2 youenn fablet 2023-02-08 01:08:12 PST
Thanks Francois,
Do you want to make a PR, or should we take over?
Comment 3 Radar WebKit Bug Importer 2023-02-08 01:08:34 PST
Comment 4 beaufort.francois 2023-02-08 01:09:52 PST
Please take over ;)
Comment 5 youenn fablet 2024-03-04 10:04:45 PST
Pull request: https://github.com/WebKit/WebKit/pull/25431
Comment 6 EWS 2024-03-05 02:43:35 PST
Committed 275685@main (ab0993157de8): <https://commits.webkit.org/275685@main>

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