<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - TAKE 2: Pass down website autoplay policies to media elements"
href="https://bugs.webkit.org/show_bug.cgi?id=167355#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - TAKE 2: Pass down website autoplay policies to media elements"
href="https://bugs.webkit.org/show_bug.cgi?id=167355">bug 167355</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=167355#c2">comment #2</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=299566&action=diff" name="attach_299566" title="Patch">attachment 299566</a> <a href="attachment.cgi?id=299566&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=299566&action=review">https://bugs.webkit.org/attachment.cgi?id=299566&action=review</a>
>
> > Source/WebCore/loader/DocumentLoader.h:471
> > + std::optional<bool> m_audioPlaybackRequiresUserGesture;
> > + std::optional<bool> m_videoPlaybackRequiresUserGesture;
>
> I think this should be a 3-state enum, probably with a different name like
> m_audioPlaybackPolicy.
> enum class AutoplayPolicy {
> RequireUserGesture,
> AutoPlay,
> AutoPlayWithoutSound,
> Default, <-- This name might need to be more descriptive indicating that
> the policy hasn't been set by the WebsitePolicies so default to the Settings
> value. Maybe just a comment explaining this.
> etc.
> }
> These two could probably even be made into one enum</span >
Done.
<span class="quote">>
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:820
> > +#if PLATFORM(MAC)
>
> Let's get rid of this now that it doesn't do anything for other platforms.</span >
Okay, and I made the tests run on iOS as well.
<span class="quote">>
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:823
> > + documentLoader->setAudioPlaybackRequiresUserGesture(std::optional<bool>());
>
> std::nullopt</span >
Not necessary with the changes above.</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>