-
Notifications
You must be signed in to change notification settings - Fork 241
Expand file tree
/
Copy pathother-width.html
More file actions
260 lines (239 loc) · 12.6 KB
/
Copy pathother-width.html
File metadata and controls
260 lines (239 loc) · 12.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Able Player Width Tests | Able Player Demos</title>
<link rel="stylesheet" href="demos.css" type="text/css">
<!-- Dependencies -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Able Player CSS -->
<link rel="stylesheet" href="../build/ableplayer.min.css" type="text/css"/>
<!-- Able Player JavaScript -->
<script src="../build/ableplayer.js"></script>
<!-- Vimeo JavaScript -->
<script src="https://player.vimeo.com/api/player.js"></script>
<style>
section {
max-width: 100%;
}
</style>
</head>
<body>
<header>
<div class="title">Able Player Demos</div>
</header>
<nav>
<ul>
<li><a href="index.html">More demos</a></li>
<li><a href="https://ableplayer.github.io/ableplayer">Able Player Home</a></li>
</ul>
</nav>
<main>
<h1>Able Player Width Tests</h1>
<p>This page includes various combinations of audio and video elements.
The following rules apply for defining the size of an Able Player instance:</p>
<ul>
<li>If <strong>width</strong> and <strong>height</strong> attributes are present,
these are used to set the default size of the player.</li>
<li>The above attributes are not valid HTML for <audio>, but are still supported.
However, to ensure valid code, <strong>data-width</strong> should be used instead.</li>
<li>If no size attributes are present, the player defaults to the intrinsic width of the video.</li>
<li>The player will not exceed the width of its container, and will scale appropriately in a responsive design.</li>
</ul>
<p>For additional demos see the <a href="index.html">Index of <em>Able Player</em> Examples</a>.</p>
<section aria-labelledby="audio1-heading">
<h2 id="audio1-heading">Audio Example 1 (default width)</h2>
<ul>
<li><strong>Width attribute:</strong> No</li>
<li><strong>CSS width of container:</strong> Unspecified</li>
<li><strong>Expected outcome:</strong> Player fills width of the screen</li>
</ul>
<audio id="audio1" preload="auto" data-able-player playsinline>
<source type="audio/mpeg" src="../media/smallf.mp3"/>
<source type="audio/ogg" src="../media/smallf.ogg"/>
</audio>
</section>
<section aria-labelledby="audio2-heading">
<h2 id="audio2-heading">Audio Example 2 (width attribute)</h2>
<ul>
<li><strong>Width attribute:</strong> 800</li>
<li><strong>CSS width of container:</strong> Unspecified</li>
<li><strong>Expected outcome:</strong> Player is 800px wide</li>
</ul>
<audio id="audio2" data-width="800" preload="auto" data-able-player playsinline>
<source type="audio/mpeg" src="../media/smallf.mp3"/>
<source type="audio/ogg" src="../media/smallf.ogg"/>
</audio>
</section>
<section aria-labelledby="audio3-heading" style="width:500px;max-width:100%">
<h2 id="audio3-heading">Audio Example 3 (width controlled by container)</h2>
<ul>
<li><strong>Width attribute:</strong> 800</li>
<li><strong>CSS width of container:</strong> 500px</li>
<li><strong>Expected outcome:</strong> Player fills width of container (500px)</li>
</ul>
<audio id="audio3" width="800" preload="auto" data-able-player data-skin="legacy" playsinline>
<source type="audio/mpeg" src="../media/smallf.mp3"/>
<source type="audio/ogg" src="../media/smallf.ogg"/>
</audio>
</section>
<section aria-labelledby="video1-heading">
<h2 id="video1-heading">Video Example 1 (Default Size)</h2>
<ul>
<li><strong>Video intrinsic size:</strong> 1920 x 1080</li>
<li><strong>Aspect ratio:</strong> 16:9</li>
<li><strong>Width/height attributes:</strong> Unspecified</li>
<li><strong>Width of container:</strong> Unspecified</li>
<li><strong>Expected outcome:</strong> Player fills width of the screen</li>
</ul>
<video id="video1" preload="auto" data-able-player data-skin="legacy" poster="../media/deadline.jpg" playsinline>
<source type="video/mp4" src="../media/deadline.mp4" data-desc-src="../media/deadline_desc.mp4"/>
<track kind="captions" src="../media/deadline_captions_en.vtt" srclang="en" label="English" default/>
<track kind="captions" src="../media/deadline_captions_ar.vtt" srclang="ar" label="Arabic"/>
<track kind="captions" src="../media/deadline_captions_es.vtt" srclang="es" label="Spanish"/>
<track kind="captions" src="../media/deadline_captions_hi.vtt" srclang="hi" label="Hindi"/>
<track kind="captions" src="../media/deadline_captions_it.vtt" srclang="it" label="Italian"/>
<track kind="captions" src="../media/deadline_captions_pt-br.vtt" srclang="pt-br" label="Portuguese, Brazilian"/>
<track kind="descriptions" src="../media/deadline_descriptions_en.vtt" srclang="en" label="English descriptions"/>
</video>
</section>
<section aria-labelledby="video2-heading">
<h2 id="video2-heading">Video Example 2 (Width attribute)</h2>
<ul>
<li><strong>Video dimensions:</strong> 1920 x 1080</li>
<li><strong>Aspect ratio:</strong> 16:9</li>
<li><strong>Width/height attributes:</strong> 800 x 450</li>
<li><strong>Width of container:</strong> Unspecified</li>
<li><strong>Expected outcome:</strong> Video displayed at 800 x 450</li>
</ul>
<video id="video2" preload="auto" data-able-player data-skin="legacy" poster="../media/deadline.jpg" playsinline
width="800" height="450">
<source type="video/mp4" src="../media/deadline.mp4" data-desc-src="../media/deadline_desc.mp4"/>
<track kind="captions" src="../media/deadline_captions_en.vtt" srclang="en" label="English" default/>
<track kind="captions" src="../media/deadline_captions_ar.vtt" srclang="ar" label="Arabic"/>
<track kind="captions" src="../media/deadline_captions_es.vtt" srclang="es" label="Spanish"/>
<track kind="captions" src="../media/deadline_captions_hi.vtt" srclang="hi" label="Hindi"/>
<track kind="captions" src="../media/deadline_captions_it.vtt" srclang="it" label="Italian"/>
<track kind="captions" src="../media/deadline_captions_pt-br.vtt" srclang="pt-br" label="Portuguese, Brazilian"/>
<track kind="descriptions" src="../media/deadline_descriptions_en.vtt" srclang="en" label="English descriptions"/>
</video>
</section>
<section aria-labelledby="video3-heading" style="width:500px;max-width:100%">
<h2 id="video3-heading">Video Example 3 (width controlled by container)</h2>
<ul>
<li><strong>Video dimensions:</strong> 1920 x 1080</li>
<li><strong>Aspect ratio:</strong> 16:9</li>
<li><strong>Width/height attributes:</strong> Unspecified</li>
<li><strong>Width of container:</strong> 500px (max-width 100%)</li>
<li><strong>Expected outcome:</strong> Video fills the width of its container, 500px or less.</li>
</ul>
<video id="video3" preload="auto" data-able-player data-skin="legacy" poster="../media/deadline.jpg" playsinline>
<source type="video/mp4" src="../media/deadline.mp4" data-desc-src="../media/deadline_desc.mp4"/>
<track kind="captions" src="../media/deadline_captions_en.vtt" srclang="en" label="English" default/>
<track kind="captions" src="../media/deadline_captions_ar.vtt" srclang="ar" label="Arabic"/>
<track kind="captions" src="../media/deadline_captions_es.vtt" srclang="es" label="Spanish"/>
<track kind="captions" src="../media/deadline_captions_hi.vtt" srclang="hi" label="Hindi"/>
<track kind="captions" src="../media/deadline_captions_it.vtt" srclang="it" label="Italian"/>
<track kind="captions" src="../media/deadline_captions_pt-br.vtt" srclang="pt-br" label="Portuguese, Brazilian"/>
<track kind="descriptions" src="../media/deadline_descriptions_en.vtt" srclang="en" label="English descriptions"/>
</video>
</section>
<section aria-labelledby="video4-heading" style="width:500px;max-width:100%">
<h2 id="video4-heading">Video Example 4 (4:3 Aspect Ratio)</h2>
<ul>
<li><strong>Video dimensions:</strong> 640 x 480</li>
<li><strong>Aspect ratio:</strong> 4:3</li>
<li><strong>Width/height attributes:</strong> Unspecified </li>
<li><strong>Width of container:</strong> 500px (max-width 100%)</li>
<li><strong>Expected outcome:</strong> Video fills the width of its container, 500px or less.</li>
</ul>
<video id="video4" preload="auto" poster="../media/wwa.jpg" data-able-player data-skin="legacy" playsinline>
<source type="video/mp4" src="../media/wwa.mp4" data-desc-src="../media/wwa_described.mp4"/>
<source type="video/webm" src="../media/wwa.webm" data-desc-src="../media/wwa_described.webm"/>
<track kind="captions" src="../media/wwa_captions_en.vtt" srclang="en" label="English"/>
<track kind="descriptions" src="../media/wwa_description_en.vtt" srclang="en"/>
<track kind="chapters" src="../media/wwa_chapters_en.vtt" srclang="en"/>
</video>
</section>
<section aria-labelledby="youtube1-heading">
<h2 id="youtube1-heading">YouTube Example 1 (Unconstrained)</h2>
<ul>
<li><strong>Video dimensions:</strong> 640 x 360</li>
<li><strong>Aspect ratio:</strong> 16:9</li>
<li><strong>Width/height attributes:</strong> Unspecified </li>
<li><strong>Width of container:</strong> Unspecified</li>
<li><strong>Expected outcome:</strong> Player fills width of the screen</li>
</ul>
<video id="youtube1" data-able-player data-skin="legacy" preload="auto"
data-youtube-id="dhwpLACAls8" data-youtube-desc-id="Ck2TdVMhWcU">
</video>
</section>
<section aria-labelledby="youtube2-heading">
<h2 id="youtube2-heading">YouTube Example 2 (width attribute)</h2>
<ul>
<li><strong>Video dimensions:</strong> 640 x 360</li>
<li><strong>Aspect ratio:</strong> 16:9</li>
<li><strong>Width/height attributes:</strong> 800 x 450</li>
<li><strong>Width of container:</strong> Unspecified</li>
<li><strong>Expected outcome:</strong> Video will be displayed at 800 x 450.</li>
</ul>
<video id="youtube2" width="800" data-able-player data-skin="legacy" preload="auto"
data-youtube-id="dhwpLACAls8" data-youtube-desc-id="Ck2TdVMhWcU">
</video>
</section>
<section aria-labelledby="youtube2-heading" style="width:500px;max-width:100%;">
<h2 id="youtube3-heading">YouTube Example 3 (width controlled by container)</h2>
<ul>
<li><strong>Video dimensions:</strong> 640 x 360</li>
<li><strong>Aspect ratio:</strong> 16:9</li>
<li><strong>Width/height attributes:</strong> Unspecified </li>
<li><strong>Width of container:</strong> 500px (max-width 100%)</li>
<li><strong>Expected outcome:</strong> Video fills the width of its container, 500px or less.</li>
</ul>
<video id="youtube3" data-able-player data-skin="legacy" preload="auto"
data-youtube-id="dhwpLACAls8" data-youtube-desc-id="Ck2TdVMhWcU">
</video>
</section>
<section aria-labelledby="vimeo1-heading">
<h2 id="vimeo1-heading">Vimeo Example 1 (Unconstrained)</h2>
<ul>
<li><strong>Video dimensions:</strong> Unknown</li>
<li><strong>Aspect ratio:</strong> Unknown</li>
<li><strong>Inline style dimensions:</strong> N/A</li>
<li><strong>Width/height attributes:</strong> N/A</li>
<li><strong>Expected outcome:</strong> Player fills width of the screen.</li>
</ul>
<video id="vimeo1" data-able-player data-skin="legacy" preload="auto"
data-vimeo-id="328769500" data-vimeo-desc-id="328769442">
</video>
</section>
<section aria-labelledby="vimeo2-heading">
<h2 id="vimeo2-heading">Vimeo Example 2 (width attribute)</h2>
<ul>
<li><strong>Video dimensions:</strong> Unknown</li>
<li><strong>Aspect ratio:</strong> Unknown</li>
<li><strong>Width/height attributes:</strong> 800 x 450</li>
<li><strong>Expected outcome:</strong> Video displayed at 800px wide</li>
</ul>
<video id="vimeo2" data-able-player data-skin="legacy" preload="auto" width="800" height="450"
data-vimeo-id="328769500" data-vimeo-desc-id="328769442">
</video>
</section>
<section aria-labelledby="vimeo3-heading" style="width:500px;max-width:100%">
<h2 id="vimeo3-heading">Vimeo Example 3 (width controlled by container)</h2>
<ul>
<li><strong>Video dimensions:</strong> Unknown</li>
<li><strong>Aspect ratio:</strong> Unknown</li>
<li><strong>Width/height attributes:</strong> Unspecified</li>
<li><strong>Width of container:</strong> 500px (max-width 100%)</li>
<li><strong>Expected outcome:</strong> Video fills the width of its container, 500px or less.</li>
</ul>
<video id="vimeo3" data-able-player data-skin="legacy" preload="auto"
data-vimeo-id="328769500" data-vimeo-desc-id="328769442">
</video>
</section>
</main>
</body>
</html>