<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@apple.com" title="Matt Rajca <mrajca@apple.com>"> <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">> Comment on <span class=""><a href="attachment.cgi?id=299073&action=diff" name="attach_299073" title="Patch">attachment 299073</a> <a href="attachment.cgi?id=299073&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=299073&action=review">https://bugs.webkit.org/attachment.cgi?id=299073&action=review</a>
>
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:821
> > + if (coreFrame && !websitePolicies.autoplayEnabled) {
>
> I don't think we need to check coreFrame. It was dereferenced on line 804,
> so if it were null we would have already crashed.</span >
Removed.
<span class="quote">>
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:824
> > + settings.setVideoPlaybackRequiresUserGesture(true);
> > + settings.setAudioPlaybackRequiresUserGesture(true);
>
> Are these values set back to their default value for the next navigation?
> Add a test that sets autoplayEnabled back to true and does another
> navigation to make sure that it behaves as expected.</span >
Good catch. I polished this up and added a test.
<span class="quote">>
> > Tools/TestWebKitAPI/Tests/WebKit2/autoplayCheck.html:12
> > + }, 100)
>
> Is 100ms enough time for the video to have always started playing when it is
> 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>