Bug 207191 - Align getDisplayMedia() with spec
Summary: Align getDisplayMedia() with spec
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
Keywords: InRadar
Depends on:
Reported: 2020-02-04 02:02 PST by Alex Bakoushin
Modified: 2020-02-07 10:41 PST (History)
15 users (show)

See Also:

Patch (4.77 KB, patch)
2020-02-07 07:09 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Bakoushin 2020-02-04 02:02:44 PST
Currently, calling navigator.mediaDevices.getDisplayMedia() with no parameters throws a TypeError.

But according to the spec, the first and only parameter is optional.
See: https://www.w3.org/TR/screen-capture/#mediadevices-additions

Also, according to the spec, the first parameter type is DisplayMediaStreamConstraints, which defaults to:
  video = true;
  audio = false;
See: https://www.w3.org/TR/screen-capture/#dom-displaymediastreamconstraints

Expected behavior:
Calling getDisplayMedia() with no parameters will not throw an error, but will use the defaults of DisplayMediaStreamConstraints.
Comment 1 Radar WebKit Bug Importer 2020-02-04 09:12:42 PST
Comment 2 youenn fablet 2020-02-07 07:09:15 PST
Created attachment 390083 [details]
Comment 3 WebKit Commit Bot 2020-02-07 10:41:47 PST
Comment on attachment 390083 [details]

Clearing flags on attachment: 390083

Committed r256034: <https://trac.webkit.org/changeset/256034>
Comment 4 WebKit Commit Bot 2020-02-07 10:41:49 PST
All reviewed patches have been landed.  Closing bug.