<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<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#c28">Comment # 28</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:agold@apple.com" title="Andrew Gold <agold@apple.com>"> <span class="fn">Andrew Gold</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>
Thanks for the review!
<span class="quote">>> Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:118
>> +#endif
>
> This class really shouldn't have any data members. Can this be merged into WebPageProxy.</span >
Will move these.
<span class="quote">>> Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:119
>> + WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying };
>
> Ditto.</span >
Ditto.
<span class="quote">>> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:375
>> + cameraAuthorizationBlock();
>
> Why does this need to be iOS specific?</span >
This is iOS specific because Mac does not require apps to request permission to use media capture devices.
<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) {
>
> It's a bit odd that you pass SecurityOrigin's to this level, but then don't use them, but rather get URLs.</span >
Will refactor.
<span class="quote">>> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:402
>> +void UIDelegate::UIClient::isPlayingAudioDidChange(WebKit::WebPageProxy& page)
>
> It is really weird that isPlayingAudioDidChange is what triggers _webViewDidBeginCaptureSession/_webViewDidEndCaptureSession. This should be re-worked to be more direct.</span >
This is what is currently being used on Mac to notify the client of a capture session beginning/ending. Should I write a new method and only call that one and let the Mac team know to change their implementation, or should I continue to call this method to let clients using the C API know of a change in state, and also call a new method to notify WK2 clients?
<span class="quote">>> Source/WebKit2/UIProcess/ios/WKUserMediaCaptureDeviceAuthorizerIOS.h:28
>> +@interface WKUserMediaCaptureDeviceAuthorizerIOS : NSObject
>
> 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.</span >
I will remove this class and folds its logic into UIDelegate.</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>