Bug 88897 - Disable autoplay when user gesture is required for media playback
Summary: Disable autoplay when user gesture is required for media playback
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 66687
  Show dependency treegraph
 
Reported: 2012-06-12 11:47 PDT by Min Qin
Modified: 2012-06-12 13:57 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.78 KB, patch)
2012-06-12 11:52 PDT, Min Qin
no flags Details | Formatted Diff | Diff
Patch (4.27 KB, patch)
2012-06-12 11:56 PDT, Min Qin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Min Qin 2012-06-12 11:47:52 PDT
Disable autoplay when user gesture is required for media playback
Comment 1 Min Qin 2012-06-12 11:52:25 PDT
Created attachment 147129 [details]
Patch
Comment 2 Min Qin 2012-06-12 11:56:37 PDT
Created attachment 147131 [details]
Patch
Comment 3 Adam Barth 2012-06-12 12:59:46 PDT
Comment on attachment 147131 [details]
Patch

Makes sense.
Comment 4 Eric Carlson 2012-06-12 13:29:04 PDT
Comment on attachment 147131 [details]
Patch

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

> LayoutTests/media/no-autoplay-with-user-gesture-requirement.html:10
> +            function cleanGestureRequirement() {

Nit: a function's opening brace should be on a new line.
Comment 5 Eric Carlson 2012-06-12 13:34:24 PDT
Comment on attachment 147131 [details]
Patch

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

> LayoutTests/media/no-autoplay-with-user-gesture-requirement.html:31
> +            function canplaythrough()
> +            {
> +                 setTimeout(testPaused, 500);
> +            }

500ms is a *very* long time for a test to hang out waiting for nothing to happen. The 'play' event handler will make the test fail immediately if playback does start, so I think a much shorter timeout should be used here.
Comment 6 WebKit Review Bot 2012-06-12 13:37:39 PDT
Comment on attachment 147131 [details]
Patch

Clearing flags on attachment: 147131

Committed r120112: <http://trac.webkit.org/changeset/120112>
Comment 7 WebKit Review Bot 2012-06-12 13:37:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Eric Carlson 2012-06-12 13:45:44 PDT
(In reply to comment #7)
> All reviewed patches have been landed.  Closing bug.

Hmm, guess I should have cleared the cq+ flag :-(

@Min, can you please file to do the cleanup work needed?
Comment 9 Min Qin 2012-06-12 13:50:20 PDT
Hi,Eric
I Created patch https://bugs.webkit.org/show_bug.cgi?id=88909 to fix the comments.
Fixed the bracket and reduced the timeout to 100 ms

(In reply to comment #8)
> (In reply to comment #7)
> > All reviewed patches have been landed.  Closing bug.
> 
> Hmm, guess I should have cleared the cq+ flag :-(
> 
> @Min, can you please file to do the cleanup work needed?
Comment 10 Eric Carlson 2012-06-12 13:57:02 PDT
(In reply to comment #9)
> Hi,Eric
> I Created patch https://bugs.webkit.org/show_bug.cgi?id=88909 to fix the comments.
> Fixed the bracket and reduced the timeout to 100 ms
> 
Thank you very much for the quick fix!