OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <video autoplay controls></video> | |
3 <script src=media-file.js></script> | |
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | |
5 (Please avoid writing new tests using video-test.js) --> | |
6 <script src=video-test.js></script> | |
7 <script src=autoplay-experiment-helper.js></script> | |
8 <body> | |
9 <pre> | |
10 Check if the autoplay gesture override experiment works. There are a lot | |
11 of config options, so this test just runs all of them. | |
12 | |
13 The "results" table contains one row per config tested. | |
14 == Test Inputs == | |
liberato (no reviews please)
2016/05/03 15:45:23
this should probably move into the js too.
| |
15 # - config number, in case you'd like to run just one. | |
16 Flags - autoplay experiment setting being tested. | |
17 a - "foraudio" | |
18 v - "forvideo" | |
19 V - "ifviewport" | |
20 P - "ifpagevisible" | |
21 M - "ifmuted" | |
22 p - "playmuted" | |
23 m - "ifmobile" | |
24 For example, vM means '-forvideo-ifmuted". | |
25 Type - audio or video element? | |
26 audio - <audio> | |
27 video - <video> | |
28 Play w/- how is play requested? | |
29 none - play is not requested. | |
30 attr - autoplay attribute is set on the element. | |
31 play() - play() called after media is ready to play. | |
32 Mute - how is media muted? | |
33 no - media is not muted. | |
34 yes - muted attribute is set on the element. | |
35 Mobile - is page optimized for mobile? | |
36 no - page is not optimized for mobile. | |
37 yes - page is optimized for mobile. | |
38 View - is media in viewport? | |
39 onscreen - element starts out onscreen. | |
40 scroll - element starts offscreen, scrolled into view once | |
41 it is ready to play. | |
42 offscreen - element starts out offscreen and stays offscreen. | |
43 obscured - onscreen but page is not visible. | |
44 Setting - autoplay settings value | |
45 enabled - content settings enables autoplay | |
46 disabled - content settings disables autoplay | |
47 | |
48 == Test Outputs == | |
49 Early? - did playback start before element was scrolled onscreen? For | |
50 tests in which View!=scroll, this is reported as "-". | |
51 Played? - did playback start by the conclusion of the test? | |
52 Muted? - was the media muted? If the media didn't play, then this is | |
53 reported as "-". | |
54 | |
55 </pre> | |
56 <table id="results"> | |
57 <tr> | |
58 <td>#</td> | |
59 <td>Flags</td> | |
60 <td>Type</td> | |
61 <td>Play w/</td> | |
62 <td>Mute</td> | |
63 <td>Mobile</td> | |
64 <td>View</td> | |
65 <td>Setting</td> | |
66 <td>Early?</td> | |
67 <td>Played?</td> | |
68 <td>Muted?</td> | |
69 </tr> | |
70 </table> | |
71 </body> | |
72 | |
73 <script> | |
74 | |
75 start('audio', [ 'none', | |
76 'enabled-forvideo', | |
77 'enabled-foraudio', | |
78 'enabled-foraudio-ifviewport']); | |
79 | |
80 </script> | |
81 </html> | |
OLD | NEW |