Bug 235838 - [macOS] Expose screen and window capture state to WKWebView
Summary: [macOS] Expose screen and window capture state to WKWebView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-28 15:08 PST by Eric Carlson
Modified: 2022-02-01 10:35 PST (History)
15 users (show)

See Also:


Attachments
Patch (85.27 KB, patch)
2022-01-28 16:23 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (82.23 KB, patch)
2022-01-31 11:52 PST, Eric Carlson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (84.50 KB, patch)
2022-01-31 13:08 PST, Eric Carlson
youennf: review+
Details | Formatted Diff | Diff
Patch for landing (84.68 KB, patch)
2022-01-31 14:32 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (86.60 KB, patch)
2022-01-31 16:45 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (85.53 KB, patch)
2022-02-01 08:56 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2022-01-28 15:08:20 PST
Expose screen and window capture state to WKWebView
Comment 1 Radar WebKit Bug Importer 2022-01-28 15:41:43 PST
<rdar://problem/88207924>
Comment 2 Eric Carlson 2022-01-28 16:23:18 PST
Created attachment 450287 [details]
Patch
Comment 3 Eric Carlson 2022-01-31 11:52:42 PST
Created attachment 450426 [details]
Patch
Comment 4 EWS Watchlist 2022-01-31 11:54:39 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 5 Eric Carlson 2022-01-31 13:08:40 PST
Created attachment 450439 [details]
Patch
Comment 6 youenn fablet 2022-01-31 14:15:16 PST
Comment on attachment 450439 [details]
Patch

Probably worth adding a test validating we delay with a timer the start capture/stop capture.
While this is mostly useful for camera, it is good to validate this will work for display as well.

Another question worth exploring. We might add in the future getViewPortMedia which is specific to capturing the self tab.
We probably want a different delegate, but it may be ok to keep the same display states/mutators APIs.
Wdyt?

View in context: https://bugs.webkit.org/attachment.cgi?id=450439&action=review

> Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:4873
> +    UNUSED_PARAM(isFromDisplayCapture);

FIXME: Remove isFromDisplayCapture?
Comment 7 Eric Carlson 2022-01-31 14:28:32 PST
(In reply to youenn fablet from comment #6)
> Comment on attachment 450439 [details]
> Patch
> 
> Probably worth adding a test validating we delay with a timer the start
> capture/stop capture.
> While this is mostly useful for camera, it is good to validate this will
> work for display as well.
> 
> Another question worth exploring. We might add in the future
> getViewPortMedia which is specific to capturing the self tab.
> We probably want a different delegate, but it may be ok to keep the same
> display states/mutators APIs.
> Wdyt?
> 

Seems reasonable.

> View in context:
> https://bugs.webkit.org/attachment.cgi?id=450439&action=review
> 
> > Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:4873
> > +    UNUSED_PARAM(isFromDisplayCapture);
> 
> FIXME: Remove isFromDisplayCapture?

Good idea, I'll do that.
Comment 8 Eric Carlson 2022-01-31 14:32:28 PST
Created attachment 450466 [details]
Patch for landing
Comment 9 Eric Carlson 2022-01-31 16:45:07 PST
Created attachment 450473 [details]
Patch
Comment 10 Eric Carlson 2022-02-01 08:56:50 PST
Created attachment 450536 [details]
Patch for landing
Comment 11 EWS 2022-02-01 10:35:31 PST
Committed r288894 (246639@main): <https://commits.webkit.org/246639@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450536 [details].