<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:sam&#64;webkit.org" title="Sam Weinig &lt;sam&#64;webkit.org&gt;"> <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&#64;webkit.org" title="Sam Weinig &lt;sam&#64;webkit.org&gt;"> <span class="fn">Sam Weinig</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>

<span class="quote">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:118
&gt; +#if PLATFORM(IOS)
&gt; +        WKUserMediaCaptureDeviceAuthorizerIOS *captureDeviceAuthorizer();
&gt; +        RetainPtr&lt;WKUserMediaCaptureDeviceAuthorizerIOS&gt; m_captureDeviceAuthorizer;
&gt; +#endif</span >

This class really shouldn't have any data members.  Can this be merged into WebPageProxy.

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

Ditto.

<span class="quote">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:375
&gt; +    void (^cameraAuthorizationBlock)(void) = ^ {
&gt; +        if (requiresVideo) {
&gt; +            [captureDeviceAuthorizer() requestCameraAuthorization:^(BOOL authorized) {
&gt; +                if (!authorized)
&gt; +                    request.deny(UserMediaPermissionRequestProxy::UserMediaAccessDenialReason::PermissionDenied);
&gt; +                else
&gt; +                    uiDelegateAuthorizationBlock();
&gt; +            }];
&gt; +        } else
&gt; +            uiDelegateAuthorizationBlock();
&gt; +    };
&gt; +
&gt; +    if (requiresAudio) {
&gt; +        [captureDeviceAuthorizer() requestMicrophoneAuthorization:^(BOOL authorized) {
&gt; +            if (!authorized)
&gt; +                request.deny(UserMediaPermissionRequestProxy::UserMediaAccessDenialReason::PermissionDenied);
&gt; +            else
&gt; +                cameraAuthorizationBlock();
&gt; +        }];
&gt; +    } else
&gt; +        cameraAuthorizationBlock();</span >

Why does this need to be iOS specific?

<span class="quote">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:395
&gt; +    [(id &lt;WKUIDelegatePrivate&gt;)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">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:402
&gt; +void UIDelegate::UIClient::isPlayingAudioDidChange(WebKit::WebPageProxy&amp; 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">&gt; Source/WebKit2/UIProcess/ios/WKUserMediaCaptureDeviceAuthorizerIOS.h:28
&gt; +&#64;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>