Bug 175005

Summary: Support quirk for letting media autoplay if the user interacted with at least one media element
Product: WebKit Reporter: Matt Rajca <mrajca>
Component: MediaAssignee: Matt Rajca <mrajca>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review+

Matt Rajca
Reported 2017-07-31 17:08:06 PDT
Support quirk for letting media autoplay if the user interacted with at least one media element.
Attachments
Patch (6.15 KB, patch)
2017-07-31 17:10 PDT, Matt Rajca
eric.carlson: review+
Matt Rajca
Comment 1 2017-07-31 17:10:56 PDT
Eric Carlson
Comment 2 2017-07-31 17:23:08 PDT
Comment on attachment 316815 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=316815&action=review > Source/WebCore/ChangeLog:5 > + Radar? > Source/WebCore/html/MediaElementSession.cpp:194 > + if (needsDocumentLevelMediaUserGestureQuirk(element.document()) && element.document().topDocument().mediaState() & MediaProducer::HasUserInteractedWithMediaElement) Nit: may be worth swapping the order of the comparisons.
Matt Rajca
Comment 3 2017-07-31 17:38:28 PDT
(In reply to Eric Carlson from comment #2) > Comment on attachment 316815 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=316815&action=review > > > Source/WebCore/ChangeLog:5 > > + > > Radar? Added. > > > Source/WebCore/html/MediaElementSession.cpp:194 > > + if (needsDocumentLevelMediaUserGestureQuirk(element.document()) && element.document().topDocument().mediaState() & MediaProducer::HasUserInteractedWithMediaElement) > > Nit: may be worth swapping the order of the comparisons. Done.
Matt Rajca
Comment 4 2017-07-31 17:39:00 PDT
(In reply to Eric Carlson from comment #2) > Comment on attachment 316815 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=316815&action=review > > > Source/WebCore/ChangeLog:5 > > + > > Radar? > > > Source/WebCore/html/MediaElementSession.cpp:194 > > + if (needsDocumentLevelMediaUserGestureQuirk(element.document()) && element.document().topDocument().mediaState() & MediaProducer::HasUserInteractedWithMediaElement) > > Nit: may be worth swapping the order of the comparisons. I also put the quirk in #if PLATFORM(MAC) like we talked about.
Matt Rajca
Comment 5 2017-07-31 17:39:22 PDT
Radar WebKit Bug Importer
Comment 6 2017-07-31 17:41:13 PDT
Note You need to log in before you can comment on or make changes to this bug.