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

See Also:


Attachments

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
<rdar://problem/105167105>
Comment 4 beaufort.francois 2023-02-08 01:09:52 PST
Please take over ;)