<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&#64;apple.com" title="Andrew Gold &lt;agold&#64;apple.com&gt;"> <span class="fn">Andrew Gold</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=294874&amp;action=diff" name="attach_294874" title="Proposed Patch V9">attachment 294874</a> <a href="attachment.cgi?id=294874&amp;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&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=294874&amp;action=review</a>

Thanks for the review!

<span class="quote">&gt;&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:118
&gt;&gt; +#endif
&gt; 
&gt; This class really shouldn't have any data members.  Can this be merged into WebPageProxy.</span >

Will move these.

<span class="quote">&gt;&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:119
&gt;&gt; +        WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying };
&gt; 
&gt; Ditto.</span >

Ditto.

<span class="quote">&gt;&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:375
&gt;&gt; +        cameraAuthorizationBlock();
&gt; 
&gt; 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">&gt;&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:395
&gt;&gt; +    [(id &lt;WKUIDelegatePrivate&gt;)delegate _webView:webView checkUserMediaPermissionForURL:requestFrameURL mainFrameURL:mainFrameURL frameIdentifier:frame.frameID() decisionHandler:^(NSString *salt, BOOL authorized) {
&gt; 
&gt; 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">&gt;&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:402
&gt;&gt; +void UIDelegate::UIClient::isPlayingAudioDidChange(WebKit::WebPageProxy&amp; page)
&gt; 
&gt; 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">&gt;&gt; Source/WebKit2/UIProcess/ios/WKUserMediaCaptureDeviceAuthorizerIOS.h:28
&gt;&gt; +&#64;interface WKUserMediaCaptureDeviceAuthorizerIOS : NSObject
&gt; 
&gt; 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>