RESOLVED FIXED 189930
[MediaStream] Update constraints supported by getDisplayMedia
https://bugs.webkit.org/show_bug.cgi?id=189930
Summary [MediaStream] Update constraints supported by getDisplayMedia
Eric Carlson
Reported 2018-09-24 14:26:57 PDT
The spec has changed the constraints that getDisplayMedia supports.
Attachments
Patch (19.73 KB, patch)
2018-09-24 14:33 PDT, Eric Carlson
no flags
Patch for landing (25.45 KB, patch)
2018-09-25 10:29 PDT, Eric Carlson
no flags
Fix broken API tests (1.96 KB, patch)
2018-09-25 13:54 PDT, Eric Carlson
no flags
Eric Carlson
Comment 1 2018-09-24 14:33:57 PDT
Radar WebKit Bug Importer
Comment 2 2018-09-24 14:34:39 PDT
youenn fablet
Comment 3 2018-09-24 21:43:39 PDT
Comment on attachment 350686 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350686&action=review > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:163 > + // 2. For each member present in constraints whose value, value, is a dictionary, run the following steps: s/, value,// > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:175 > + Remove this line? > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:213 > + case MediaConstraintType::EchoCancellation: From your quote of the spec, we should also reject if any of these value has a min/exact value. Maybe we should add some tests for these values. > Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:245 > + if (request.type != MediaStreamRequest::Type::UserMedia || !request.audioConstraints.isValid) To improve readability, we could try to split more getDisplayDevice vs. getUserMedia code path. For instance, have one top level request.type check in this function and introduce getCaptureDevices and getScreenDevices to iterate over relevant devices according request.type.
Eric Carlson
Comment 4 2018-09-25 10:27:43 PDT
Comment on attachment 350686 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350686&action=review >> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:163 >> + // 2. For each member present in constraints whose value, value, is a dictionary, run the following steps: > > s/, value,// This is verbatim from the spec. >> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:175 >> + > > Remove this line? OK >> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:213 >> + case MediaConstraintType::EchoCancellation: > > From your quote of the spec, we should also reject if any of these value has a min/exact value. > Maybe we should add some tests for these values. These are audio-only constraints, and we don't support audio with getDisplayMedia. Good idea about the test, I will add an invalid audio constraint to the test. >> Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:245 >> + if (request.type != MediaStreamRequest::Type::UserMedia || !request.audioConstraints.isValid) > > To improve readability, we could try to split more getDisplayDevice vs. getUserMedia code path. > For instance, have one top level request.type check in this function and introduce getCaptureDevices and getScreenDevices to iterate over relevant devices according request.type. Good idea, I will do that.
Eric Carlson
Comment 5 2018-09-25 10:29:56 PDT
Created attachment 350756 [details] Patch for landing
WebKit Commit Bot
Comment 6 2018-09-25 11:37:38 PDT
Comment on attachment 350756 [details] Patch for landing Clearing flags on attachment: 350756 Committed r236465: <https://trac.webkit.org/changeset/236465>
WebKit Commit Bot
Comment 7 2018-09-25 11:37:41 PDT
All reviewed patches have been landed. Closing bug.
Eric Carlson
Comment 8 2018-09-25 13:54:02 PDT
Reopening to attach new patch.
Eric Carlson
Comment 9 2018-09-25 13:54:03 PDT
Created attachment 350787 [details] Fix broken API tests
WebKit Commit Bot
Comment 10 2018-09-25 14:31:38 PDT
Comment on attachment 350787 [details] Fix broken API tests Clearing flags on attachment: 350787 Committed r236476: <https://trac.webkit.org/changeset/236476>
WebKit Commit Bot
Comment 11 2018-09-25 14:31:39 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.