forked from CSS-Tricks/AnythingSlider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.html
386 lines (356 loc) · 14.7 KB
/
video.html
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>AnythingSlider Video Demo</title>
<link rel="shortcut icon" href="demos/images/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="demos/images/apple-touch-icon.png">
<!-- jQuery (required) -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>
<!-- Demo stuff -->
<link rel="stylesheet" href="demos/css/page.css">
<!-- Anything Slider optional plugins, but needed so the embeded video controls will work in IE -->
<!-- http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js -->
<script src="js/swfobject.js"></script>
<!-- Anything Slider -->
<link rel="stylesheet" href="css/anythingslider.css">
<script src="js/jquery.anythingslider.js"></script>
<!-- AnythingSlider video extension; optional, but needed to control video pause/play -->
<script src="js/jquery.anythingslider.video.js"></script>
<script>
// DOM Ready
$(function(){
$('#slider')
.anythingSlider({
resizeContents : true,
addWmodeToObject : 'opaque',
navigationFormatter : function(index, panel){ // Format navigation labels with text
return ['Vimeo-iframe', 'Vimeo-embed', 'YouTube-iframe', 'YouTube-embed', 'HTML5 Video'][index - 1];
}
})
// Initialize video extension
// see https://developers.google.com/youtube/player_parameters?hl=en#Parameters for a list of parameters
.anythingSliderVideo({
// video id prefix; suffix from $.fn.anythingSliderVideo.videoIndex
videoId : 'asvideo',
// auto load YouTube api script
youtubeAutoLoad : true,
// see: https://developers.google.com/youtube/player_parameters#Parameters
youtubeParams: {
modestbranding : 1,
iv_load_policy : 3,
fs : 1
}
});
});
</script>
</head>
<body>
<br>
<div id="nav">
<a href="index.html">Main Demo</a>
<a href="simple.html">Simple Demo</a>
<a href="expand.html">Expand Demo</a>
<a class="current" href="video.html">Video Demo</a>
<a href="demos.html">FX Demos</a>
<a href="css3.html">CSS3 Demo</a>
<a class="play" href="http://jsfiddle.net/Mottie/ycUB6/">Playground</a>
<a class="git" href="https://github.com/CSS-Tricks/AnythingSlider/wiki">Documentation</a>
<a class="git" href="https://github.com/CSS-Tricks/AnythingSlider/zipball/master">Download</a>
<a class="issue" href="https://github.com/CSS-Tricks/AnythingSlider/issues">Issues</a>
</div>
<br><br>
<!-- START AnythingSlider -->
<ul id="slider">
<!-- Vimeo: iframe -->
<li class="panel1"><iframe src="http://player.vimeo.com/video/18011143?title=0&byline=0&portrait=0" width="400" height="225" frameborder="0"></iframe></li>
<!-- Vimeo: Embeded -->
<li class="panel2"><object width="940" height="529"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12280336&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12280336&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="940" height="529"></embed></object></li>
<!-- YouTube: iframe -->
<li class="panel3"><iframe title="YouTube video player" width="480" height="385" src="http://www.youtube.com/embed/1gOyrAVZHi4" frameborder="0" allowfullscreen></iframe></li>
<!-- YouTube: Embedded -->
<li class="panel4"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/zSgiXGELjbc&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zSgiXGELjbc&hl=en_US&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></li>
<!-- HTML5 Video -->
<li class="panel5">
<video width="320" height="240" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
<source src="demos/video/movie.mp4" type="video/mp4">
<source src="demos/video/movie.webm" type="video/webm">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
</li>
</ul> <!-- END AnythingSlider -->
<br>
<!-- Video compatibility table -->
<div class="video-info">
<h2>AnythingSlider Video Extension Compatibility</h2>
<table border="1" class="data">
<thead>
<tr>
<th rowspan="2">Video Type</th>
<th rowspan="2">Function</th>
<th colspan="8">Browser</th>
</tr>
<tr>
<th class="header">FF</th>
<th class="header">C</th>
<th class="header">S</th>
<th class="header">O</th>
<th class="header">IE10</th>
<th class="header">IE9</th>
<th class="header">IE8</th>
<th class="header">IE7</th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="4">Vimeo iframe</th>
<td>Setup</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<td>Continue</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr><td>Pause</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr>
<td>Pause Slideshow</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr>
<th rowspan="4">Vimeo embed</th>
<td>Setup</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<td>Continue</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr><td>Pause</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<td>Pause Slideshow</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<th rowspan="4">YouTube iframe</th>
<td>Setup</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<td>Continue *</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="prob">?</td> <!-- Safari -->
<td class="bad">?</td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr><td>Pause</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr>
<td>Pause Slideshow</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="bad">?</td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr>
<th rowspan="4">YouTube embed</th>
<td>Setup</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<td>Continue</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr><td>Pause</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<td>Pause Slideshow</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="good"></td> <!-- IE8 -->
<td class="good"></td> <!-- IE7 -->
</tr>
<tr>
<th rowspan="4">HTML5 Video</th>
<td>Setup</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="prob"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="bad"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr>
<td>Continue</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="bad"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr><td>Pause</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="bad"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
<tr>
<td>Pause Slideshow</td>
<td class="good"></td> <!-- Firefox -->
<td class="good"></td> <!-- Chrome -->
<td class="good"></td> <!-- Safari -->
<td class="good"></td> <!-- Opera -->
<td class="good"></td> <!-- IE10 -->
<td class="good"></td> <!-- IE9 -->
<td class="bad"></td> <!-- IE8 -->
<td class="bad"></td> <!-- IE7 -->
</tr>
</tbody>
</table>
<br>
<h3>Legend (<small>Updated 4/23/2013</small>)</h3>
<ul>
<li>(*) YouTube iframe
<ul>
<li><del>The video autoplays (continues) the second time the video comes into view, because it gets paused even though it hasn't started; oddly this isn't a problem in Firefox. Still working on a fix</del>.</li>
<li><del>Watching a related video breaks the ability if the slider to continue playing and pause the slideshow while playing these videos. This is because the iframe does not update the video URL and there is no way, that I know of, of determining which iframe is reporting a status change.</del></li>
<li>Did not test the updated video extension in Safari or Opera.</li>
</ul>
</li>
<li>(FF) Firefox 3+ - No problems noted.</li>
<li>(C) Chrome - Ignore "Unsafe JavaScript attempt to access frame with URL" error.</li>
<li>(S) Safari 4+
<ul>
<li>HTML5 video shows up as a black box when it should be hidden by overflow (at least in Windows).</li>
<li>In Safari for Windows, including an HTML5 along with other videos appears to offset every video down and right (about 100px) for an unknown reason. For now, this issue can be solved by keeping HTML5 videos separate from other videos.</li>
</ul>
</li>
<li>(O) Opera 9+ - YouTube iframe does not update player status when the script controls it (<a href="https://groups.google.com/forum/#!msg/youtube-api-gdata/eaPsecXHVmc/NXNDQhMZcwsJ">reported</a>). So this breaks this extension's ability to resume a video and pause the slideshow.Not tested in the latest version.</li>
<li>(IE10) Internet Explorer 10 - No problems noted.</li>
<li>(IE9) Internet Explorer 9 - No problems noted.</li>
<li>(IE8) Internet Explorer 8 - no support for HTML5.</li>
<li>(IE7) Internet Explorer 7 - no support for HTML5 and no support for iframe communication.</li>
</ul>
</div>
<br>
</body>
</html>