[Webkit-unassigned] [Bug 79167] Expose a setting to exempt media playback from user gesture requirement after a user gesture is initiated on loading/playing a media
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 21 21:58:27 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=79167
--- Comment #5 from Eric Carlson <eric.carlson at apple.com> 2012-02-21 21:58:27 PST ---
(In reply to comment #4)
> No, we do not lift the restriction in HTMLMediaElement.
> So if I build chrome with requireUserGestureForMediaPlayback settings on, I have to manually click on the play and pause button to play and pause the media, even if the media is loaded through user gesture.
> There is no place we called removeBehaviorRestriction() in chromium.
>
I think we should just clear m_restrictions if loading or playback is initiated by a user gesture. I would suggest adding a function like this:
void HTMLMediaElement::userRequestsMediaLoading()
{
// The user is requesting data loading and/or playback, so remove the "only change playback in response
// to a user gesture" restriction on this movie.
m_restrictions = NoRestrictions;
}
and then this:
if (ScriptController::processingUserGesture())
userRequestsMediaLoading();
to play() and load(), and you won't need any of the rest of your patch.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list