<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Pass down website autoplay policies to media elements"
   href="https://bugs.webkit.org/show_bug.cgi?id=167132#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Pass down website autoplay policies to media elements"
   href="https://bugs.webkit.org/show_bug.cgi?id=167132">bug 167132</a>
              from <span class="vcard"><a class="email" href="mailto:mrajca&#64;apple.com" title="Matt Rajca &lt;mrajca&#64;apple.com&gt;"> <span class="fn">Matt Rajca</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=167132#c9">comment #9</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=299073&amp;action=diff" name="attach_299073" title="Patch">attachment 299073</a> <a href="attachment.cgi?id=299073&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=299073&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=299073&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:821
&gt; &gt; +    if (coreFrame &amp;&amp; !websitePolicies.autoplayEnabled) {
&gt; 
&gt; I don't think we need to check coreFrame.  It was dereferenced on line 804,
&gt; so if it were null we would have already crashed.</span >

Removed.

<span class="quote">&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:824
&gt; &gt; +        settings.setVideoPlaybackRequiresUserGesture(true);
&gt; &gt; +        settings.setAudioPlaybackRequiresUserGesture(true);
&gt; 
&gt; Are these values set back to their default value for the next navigation? 
&gt; Add a test that sets autoplayEnabled back to true and does another
&gt; navigation to make sure that it behaves as expected.</span >

Good catch. I polished this up and added a test.

<span class="quote">&gt; 
&gt; &gt; Tools/TestWebKitAPI/Tests/WebKit2/autoplayCheck.html:12
&gt; &gt; +                }, 100)
&gt; 
&gt; Is 100ms enough time for the video to have always started playing when it is
&gt; allowed to?</span >

It should be, given the video file is around 100 KB and loaded locally.</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>