[Webkit-unassigned] [Bug 167132] Pass down website autoplay policies to media elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 18 09:48:43 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=167132

--- Comment #9 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 299073
  --> https://bugs.webkit.org/attachment.cgi?id=299073
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=299073&action=review

> 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.

> 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.

> 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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170118/ca2ce5a3/attachment.html>


More information about the webkit-unassigned mailing list