RESOLVED FIXED 174947
Don't add autoplay restrictions to media elements created in response to user gestures
https://bugs.webkit.org/show_bug.cgi?id=174947
Summary Don't add autoplay restrictions to media elements created in response to user...
Matt Rajca
Reported 2017-07-28 12:21:08 PDT
Don't add autoplay restrictions to media elements created in response to user gestures.
Attachments
Patch (5.28 KB, patch)
2017-07-28 12:27 PDT, Matt Rajca
eric.carlson: review+
Matt Rajca
Comment 1 2017-07-28 12:22:21 PDT
This fixes playback on the New York Times homepage (and possibly other sites).
Matt Rajca
Comment 2 2017-07-28 12:27:28 PDT
Eric Carlson
Comment 3 2017-07-28 15:02:31 PDT
Comment on attachment 316665 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=316665&action=review > Source/WebCore/html/HTMLMediaElement.cpp:466 > + const bool isProcessingUserGesture = processingUserGestureForMedia(); Why const for this and not the other bool variables? > LayoutTests/media/video-create-with-user-gesture.html:17 > + failTestIn(1000); Nit: this is probably too short for a heavily laden machine (e.g. a bot). I would set it to something like 10 seconds.
Matt Rajca
Comment 4 2017-07-28 17:24:11 PDT
(In reply to Eric Carlson from comment #3) > Comment on attachment 316665 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=316665&action=review > > > Source/WebCore/html/HTMLMediaElement.cpp:466 > > + const bool isProcessingUserGesture = processingUserGestureForMedia(); > > Why const for this and not the other bool variables? I can change the other ones for consistency. None of these are modified after they're declared. > > > LayoutTests/media/video-create-with-user-gesture.html:17 > > + failTestIn(1000); > > Nit: this is probably too short for a heavily laden machine (e.g. a bot). I > would set it to something like 10 seconds. Will do.
Matt Rajca
Comment 5 2017-07-28 17:27:22 PDT
Radar WebKit Bug Importer
Comment 6 2017-07-28 17:29:15 PDT
Note You need to log in before you can comment on or make changes to this bug.