<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sam@webkit.org" title="Sam Weinig <sam@webkit.org>"> <span class="fn">Sam Weinig</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Support for HTML Media Capture API"
href="https://bugs.webkit.org/show_bug.cgi?id=43239">bug 43239</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #294874 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Support for HTML Media Capture API"
href="https://bugs.webkit.org/show_bug.cgi?id=43239#c27">Comment # 27</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Support for HTML Media Capture API"
href="https://bugs.webkit.org/show_bug.cgi?id=43239">bug 43239</a>
from <span class="vcard"><a class="email" href="mailto:sam@webkit.org" title="Sam Weinig <sam@webkit.org>"> <span class="fn">Sam Weinig</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=294874&action=diff" name="attach_294874" title="Proposed Patch V9">attachment 294874</a> <a href="attachment.cgi?id=294874&action=edit" title="Proposed Patch V9">[details]</a></span>
Proposed Patch V9
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=294874&action=review">https://bugs.webkit.org/attachment.cgi?id=294874&action=review</a>
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:118
> +#if PLATFORM(IOS)
> + WKUserMediaCaptureDeviceAuthorizerIOS *captureDeviceAuthorizer();
> + RetainPtr<WKUserMediaCaptureDeviceAuthorizerIOS> m_captureDeviceAuthorizer;
> +#endif</span >
This class really shouldn't have any data members. Can this be merged into WebPageProxy.
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:119
> + WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying };</span >
Ditto.
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:375
> + void (^cameraAuthorizationBlock)(void) = ^ {
> + if (requiresVideo) {
> + [captureDeviceAuthorizer() requestCameraAuthorization:^(BOOL authorized) {
> + if (!authorized)
> + request.deny(UserMediaPermissionRequestProxy::UserMediaAccessDenialReason::PermissionDenied);
> + else
> + uiDelegateAuthorizationBlock();
> + }];
> + } else
> + uiDelegateAuthorizationBlock();
> + };
> +
> + if (requiresAudio) {
> + [captureDeviceAuthorizer() requestMicrophoneAuthorization:^(BOOL authorized) {
> + if (!authorized)
> + request.deny(UserMediaPermissionRequestProxy::UserMediaAccessDenialReason::PermissionDenied);
> + else
> + cameraAuthorizationBlock();
> + }];
> + } else
> + cameraAuthorizationBlock();</span >
Why does this need to be iOS specific?
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:395
> + [(id <WKUIDelegatePrivate>)delegate _webView:webView checkUserMediaPermissionForURL:requestFrameURL mainFrameURL:mainFrameURL frameIdentifier:frame.frameID() decisionHandler:^(NSString *salt, BOOL authorized) {</span >
It's a bit odd that you pass SecurityOrigin's to this level, but then don't use them, but rather get URLs.
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:402
> +void UIDelegate::UIClient::isPlayingAudioDidChange(WebKit::WebPageProxy& page)</span >
It is really weird that isPlayingAudioDidChange is what triggers _webViewDidBeginCaptureSession/_webViewDidEndCaptureSession. This should be re-worked to be more direct.
<span class="quote">> Source/WebKit2/UIProcess/ios/WKUserMediaCaptureDeviceAuthorizerIOS.h:28
> +@interface WKUserMediaCaptureDeviceAuthorizerIOS : NSObject</span >
As this class is not AP/SPII, it should not have the WK prefix. I am generally confused about why this class is necessary, as it seems to store no state.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>