MediaElement.js – HTML5 Video & Audio Player - Version 4.2.8

Version Description

  • Updating to latest 4.x version
Download this release

Release Info

Developer johndyer
Plugin Icon 128x128 MediaElement.js – HTML5 Video & Audio Player
Version 4.2.8
Comparing to
See all releases

Code changes from version 2.23.5 to 4.2.8

Files changed (43) hide show
  1. mediaelement-js-wp.php +457 -481
  2. mediaelement/background.png +0 -0
  3. mediaelement/bigplay.png +0 -0
  4. mediaelement/controls-ted.png +0 -0
  5. mediaelement/controls-wmp-bg.png +0 -0
  6. mediaelement/controls-wmp.png +0 -0
  7. mediaelement/controls.png +0 -0
  8. mediaelement/controls.svg +0 -172
  9. mediaelement/flashmediaelement.swf +0 -0
  10. mediaelement/loading.gif +0 -0
  11. mediaelement/mediaelement-and-player.js +0 -6655
  12. mediaelement/mediaelement-and-player.min.js +0 -43
  13. mediaelement/mediaelement.js +0 -2441
  14. mediaelement/mediaelement.min.js +0 -30
  15. mediaelement/mediaelementplayer.css +0 -1007
  16. mediaelement/mediaelementplayer.js +0 -4213
  17. mediaelement/mediaelementplayer.min.css +0 -1
  18. mediaelement/mediaelementplayer.min.js +0 -14
  19. mediaelement/mejs-skins.css +0 -289
  20. mediaelement/silverlightmediaelement.xap +0 -0
  21. mediaelement/v4/lang/ca.js +89 -0
  22. mediaelement/v4/lang/cs.js +90 -0
  23. mediaelement/v4/lang/de.js +90 -0
  24. mediaelement/v4/lang/es.js +90 -0
  25. mediaelement/v4/lang/fa.js +90 -0
  26. mediaelement/v4/lang/fr.js +91 -0
  27. mediaelement/v4/lang/hr.js +87 -0
  28. mediaelement/v4/lang/hu.js +90 -0
  29. mediaelement/v4/lang/it.js +90 -0
  30. mediaelement/v4/lang/ja.js +90 -0
  31. mediaelement/v4/lang/ko.js +90 -0
  32. mediaelement/v4/lang/nl.js +91 -0
  33. mediaelement/v4/lang/pl.js +90 -0
  34. mediaelement/v4/lang/pt.js +92 -0
  35. mediaelement/v4/lang/ro.js +90 -0
  36. mediaelement/v4/lang/ru.js +90 -0
  37. mediaelement/v4/lang/sk.js +90 -0
  38. mediaelement/v4/lang/sv.js +89 -0
  39. mediaelement/v4/lang/uk.js +89 -0
  40. mediaelement/v4/lang/zh-cn.js +90 -0
  41. mediaelement/v4/lang/zh.js +91 -0
  42. mediaelement/v4/mediaelement-and-player.js +8508 -0
  43. mediaelement/v4/mediaelement-and-player.min.js +12 -0
mediaelement-js-wp.php CHANGED
@@ -1,481 +1,457 @@
1
- <?php
2
- /**
3
- * @package MediaElementJS
4
- * @version 2.23.5
5
- */
6
-
7
- /*
8
- Plugin Name: MediaElement.js - HTML5 Audio and Video
9
- Plugin URI: http://mediaelementjs.com/
10
- Description: Video and audio plugin for WordPress built on MediaElement.js HTML5 video and audio player library. Embeds media in your post or page using HTML5 with Flash or Silverlight fallback support for non-HTML5 browsers. Video support: MP4, Ogg, WebM, WMV. Audio support: MP3, WMA, WAV
11
- Author: John Dyer
12
- Version: 2.23.5
13
- Author URI: http://j.hn/
14
- License: MIT
15
- */
16
-
17
- /*
18
- Adapted from: http://videojs.com/ plugin
19
- */
20
-
21
- $mediaElementPlayerIndex = 1;
22
-
23
- /* Runs when plugin is activated */
24
- register_activation_hook(__FILE__,'mejs_install');
25
-
26
- function mejs_install() {
27
- add_option('mep_video_skin', '');
28
-
29
- add_option('mep_default_video_height', 270);
30
- add_option('mep_default_video_width', 480);
31
- add_option('mep_default_video_type', '');
32
-
33
- add_option('mep_default_audio_height', 30);
34
- add_option('mep_default_audio_width', 400);
35
- add_option('mep_default_audio_type', '');
36
- }
37
-
38
- /* Runs on plugin deactivation*/
39
- register_deactivation_hook( __FILE__, 'mejs_remove' );
40
- function mejs_remove() {
41
- delete_option('mep_video_skin');
42
-
43
- delete_option('mep_default_video_height');
44
- delete_option('mep_default_video_width');
45
- delete_option('mep_default_video_type');
46
-
47
- delete_option('mep_default_audio_height');
48
- delete_option('mep_default_audio_width');
49
- delete_option('mep_default_audio_type');
50
- }
51
-
52
- // create custom plugin settings menu
53
- add_action('admin_menu', 'mejs_create_menu');
54
-
55
- function mejs_create_menu() {
56
-
57
- //create new top-level menu
58
- add_options_page('MediaElement.js', 'MediaElement.js', 'administrator', __FILE__, 'mejs_settings_page');
59
-
60
- //call register settings function
61
- add_action( 'admin_init', 'mejs_register_settings' );
62
- }
63
-
64
-
65
- function mejs_register_settings() {
66
- //register our settings
67
- register_setting( 'mep_settings', 'mep_video_skin' );
68
-
69
- register_setting( 'mep_settings', 'mep_default_video_height' );
70
- register_setting( 'mep_settings', 'mep_default_video_width' );
71
- register_setting( 'mep_settings', 'mep_default_video_type' );
72
-
73
- register_setting( 'mep_settings', 'mep_default_audio_height' );
74
- register_setting( 'mep_settings', 'mep_default_audio_width' );
75
- register_setting( 'mep_settings', 'mep_default_audio_type' );
76
- }
77
-
78
-
79
- function mejs_settings_page() {
80
- ?>
81
- <div class="wrap">
82
- <h2>MediaElement.js HTML5 Player Options</h2>
83
-
84
- <p>See <a href="http://mediaelementjs.com/">MediaElementjs.com</a> for more details on how the HTML5 player and Flash fallbacks work.</p>
85
-
86
- <form method="post" action="options.php">
87
- <?php wp_nonce_field('update-options'); ?>
88
-
89
-
90
- <h3 class="title"><span>Video Settings</span></h3>
91
-
92
- <table class="form-table">
93
- <tr valign="top">
94
- <th scope="row">
95
- <label for="mep_default_video_width">Default Width</label>
96
- </th>
97
- <td >
98
- <input name="mep_default_video_width" type="text" id="mep_default_video_width" value="<?php echo get_option('mep_default_video_width'); ?>" />
99
- </td>
100
- </tr>
101
- <tr valign="top">
102
- <th scope="row">
103
- <label for="mep_default_video_height">Default Height</label>
104
- </th>
105
- <td >
106
- <input name="mep_default_video_height" type="text" id="mep_default_video_height" value="<?php echo get_option('mep_default_video_height'); ?>" />
107
- </td>
108
- </tr>
109
- <tr valign="top">
110
- <th scope="row">
111
- <label for="mep_default_video_type">Default Type</label>
112
- </th>
113
- <td >
114
- <input name="mep_default_video_type" type="text" id="mep_default_video_type" value="<?php echo get_option('mep_default_video_type'); ?>" /> <span class="description">such as "video/mp4"</span>
115
- </td>
116
- </tr>
117
- <tr valign="top">
118
- <th scope="row">
119
- <label for="mep_video_skin">Video Skin</label>
120
- </th>
121
- <td >
122
- <select name="mep_video_skin" id="mep_video_skin">
123
- <option value="" <?php echo (get_option('mep_video_skin') == '') ? ' selected' : ''; ?>>Default</option>
124
- <option value="wmp" <?php echo (get_option('mep_video_skin') == 'wmp') ? ' selected' : ''; ?>>WMP</option>
125
- <option value="ted" <?php echo (get_option('mep_video_skin') == 'ted') ? ' selected' : ''; ?>>TED</option>
126
- </select>
127
- </td>
128
- </tr>
129
- </table>
130
-
131
- <h3 class="title"><span>Audio Settings</span></h3>
132
-
133
-
134
- <table class="form-table">
135
- <tr valign="top">
136
- <tr valign="top">
137
- <th scope="row">
138
- <label for="mep_default_audio_width">Default Width</label>
139
- </th>
140
- <td >
141
- <input name="mep_default_audio_width" type="text" id="mep_default_audio_width" value="<?php echo get_option('mep_default_audio_width'); ?>" />
142
- </td>
143
- </tr>
144
- <tr valign="top">
145
- <th scope="row">
146
- <label for="mep_default_audio_height">Default Height</label>
147
- </th>
148
- <td >
149
- <input name="mep_default_audio_height" type="text" id="mep_default_audio_height" value="<?php echo get_option('mep_default_audio_height'); ?>" />
150
- </td>
151
- </tr>
152
- <th scope="row">
153
- <label for="mep_default_audio_type">Default Type</label>
154
- </th>
155
- <td >
156
- <input name="mep_default_audio_type" type="text" id="mep_default_audio_type" value="<?php echo get_option('mep_default_audio_type'); ?>" /> <span class="description">such as "audio/mp3"</span>
157
- </td>
158
- </tr>
159
- </table>
160
-
161
- <input type="hidden" name="action" value="update" />
162
- <input type="hidden" name="page_options" value="mep_default_video_width,mep_default_video_height,mep_default_video_type,mep_default_audio_type,mep_default_audio_width,mep_default_audio_height,mep_video_skin" />
163
-
164
- <p>
165
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
166
- </p>
167
-
168
- </div>
169
-
170
-
171
-
172
- </form>
173
- </div>
174
- <?php
175
- }
176
-
177
-
178
- define('MEDIAELEMENTJS_DIR', WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/');
179
- // Javascript
180
- function mejs_add_scripts(){
181
- if (!is_admin()){
182
- // the scripts
183
- wp_enqueue_script("mediaelementjs-scripts", MEDIAELEMENTJS_DIR ."mediaelement-and-player.min.js", array('jquery'), "2.1.3", false);
184
- }
185
- }
186
- add_action('wp_print_scripts', 'mejs_add_scripts');
187
-
188
- // css
189
- function mejs_add_styles(){
190
- if (!is_admin()){
191
- // the style
192
- wp_enqueue_style("mediaelementjs-styles", MEDIAELEMENTJS_DIR ."mediaelementplayer.css");
193
-
194
- if (get_option('mep_video_skin') != '') {
195
- wp_enqueue_style("mediaelementjs-skins", MEDIAELEMENTJS_DIR ."mejs-skins.css");
196
- }
197
- }
198
- }
199
- add_action('wp_print_styles', 'mejs_add_styles');
200
-
201
- function mejs_add_header(){
202
- /*
203
-
204
- $dir = WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/';
205
-
206
- echo <<<_end_
207
- <link rel="stylesheet" href="{$dir}mediaelementplayer.min.css" type="text/css" />
208
- <script src="{$dir}mediaelement-and-player.min.js" type="text/javascript"></script>
209
- _end_;
210
- */
211
-
212
- }
213
-
214
- // If this happens in the <head> tag it fails in iOS. Boo.
215
- function mejs_add_footer(){
216
- /*
217
- $defaultVideoWidth = get_option('mep_default_video_width');
218
- $defaultVideoHeight = get_option('mep_default_video_height');
219
-
220
- echo <<<_end_
221
- <script type="text/javascript">
222
- jQuery(document).ready(function($) {
223
- $('video[class=mep],audio[class=mep]').mediaelementplayer({defaultVideoWidth:{$defaultVideoWidth},defaultVideoHeight:{$defaultVideoHeight}});
224
- });
225
- </script>
226
- _end_;
227
- */
228
- }
229
-
230
- add_action('wp_head','mejs_add_header');
231
- add_action('wp_footer','mejs_add_footer');
232
-
233
- function mejs_media_shortcode($tagName, $atts){
234
-
235
- global $mediaElementPlayerIndex;
236
- $dir = WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/';
237
-
238
- extract(shortcode_atts(array(
239
- 'src' => '',
240
- 'mp4' => '',
241
- 'mp3' => '',
242
- 'wmv' => '',
243
- 'webm' => '',
244
- 'flv' => '',
245
- 'ogg' => '',
246
- 'poster' => '',
247
- 'width' => get_option('mep_default_'.$tagName.'_width'),
248
- 'height' => get_option('mep_default_'.$tagName.'_height'),
249
- 'type' => get_option('mep_default_'.$tagName.'_type'),
250
- 'preload' => 'none',
251
- 'skin' => get_option('mep_video_skin'),
252
- 'autoplay' => '',
253
- 'loop' => '',
254
-
255
- // old ones
256
- 'duration' => 'true',
257
- 'progress' => 'true',
258
- 'fullscreen' => 'true',
259
- 'volume' => 'true',
260
-
261
- // captions
262
- 'captions' => '',
263
- 'captionslang' => 'en'
264
- ), $atts));
265
-
266
- if ($type) {
267
- $type_attribute = 'type="'.$type.'"';
268
- }
269
-
270
- /*
271
- if ($src) {
272
- $src_attribute = 'src="'.htmlspecialchars($src).'"';
273
- $flash_src = htmlspecialchars($src);
274
- }
275
- */
276
-
277
- if ($src) {
278
-
279
- // does it have an extension?
280
- if (substr($src, strlen($src)-4, 1)=='.') {
281
- $src_attribute = 'src="'.htmlspecialchars($src).'"';
282
- $flash_src = htmlspecialchars($src);
283
- } else {
284
-
285
- // for missing extension, we try to find all possible files in the system
286
-
287
- if (substr($src, 0, 4)!='http')
288
- $filename = WP_CONTENT_DIR . substr($src, strlen(WP_CONTENT_DIR)-strrpos(WP_CONTENT_DIR, '/'));
289
- else
290
- $filename = WP_CONTENT_DIR . substr($src, strlen(WP_CONTENT_URL));
291
-
292
- if ($tagName == 'video') {
293
- // MP4
294
- if (file_exists($filename.'.mp4')) {
295
- $mp4=$src.'.mp4';
296
- } elseif (file_exists($filename.'.m4v')) {
297
- $mp4=$src.'.m4v';
298
- }
299
-
300
- // WEBM
301
- if (file_exists($filename.'.webm')) {
302
- $webm=$src.'.webm';
303
- }
304
-
305
- // OGG
306
- if (file_exists($filename.'.ogg')) {
307
- $ogg=$src.'.ogg';
308
- } elseif (file_exists($filename.'.ogv')) {
309
- $ogg=$src.'.ogv';
310
- }
311
-
312
- // FLV
313
- if (file_exists($filename.'.flv')) {
314
- $flv=$src.'.flv';
315
- }
316
-
317
- // WMV
318
- if (file_exists($filename.'.wmv')) {
319
- $wmv=$src.'.wmv';
320
- }
321
-
322
- // POSTER
323
- if (file_exists($filename.'.jpg')) {
324
- $poster=$src.'.jpg';
325
- }
326
-
327
- } elseif ($tagName == 'audio') {
328
-
329
- // MP3
330
- if (file_exists($filename.'.mp3')) {
331
- $mp3=$src.'.mp3';
332
- }
333
-
334
- // OGG
335
- if (file_exists($filename.'.ogg')) {
336
- $ogg=$src.'.ogg';
337
- } elseif (file_exists($filename.'.oga')) {
338
- $ogg=$src.'.oga';
339
- }
340
-
341
- }
342
- }
343
- }
344
-
345
-
346
-
347
- if ($mp4) {
348
- $mp4_source = '<source src="'.htmlspecialchars($mp4).'" type="'.$tagName.'/mp4" />';
349
- $flash_src = htmlspecialchars($mp4);
350
- }
351
-
352
- if ($mp3) {
353
- $mp3_source = '<source src="'.htmlspecialchars($mp3).'" type="'.$tagName.'/mp3" />';
354
- $flash_src = htmlspecialchars($mp3);
355
- }
356
-
357
- if ($webm) {
358
- $webm_source = '<source src="'.htmlspecialchars($webm).'" type="'.$tagName.'/webm" />';
359
- }
360
-
361
- if ($ogg) {
362
- $ogg_source = '<source src="'.htmlspecialchars($ogg).'" type="'.$tagName.'/ogg" />';
363
- }
364
-
365
- if ($flv) {
366
- $flv_source = '<source src="'.htmlspecialchars($flv).'" type="'.$tagName.'/flv" />';
367
- }
368
-
369
- if ($wmv) {
370
- $wmv_source = '<source src="'.htmlspecialchars($wmv).'" type="'.$tagName.'/wmv" />';
371
- }
372
-
373
-
374
- if ($captions) {
375
- $captions_source = '<track src="'.$captions.'" kind="subtitles" srclang="'.$captionslang.'" />';
376
- }
377
-
378
- if ($width && $tagName == 'video') {
379
- $width_attribute = 'width="'.$width.'"';
380
- }
381
-
382
- if ($height && $tagName == 'video') {
383
- $height_attribute = 'height="'.$height.'"';
384
- }
385
-
386
- if ($poster) {
387
- $poster_attribute = 'poster="'.htmlspecialchars($poster).'"';
388
- }
389
-
390
- if ($preload) {
391
- $preload_attribute = 'preload="'.$preload.'"';
392
- }
393
-
394
- if ($autoplay) {
395
- $autoplay_attribute = 'autoplay="'.$autoplay.'"';
396
- }
397
-
398
- if ($loop) {
399
- $loop_option = ', loop: ' . $loop;
400
- }
401
-
402
- // CONTROLS
403
- $controls_option = ",features: ['playpause'";
404
- if ($progress == 'true')
405
- $controls_option .= ",'current','progress'";
406
- if ($duration == 'true')
407
- $controls_option .= ",'duration'";
408
- if ($volume == 'true')
409
- $controls_option .= ",'volume'";
410
- $controls_option .= ",'tracks'";
411
- if ($fullscreen == 'true')
412
- $controls_option .= ",'fullscreen'";
413
- $controls_option .= "]";
414
-
415
- // AUDIO SIZE
416
- $audio_size = '';
417
- if ($tagName == 'audio') {
418
- $audio_size = ',audioWidth:'.$width.',audioHeight:'.$height;
419
- }
420
-
421
- // VIDEO class (skin)
422
- $video_skin_attribute = '';
423
- if ($skin != '' && $tagName == 'video') {
424
- $video_skin_attribute = 'class="mejs-'.$skin.'"';
425
- }
426
-
427
- $mediahtml .= <<<_end_
428
- <{$tagName} id="wp_mep_{$mediaElementPlayerIndex}" {$src_attribute} {$type_attribute} {$width_attribute} {$height_attribute} {$poster_attribute} controls="controls" {$preload_attribute} {$autoplay_attribute} $video_skin_attribute>
429
- {$mp4_source}
430
- {$mp3_source}
431
- {$webm_source}
432
- {$flv_source}
433
- {$wmv_source}
434
- {$ogg_source}
435
- {$captions_source}
436
- <object width="{$width}" height="{$height}" type="application/x-shockwave-flash" data="{$dir}flashmediaelement.swf">
437
- <param name="movie" value="{$dir}flashmediaelement.swf" />
438
- <param name="flashvars" value="controls=true&amp;file={$flash_src}" />
439
- </object>
440
- </{$tagName}>
441
- <script type="text/javascript">
442
- jQuery(document).ready(function($) {
443
- $('#wp_mep_$mediaElementPlayerIndex').mediaelementplayer({
444
- m:1
445
- {$loop_option}
446
- {$controls_option}
447
- {$audio_size}
448
- });
449
- });
450
- </script>
451
-
452
- _end_;
453
-
454
- $mediaElementPlayerIndex++;
455
-
456
- return $mediahtml;
457
- }
458
-
459
-
460
-
461
- function mejs_audio_shortcode($atts){
462
- return mejs_media_shortcode('audio',$atts);
463
- }
464
- function mejs_video_shortcode($atts){
465
- return mejs_media_shortcode('video',$atts);
466
- }
467
-
468
- add_shortcode('audio', 'mejs_audio_shortcode');
469
- add_shortcode('mejsaudio', 'mejs_audio_shortcode');
470
- add_shortcode('video', 'mejs_video_shortcode');
471
- add_shortcode('mejsvideo', 'mejs_video_shortcode');
472
-
473
- function mejs_init() {
474
-
475
- wp_enqueue_script( 'jquery' );
476
-
477
- }
478
-
479
- add_action('init', 'mejs_init');
480
-
481
- ?>
1
+ <?php
2
+ /**
3
+ * @package MediaElementJS
4
+ * @version 4.2.8
5
+ */
6
+
7
+ /*
8
+ Plugin Name: MediaElement.js - HTML5 Audio and Video
9
+ Plugin URI: http://mediaelementjs.com/
10
+ Description: Video and audio plugin for WordPress built on MediaElement.js HTML5 video and audio player library. Embeds media in your post or page using HTML5 with Flash or Silverlight fallback support for non-HTML5 browsers. Video support: MP4, Ogg, WebM, WMV. Audio support: MP3, WMA, WAV
11
+ Author: John Dyer
12
+ Version: 4.2.8
13
+ Author URI: http://j.hn/
14
+ License: MIT
15
+ */
16
+
17
+ /*
18
+ Adapted from: http://videojs.com/ plugin
19
+ */
20
+
21
+ $mediaElementPlayerIndex = 1;
22
+
23
+ /* Runs when plugin is activated */
24
+ register_activation_hook(__FILE__,'mejs_install');
25
+
26
+ function mejs_install() {
27
+ add_option('mep_video_skin', '');
28
+
29
+ add_option('mep_default_video_height', 270);
30
+ add_option('mep_default_video_width', 480);
31
+ add_option('mep_default_video_type', '');
32
+
33
+ add_option('mep_default_audio_height', 30);
34
+ add_option('mep_default_audio_width', 400);
35
+ add_option('mep_default_audio_type', '');
36
+ }
37
+
38
+ /* Runs on plugin deactivation*/
39
+ register_deactivation_hook( __FILE__, 'mejs_remove' );
40
+ function mejs_remove() {
41
+ delete_option('mep_video_skin');
42
+
43
+ delete_option('mep_default_video_height');
44
+ delete_option('mep_default_video_width');
45
+ delete_option('mep_default_video_type');
46
+
47
+ delete_option('mep_default_audio_height');
48
+ delete_option('mep_default_audio_width');
49
+ delete_option('mep_default_audio_type');
50
+ }
51
+
52
+ // create custom plugin settings menu
53
+ add_action('admin_menu', 'mejs_create_menu');
54
+
55
+ function mejs_create_menu() {
56
+
57
+ //create new top-level menu
58
+ add_options_page('MediaElement.js', 'MediaElement.js', 'administrator', __FILE__, 'mejs_settings_page');
59
+
60
+ //call register settings function
61
+ add_action( 'admin_init', 'mejs_register_settings' );
62
+ }
63
+
64
+
65
+ function mejs_register_settings() {
66
+ //register our settings
67
+ register_setting( 'mep_settings', 'mep_default_video_height' );
68
+ register_setting( 'mep_settings', 'mep_default_video_width' );
69
+ register_setting( 'mep_settings', 'mep_default_video_type' );
70
+
71
+ register_setting( 'mep_settings', 'mep_default_audio_height' );
72
+ register_setting( 'mep_settings', 'mep_default_audio_width' );
73
+ register_setting( 'mep_settings', 'mep_default_audio_type' );
74
+ }
75
+
76
+
77
+ function mejs_settings_page() {
78
+ ?>
79
+ <div class="wrap">
80
+ <h2>MediaElement.js HTML5 Player Options</h2>
81
+
82
+ <p>See <a href="http://mediaelementjs.com/">MediaElementjs.com</a> for more details on how the HTML5 player and Flash fallbacks work.</p>
83
+
84
+ <form method="post" action="options.php">
85
+ <?php wp_nonce_field('update-options'); ?>
86
+
87
+
88
+ <h3 class="title"><span>Video Settings</span></h3>
89
+
90
+ <table class="form-table">
91
+ <tr valign="top">
92
+ <th scope="row">
93
+ <label for="mep_default_video_width">Default Width</label>
94
+ </th>
95
+ <td >
96
+ <input name="mep_default_video_width" type="text" id="mep_default_video_width" value="<?php echo get_option('mep_default_video_width'); ?>" />
97
+ </td>
98
+ </tr>
99
+ <tr valign="top">
100
+ <th scope="row">
101
+ <label for="mep_default_video_height">Default Height</label>
102
+ </th>
103
+ <td >
104
+ <input name="mep_default_video_height" type="text" id="mep_default_video_height" value="<?php echo get_option('mep_default_video_height'); ?>" />
105
+ </td>
106
+ </tr>
107
+ <tr valign="top">
108
+ <th scope="row">
109
+ <label for="mep_default_video_type">Default Type</label>
110
+ </th>
111
+ <td >
112
+ <input name="mep_default_video_type" type="text" id="mep_default_video_type" value="<?php echo get_option('mep_default_video_type'); ?>" /> <span class="description">such as "video/mp4"</span>
113
+ </td>
114
+ </tr>
115
+ </table>
116
+
117
+ <h3 class="title"><span>Audio Settings</span></h3>
118
+
119
+
120
+ <table class="form-table">
121
+ <tr valign="top">
122
+ <tr valign="top">
123
+ <th scope="row">
124
+ <label for="mep_default_audio_width">Default Width</label>
125
+ </th>
126
+ <td >
127
+ <input name="mep_default_audio_width" type="text" id="mep_default_audio_width" value="<?php echo get_option('mep_default_audio_width'); ?>" />
128
+ </td>
129
+ </tr>
130
+ <tr valign="top">
131
+ <th scope="row">
132
+ <label for="mep_default_audio_height">Default Height</label>
133
+ </th>
134
+ <td >
135
+ <input name="mep_default_audio_height" type="text" id="mep_default_audio_height" value="<?php echo get_option('mep_default_audio_height'); ?>" />
136
+ </td>
137
+ </tr>
138
+ <th scope="row">
139
+ <label for="mep_default_audio_type">Default Type</label>
140
+ </th>
141
+ <td >
142
+ <input name="mep_default_audio_type" type="text" id="mep_default_audio_type" value="<?php echo get_option('mep_default_audio_type'); ?>" /> <span class="description">such as "audio/mp3"</span>
143
+ </td>
144
+ </tr>
145
+ </table>
146
+
147
+ <input type="hidden" name="action" value="update" />
148
+ <input type="hidden" name="page_options" value="mep_default_video_width,mep_default_video_height,mep_default_video_type,mep_default_audio_type,mep_default_audio_width,mep_default_audio_height,mep_video_skin" />
149
+
150
+ <p>
151
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
152
+ </p>
153
+
154
+ </div>
155
+
156
+
157
+
158
+ </form>
159
+ </div>
160
+ <?php
161
+ }
162
+
163
+
164
+ define('MEDIAELEMENTJS_DIR', WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/');
165
+ // Javascript
166
+ function mejs_add_scripts(){
167
+ if (!is_admin()){
168
+ // the scripts
169
+ wp_enqueue_script("mediaelementjs-scripts", MEDIAELEMENTJS_DIR ."v4/mediaelement-and-player.min.js", array(), "4.2.8", false);
170
+ }
171
+ }
172
+ add_action('wp_print_scripts', 'mejs_add_scripts');
173
+
174
+ // css
175
+ function mejs_add_styles(){
176
+ if (!is_admin()){
177
+ // the style
178
+ wp_enqueue_style("mediaelementjs-styles", MEDIAELEMENTJS_DIR ."v4/mediaelementplayer.min.css");
179
+ wp_enqueue_style("mediaelementjs-styles-legacy", MEDIAELEMENTJS_DIR ."v4/mediaelementplayer-legacy.min.css");
180
+ }
181
+ }
182
+ add_action('wp_print_styles', 'mejs_add_styles');
183
+
184
+ function mejs_add_header(){
185
+ /*
186
+
187
+ $dir = WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/';
188
+
189
+ echo <<<_end_
190
+ <link rel="stylesheet" href="{$dir}mediaelementplayer.min.css" type="text/css" />
191
+ <script src="{$dir}mediaelement-and-player.min.js" type="text/javascript"></script>
192
+ _end_;
193
+ */
194
+
195
+ }
196
+
197
+ // If this happens in the <head> tag it fails in iOS. Boo.
198
+ function mejs_add_footer(){
199
+ /*
200
+ $defaultVideoWidth = get_option('mep_default_video_width');
201
+ $defaultVideoHeight = get_option('mep_default_video_height');
202
+
203
+ echo <<<_end_
204
+ <script type="text/javascript">
205
+ jQuery(document).ready(function($) {
206
+ $('video[class=mep],audio[class=mep]').mediaelementplayer({defaultVideoWidth:{$defaultVideoWidth},defaultVideoHeight:{$defaultVideoHeight}});
207
+ });
208
+ </script>
209
+ _end_;
210
+ */
211
+ }
212
+
213
+ add_action('wp_head','mejs_add_header');
214
+ add_action('wp_footer','mejs_add_footer');
215
+
216
+ function mejs_media_shortcode($tagName, $atts){
217
+
218
+ global $mediaElementPlayerIndex;
219
+ $dir = WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/';
220
+
221
+ extract(shortcode_atts(array(
222
+ 'src' => '',
223
+ 'mp4' => '',
224
+ 'mp3' => '',
225
+ 'wmv' => '',
226
+ 'webm' => '',
227
+ 'flv' => '',
228
+ 'ogg' => '',
229
+ 'poster' => '',
230
+ 'width' => get_option('mep_default_'.$tagName.'_width'),
231
+ 'height' => get_option('mep_default_'.$tagName.'_height'),
232
+ 'type' => get_option('mep_default_'.$tagName.'_type'),
233
+ 'preload' => 'none',
234
+ 'autoplay' => '',
235
+ 'loop' => '',
236
+
237
+ // old ones
238
+ 'duration' => 'true',
239
+ 'progress' => 'true',
240
+ 'fullscreen' => 'true',
241
+ 'volume' => 'true',
242
+
243
+ // captions
244
+ 'captions' => '',
245
+ 'captionslang' => 'en'
246
+ ), $atts));
247
+
248
+ if ($type) {
249
+ $type_attribute = 'type="'.$type.'"';
250
+ }
251
+
252
+ /*
253
+ if ($src) {
254
+ $src_attribute = 'src="'.htmlspecialchars($src).'"';
255
+ $flash_src = htmlspecialchars($src);
256
+ }
257
+ */
258
+
259
+ if ($src) {
260
+
261
+ // does it have an extension?
262
+ if (substr($src, strlen($src)-4, 1)=='.') {
263
+ $src_attribute = 'src="'.htmlspecialchars($src).'"';
264
+ $flash_src = htmlspecialchars($src);
265
+ } else {
266
+
267
+ // for missing extension, we try to find all possible files in the system
268
+
269
+ if (substr($src, 0, 4)!='http')
270
+ $filename = WP_CONTENT_DIR . substr($src, strlen(WP_CONTENT_DIR)-strrpos(WP_CONTENT_DIR, '/'));
271
+ else
272
+ $filename = WP_CONTENT_DIR . substr($src, strlen(WP_CONTENT_URL));
273
+
274
+ if ($tagName == 'video') {
275
+ // MP4
276
+ if (file_exists($filename.'.mp4')) {
277
+ $mp4=$src.'.mp4';
278
+ } elseif (file_exists($filename.'.m4v')) {
279
+ $mp4=$src.'.m4v';
280
+ }
281
+
282
+ // WEBM
283
+ if (file_exists($filename.'.webm')) {
284
+ $webm=$src.'.webm';
285
+ }
286
+
287
+ // OGG
288
+ if (file_exists($filename.'.ogg')) {
289
+ $ogg=$src.'.ogg';
290
+ } elseif (file_exists($filename.'.ogv')) {
291
+ $ogg=$src.'.ogv';
292
+ }
293
+
294
+ // FLV
295
+ if (file_exists($filename.'.flv')) {
296
+ $flv=$src.'.flv';
297
+ }
298
+
299
+ // WMV
300
+ if (file_exists($filename.'.wmv')) {
301
+ $wmv=$src.'.wmv';
302
+ }
303
+
304
+ // POSTER
305
+ if (file_exists($filename.'.jpg')) {
306
+ $poster=$src.'.jpg';
307
+ }
308
+
309
+ } elseif ($tagName == 'audio') {
310
+
311
+ // MP3
312
+ if (file_exists($filename.'.mp3')) {
313
+ $mp3=$src.'.mp3';
314
+ }
315
+
316
+ // OGG
317
+ if (file_exists($filename.'.ogg')) {
318
+ $ogg=$src.'.ogg';
319
+ } elseif (file_exists($filename.'.oga')) {
320
+ $ogg=$src.'.oga';
321
+ }
322
+
323
+ }
324
+ }
325
+ }
326
+
327
+
328
+
329
+ if ($mp4) {
330
+ $mp4_source = '<source src="'.htmlspecialchars($mp4).'" type="'.$tagName.'/mp4" />';
331
+ $flash_src = htmlspecialchars($mp4);
332
+ }
333
+
334
+ if ($mp3) {
335
+ $mp3_source = '<source src="'.htmlspecialchars($mp3).'" type="'.$tagName.'/mp3" />';
336
+ $flash_src = htmlspecialchars($mp3);
337
+ }
338
+
339
+ if ($webm) {
340
+ $webm_source = '<source src="'.htmlspecialchars($webm).'" type="'.$tagName.'/webm" />';
341
+ }
342
+
343
+ if ($ogg) {
344
+ $ogg_source = '<source src="'.htmlspecialchars($ogg).'" type="'.$tagName.'/ogg" />';
345
+ }
346
+
347
+ if ($flv) {
348
+ $flv_source = '<source src="'.htmlspecialchars($flv).'" type="'.$tagName.'/flv" />';
349
+ }
350
+
351
+ if ($wmv) {
352
+ $wmv_source = '<source src="'.htmlspecialchars($wmv).'" type="'.$tagName.'/wmv" />';
353
+ }
354
+
355
+
356
+ if ($captions) {
357
+ $captions_source = '<track src="'.$captions.'" kind="subtitles" srclang="'.$captionslang.'" />';
358
+ }
359
+
360
+ if ($width && $tagName == 'video') {
361
+ $width_attribute = 'width="'.$width.'"';
362
+ }
363
+
364
+ if ($height && $tagName == 'video') {
365
+ $height_attribute = 'height="'.$height.'"';
366
+ }
367
+
368
+ if ($poster) {
369
+ $poster_attribute = 'poster="'.htmlspecialchars($poster).'"';
370
+ }
371
+
372
+ if ($preload) {
373
+ $preload_attribute = 'preload="'.$preload.'"';
374
+ }
375
+
376
+ if ($autoplay) {
377
+ $autoplay_attribute = 'autoplay="'.$autoplay.'"';
378
+ }
379
+
380
+ if ($loop) {
381
+ $loop_option = ', loop: ' . $loop;
382
+ }
383
+
384
+ // CONTROLS
385
+ $controls_option = ",features: ['playpause'";
386
+ if ($progress == 'true')
387
+ $controls_option .= ",'current','progress'";
388
+ if ($duration == 'true')
389
+ $controls_option .= ",'duration'";
390
+ if ($volume == 'true')
391
+ $controls_option .= ",'volume'";
392
+ $controls_option .= ",'tracks'";
393
+ if ($fullscreen == 'true')
394
+ $controls_option .= ",'fullscreen'";
395
+ $controls_option .= "]";
396
+
397
+ // AUDIO SIZE
398
+ $audio_size = '';
399
+ if ($tagName == 'audio') {
400
+ $audio_size = ',audioWidth:'.$width.',audioHeight:'.$height;
401
+ }
402
+
403
+ // VIDEO class (skin)
404
+ $video_skin_attribute = '';
405
+ if ($skin != '' && $tagName == 'video') {
406
+ $video_skin_attribute = 'class="mejs-'.$skin.'"';
407
+ }
408
+
409
+ $mediahtml .= <<<_end_
410
+ <{$tagName} id="wp_mep_{$mediaElementPlayerIndex}" {$src_attribute} {$type_attribute} {$width_attribute} {$height_attribute} {$poster_attribute} controls="controls" {$preload_attribute} {$autoplay_attribute} $video_skin_attribute>
411
+ {$mp4_source}
412
+ {$mp3_source}
413
+ {$webm_source}
414
+ {$flv_source}
415
+ {$wmv_source}
416
+ {$ogg_source}
417
+ {$captions_source}
418
+ </{$tagName}>
419
+ <script type="text/javascript">
420
+ jQuery(document).ready(function($) {
421
+ $('#wp_mep_$mediaElementPlayerIndex').mediaelementplayer({
422
+ m:1
423
+ {$loop_option}
424
+ {$controls_option}
425
+ {$audio_size}
426
+ });
427
+ });
428
+ </script>
429
+
430
+ _end_;
431
+
432
+ $mediaElementPlayerIndex++;
433
+
434
+ return $mediahtml;
435
+ }
436
+
437
+
438
+
439
+ function mejs_audio_shortcode($atts){
440
+ return mejs_media_shortcode('audio',$atts);
441
+ }
442
+ function mejs_video_shortcode($atts){
443
+ return mejs_media_shortcode('video',$atts);
444
+ }
445
+
446
+ add_shortcode('audio', 'mejs_audio_shortcode');
447
+ add_shortcode('mejsaudio', 'mejs_audio_shortcode');
448
+ add_shortcode('video', 'mejs_video_shortcode');
449
+ add_shortcode('mejsvideo', 'mejs_video_shortcode');
450
+
451
+ function mejs_init() {
452
+
453
+ }
454
+
455
+ add_action('init', 'mejs_init');
456
+
457
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/background.png DELETED
Binary file
mediaelement/bigplay.png DELETED
Binary file
mediaelement/controls-ted.png DELETED
Binary file
mediaelement/controls-wmp-bg.png DELETED
Binary file
mediaelement/controls-wmp.png DELETED
Binary file
mediaelement/controls.png DELETED
Binary file
mediaelement/controls.svg DELETED
@@ -1,172 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!-- Generator: Adobe Fireworks CS6, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg id="controls.fw-Page%201" viewBox="0 0 144 32" style="background-color:#ffffff00" version="1.1"
5
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
6
- x="0px" y="0px" width="144px" height="32px"
7
- >
8
- <defs>
9
- <radialGradient id="gradient1" cx="50%" cy="50%" r="50%">
10
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
11
- <stop stop-color="#f2f2f2" stop-opacity="0.2" offset="100%"/>
12
- </radialGradient>
13
- <linearGradient id="gradient2" x1="50%" y1="-7.8652%" x2="50%" y2="249.6629%">
14
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
15
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
16
- </linearGradient>
17
- <linearGradient id="gradient3" x1="50%" y1="0%" x2="50%" y2="238.75%">
18
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
19
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
20
- </linearGradient>
21
- <linearGradient id="gradient4" x1="50%" y1="0%" x2="50%" y2="100%">
22
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
23
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
24
- </linearGradient>
25
- <linearGradient id="gradient5" x1="50%" y1="-33.3333%" x2="50%" y2="152.0833%">
26
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
27
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
28
- </linearGradient>
29
- <linearGradient id="gradient6" x1="50%" y1="0%" x2="50%" y2="100%">
30
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
31
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
32
- </linearGradient>
33
- <linearGradient id="gradient7" x1="50%" y1="-33.3333%" x2="50%" y2="152.0833%">
34
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
35
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
36
- </linearGradient>
37
- <linearGradient id="gradient8" x1="50%" y1="0%" x2="50%" y2="100%">
38
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
39
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
40
- </linearGradient>
41
- <linearGradient id="gradient9" x1="50%" y1="0%" x2="50%" y2="100%">
42
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
43
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
44
- </linearGradient>
45
- <linearGradient id="gradient10" x1="50%" y1="0%" x2="50%" y2="100%">
46
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
47
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
48
- </linearGradient>
49
- <linearGradient id="gradient11" x1="50%" y1="0%" x2="50%" y2="100%">
50
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
51
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
52
- </linearGradient>
53
- <linearGradient id="gradient12" x1="50%" y1="0%" x2="50%" y2="238.75%">
54
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
55
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
56
- </linearGradient>
57
- <linearGradient id="gradient13" x1="40%" y1="-140%" x2="40%" y2="98.75%">
58
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
59
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
60
- </linearGradient>
61
- <linearGradient id="gradient14" x1="50%" y1="0%" x2="50%" y2="238.75%">
62
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
63
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
64
- </linearGradient>
65
- <linearGradient id="gradient15" x1="60%" y1="-140%" x2="60%" y2="98.75%">
66
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
67
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
68
- </linearGradient>
69
- <linearGradient id="gradient16" x1="50%" y1="0%" x2="50%" y2="298.4375%">
70
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
71
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
72
- </linearGradient>
73
- <linearGradient id="gradient17" x1="50%" y1="0%" x2="50%" y2="238.75%">
74
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
75
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
76
- </linearGradient>
77
- <linearGradient id="gradient18" x1="50%" y1="-200%" x2="50%" y2="100%">
78
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
79
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
80
- </linearGradient>
81
- <linearGradient id="gradient19" x1="50%" y1="-200%" x2="50%" y2="110.9375%">
82
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
83
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
84
- </linearGradient>
85
- <linearGradient id="gradient20" x1="55%" y1="0%" x2="55%" y2="100%">
86
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
87
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="100%"/>
88
- </linearGradient>
89
- <linearGradient id="gradient21" x1="50%" y1="0%" x2="50%" y2="100%">
90
- <stop stop-color="#ffffff" stop-opacity="1" offset="0%"/>
91
- <stop stop-color="#c8c8c8" stop-opacity="1" offset="99.4444%"/>
92
- </linearGradient>
93
- </defs>
94
- <g id="BG">
95
- </g>
96
- <g id="controls">
97
- <path id="Line" d="M 98.5 7.5 L 109.5 7.5 " stroke="#ffffff" stroke-width="1" fill="none"/>
98
- <path id="Line2" d="M 98.5 3.5 L 109.5 3.5 " stroke="#ffffff" stroke-width="1" fill="none"/>
99
- <path id="Line3" d="M 98.5 11.5 L 109.5 11.5 " stroke="#ffffff" stroke-width="1" fill="none"/>
100
- <path id="Ellipse" d="M 108 11.5 C 108 10.6716 108.4477 10 109 10 C 109.5523 10 110 10.6716 110 11.5 C 110 12.3284 109.5523 13 109 13 C 108.4477 13 108 12.3284 108 11.5 Z" fill="#ffffff"/>
101
- <path id="Ellipse2" d="M 104 7.5 C 104 6.6716 104.4477 6 105 6 C 105.5523 6 106 6.6716 106 7.5 C 106 8.3284 105.5523 9 105 9 C 104.4477 9 104 8.3284 104 7.5 Z" fill="#ffffff"/>
102
- <path id="Ellipse3" d="M 108 3.5 C 108 2.6716 108.4477 2 109 2 C 109.5523 2 110 2.6716 110 3.5 C 110 4.3284 109.5523 5 109 5 C 108.4477 5 108 4.3284 108 3.5 Z" fill="#ffffff"/>
103
- </g>
104
- <g id="backlight">
105
- <g id="off">
106
- <rect x="83" y="21" width="10" height="6" stroke="#ffffff" stroke-width="1" fill="#333333"/>
107
- </g>
108
- <g id="on">
109
- <path id="Ellipse4" d="M 81 8 C 81 5.2385 84.134 3 88 3 C 91.866 3 95 5.2385 95 8 C 95 10.7615 91.866 13 88 13 C 84.134 13 81 10.7615 81 8 Z" fill="url(#gradient1)"/>
110
- <rect x="83" y="5" width="10" height="6" stroke="#ffffff" stroke-width="1" fill="#333333"/>
111
- </g>
112
- </g>
113
- <g id="loop">
114
- <g id="on2">
115
- <path d="M 73.795 4.205 C 75.2155 4.8785 76.2 6.3234 76.2 8 C 76.2 10.3196 74.3196 12.2 72 12.2 C 69.6804 12.2 67.8 10.3196 67.8 8 C 67.8 6.3234 68.7845 4.8785 70.205 4.205 L 68.875 2.875 C 67.1501 3.9289 66 5.8306 66 8 C 66 11.3138 68.6862 14 72 14 C 75.3138 14 78 11.3138 78 8 C 78 5.8306 76.8499 3.9289 75.125 2.875 L 73.795 4.205 Z" fill="url(#gradient2)"/>
116
- <path d="M 71 2 L 66 2 L 71 7 L 71 2 Z" fill="url(#gradient3)"/>
117
- </g>
118
- <g id="off2">
119
- <path d="M 73.795 20.205 C 75.2155 20.8785 76.2 22.3234 76.2 24 C 76.2 26.3196 74.3196 28.2 72 28.2 C 69.6804 28.2 67.8 26.3196 67.8 24 C 67.8 22.3234 68.7845 20.8785 70.205 20.205 L 68.875 18.875 C 67.1501 19.9289 66 21.8306 66 24 C 66 27.3138 68.6862 30 72 30 C 75.3138 30 78 27.3138 78 24 C 78 21.8306 76.8499 19.9289 75.125 18.875 L 73.795 20.205 Z" fill="#a8a8b7"/>
120
- <path d="M 71 18 L 66 18 L 71 23 L 71 18 Z" fill="#a8a8b7"/>
121
- </g>
122
- </g>
123
- <g id="cc">
124
- <rect visibility="hidden" x="49" y="2" width="14" height="12" stroke="#b0b0b0" stroke-width="1" fill="none"/>
125
- <text visibility="hidden" x="49" y="17" width="14" fill="#ffffff" style="font-size: 10px; color: #ffffff; font-family: Arial; text-align: center; "><tspan><![CDATA[cc]]></tspan></text>
126
- <path d="M 55 7 C 50.2813 3.7813 50.063 12.9405 55 10 " stroke="#ffffff" stroke-width="1" fill="none"/>
127
- <path d="M 60 7 C 55.2813 3.7813 55.063 12.9405 60 10 " stroke="#ffffff" stroke-width="1" fill="none"/>
128
- <path d="M 50 3 L 62 3 L 62 13 L 50 13 L 50 3 ZM 49 2 L 49 14 L 63 14 L 63 2 L 49 2 Z" fill="url(#gradient4)"/>
129
- <rect x="49" y="2" width="14" height="12" fill="none"/>
130
- </g>
131
- <g id="volume">
132
- <g id="no%20sound">
133
- <rect x="17" y="5" width="5" height="6" fill="url(#gradient5)"/>
134
- <path d="M 21 5 L 25 2 L 25 14 L 21 11.0625 L 21 5 Z" fill="url(#gradient6)"/>
135
- </g>
136
- <g id="sound%20bars">
137
- <rect x="17" y="21" width="5" height="6" fill="url(#gradient7)"/>
138
- <path d="M 21 21 L 25 18 L 25 30 L 21 27.0625 L 21 21 Z" fill="url(#gradient8)"/>
139
- <path d="M 27 18 C 27 18 30.0625 17.375 30 24 C 29.9375 30.625 27 30 27 30 " stroke="#ffffff" stroke-width="1" fill="none"/>
140
- <path d="M 26 21.0079 C 26 21.0079 28.041 20.6962 27.9994 24 C 27.9577 27.3038 26 26.9921 26 26.9921 " stroke="#ffffff" stroke-width="1" fill="none"/>
141
- </g>
142
- </g>
143
- <g id="play/pause">
144
- <g id="play">
145
- <path id="Polygon" d="M 14 8.5 L 3 14 L 3 3 L 14 8.5 Z" fill="url(#gradient9)"/>
146
- </g>
147
- <g id="pause">
148
- <rect x="3" y="18" width="3" height="12" fill="url(#gradient10)"/>
149
- <rect x="10" y="18" width="3" height="12" fill="url(#gradient11)"/>
150
- </g>
151
- </g>
152
- <g id="fullscreen">
153
- <g id="enter%201">
154
- <path d="M 34 2 L 39 2 L 34 7 L 34 2 Z" fill="url(#gradient12)"/>
155
- <path d="M 34 14 L 39 14 L 34 9 L 34 14 Z" fill="url(#gradient13)"/>
156
- <path d="M 46 2 L 41 2 L 46 7 L 46 2 Z" fill="url(#gradient14)"/>
157
- <path d="M 46 14 L 41 14 L 46 9 L 46 14 Z" fill="url(#gradient15)"/>
158
- </g>
159
- <g id="exit">
160
- <path d="M 42 22 L 46 22 L 42 18 L 42 22 Z" fill="url(#gradient16)"/>
161
- <path d="M 38 22 L 38 18 L 34 22 L 38 22 Z" fill="url(#gradient17)"/>
162
- <path d="M 38 26 L 34 26 L 38 30 L 38 26 Z" fill="url(#gradient18)"/>
163
- <path d="M 42 26 L 42 30 L 46 26 L 42 26 Z" fill="url(#gradient19)"/>
164
- </g>
165
- </g>
166
- <g id="stop">
167
- <rect x="115" y="3" width="10" height="10" fill="url(#gradient20)"/>
168
- </g>
169
- <g id="chooser">
170
- <path d="M 135.2346 6.1522 C 136.2551 5.7295 137.4251 6.2141 137.8478 7.2346 C 138.2704 8.2551 137.7859 9.425 136.7654 9.8478 C 135.7449 10.2705 134.5749 9.7859 134.1522 8.7654 C 133.7295 7.7449 134.2141 6.5749 135.2346 6.1522 ZM 133.2735 1.4176 L 136 4.0054 L 138.7265 1.4176 L 138.8246 5.1754 L 142.5824 5.2735 L 139.9946 8 L 142.5824 10.7265 L 138.8246 10.8246 L 138.7265 14.5824 L 136 11.9946 L 133.2735 14.5824 L 133.1754 10.8246 L 129.4176 10.7265 L 132.0054 8 L 129.4176 5.2735 L 133.1754 5.1754 L 133.2735 1.4176 Z" fill="url(#gradient21)"/>
171
- </g>
172
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/flashmediaelement.swf DELETED
Binary file
mediaelement/loading.gif DELETED
Binary file
mediaelement/mediaelement-and-player.js DELETED
@@ -1,6655 +0,0 @@
1
- /*!
2
- *
3
- * MediaElement.js
4
- * HTML5 <video> and <audio> shim and player
5
- * http://mediaelementjs.com/
6
- *
7
- * Creates a JavaScript object that mimics HTML5 MediaElement API
8
- * for browsers that don't understand HTML5 or can't play the provided codec
9
- * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
10
- *
11
- * Copyright 2010-2014, John Dyer (http://j.hn)
12
- * License: MIT
13
- *
14
- */
15
- // Namespace
16
- var mejs = mejs || {};
17
-
18
- // version number
19
- mejs.version = '2.23.5';
20
-
21
-
22
- // player number (for missing, same id attr)
23
- mejs.meIndex = 0;
24
-
25
- // media types accepted by plugins
26
- mejs.plugins = {
27
- silverlight: [
28
- {version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
29
- ],
30
- flash: [
31
- {version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/rtmp','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a', 'audio/mp4', 'audio/mpeg', 'video/dailymotion', 'video/x-dailymotion', 'application/x-mpegURL', 'audio/ogg']}
32
- // 'video/youtube', 'video/x-youtube',
33
- // ,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
34
- ],
35
- youtube: [
36
- {version: null, types: ['video/youtube', 'video/x-youtube', 'audio/youtube', 'audio/x-youtube']}
37
- ],
38
- vimeo: [
39
- {version: null, types: ['video/vimeo', 'video/x-vimeo']}
40
- ]
41
- };
42
-
43
- /*
44
- Utility methods
45
- */
46
- mejs.Utility = {
47
- encodeUrl: function(url) {
48
- return encodeURIComponent(url); //.replace(/\?/gi,'%3F').replace(/=/gi,'%3D').replace(/&/gi,'%26');
49
- },
50
- escapeHTML: function(s) {
51
- return s.toString().split('&').join('&amp;').split('<').join('&lt;').split('"').join('&quot;');
52
- },
53
- absolutizeUrl: function(url) {
54
- var el = document.createElement('div');
55
- el.innerHTML = '<a href="' + this.escapeHTML(url) + '">x</a>';
56
- return el.firstChild.href;
57
- },
58
- getScriptPath: function(scriptNames) {
59
- var
60
- i = 0,
61
- j,
62
- codePath = '',
63
- testname = '',
64
- slashPos,
65
- filenamePos,
66
- scriptUrl,
67
- scriptPath,
68
- scriptFilename,
69
- scripts = document.getElementsByTagName('script'),
70
- il = scripts.length,
71
- jl = scriptNames.length;
72
-
73
- // go through all <script> tags
74
- for (; i < il; i++) {
75
- scriptUrl = scripts[i].src;
76
- slashPos = scriptUrl.lastIndexOf('/');
77
- if (slashPos > -1) {
78
- scriptFilename = scriptUrl.substring(slashPos + 1);
79
- scriptPath = scriptUrl.substring(0, slashPos + 1);
80
- } else {
81
- scriptFilename = scriptUrl;
82
- scriptPath = '';
83
- }
84
-
85
- // see if any <script> tags have a file name that matches the
86
- for (j = 0; j < jl; j++) {
87
- testname = scriptNames[j];
88
- filenamePos = scriptFilename.indexOf(testname);
89
- if (filenamePos > -1) {
90
- codePath = scriptPath;
91
- break;
92
- }
93
- }
94
-
95
- // if we found a path, then break and return it
96
- if (codePath !== '') {
97
- break;
98
- }
99
- }
100
-
101
- // send the best path back
102
- return codePath;
103
- },
104
- /*
105
- * Calculate the time format to use. We have a default format set in the
106
- * options but it can be imcomplete. We ajust it according to the media
107
- * duration.
108
- *
109
- * We support format like 'hh:mm:ss:ff'.
110
- */
111
- calculateTimeFormat: function(time, options, fps) {
112
- if (time < 0) {
113
- time = 0;
114
- }
115
-
116
- if(typeof fps == 'undefined') {
117
- fps = 25;
118
- }
119
-
120
- var format = options.timeFormat,
121
- firstChar = format[0],
122
- firstTwoPlaces = (format[1] == format[0]),
123
- separatorIndex = firstTwoPlaces? 2: 1,
124
- separator = ':',
125
- hours = Math.floor(time / 3600) % 24,
126
- minutes = Math.floor(time / 60) % 60,
127
- seconds = Math.floor(time % 60),
128
- frames = Math.floor(((time % 1)*fps).toFixed(3)),
129
- lis = [
130
- [frames, 'f'],
131
- [seconds, 's'],
132
- [minutes, 'm'],
133
- [hours, 'h']
134
- ];
135
-
136
- // Try to get the separator from the format
137
- if (format.length < separatorIndex) {
138
- separator = format[separatorIndex];
139
- }
140
-
141
- var required = false;
142
-
143
- for (var i=0, len=lis.length; i < len; i++) {
144
- if (format.indexOf(lis[i][1]) !== -1) {
145
- required=true;
146
- }
147
- else if (required) {
148
- var hasNextValue = false;
149
- for (var j=i; j < len; j++) {
150
- if (lis[j][0] > 0) {
151
- hasNextValue = true;
152
- break;
153
- }
154
- }
155
-
156
- if (! hasNextValue) {
157
- break;
158
- }
159
-
160
- if (!firstTwoPlaces) {
161
- format = firstChar + format;
162
- }
163
- format = lis[i][1] + separator + format;
164
- if (firstTwoPlaces) {
165
- format = lis[i][1] + format;
166
- }
167
- firstChar = lis[i][1];
168
- }
169
- }
170
- options.currentTimeFormat = format;
171
- },
172
- /*
173
- * Prefix the given number by zero if it is lower than 10.
174
- */
175
- twoDigitsString: function(n) {
176
- if (n < 10) {
177
- return '0' + n;
178
- }
179
- return String(n);
180
- },
181
- secondsToTimeCode: function(time, options) {
182
- if (time < 0) {
183
- time = 0;
184
- }
185
-
186
- // Maintain backward compatibility with method signature before v2.18.
187
- if (typeof options !== 'object') {
188
- var format = 'm:ss';
189
- format = arguments[1] ? 'hh:mm:ss' : format; // forceHours
190
- format = arguments[2] ? format + ':ff' : format; // showFrameCount
191
-
192
- options = {
193
- currentTimeFormat: format,
194
- framesPerSecond: arguments[3] || 25
195
- };
196
- }
197
-
198
- var fps = options.framesPerSecond;
199
- if(typeof fps === 'undefined') {
200
- fps = 25;
201
- }
202
-
203
- var format = options.currentTimeFormat,
204
- hours = Math.floor(time / 3600) % 24,
205
- minutes = Math.floor(time / 60) % 60,
206
- seconds = Math.floor(time % 60),
207
- frames = Math.floor(((time % 1)*fps).toFixed(3));
208
- lis = [
209
- [frames, 'f'],
210
- [seconds, 's'],
211
- [minutes, 'm'],
212
- [hours, 'h']
213
- ];
214
-
215
- var res = format;
216
- for (i=0,len=lis.length; i < len; i++) {
217
- res = res.replace(lis[i][1]+lis[i][1], this.twoDigitsString(lis[i][0]));
218
- res = res.replace(lis[i][1], lis[i][0]);
219
- }
220
- return res;
221
- },
222
-
223
- timeCodeToSeconds: function(hh_mm_ss_ff, forceHours, showFrameCount, fps){
224
- if (typeof showFrameCount == 'undefined') {
225
- showFrameCount=false;
226
- } else if(typeof fps == 'undefined') {
227
- fps = 25;
228
- }
229
-
230
- var tc_array = hh_mm_ss_ff.split(":"),
231
- tc_hh = parseInt(tc_array[0], 10),
232
- tc_mm = parseInt(tc_array[1], 10),
233
- tc_ss = parseInt(tc_array[2], 10),
234
- tc_ff = 0,
235
- tc_in_seconds = 0;
236
-
237
- if (showFrameCount) {
238
- tc_ff = parseInt(tc_array[3])/fps;
239
- }
240
-
241
- tc_in_seconds = ( tc_hh * 3600 ) + ( tc_mm * 60 ) + tc_ss + tc_ff;
242
-
243
- return tc_in_seconds;
244
- },
245
-
246
-
247
- convertSMPTEtoSeconds: function (SMPTE) {
248
- if (typeof SMPTE != 'string')
249
- return false;
250
-
251
- SMPTE = SMPTE.replace(',', '.');
252
-
253
- var secs = 0,
254
- decimalLen = (SMPTE.indexOf('.') != -1) ? SMPTE.split('.')[1].length : 0,
255
- multiplier = 1;
256
-
257
- SMPTE = SMPTE.split(':').reverse();
258
-
259
- for (var i = 0; i < SMPTE.length; i++) {
260
- multiplier = 1;
261
- if (i > 0) {
262
- multiplier = Math.pow(60, i);
263
- }
264
- secs += Number(SMPTE[i]) * multiplier;
265
- }
266
- return Number(secs.toFixed(decimalLen));
267
- },
268
-
269
- /* borrowed from SWFObject: http://code.google.com/p/swfobject/source/browse/trunk/swfobject/src/swfobject.js#474 */
270
- removeSwf: function(id) {
271
- var obj = document.getElementById(id);
272
- if (obj && /object|embed/i.test(obj.nodeName)) {
273
- if (mejs.MediaFeatures.isIE) {
274
- obj.style.display = "none";
275
- (function(){
276
- if (obj.readyState == 4) {
277
- mejs.Utility.removeObjectInIE(id);
278
- } else {
279
- setTimeout(arguments.callee, 10);
280
- }
281
- })();
282
- } else {
283
- obj.parentNode.removeChild(obj);
284
- }
285
- }
286
- },
287
- removeObjectInIE: function(id) {
288
- var obj = document.getElementById(id);
289
- if (obj) {
290
- for (var i in obj) {
291
- if (typeof obj[i] == "function") {
292
- obj[i] = null;
293
- }
294
- }
295
- obj.parentNode.removeChild(obj);
296
- }
297
- },
298
- determineScheme: function(url) {
299
- if (url && url.indexOf("://") != -1) {
300
- return url.substr(0, url.indexOf("://")+3);
301
- }
302
- return "//"; // let user agent figure this out
303
- },
304
-
305
- // taken from underscore
306
- debounce: function(func, wait, immediate) {
307
- var timeout;
308
- return function() {
309
- var context = this, args = arguments;
310
- var later = function() {
311
- timeout = null;
312
- if (!immediate) func.apply(context, args);
313
- };
314
- var callNow = immediate && !timeout;
315
- clearTimeout(timeout);
316
- timeout = setTimeout(later, wait);
317
- if (callNow) func.apply(context, args);
318
- };
319
- },
320
-
321
- /**
322
- * Returns true if targetNode appears after sourceNode in the dom.
323
- * @param {HTMLElement} sourceNode - the source node for comparison
324
- * @param {HTMLElement} targetNode - the node to compare against sourceNode
325
- */
326
- isNodeAfter: function(sourceNode, targetNode) {
327
- return !!(
328
- sourceNode &&
329
- targetNode &&
330
- typeof sourceNode.compareDocumentPosition === 'function' &&
331
- sourceNode.compareDocumentPosition(targetNode) & Node.DOCUMENT_POSITION_PRECEDING
332
- );
333
- }
334
- };
335
-
336
-
337
- // Core detector, plugins are added below
338
- mejs.PluginDetector = {
339
-
340
- // main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]);
341
- hasPluginVersion: function(plugin, v) {
342
- var pv = this.plugins[plugin];
343
- v[1] = v[1] || 0;
344
- v[2] = v[2] || 0;
345
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
346
- },
347
-
348
- // cached values
349
- nav: window.navigator,
350
- ua: window.navigator.userAgent.toLowerCase(),
351
-
352
- // stored version numbers
353
- plugins: [],
354
-
355
- // runs detectPlugin() and stores the version number
356
- addPlugin: function(p, pluginName, mimeType, activeX, axDetect) {
357
- this.plugins[p] = this.detectPlugin(pluginName, mimeType, activeX, axDetect);
358
- },
359
-
360
- // get the version number from the mimetype (all but IE) or ActiveX (IE)
361
- detectPlugin: function(pluginName, mimeType, activeX, axDetect) {
362
-
363
- var version = [0,0,0],
364
- description,
365
- i,
366
- ax;
367
-
368
- // Firefox, Webkit, Opera
369
- if (typeof(this.nav.plugins) != 'undefined' && typeof this.nav.plugins[pluginName] == 'object') {
370
- description = this.nav.plugins[pluginName].description;
371
- if (description && !(typeof this.nav.mimeTypes != 'undefined' && this.nav.mimeTypes[mimeType] && !this.nav.mimeTypes[mimeType].enabledPlugin)) {
372
- version = description.replace(pluginName, '').replace(/^\s+/,'').replace(/\sr/gi,'.').split('.');
373
- for (i=0; i<version.length; i++) {
374
- version[i] = parseInt(version[i].match(/\d+/), 10);
375
- }
376
- }
377
- // Internet Explorer / ActiveX
378
- } else if (typeof(window.ActiveXObject) != 'undefined') {
379
- try {
380
- ax = new ActiveXObject(activeX);
381
- if (ax) {
382
- version = axDetect(ax);
383
- }
384
- }
385
- catch (e) { }
386
- }
387
- return version;
388
- }
389
- };
390
-
391
- // Add Flash detection
392
- mejs.PluginDetector.addPlugin('flash','Shockwave Flash','application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash', function(ax) {
393
- // adapted from SWFObject
394
- var version = [],
395
- d = ax.GetVariable("$version");
396
- if (d) {
397
- d = d.split(" ")[1].split(",");
398
- version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
399
- }
400
- return version;
401
- });
402
-
403
- // Add Silverlight detection
404
- mejs.PluginDetector.addPlugin('silverlight','Silverlight Plug-In','application/x-silverlight-2','AgControl.AgControl', function (ax) {
405
- // Silverlight cannot report its version number to IE
406
- // but it does have a isVersionSupported function, so we have to loop through it to get a version number.
407
- // adapted from http://www.silverlightversion.com/
408
- var v = [0,0,0,0],
409
- loopMatch = function(ax, v, i, n) {
410
- while(ax.isVersionSupported(v[0]+ "."+ v[1] + "." + v[2] + "." + v[3])){
411
- v[i]+=n;
412
- }
413
- v[i] -= n;
414
- };
415
- loopMatch(ax, v, 0, 1);
416
- loopMatch(ax, v, 1, 1);
417
- loopMatch(ax, v, 2, 10000); // the third place in the version number is usually 5 digits (4.0.xxxxx)
418
- loopMatch(ax, v, 2, 1000);
419
- loopMatch(ax, v, 2, 100);
420
- loopMatch(ax, v, 2, 10);
421
- loopMatch(ax, v, 2, 1);
422
- loopMatch(ax, v, 3, 1);
423
-
424
- return v;
425
- });
426
- // add adobe acrobat
427
- /*
428
- PluginDetector.addPlugin('acrobat','Adobe Acrobat','application/pdf','AcroPDF.PDF', function (ax) {
429
- var version = [],
430
- d = ax.GetVersions().split(',')[0].split('=')[1].split('.');
431
-
432
- if (d) {
433
- version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
434
- }
435
- return version;
436
- });
437
- */
438
- // necessary detection (fixes for <IE9)
439
- mejs.MediaFeatures = {
440
- init: function() {
441
- var
442
- t = this,
443
- d = document,
444
- nav = mejs.PluginDetector.nav,
445
- ua = mejs.PluginDetector.ua.toLowerCase(),
446
- i,
447
- v,
448
- html5Elements = ['source','track','audio','video'];
449
-
450
- // detect browsers (only the ones that have some kind of quirk we need to work around)
451
- t.isiPad = (ua.match(/ipad/i) !== null);
452
- t.isiPhone = (ua.match(/iphone/i) !== null);
453
- t.isiOS = t.isiPhone || t.isiPad;
454
- t.isAndroid = (ua.match(/android/i) !== null);
455
- t.isBustedAndroid = (ua.match(/android 2\.[12]/) !== null);
456
- t.isBustedNativeHTTPS = (location.protocol === 'https:' && (ua.match(/android [12]\./) !== null || ua.match(/macintosh.* version.* safari/) !== null));
457
- t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1 || nav.appName.toLowerCase().match(/trident/gi) !== null);
458
- t.isChrome = (ua.match(/chrome/gi) !== null);
459
- t.isChromium = (ua.match(/chromium/gi) !== null);
460
- t.isFirefox = (ua.match(/firefox/gi) !== null);
461
- t.isWebkit = (ua.match(/webkit/gi) !== null);
462
- t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit && !t.isIE;
463
- t.isOpera = (ua.match(/opera/gi) !== null);
464
- t.hasTouch = ('ontouchstart' in window); // && window.ontouchstart != null); // this breaks iOS 7
465
-
466
- // Borrowed from `Modernizr.svgasimg`, sources:
467
- // - https://github.com/Modernizr/Modernizr/issues/687
468
- // - https://github.com/Modernizr/Modernizr/pull/1209/files
469
- t.svgAsImg = !!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1');
470
-
471
- // create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection
472
- for (i=0; i<html5Elements.length; i++) {
473
- v = document.createElement(html5Elements[i]);
474
- }
475
-
476
- t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid);
477
-
478
- // Fix for IE9 on Windows 7N / Windows 7KN (Media Player not installer)
479
- try{
480
- v.canPlayType("video/mp4");
481
- }catch(e){
482
- t.supportsMediaTag = false;
483
- }
484
-
485
- t.supportsPointerEvents = (function() {
486
- // TAKEN FROM MODERNIZR
487
- var element = document.createElement('x'),
488
- documentElement = document.documentElement,
489
- getComputedStyle = window.getComputedStyle,
490
- supports;
491
- if(!('pointerEvents' in element.style)){
492
- return false;
493
- }
494
- element.style.pointerEvents = 'auto';
495
- element.style.pointerEvents = 'x';
496
- documentElement.appendChild(element);
497
- supports = getComputedStyle &&
498
- getComputedStyle(element, '').pointerEvents === 'auto';
499
- documentElement.removeChild(element);
500
- return !!supports;
501
- })();
502
-
503
-
504
- // Older versions of Firefox can't move plugins around without it resetting,
505
- t.hasFirefoxPluginMovingProblem = false;
506
-
507
- // detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails)
508
-
509
- // iOS
510
- t.hasiOSFullScreen = (typeof v.webkitEnterFullscreen !== 'undefined');
511
-
512
- // W3C
513
- t.hasNativeFullscreen = (typeof v.requestFullscreen !== 'undefined');
514
-
515
- // webkit/firefox/IE11+
516
- t.hasWebkitNativeFullScreen = (typeof v.webkitRequestFullScreen !== 'undefined');
517
- t.hasMozNativeFullScreen = (typeof v.mozRequestFullScreen !== 'undefined');
518
- t.hasMsNativeFullScreen = (typeof v.msRequestFullscreen !== 'undefined');
519
-
520
- t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen || t.hasMsNativeFullScreen);
521
- t.nativeFullScreenEnabled = t.hasTrueNativeFullScreen;
522
-
523
- // Enabled?
524
- if (t.hasMozNativeFullScreen) {
525
- t.nativeFullScreenEnabled = document.mozFullScreenEnabled;
526
- } else if (t.hasMsNativeFullScreen) {
527
- t.nativeFullScreenEnabled = document.msFullscreenEnabled;
528
- }
529
-
530
- if (t.isChrome) {
531
- t.hasiOSFullScreen = false;
532
- }
533
-
534
- if (t.hasTrueNativeFullScreen) {
535
-
536
- t.fullScreenEventName = '';
537
- if (t.hasWebkitNativeFullScreen) {
538
- t.fullScreenEventName = 'webkitfullscreenchange';
539
-
540
- } else if (t.hasMozNativeFullScreen) {
541
- t.fullScreenEventName = 'mozfullscreenchange';
542
-
543
- } else if (t.hasMsNativeFullScreen) {
544
- t.fullScreenEventName = 'MSFullscreenChange';
545
- }
546
-
547
- t.isFullScreen = function() {
548
- if (t.hasMozNativeFullScreen) {
549
- return d.mozFullScreen;
550
-
551
- } else if (t.hasWebkitNativeFullScreen) {
552
- return d.webkitIsFullScreen;
553
-
554
- } else if (t.hasMsNativeFullScreen) {
555
- return d.msFullscreenElement !== null;
556
- }
557
- }
558
-
559
- t.requestFullScreen = function(el) {
560
-
561
- if (t.hasWebkitNativeFullScreen) {
562
- el.webkitRequestFullScreen();
563
-
564
- } else if (t.hasMozNativeFullScreen) {
565
- el.mozRequestFullScreen();
566
-
567
- } else if (t.hasMsNativeFullScreen) {
568
- el.msRequestFullscreen();
569
-
570
- }
571
- }
572
-
573
- t.cancelFullScreen = function() {
574
- if (t.hasWebkitNativeFullScreen) {
575
- document.webkitCancelFullScreen();
576
-
577
- } else if (t.hasMozNativeFullScreen) {
578
- document.mozCancelFullScreen();
579
-
580
- } else if (t.hasMsNativeFullScreen) {
581
- document.msExitFullscreen();
582
-
583
- }
584
- }
585
-
586
- }
587
-
588
-
589
- // OS X 10.5 can't do this even if it says it can :(
590
- if (t.hasiOSFullScreen && ua.match(/mac os x 10_5/i)) {
591
- t.hasNativeFullScreen = false;
592
- t.hasiOSFullScreen = false;
593
- }
594
-
595
- }
596
- };
597
- mejs.MediaFeatures.init();
598
-
599
- /*
600
- extension methods to <video> or <audio> object to bring it into parity with PluginMediaElement (see below)
601
- */
602
- mejs.HtmlMediaElement = {
603
- pluginType: 'native',
604
- isFullScreen: false,
605
-
606
- setCurrentTime: function (time) {
607
- this.currentTime = time;
608
- },
609
-
610
- setMuted: function (muted) {
611
- this.muted = muted;
612
- },
613
-
614
- setVolume: function (volume) {
615
- this.volume = volume;
616
- },
617
-
618
- // for parity with the plugin versions
619
- stop: function () {
620
- this.pause();
621
- },
622
-
623
- // This can be a url string
624
- // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
625
- setSrc: function (url) {
626
-
627
- // Fix for IE9 which can't set .src when there are <source> elements. Awesome, right?
628
- var
629
- existingSources = this.getElementsByTagName('source');
630
- while (existingSources.length > 0){
631
- this.removeChild(existingSources[0]);
632
- }
633
-
634
- if (typeof url == 'string') {
635
- this.src = url;
636
- } else {
637
- var i, media;
638
-
639
- for (i=0; i<url.length; i++) {
640
- media = url[i];
641
- if (this.canPlayType(media.type)) {
642
- this.src = media.src;
643
- break;
644
- }
645
- }
646
- }
647
- },
648
-
649
- setVideoSize: function (width, height) {
650
- this.width = width;
651
- this.height = height;
652
- }
653
- };
654
-
655
- /*
656
- Mimics the <video/audio> element by calling Flash's External Interface or Silverlights [ScriptableMember]
657
- */
658
- mejs.PluginMediaElement = function (pluginid, pluginType, mediaUrl) {
659
- this.id = pluginid;
660
- this.pluginType = pluginType;
661
- this.src = mediaUrl;
662
- this.events = {};
663
- this.attributes = {};
664
- };
665
-
666
- // JavaScript values and ExternalInterface methods that match HTML5 video properties methods
667
- // http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html
668
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
669
- mejs.PluginMediaElement.prototype = {
670
-
671
- // special
672
- pluginElement: null,
673
- pluginType: '',
674
- isFullScreen: false,
675
-
676
- // not implemented :(
677
- playbackRate: -1,
678
- defaultPlaybackRate: -1,
679
- seekable: [],
680
- played: [],
681
-
682
- // HTML5 read-only properties
683
- paused: true,
684
- ended: false,
685
- seeking: false,
686
- duration: 0,
687
- error: null,
688
- tagName: '',
689
-
690
- // HTML5 get/set properties, but only set (updated by event handlers)
691
- muted: false,
692
- volume: 1,
693
- currentTime: 0,
694
-
695
- // HTML5 methods
696
- play: function () {
697
- if (this.pluginApi != null) {
698
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
699
- this.pluginApi.playVideo();
700
- } else {
701
- this.pluginApi.playMedia();
702
- }
703
- this.paused = false;
704
- }
705
- },
706
- load: function () {
707
- if (this.pluginApi != null) {
708
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
709
- } else {
710
- this.pluginApi.loadMedia();
711
- }
712
-
713
- this.paused = false;
714
- }
715
- },
716
- pause: function () {
717
- if (this.pluginApi != null) {
718
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
719
- if( this.pluginApi.getPlayerState() == 1 ) {
720
- this.pluginApi.pauseVideo();
721
- }
722
- } else {
723
- this.pluginApi.pauseMedia();
724
- }
725
-
726
-
727
- this.paused = true;
728
- }
729
- },
730
- stop: function () {
731
- if (this.pluginApi != null) {
732
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
733
- this.pluginApi.stopVideo();
734
- } else {
735
- this.pluginApi.stopMedia();
736
- }
737
- this.paused = true;
738
- }
739
- },
740
- canPlayType: function(type) {
741
- var i,
742
- j,
743
- pluginInfo,
744
- pluginVersions = mejs.plugins[this.pluginType];
745
-
746
- for (i=0; i<pluginVersions.length; i++) {
747
- pluginInfo = pluginVersions[i];
748
-
749
- // test if user has the correct plugin version
750
- if (mejs.PluginDetector.hasPluginVersion(this.pluginType, pluginInfo.version)) {
751
-
752
- // test for plugin playback types
753
- for (j=0; j<pluginInfo.types.length; j++) {
754
- // find plugin that can play the type
755
- if (type == pluginInfo.types[j]) {
756
- return 'probably';
757
- }
758
- }
759
- }
760
- }
761
-
762
- return '';
763
- },
764
-
765
- positionFullscreenButton: function(x,y,visibleAndAbove) {
766
- if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
767
- this.pluginApi.positionFullscreenButton(Math.floor(x),Math.floor(y),visibleAndAbove);
768
- }
769
- },
770
-
771
- hideFullscreenButton: function() {
772
- if (this.pluginApi != null && this.pluginApi.hideFullscreenButton) {
773
- this.pluginApi.hideFullscreenButton();
774
- }
775
- },
776
-
777
-
778
- // custom methods since not all JavaScript implementations support get/set
779
-
780
- // This can be a url string
781
- // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
782
- setSrc: function (url) {
783
- if (typeof url == 'string') {
784
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(url));
785
- this.src = mejs.Utility.absolutizeUrl(url);
786
- } else {
787
- var i, media;
788
-
789
- for (i=0; i<url.length; i++) {
790
- media = url[i];
791
- if (this.canPlayType(media.type)) {
792
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(media.src));
793
- this.src = mejs.Utility.absolutizeUrl(media.src);
794
- break;
795
- }
796
- }
797
- }
798
-
799
- },
800
- setCurrentTime: function (time) {
801
- if (this.pluginApi != null) {
802
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
803
- this.pluginApi.seekTo(time);
804
- } else {
805
- this.pluginApi.setCurrentTime(time);
806
- }
807
-
808
-
809
-
810
- this.currentTime = time;
811
- }
812
- },
813
- setVolume: function (volume) {
814
- if (this.pluginApi != null) {
815
- // same on YouTube and MEjs
816
- if (this.pluginType == 'youtube') {
817
- this.pluginApi.setVolume(volume * 100);
818
- } else {
819
- this.pluginApi.setVolume(volume);
820
- }
821
- this.volume = volume;
822
- }
823
- },
824
- setMuted: function (muted) {
825
- if (this.pluginApi != null) {
826
- if (this.pluginType == 'youtube') {
827
- if (muted) {
828
- this.pluginApi.mute();
829
- } else {
830
- this.pluginApi.unMute();
831
- }
832
- this.muted = muted;
833
- this.dispatchEvent({type:'volumechange'});
834
- } else {
835
- this.pluginApi.setMuted(muted);
836
- }
837
- this.muted = muted;
838
- }
839
- },
840
-
841
- // additional non-HTML5 methods
842
- setVideoSize: function (width, height) {
843
-
844
- //if (this.pluginType == 'flash' || this.pluginType == 'silverlight') {
845
- if (this.pluginElement && this.pluginElement.style) {
846
- this.pluginElement.style.width = width + 'px';
847
- this.pluginElement.style.height = height + 'px';
848
- }
849
- if (this.pluginApi != null && this.pluginApi.setVideoSize) {
850
- this.pluginApi.setVideoSize(width, height);
851
- }
852
- //}
853
- },
854
-
855
- setFullscreen: function (fullscreen) {
856
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
857
- this.pluginApi.setFullscreen(fullscreen);
858
- }
859
- },
860
-
861
- enterFullScreen: function() {
862
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
863
- this.setFullscreen(true);
864
- }
865
-
866
- },
867
-
868
- exitFullScreen: function() {
869
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
870
- this.setFullscreen(false);
871
- }
872
- },
873
-
874
- // start: fake events
875
- addEventListener: function (eventName, callback, bubble) {
876
- this.events[eventName] = this.events[eventName] || [];
877
- this.events[eventName].push(callback);
878
- },
879
- removeEventListener: function (eventName, callback) {
880
- if (!eventName) { this.events = {}; return true; }
881
- var callbacks = this.events[eventName];
882
- if (!callbacks) return true;
883
- if (!callback) { this.events[eventName] = []; return true; }
884
- for (var i = 0; i < callbacks.length; i++) {
885
- if (callbacks[i] === callback) {
886
- this.events[eventName].splice(i, 1);
887
- return true;
888
- }
889
- }
890
- return false;
891
- },
892
- dispatchEvent: function (event) {
893
- var i,
894
- args,
895
- callbacks = this.events[event.type];
896
-
897
- if (callbacks) {
898
- for (i = 0; i < callbacks.length; i++) {
899
- callbacks[i].apply(this, [event]);
900
- }
901
- }
902
- },
903
- // end: fake events
904
-
905
- // fake DOM attribute methods
906
- hasAttribute: function(name){
907
- return (name in this.attributes);
908
- },
909
- removeAttribute: function(name){
910
- delete this.attributes[name];
911
- },
912
- getAttribute: function(name){
913
- if (this.hasAttribute(name)) {
914
- return this.attributes[name];
915
- }
916
- return null;
917
- },
918
- setAttribute: function(name, value){
919
- this.attributes[name] = value;
920
- },
921
-
922
- remove: function() {
923
- mejs.Utility.removeSwf(this.pluginElement.id);
924
- }
925
- };
926
-
927
- /*
928
- Default options
929
- */
930
- mejs.MediaElementDefaults = {
931
- // allows testing on HTML5, flash, silverlight
932
- // auto: attempts to detect what the browser can do
933
- // auto_plugin: prefer plugins and then attempt native HTML5
934
- // native: forces HTML5 playback
935
- // shim: disallows HTML5, will attempt either Flash or Silverlight
936
- // none: forces fallback view
937
- mode: 'auto',
938
- // remove or reorder to change plugin priority and availability
939
- plugins: ['flash','silverlight','youtube','vimeo'],
940
- // shows debug errors on screen
941
- enablePluginDebug: false,
942
- // use plugin for browsers that have trouble with Basic Authentication on HTTPS sites
943
- httpsBasicAuthSite: false,
944
- // overrides the type specified, useful for dynamic instantiation
945
- type: '',
946
- // path to Flash and Silverlight plugins
947
- pluginPath: mejs.Utility.getScriptPath(['mediaelement.js','mediaelement.min.js','mediaelement-and-player.js','mediaelement-and-player.min.js']),
948
- // name of flash file
949
- flashName: 'flashmediaelement.swf',
950
- // streamer for RTMP streaming
951
- flashStreamer: '',
952
- // set to 'always' for CDN version
953
- flashScriptAccess: 'sameDomain',
954
- // turns on the smoothing filter in Flash
955
- enablePluginSmoothing: false,
956
- // enabled pseudo-streaming (seek) on .mp4 files
957
- enablePseudoStreaming: false,
958
- // start query parameter sent to server for pseudo-streaming
959
- pseudoStreamingStartQueryParam: 'start',
960
- // name of silverlight file
961
- silverlightName: 'silverlightmediaelement.xap',
962
- // default if the <video width> is not specified
963
- defaultVideoWidth: 480,
964
- // default if the <video height> is not specified
965
- defaultVideoHeight: 270,
966
- // overrides <video width>
967
- pluginWidth: -1,
968
- // overrides <video height>
969
- pluginHeight: -1,
970
- // additional plugin variables in 'key=value' form
971
- pluginVars: [],
972
- // rate in milliseconds for Flash and Silverlight to fire the timeupdate event
973
- // larger number is less accurate, but less strain on plugin->JavaScript bridge
974
- timerRate: 250,
975
- // initial volume for player
976
- startVolume: 0.8,
977
- // custom error message in case media cannot be played; otherwise, Download File
978
- // link will be displayed
979
- customError: "",
980
- success: function () { },
981
- error: function () { }
982
- };
983
-
984
- /*
985
- Determines if a browser supports the <video> or <audio> element
986
- and returns either the native element or a Flash/Silverlight version that
987
- mimics HTML5 MediaElement
988
- */
989
- mejs.MediaElement = function (el, o) {
990
- return mejs.HtmlMediaElementShim.create(el,o);
991
- };
992
-
993
- mejs.HtmlMediaElementShim = {
994
-
995
- create: function(el, o) {
996
- var
997
- options = {},
998
- htmlMediaElement = (typeof(el) == 'string') ? document.getElementById(el) : el,
999
- tagName = htmlMediaElement.tagName.toLowerCase(),
1000
- isMediaTag = (tagName === 'audio' || tagName === 'video'),
1001
- src = (isMediaTag) ? htmlMediaElement.getAttribute('src') : htmlMediaElement.getAttribute('href'),
1002
- poster = htmlMediaElement.getAttribute('poster'),
1003
- autoplay = htmlMediaElement.getAttribute('autoplay'),
1004
- preload = htmlMediaElement.getAttribute('preload'),
1005
- controls = htmlMediaElement.getAttribute('controls'),
1006
- playback,
1007
- prop;
1008
-
1009
- // extend options
1010
- for (prop in mejs.MediaElementDefaults) {
1011
- options[prop] = mejs.MediaElementDefaults[prop];
1012
- }
1013
- for (prop in o) {
1014
- options[prop] = o[prop];
1015
- }
1016
-
1017
-
1018
- // clean up attributes
1019
- src = (typeof src == 'undefined' || src === null || src == '') ? null : src;
1020
- poster = (typeof poster == 'undefined' || poster === null) ? '' : poster;
1021
- preload = (typeof preload == 'undefined' || preload === null || preload === 'false') ? 'none' : preload;
1022
- autoplay = !(typeof autoplay == 'undefined' || autoplay === null || autoplay === 'false');
1023
- controls = !(typeof controls == 'undefined' || controls === null || controls === 'false');
1024
-
1025
- // test for HTML5 and plugin capabilities
1026
- playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src);
1027
- playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '';
1028
- playback.scheme = mejs.Utility.determineScheme(playback.url);
1029
-
1030
- if (playback.method == 'native') {
1031
- // second fix for android
1032
- if (mejs.MediaFeatures.isBustedAndroid) {
1033
- htmlMediaElement.src = playback.url;
1034
- htmlMediaElement.addEventListener('click', function() {
1035
- htmlMediaElement.play();
1036
- }, false);
1037
- }
1038
-
1039
- // add methods to native HTMLMediaElement
1040
- return this.updateNative(playback, options, autoplay, preload);
1041
- } else if (playback.method !== '') {
1042
- // create plugin to mimic HTMLMediaElement
1043
-
1044
- return this.createPlugin( playback, options, poster, autoplay, preload, controls);
1045
- } else {
1046
- // boo, no HTML5, no Flash, no Silverlight.
1047
- this.createErrorMessage( playback, options, poster );
1048
-
1049
- return this;
1050
- }
1051
- },
1052
-
1053
- determinePlayback: function(htmlMediaElement, options, supportsMediaTag, isMediaTag, src) {
1054
- var
1055
- mediaFiles = [],
1056
- i,
1057
- j,
1058
- k,
1059
- l,
1060
- n,
1061
- type,
1062
- result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() !== 'audio'), scheme: ''},
1063
- pluginName,
1064
- pluginVersions,
1065
- pluginInfo,
1066
- dummy,
1067
- media;
1068
-
1069
- // STEP 1: Get URL and type from <video src> or <source src>
1070
-
1071
- // supplied type overrides <video type> and <source type>
1072
- if (typeof options.type != 'undefined' && options.type !== '') {
1073
-
1074
- // accept either string or array of types
1075
- if (typeof options.type == 'string') {
1076
- mediaFiles.push({type:options.type, url:src});
1077
- } else {
1078
-
1079
- for (i=0; i<options.type.length; i++) {
1080
- mediaFiles.push({type:options.type[i], url:src});
1081
- }
1082
- }
1083
-
1084
- // test for src attribute first
1085
- } else if (src !== null) {
1086
- type = this.formatType(src, htmlMediaElement.getAttribute('type'));
1087
- mediaFiles.push({type:type, url:src});
1088
-
1089
- // then test for <source> elements
1090
- } else {
1091
- // test <source> types to see if they are usable
1092
- for (i = 0; i < htmlMediaElement.childNodes.length; i++) {
1093
- n = htmlMediaElement.childNodes[i];
1094
- if (n.nodeType == 1 && n.tagName.toLowerCase() == 'source') {
1095
- src = n.getAttribute('src');
1096
- type = this.formatType(src, n.getAttribute('type'));
1097
- media = n.getAttribute('media');
1098
-
1099
- if (!media || !window.matchMedia || (window.matchMedia && window.matchMedia(media).matches)) {
1100
- mediaFiles.push({type:type, url:src});
1101
- }
1102
- }
1103
- }
1104
- }
1105
-
1106
- // in the case of dynamicly created players
1107
- // check for audio types
1108
- if (!isMediaTag && mediaFiles.length > 0 && mediaFiles[0].url !== null && this.getTypeFromFile(mediaFiles[0].url).indexOf('audio') > -1) {
1109
- result.isVideo = false;
1110
- }
1111
-
1112
-
1113
- // STEP 2: Test for playback method
1114
-
1115
- // special case for Android which sadly doesn't implement the canPlayType function (always returns '')
1116
- if (result.isVideo && mejs.MediaFeatures.isBustedAndroid) {
1117
- htmlMediaElement.canPlayType = function(type) {
1118
- return (type.match(/video\/(mp4|m4v)/gi) !== null) ? 'maybe' : '';
1119
- };
1120
- }
1121
-
1122
- // special case for Chromium to specify natively supported video codecs (i.e. WebM and Theora)
1123
- if (result.isVideo && mejs.MediaFeatures.isChromium) {
1124
- htmlMediaElement.canPlayType = function(type) {
1125
- return (type.match(/video\/(webm|ogv|ogg)/gi) !== null) ? 'maybe' : '';
1126
- };
1127
- }
1128
-
1129
- // test for native playback first
1130
- if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native') && !(mejs.MediaFeatures.isBustedNativeHTTPS && options.httpsBasicAuthSite === true)) {
1131
-
1132
- if (!isMediaTag) {
1133
-
1134
- // create a real HTML5 Media Element
1135
- dummy = document.createElement( result.isVideo ? 'video' : 'audio');
1136
- htmlMediaElement.parentNode.insertBefore(dummy, htmlMediaElement);
1137
- htmlMediaElement.style.display = 'none';
1138
-
1139
- // use this one from now on
1140
- result.htmlMediaElement = htmlMediaElement = dummy;
1141
- }
1142
-
1143
- for (i=0; i<mediaFiles.length; i++) {
1144
- // normal check
1145
- if (mediaFiles[i].type == "video/m3u8" || htmlMediaElement.canPlayType(mediaFiles[i].type).replace(/no/, '') !== ''
1146
- // special case for Mac/Safari 5.0.3 which answers '' to canPlayType('audio/mp3') but 'maybe' to canPlayType('audio/mpeg')
1147
- || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/mp3/,'mpeg')).replace(/no/, '') !== ''
1148
- // special case for m4a supported by detecting mp4 support
1149
- || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/m4a/,'mp4')).replace(/no/, '') !== '') {
1150
- result.method = 'native';
1151
- result.url = mediaFiles[i].url;
1152
- break;
1153
- }
1154
- }
1155
-
1156
- if (result.method === 'native') {
1157
- if (result.url !== null) {
1158
- htmlMediaElement.src = result.url;
1159
- }
1160
-
1161
- // if `auto_plugin` mode, then cache the native result but try plugins.
1162
- if (options.mode !== 'auto_plugin') {
1163
- return result;
1164
- }
1165
- }
1166
- }
1167
-
1168
- // if native playback didn't work, then test plugins
1169
- if (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'shim') {
1170
- for (i=0; i<mediaFiles.length; i++) {
1171
- type = mediaFiles[i].type;
1172
-
1173
- // test all plugins in order of preference [silverlight, flash]
1174
- for (j=0; j<options.plugins.length; j++) {
1175
-
1176
- pluginName = options.plugins[j];
1177
-
1178
- // test version of plugin (for future features)
1179
- pluginVersions = mejs.plugins[pluginName];
1180
-
1181
- for (k=0; k<pluginVersions.length; k++) {
1182
- pluginInfo = pluginVersions[k];
1183
-
1184
- // test if user has the correct plugin version
1185
-
1186
- // for youtube/vimeo
1187
- if (pluginInfo.version == null ||
1188
-
1189
- mejs.PluginDetector.hasPluginVersion(pluginName, pluginInfo.version)) {
1190
-
1191
- // test for plugin playback types
1192
- for (l=0; l<pluginInfo.types.length; l++) {
1193
- // find plugin that can play the type
1194
- if (type.toLowerCase() == pluginInfo.types[l].toLowerCase()) {
1195
- result.method = pluginName;
1196
- result.url = mediaFiles[i].url;
1197
- return result;
1198
- }
1199
- }
1200
- }
1201
- }
1202
- }
1203
- }
1204
- }
1205
-
1206
- // at this point, being in 'auto_plugin' mode implies that we tried plugins but failed.
1207
- // if we have native support then return that.
1208
- if (options.mode === 'auto_plugin' && result.method === 'native') {
1209
- return result;
1210
- }
1211
-
1212
- // what if there's nothing to play? just grab the first available
1213
- if (result.method === '' && mediaFiles.length > 0) {
1214
- result.url = mediaFiles[0].url;
1215
- }
1216
-
1217
- return result;
1218
- },
1219
-
1220
- formatType: function(url, type) {
1221
- // if no type is supplied, fake it with the extension
1222
- if (url && !type) {
1223
- return this.getTypeFromFile(url);
1224
- } else {
1225
- // only return the mime part of the type in case the attribute contains the codec
1226
- // see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
1227
- // `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
1228
-
1229
- if (type && ~type.indexOf(';')) {
1230
- return type.substr(0, type.indexOf(';'));
1231
- } else {
1232
- return type;
1233
- }
1234
- }
1235
- },
1236
-
1237
- getTypeFromFile: function(url) {
1238
- url = url.split('?')[0];
1239
- var
1240
- ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase(),
1241
- av = /(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext) ? 'video/' : 'audio/';
1242
- return this.getTypeFromExtension(ext, av);
1243
- },
1244
-
1245
- getTypeFromExtension: function(ext, av) {
1246
- av = av || '';
1247
-
1248
- switch (ext) {
1249
- case 'mp4':
1250
- case 'm4v':
1251
- case 'm4a':
1252
- case 'f4v':
1253
- case 'f4a':
1254
- return av + 'mp4';
1255
- case 'flv':
1256
- return av + 'x-flv';
1257
- case 'webm':
1258
- case 'webma':
1259
- case 'webmv':
1260
- return av + 'webm';
1261
- case 'ogg':
1262
- case 'oga':
1263
- case 'ogv':
1264
- return av + 'ogg';
1265
- case 'm3u8':
1266
- return 'application/x-mpegurl';
1267
- case 'ts':
1268
- return av + 'mp2t';
1269
- default:
1270
- return av + ext;
1271
- }
1272
- },
1273
-
1274
- createErrorMessage: function(playback, options, poster) {
1275
- var
1276
- htmlMediaElement = playback.htmlMediaElement,
1277
- errorContainer = document.createElement('div'),
1278
- errorContent = options.customError;
1279
-
1280
- errorContainer.className = 'me-cannotplay';
1281
-
1282
- try {
1283
- errorContainer.style.width = htmlMediaElement.width + 'px';
1284
- errorContainer.style.height = htmlMediaElement.height + 'px';
1285
- } catch (e) {}
1286
-
1287
- if (!errorContent) {
1288
- errorContent = '<a href="' + playback.url + '">';
1289
-
1290
- if (poster !== '') {
1291
- errorContent += '<img src="' + poster + '" width="100%" height="100%" alt="" />';
1292
- }
1293
-
1294
- errorContent += '<span>' + mejs.i18n.t('mejs.download-file') + '</span></a>';
1295
- }
1296
-
1297
- errorContainer.innerHTML = errorContent;
1298
-
1299
- htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
1300
- htmlMediaElement.style.display = 'none';
1301
-
1302
- options.error(htmlMediaElement);
1303
- },
1304
-
1305
- createPlugin:function(playback, options, poster, autoplay, preload, controls) {
1306
- var
1307
- htmlMediaElement = playback.htmlMediaElement,
1308
- width = 1,
1309
- height = 1,
1310
- pluginid = 'me_' + playback.method + '_' + (mejs.meIndex++),
1311
- pluginMediaElement = new mejs.PluginMediaElement(pluginid, playback.method, playback.url),
1312
- container = document.createElement('div'),
1313
- specialIEContainer,
1314
- node,
1315
- initVars;
1316
-
1317
- // copy tagName from html media element
1318
- pluginMediaElement.tagName = htmlMediaElement.tagName;
1319
-
1320
- // copy attributes from html media element to plugin media element
1321
- for (var i = 0; i < htmlMediaElement.attributes.length; i++) {
1322
- var attribute = htmlMediaElement.attributes[i];
1323
- if (attribute.specified) {
1324
- pluginMediaElement.setAttribute(attribute.name, attribute.value);
1325
- }
1326
- }
1327
-
1328
- // check for placement inside a <p> tag (sometimes WYSIWYG editors do this)
1329
- node = htmlMediaElement.parentNode;
1330
-
1331
- while (node !== null && node.tagName != null && node.tagName.toLowerCase() !== 'body' &&
1332
- node.parentNode != null && node.parentNode.tagName != null && node.parentNode.constructor != null && node.parentNode.constructor.name === "ShadowRoot") {
1333
- if (node.parentNode.tagName.toLowerCase() === 'p') {
1334
- node.parentNode.parentNode.insertBefore(node, node.parentNode);
1335
- break;
1336
- }
1337
- node = node.parentNode;
1338
- }
1339
-
1340
- if (playback.isVideo) {
1341
- width = (options.pluginWidth > 0) ? options.pluginWidth : (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
1342
- height = (options.pluginHeight > 0) ? options.pluginHeight : (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
1343
-
1344
- // in case of '%' make sure it's encoded
1345
- width = mejs.Utility.encodeUrl(width);
1346
- height = mejs.Utility.encodeUrl(height);
1347
-
1348
- } else {
1349
- if (options.enablePluginDebug) {
1350
- width = 320;
1351
- height = 240;
1352
- }
1353
- }
1354
-
1355
- // register plugin
1356
- pluginMediaElement.success = options.success;
1357
-
1358
- // add container (must be added to DOM before inserting HTML for IE)
1359
- container.className = 'me-plugin';
1360
- container.id = pluginid + '_container';
1361
-
1362
- if (playback.isVideo) {
1363
- htmlMediaElement.parentNode.insertBefore(container, htmlMediaElement);
1364
- } else {
1365
- document.body.insertBefore(container, document.body.childNodes[0]);
1366
- }
1367
-
1368
- if (playback.method === 'flash' || playback.method === 'silverlight') {
1369
-
1370
- var canPlayVideo = htmlMediaElement.getAttribute('type') === 'audio/mp4',
1371
- childrenSources = htmlMediaElement.getElementsByTagName('source');
1372
-
1373
- if (childrenSources && !canPlayVideo) {
1374
- for (var i = 0, total = childrenSources.length; i < total; i++) {
1375
- if (childrenSources[i].getAttribute('type') === 'audio/mp4') {
1376
- canPlayVideo = true;
1377
- }
1378
- }
1379
- }
1380
-
1381
- // flash/silverlight vars
1382
- initVars = [
1383
- 'id=' + pluginid,
1384
- 'isvideo=' + ((playback.isVideo || canPlayVideo) ? "true" : "false"),
1385
- 'autoplay=' + ((autoplay) ? "true" : "false"),
1386
- 'preload=' + preload,
1387
- 'width=' + width,
1388
- 'startvolume=' + options.startVolume,
1389
- 'timerrate=' + options.timerRate,
1390
- 'flashstreamer=' + options.flashStreamer,
1391
- 'height=' + height,
1392
- 'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
1393
-
1394
- if (playback.url !== null) {
1395
- if (playback.method == 'flash') {
1396
- initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
1397
- } else {
1398
- initVars.push('file=' + playback.url);
1399
- }
1400
- }
1401
- if (options.enablePluginDebug) {
1402
- initVars.push('debug=true');
1403
- }
1404
- if (options.enablePluginSmoothing) {
1405
- initVars.push('smoothing=true');
1406
- }
1407
- if (options.enablePseudoStreaming) {
1408
- initVars.push('pseudostreaming=true');
1409
- }
1410
- if (controls) {
1411
- initVars.push('controls=true'); // shows controls in the plugin if desired
1412
- }
1413
- if (options.pluginVars) {
1414
- initVars = initVars.concat(options.pluginVars);
1415
- }
1416
-
1417
- // call from plugin
1418
- window[pluginid + '_init'] = function() {
1419
- switch (pluginMediaElement.pluginType) {
1420
- case 'flash':
1421
- pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(pluginid);
1422
- break;
1423
- case 'silverlight':
1424
- pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
1425
- pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
1426
- break;
1427
- }
1428
-
1429
- if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
1430
- pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
1431
- }
1432
- };
1433
-
1434
- // event call from plugin
1435
- window[pluginid + '_event'] = function(eventName, values) {
1436
-
1437
- var
1438
- e,
1439
- i,
1440
- bufferedTime;
1441
-
1442
- // fake event object to mimic real HTML media event.
1443
- e = {
1444
- type: eventName,
1445
- target: pluginMediaElement
1446
- };
1447
-
1448
- // attach all values to element and event object
1449
- for (i in values) {
1450
- pluginMediaElement[i] = values[i];
1451
- e[i] = values[i];
1452
- }
1453
-
1454
- // fake the newer W3C buffered TimeRange (loaded and total have been removed)
1455
- bufferedTime = values.bufferedTime || 0;
1456
-
1457
- e.target.buffered = e.buffered = {
1458
- start: function(index) {
1459
- return 0;
1460
- },
1461
- end: function (index) {
1462
- return bufferedTime;
1463
- },
1464
- length: 1
1465
- };
1466
-
1467
- pluginMediaElement.dispatchEvent(e);
1468
- }
1469
-
1470
-
1471
- }
1472
-
1473
- switch (playback.method) {
1474
- case 'silverlight':
1475
- container.innerHTML =
1476
- '<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + pluginid + '" name="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
1477
- '<param name="initParams" value="' + initVars.join(',') + '" />' +
1478
- '<param name="windowless" value="true" />' +
1479
- '<param name="background" value="black" />' +
1480
- '<param name="minRuntimeVersion" value="3.0.0.0" />' +
1481
- '<param name="autoUpgrade" value="true" />' +
1482
- '<param name="source" value="' + options.pluginPath + options.silverlightName + '" />' +
1483
- '</object>';
1484
- break;
1485
-
1486
- case 'flash':
1487
-
1488
- if (mejs.MediaFeatures.isIE) {
1489
- specialIEContainer = document.createElement('div');
1490
- container.appendChild(specialIEContainer);
1491
- specialIEContainer.outerHTML =
1492
- '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
1493
- 'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
1494
- '<param name="movie" value="' + options.pluginPath + options.flashName + '?' + (new Date().getTime()) + '" />' +
1495
- '<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
1496
- '<param name="quality" value="high" />' +
1497
- '<param name="bgcolor" value="#000000" />' +
1498
- '<param name="wmode" value="transparent" />' +
1499
- '<param name="allowScriptAccess" value="' + options.flashScriptAccess + '" />' +
1500
- '<param name="allowFullScreen" value="true" />' +
1501
- '<param name="scale" value="default" />' +
1502
- '</object>';
1503
-
1504
- } else {
1505
-
1506
- container.innerHTML =
1507
- '<embed id="' + pluginid + '" name="' + pluginid + '" ' +
1508
- 'play="true" ' +
1509
- 'loop="false" ' +
1510
- 'quality="high" ' +
1511
- 'bgcolor="#000000" ' +
1512
- 'wmode="transparent" ' +
1513
- 'allowScriptAccess="' + options.flashScriptAccess + '" ' +
1514
- 'allowFullScreen="true" ' +
1515
- 'type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" ' +
1516
- 'src="' + options.pluginPath + options.flashName + '" ' +
1517
- 'flashvars="' + initVars.join('&') + '" ' +
1518
- 'width="' + width + '" ' +
1519
- 'height="' + height + '" ' +
1520
- 'scale="default"' +
1521
- 'class="mejs-shim"></embed>';
1522
- }
1523
- break;
1524
-
1525
- case 'youtube':
1526
-
1527
-
1528
- var videoId;
1529
- // youtu.be url from share button
1530
- if (playback.url.lastIndexOf("youtu.be") != -1) {
1531
- videoId = playback.url.substr(playback.url.lastIndexOf('/')+1);
1532
- if (videoId.indexOf('?') != -1) {
1533
- videoId = videoId.substr(0, videoId.indexOf('?'));
1534
- }
1535
- }
1536
- else {
1537
- // https://www.youtube.com/watch?v=
1538
- var videoIdMatch = playback.url.match( /[?&]v=([^&#]+)|&|#|$/ );
1539
- if ( videoIdMatch ) {
1540
- videoId = videoIdMatch[1];
1541
- }
1542
- }
1543
- youtubeSettings = {
1544
- container: container,
1545
- containerId: container.id,
1546
- pluginMediaElement: pluginMediaElement,
1547
- pluginId: pluginid,
1548
- videoId: videoId,
1549
- height: height,
1550
- width: width,
1551
- scheme: playback.scheme,
1552
- variables: options.youtubeIframeVars
1553
- };
1554
-
1555
- // favor iframe version of YouTube
1556
- if (window.postMessage) {
1557
- mejs.YouTubeApi.enqueueIframe(youtubeSettings);
1558
- } else if (mejs.PluginDetector.hasPluginVersion('flash', [10,0,0]) ) {
1559
- mejs.YouTubeApi.createFlash(youtubeSettings, options);
1560
- }
1561
- break;
1562
-
1563
- // DEMO Code. Does NOT work.
1564
- case 'vimeo':
1565
- var player_id = pluginid + "_player";
1566
- pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
1567
-
1568
- container.innerHTML ='<iframe src="' + playback.scheme + 'player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
1569
- if (typeof($f) == 'function') { // froogaloop available
1570
- var player = $f(container.childNodes[0]),
1571
- playerState = -1;
1572
-
1573
- player.addEvent('ready', function() {
1574
-
1575
- player.playVideo = function() {
1576
- player.api( 'play' );
1577
- };
1578
- player.stopVideo = function() {
1579
- player.api( 'unload' );
1580
- };
1581
- player.pauseVideo = function() {
1582
- player.api( 'pause' );
1583
- };
1584
- player.seekTo = function( seconds ) {
1585
- player.api( 'seekTo', seconds );
1586
- };
1587
- player.setVolume = function( volume ) {
1588
- player.api( 'setVolume', volume );
1589
- };
1590
- player.setMuted = function( muted ) {
1591
- if( muted ) {
1592
- player.lastVolume = player.api( 'getVolume' );
1593
- player.api( 'setVolume', 0 );
1594
- } else {
1595
- player.api( 'setVolume', player.lastVolume );
1596
- delete player.lastVolume;
1597
- }
1598
- };
1599
- // parity with YT player
1600
- player.getPlayerState = function() {
1601
- return playerState;
1602
- };
1603
-
1604
- function createEvent(player, pluginMediaElement, eventName, e) {
1605
- var event = {
1606
- type: eventName,
1607
- target: pluginMediaElement
1608
- };
1609
- if (eventName == 'timeupdate') {
1610
- pluginMediaElement.currentTime = event.currentTime = e.seconds;
1611
- pluginMediaElement.duration = event.duration = e.duration;
1612
- }
1613
- pluginMediaElement.dispatchEvent(event);
1614
- }
1615
-
1616
- player.addEvent('play', function() {
1617
- playerState = 1;
1618
- createEvent(player, pluginMediaElement, 'play');
1619
- createEvent(player, pluginMediaElement, 'playing');
1620
- });
1621
-
1622
- player.addEvent('pause', function() {
1623
- playerState = 2;
1624
- createEvent(player, pluginMediaElement, 'pause');
1625
- });
1626
-
1627
- player.addEvent('finish', function() {
1628
- playerState = 0;
1629
- createEvent(player, pluginMediaElement, 'ended');
1630
- });
1631
-
1632
- player.addEvent('playProgress', function(e) {
1633
- createEvent(player, pluginMediaElement, 'timeupdate', e);
1634
- });
1635
-
1636
- player.addEvent('seek', function(e) {
1637
- playerState = 3;
1638
- createEvent(player, pluginMediaElement, 'seeked', e);
1639
- });
1640
-
1641
- player.addEvent('loadProgress', function(e) {
1642
- playerState = 3;
1643
- createEvent(player, pluginMediaElement, 'progress', e);
1644
- });
1645
-
1646
- pluginMediaElement.pluginElement = container;
1647
- pluginMediaElement.pluginApi = player;
1648
-
1649
- pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
1650
- });
1651
- }
1652
- else {
1653
- console.warn("You need to include froogaloop for vimeo to work");
1654
- }
1655
- break;
1656
- }
1657
- // hide original element
1658
- htmlMediaElement.style.display = 'none';
1659
- // prevent browser from autoplaying when using a plugin
1660
- htmlMediaElement.removeAttribute('autoplay');
1661
-
1662
- return pluginMediaElement;
1663
- },
1664
-
1665
- updateNative: function(playback, options, autoplay, preload) {
1666
-
1667
- var htmlMediaElement = playback.htmlMediaElement,
1668
- m;
1669
-
1670
-
1671
- // add methods to video object to bring it into parity with Flash Object
1672
- for (m in mejs.HtmlMediaElement) {
1673
- htmlMediaElement[m] = mejs.HtmlMediaElement[m];
1674
- }
1675
-
1676
- /*
1677
- Chrome now supports preload="none"
1678
- if (mejs.MediaFeatures.isChrome) {
1679
-
1680
- // special case to enforce preload attribute (Chrome doesn't respect this)
1681
- if (preload === 'none' && !autoplay) {
1682
-
1683
- // forces the browser to stop loading (note: fails in IE9)
1684
- htmlMediaElement.src = '';
1685
- htmlMediaElement.load();
1686
- htmlMediaElement.canceledPreload = true;
1687
-
1688
- htmlMediaElement.addEventListener('play',function() {
1689
- if (htmlMediaElement.canceledPreload) {
1690
- htmlMediaElement.src = playback.url;
1691
- htmlMediaElement.load();
1692
- htmlMediaElement.play();
1693
- htmlMediaElement.canceledPreload = false;
1694
- }
1695
- }, false);
1696
- // for some reason Chrome forgets how to autoplay sometimes.
1697
- } else if (autoplay) {
1698
- htmlMediaElement.load();
1699
- htmlMediaElement.play();
1700
- }
1701
- }
1702
- */
1703
-
1704
- // fire success code
1705
- options.success(htmlMediaElement, htmlMediaElement);
1706
-
1707
- return htmlMediaElement;
1708
- }
1709
- };
1710
-
1711
- /*
1712
- - test on IE (object vs. embed)
1713
- - determine when to use iframe (Firefox, Safari, Mobile) vs. Flash (Chrome, IE)
1714
- - fullscreen?
1715
- */
1716
-
1717
- // YouTube Flash and Iframe API
1718
- mejs.YouTubeApi = {
1719
- isIframeStarted: false,
1720
- isIframeLoaded: false,
1721
- loadIframeApi: function(yt) {
1722
- if (!this.isIframeStarted) {
1723
- var tag = document.createElement('script');
1724
- tag.src = yt.scheme + "www.youtube.com/player_api";
1725
- var firstScriptTag = document.getElementsByTagName('script')[0];
1726
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
1727
- this.isIframeStarted = true;
1728
- }
1729
- },
1730
- iframeQueue: [],
1731
- enqueueIframe: function(yt) {
1732
-
1733
- if (this.isLoaded) {
1734
- this.createIframe(yt);
1735
- } else {
1736
- this.loadIframeApi(yt);
1737
- this.iframeQueue.push(yt);
1738
- }
1739
- },
1740
- createIframe: function(settings) {
1741
-
1742
- var
1743
- pluginMediaElement = settings.pluginMediaElement,
1744
- defaultVars = {controls:0, wmode:'transparent'},
1745
- player = new YT.Player(settings.containerId, {
1746
- height: settings.height,
1747
- width: settings.width,
1748
- videoId: settings.videoId,
1749
- playerVars: mejs.$.extend({}, defaultVars, settings.variables),
1750
- events: {
1751
- 'onReady': function(e) {
1752
-
1753
- // wrapper to match
1754
- player.setVideoSize = function(width, height) {
1755
- player.setSize(width, height);
1756
- };
1757
-
1758
- // hook up iframe object to MEjs
1759
- settings.pluginMediaElement.pluginApi = player;
1760
- settings.pluginMediaElement.pluginElement = document.getElementById(settings.containerId);
1761
-
1762
- // init mejs
1763
- pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
1764
-
1765
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'canplay');
1766
-
1767
- // create timer
1768
- setInterval(function() {
1769
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
1770
- }, 250);
1771
-
1772
- if (typeof pluginMediaElement.attributes.autoplay !== 'undefined') {
1773
- player.playVideo();
1774
- }
1775
- },
1776
- 'onStateChange': function(e) {
1777
-
1778
- mejs.YouTubeApi.handleStateChange(e.data, player, pluginMediaElement);
1779
-
1780
- }
1781
- }
1782
- });
1783
- },
1784
-
1785
- createEvent: function (player, pluginMediaElement, eventName) {
1786
- var event = {
1787
- type: eventName,
1788
- target: pluginMediaElement
1789
- };
1790
-
1791
- if (player && player.getDuration) {
1792
-
1793
- // time
1794
- pluginMediaElement.currentTime = event.currentTime = player.getCurrentTime();
1795
- pluginMediaElement.duration = event.duration = player.getDuration();
1796
-
1797
- // state
1798
- event.paused = pluginMediaElement.paused;
1799
- event.ended = pluginMediaElement.ended;
1800
-
1801
- // sound
1802
- event.muted = player.isMuted();
1803
- event.volume = player.getVolume() / 100;
1804
-
1805
- // progress
1806
- event.bytesTotal = player.getVideoBytesTotal();
1807
- event.bufferedBytes = player.getVideoBytesLoaded();
1808
-
1809
- // fake the W3C buffered TimeRange
1810
- var bufferedTime = event.bufferedBytes / event.bytesTotal * event.duration;
1811
-
1812
- event.target.buffered = event.buffered = {
1813
- start: function(index) {
1814
- return 0;
1815
- },
1816
- end: function (index) {
1817
- return bufferedTime;
1818
- },
1819
- length: 1
1820
- };
1821
-
1822
- }
1823
-
1824
- // send event up the chain
1825
- pluginMediaElement.dispatchEvent(event);
1826
- },
1827
-
1828
- iFrameReady: function() {
1829
-
1830
- this.isLoaded = true;
1831
- this.isIframeLoaded = true;
1832
-
1833
- while (this.iframeQueue.length > 0) {
1834
- var settings = this.iframeQueue.pop();
1835
- this.createIframe(settings);
1836
- }
1837
- },
1838
-
1839
- // FLASH!
1840
- flashPlayers: {},
1841
- createFlash: function(settings) {
1842
-
1843
- this.flashPlayers[settings.pluginId] = settings;
1844
-
1845
- /*
1846
- settings.container.innerHTML =
1847
- '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
1848
- 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
1849
- '<param name="allowScriptAccess" value="sameDomain">' +
1850
- '<param name="wmode" value="transparent">' +
1851
- '</object>';
1852
- */
1853
-
1854
- var specialIEContainer,
1855
- youtubeUrl = settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
1856
-
1857
- if (mejs.MediaFeatures.isIE) {
1858
-
1859
- specialIEContainer = document.createElement('div');
1860
- settings.container.appendChild(specialIEContainer);
1861
- specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + settings.scheme + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
1862
- 'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' +
1863
- '<param name="movie" value="' + youtubeUrl + '" />' +
1864
- '<param name="wmode" value="transparent" />' +
1865
- '<param name="allowScriptAccess" value="' + options.flashScriptAccess + '" />' +
1866
- '<param name="allowFullScreen" value="true" />' +
1867
- '</object>';
1868
- } else {
1869
- settings.container.innerHTML =
1870
- '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + youtubeUrl + '" ' +
1871
- 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
1872
- '<param name="allowScriptAccess" value="' + options.flashScriptAccess + '">' +
1873
- '<param name="wmode" value="transparent">' +
1874
- '</object>';
1875
- }
1876
-
1877
- },
1878
-
1879
- flashReady: function(id) {
1880
- var
1881
- settings = this.flashPlayers[id],
1882
- player = document.getElementById(id),
1883
- pluginMediaElement = settings.pluginMediaElement;
1884
-
1885
- // hook up and return to MediaELementPlayer.success
1886
- pluginMediaElement.pluginApi =
1887
- pluginMediaElement.pluginElement = player;
1888
-
1889
- settings.success(pluginMediaElement, pluginMediaElement.pluginElement);
1890
-
1891
- // load the youtube video
1892
- player.cueVideoById(settings.videoId);
1893
-
1894
- var callbackName = settings.containerId + '_callback';
1895
-
1896
- window[callbackName] = function(e) {
1897
- mejs.YouTubeApi.handleStateChange(e, player, pluginMediaElement);
1898
- };
1899
-
1900
- player.addEventListener('onStateChange', callbackName);
1901
-
1902
- setInterval(function() {
1903
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
1904
- }, 250);
1905
-
1906
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'canplay');
1907
- },
1908
-
1909
- handleStateChange: function(youTubeState, player, pluginMediaElement) {
1910
- switch (youTubeState) {
1911
- case -1: // not started
1912
- pluginMediaElement.paused = true;
1913
- pluginMediaElement.ended = true;
1914
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'loadedmetadata');
1915
- //createYouTubeEvent(player, pluginMediaElement, 'loadeddata');
1916
- break;
1917
- case 0:
1918
- pluginMediaElement.paused = false;
1919
- pluginMediaElement.ended = true;
1920
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'ended');
1921
- break;
1922
- case 1:
1923
- pluginMediaElement.paused = false;
1924
- pluginMediaElement.ended = false;
1925
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'play');
1926
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'playing');
1927
- break;
1928
- case 2:
1929
- pluginMediaElement.paused = true;
1930
- pluginMediaElement.ended = false;
1931
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'pause');
1932
- break;
1933
- case 3: // buffering
1934
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'progress');
1935
- break;
1936
- case 5:
1937
- // cued?
1938
- break;
1939
-
1940
- }
1941
-
1942
- }
1943
- }
1944
- // IFRAME
1945
- window.onYouTubePlayerAPIReady = function() {
1946
- mejs.YouTubeApi.iFrameReady();
1947
- };
1948
- // FLASH
1949
- window.onYouTubePlayerReady = function(id) {
1950
- mejs.YouTubeApi.flashReady(id);
1951
- };
1952
-
1953
- window.mejs = mejs;
1954
- window.MediaElement = mejs.MediaElement;
1955
-
1956
- /**
1957
- * Localize strings
1958
- *
1959
- * Include translations from JS files and method to pluralize properly strings.
1960
- *
1961
- */
1962
- (function (doc, win, mejs, undefined) {
1963
-
1964
- var i18n = {
1965
- /**
1966
- * @type {String}
1967
- */
1968
- 'default': 'en',
1969
-
1970
- /**
1971
- * @type {String[]}
1972
- */
1973
- locale: {
1974
- language: (mejs.i18n && mejs.i18n.locale.language) || '',
1975
- strings: (mejs.i18n && mejs.i18n.locale.strings) || {}
1976
- },
1977
-
1978
- /**
1979
- * Filters for available languages.
1980
- *
1981
- * This plural forms are grouped in family groups based on
1982
- * https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
1983
- * with some additions and corrections according to the Localization Guide list
1984
- * (http://localization-guide.readthedocs.io/en/latest/l10n/pluralforms.html)
1985
- *
1986
- * Arguments are dynamic following the structure:
1987
- * - argument1 : Number to determine form
1988
- * - argument2...argumentN: Possible matches
1989
- *
1990
- * @type {Function[]}
1991
- */
1992
- pluralForms: [
1993
- // 0: Chinese, Japanese, Korean, Persian, Turkish, Thai, Lao, Aymará,
1994
- // Tibetan, Chiga, Dzongkha, Indonesian, Lojban, Georgian, Kazakh, Khmer, Kyrgyz, Malay,
1995
- // Burmese, Yakut, Sundanese, Tatar, Uyghur, Vietnamese, Wolof
1996
- function () {
1997
- return arguments[1];
1998
- },
1999
- // 1: Danish, Dutch, English, Faroese, Frisian, German, Norwegian, Swedish, Estonian, Finnish,
2000
- // Hungarian, Basque, Greek, Hebrew, Italian, Portuguese, Spanish, Catalan, Afrikaans,
2001
- // Angika, Assamese, Asturian, Azerbaijani, Bulgarian, Bengali, Bodo, Aragonese, Dogri,
2002
- // Esperanto, Argentinean Spanish, Fulah, Friulian, Galician, Gujarati, Hausa,
2003
- // Hindi, Chhattisgarhi, Armenian, Interlingua, Greenlandic, Kannada, Kurdish, Letzeburgesch,
2004
- // Maithili, Malayalam, Mongolian, Manipuri, Marathi, Nahuatl, Neapolitan, Norwegian Bokmal,
2005
- // Nepali, Norwegian Nynorsk, Norwegian (old code), Northern Sotho, Oriya, Punjabi, Papiamento,
2006
- // Piemontese, Pashto, Romansh, Kinyarwanda, Santali, Scots, Sindhi, Northern Sami, Sinhala,
2007
- // Somali, Songhay, Albanian, Swahili, Tamil, Telugu, Turkmen, Urdu, Yoruba
2008
- function () {
2009
- var args = arguments;
2010
- if (args[0] === 1) {
2011
- return args[1];
2012
- } else {
2013
- return args[2];
2014
- }
2015
- },
2016
- // 2: French, Brazilian Portuguese, Acholi, Akan, Amharic, Mapudungun, Breton, Filipino,
2017
- // Gun, Lingala, Mauritian Creole, Malagasy, Maori, Occitan, Tajik, Tigrinya, Uzbek, Walloon
2018
- function () {
2019
- var args = arguments;
2020
- if ([0, 1].indexOf(args[0]) > -1) {
2021
- return args[1];
2022
- } else {
2023
- return args[2];
2024
- }
2025
- },
2026
- // 3: Latvian
2027
- function () {
2028
- var args = arguments;
2029
- if (args[0] % 10 === 1 && args[0] % 100 !== 11) {
2030
- return args[1];
2031
- } else if (args[0] !== 0) {
2032
- return args[2];
2033
- } else {
2034
- return args[3];
2035
- }
2036
- },
2037
- // 4: Scottish Gaelic
2038
- function () {
2039
- var args = arguments;
2040
- if (args[0] === 1 || args[0] === 11) {
2041
- return args[1];
2042
- } else if (args[0] === 2 || args[0] === 12) {
2043
- return args[2];
2044
- } else if (args[0] > 2 && args[0] < 20) {
2045
- return args[3];
2046
- } else {
2047
- return args[4];
2048
- }
2049
- },
2050
- // 5: Romanian
2051
- function () {
2052
- if (args[0] === 1) {
2053
- return args[1];
2054
- } else if (args[0] === 0 || (args[0] % 100 > 0 && args[0] % 100 < 20)) {
2055
- return args[2];
2056
- } else {
2057
- return args[3];
2058
- }
2059
- },
2060
- // 6: Lithuanian
2061
- function () {
2062
- var args = arguments;
2063
- if (args[0] % 10 === 1 && args[0] % 100 !== 11) {
2064
- return args[1];
2065
- } else if (args[0] % 10 >= 2 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2066
- return args[2];
2067
- } else {
2068
- return [3];
2069
- }
2070
- },
2071
- // 7: Belarusian, Bosnian, Croatian, Serbian, Russian, Ukrainian
2072
- function () {
2073
- var args = arguments;
2074
- if (args[0] % 10 === 1 && args[0] % 100 !== 11) {
2075
- return args[1];
2076
- } else if (args[0] % 10 >= 2 && args[0] % 10 <= 4 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2077
- return args[2];
2078
- } else {
2079
- return args[3];
2080
- }
2081
- },
2082
- // 8: Slovak, Czech
2083
- function () {
2084
- var args = arguments;
2085
- if (args[0] === 1) {
2086
- return args[1];
2087
- } else if (args[0] >= 2 && args[0] <= 4) {
2088
- return args[2];
2089
- } else {
2090
- return args[3];
2091
- }
2092
- },
2093
- // 9: Polish
2094
- function () {
2095
- var args = arguments;
2096
- if (args[0] === 1) {
2097
- return args[1];
2098
- } else if (args[0] % 10 >= 2 && args[0] % 10 <= 4 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2099
- return args[2];
2100
- } else {
2101
- return args[3];
2102
- }
2103
- },
2104
- // 10: Slovenian
2105
- function () {
2106
- var args = arguments;
2107
- if (args[0] % 100 === 1) {
2108
- return args[2];
2109
- } else if (args[0] % 100 === 2) {
2110
- return args[3];
2111
- } else if (args[0] % 100 === 3 || args[0] % 100 === 4) {
2112
- return args[4];
2113
- } else {
2114
- return args[1];
2115
- }
2116
- },
2117
- // 11: Irish Gaelic
2118
- function () {
2119
- var args = arguments;
2120
- if (args[0] === 1) {
2121
- return args[1];
2122
- } else if (args[0] === 2) {
2123
- return args[2];
2124
- } else if (args[0] > 2 && args[0] < 7) {
2125
- return args[3];
2126
- } else if (args[0] > 6 && args[0] < 11) {
2127
- return args[4];
2128
- } else {
2129
- return args[5];
2130
- }
2131
- },
2132
- // 12: Arabic
2133
- function () {
2134
- var args = arguments;
2135
- if (args[0] === 0) {
2136
- return args[1];
2137
- } else if (args[0] === 1) {
2138
- return args[2];
2139
- } else if (args[0] === 2) {
2140
- return args[3];
2141
- } else if (args[0] % 100 >= 3 && args[0] % 100 <= 10) {
2142
- return args[4];
2143
- } else if (args[0] % 100 >= 11) {
2144
- return args[5];
2145
- } else {
2146
- return args[6];
2147
- }
2148
- },
2149
- // 13: Maltese
2150
- function () {
2151
- var args = arguments;
2152
- if (args[0] === 1) {
2153
- return args[1];
2154
- } else if (args[0] === 0 || (args[0] % 100 > 1 && args[0] % 100 < 11)) {
2155
- return args[2];
2156
- } else if (args[0] % 100 > 10 && args[0] % 100 < 20) {
2157
- return args[3];
2158
- } else {
2159
- return args[4];
2160
- }
2161
-
2162
- },
2163
- // 14: Macedonian
2164
- function () {
2165
- var args = arguments;
2166
- if (args[0] % 10 === 1) {
2167
- return args[1];
2168
- } else if (args[0] % 10 === 2) {
2169
- return args[2];
2170
- } else {
2171
- return args[3];
2172
- }
2173
- },
2174
- // 15: Icelandic
2175
- function () {
2176
- var args = arguments;
2177
- if (args[0] !== 11 && args[0] % 10 === 1) {
2178
- return args[1];
2179
- } else {
2180
- return args[2];
2181
- }
2182
- },
2183
- // New additions
2184
-
2185
- // 16: Kashubian
2186
- // Note: in https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
2187
- // Breton is listed as #16 but in the Localization Guide it belongs to the group 2
2188
- function () {
2189
- var args = arguments;
2190
- if (args[0] === 1) {
2191
- return args[1];
2192
- } else if (args[0] % 10 >= 2 && args[0] % 10 <= 4 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2193
- return args[2];
2194
- } else {
2195
- return args[3];
2196
- }
2197
- },
2198
- // 17: Welsh
2199
- function () {
2200
- var args = arguments;
2201
- if (args[0] === 1) {
2202
- return args[1];
2203
- } else if (args[0] === 2) {
2204
- return args[2];
2205
- } else if (args[0] !== 8 && args[0] !== 11) {
2206
- return args[3];
2207
- } else {
2208
- return args[4];
2209
- }
2210
- },
2211
- // 18: Javanese
2212
- function () {
2213
- var args = arguments;
2214
- if (args[0] === 0) {
2215
- return args[1];
2216
- } else {
2217
- return args[2];
2218
- }
2219
- },
2220
- // 19: Cornish
2221
- function () {
2222
- var args = arguments;
2223
- if (args[0] === 1) {
2224
- return args[1];
2225
- } else if (args[0] === 2) {
2226
- return args[2];
2227
- } else if (args[0] === 3) {
2228
- return args[3];
2229
- } else {
2230
- return args[4];
2231
- }
2232
- },
2233
- // 20: Mandinka
2234
- function () {
2235
- var args = arguments;
2236
- if (args[0] === 0) {
2237
- return args[1];
2238
- } else if (args[0] === 1) {
2239
- return args[2];
2240
- } else {
2241
- return args[3];
2242
- }
2243
- }
2244
- ],
2245
- /**
2246
- * Get specified language
2247
- *
2248
- */
2249
- getLanguage: function () {
2250
- var language = i18n.locale.language || i18n['default'];
2251
- return /^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/.exec(language) ? language : i18n['default'];
2252
- },
2253
-
2254
- /**
2255
- * Translate a string to a specified language, including optionally a number to pluralize translation
2256
- *
2257
- * @param {String} message
2258
- * @param {Number} pluralParam
2259
- * @return {String}
2260
- */
2261
- t: function (message, pluralParam) {
2262
-
2263
- if (typeof message === 'string' && message.length) {
2264
-
2265
- var
2266
- language = i18n.getLanguage(),
2267
- str,
2268
- pluralForm,
2269
- /**
2270
- * Modify string using algorithm to detect plural forms.
2271
- *
2272
- * @private
2273
- * @see http://stackoverflow.com/questions/1353408/messageformat-in-javascript-parameters-in-localized-ui-strings
2274
- * @param {String|String[]} input - String or array of strings to pick the plural form
2275
- * @param {Number} number - Number to determine the proper plural form
2276
- * @param {Number} form - Number of language family to apply plural form
2277
- * @return {String}
2278
- */
2279
- plural = function (input, number, form) {
2280
-
2281
- if (typeof input !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
2282
- return input;
2283
- }
2284
-
2285
- if (typeof input === 'string') {
2286
- return input;
2287
- }
2288
-
2289
- // Perform plural form or return original text
2290
- return i18n.pluralForms[form].apply(null, [number].concat(input));
2291
- },
2292
- /**
2293
- *
2294
- * @param {String} input
2295
- * @return {String}
2296
- */
2297
- escapeHTML = function (input) {
2298
- var map = {
2299
- '&': '&amp;',
2300
- '<': '&lt;',
2301
- '>': '&gt;',
2302
- '"': '&quot;'
2303
- };
2304
-
2305
- return input.replace(/[&<>"]/g, function(c) {
2306
- return map[c];
2307
- });
2308
- }
2309
- ;
2310
-
2311
- // Fetch the localized version of the string
2312
- if (i18n.locale.strings && i18n.locale.strings[language]) {
2313
- str = i18n.locale.strings[language][message];
2314
- if (typeof pluralParam === 'number') {
2315
- pluralForm = i18n.locale.strings[language]['mejs.plural-form'];
2316
- str = plural.apply(null, [str, pluralParam, pluralForm]);
2317
- }
2318
- }
2319
-
2320
- // Fallback to default language if requested uid is not translated
2321
- if (!str && i18n.locale.strings && i18n.locale.strings[i18n['default']]) {
2322
- str = i18n.locale.strings[i18n['default']][message];
2323
- if (typeof pluralParam === 'number') {
2324
- pluralForm = i18n.locale.strings[i18n['default']]['mejs.plural-form'];
2325
- str = plural.apply(null, [str, pluralParam, pluralForm]);
2326
-
2327
- }
2328
- }
2329
-
2330
- // As a last resort, use the requested uid, to mimic original behavior of i18n utils (in which uid was the english text)
2331
- str = str || message;
2332
-
2333
- // Replace token
2334
- if (typeof pluralParam === 'number') {
2335
- str = str.replace('%1', pluralParam);
2336
- }
2337
-
2338
- return escapeHTML(str);
2339
-
2340
- }
2341
-
2342
- return message;
2343
- }
2344
-
2345
- };
2346
-
2347
- // i18n fixes for compatibility with WordPress
2348
- if (typeof mejsL10n !== 'undefined') {
2349
- i18n.locale.language = mejsL10n.language;
2350
- }
2351
-
2352
- // Register variable
2353
- mejs.i18n = i18n;
2354
-
2355
-
2356
- }(document, window, mejs));
2357
-
2358
- // i18n fixes for compatibility with WordPress
2359
- ;(function (mejs, undefined) {
2360
-
2361
- "use strict";
2362
-
2363
- if (typeof mejsL10n !== 'undefined') {
2364
- mejs[mejsL10n.language] = mejsL10n.strings;
2365
- }
2366
-
2367
- }(mejs.i18n.locale.strings));
2368
- /*!
2369
- * This is a i18n.locale language object.
2370
- *
2371
- * English; This can serve as a template for other languages to translate
2372
- *
2373
- * @author
2374
- * TBD
2375
- * Sascha Greuel (Twitter: @SoftCreatR)
2376
- *
2377
- * @see
2378
- * me-i18n.js
2379
- *
2380
- * @params
2381
- * - exports - CommonJS, window ..
2382
- */
2383
- (function (exports) {
2384
- "use strict";
2385
-
2386
- if (exports.en === undefined) {
2387
- exports.en = {
2388
- "mejs.plural-form": 1,
2389
-
2390
- // me-shim
2391
- "mejs.download-file": "Download File",
2392
-
2393
- // mep-feature-contextmenu
2394
- "mejs.fullscreen-off": "Turn off Fullscreen",
2395
- "mejs.fullscreen-on": "Go Fullscreen",
2396
- "mejs.download-video": "Download Video",
2397
-
2398
- // mep-feature-fullscreen
2399
- "mejs.fullscreen": "Fullscreen",
2400
-
2401
- // mep-feature-jumpforward
2402
- "mejs.time-jump-forward": ["Jump forward 1 second", "Jump forward %1 seconds"],
2403
-
2404
- // mep-feature-playpause
2405
- "mejs.play": "Play",
2406
- "mejs.pause": "Pause",
2407
-
2408
- // mep-feature-postroll
2409
- "mejs.close": "Close",
2410
-
2411
- // mep-feature-progress
2412
- "mejs.time-slider": "Time Slider",
2413
- "mejs.time-help-text": "Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.",
2414
-
2415
- // mep-feature-skipback
2416
- "mejs.time-skip-back": ["Skip back 1 second", "Skip back %1 seconds"],
2417
-
2418
- // mep-feature-tracks
2419
- "mejs.captions-subtitles": "Captions/Subtitles",
2420
- "mejs.none": "None",
2421
-
2422
- // mep-feature-volume
2423
- "mejs.mute-toggle": "Mute Toggle",
2424
- "mejs.volume-help-text": "Use Up/Down Arrow keys to increase or decrease volume.",
2425
- "mejs.unmute": "Unmute",
2426
- "mejs.mute": "Mute",
2427
- "mejs.volume-slider": "Volume Slider",
2428
-
2429
- // mep-player
2430
- "mejs.video-player": "Video Player",
2431
- "mejs.audio-player": "Audio Player",
2432
-
2433
- // mep-feature-ads
2434
- "mejs.ad-skip": "Skip ad",
2435
- "mejs.ad-skip-info": ["Skip in 1 second", "Skip in %1 seconds"],
2436
-
2437
- // mep-feature-sourcechooser
2438
- "mejs.source-chooser": "Source Chooser"
2439
- };
2440
- }
2441
- }(mejs.i18n.locale.strings));
2442
-
2443
- /*!
2444
- *
2445
- * MediaElementPlayer
2446
- * http://mediaelementjs.com/
2447
- *
2448
- * Creates a controller bar for HTML5 <video> add <audio> tags
2449
- * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
2450
- *
2451
- * Copyright 2010-2013, John Dyer (http://j.hn/)
2452
- * License: MIT
2453
- *
2454
- */
2455
- if (typeof jQuery != 'undefined') {
2456
- mejs.$ = jQuery;
2457
- } else if (typeof Zepto != 'undefined') {
2458
- mejs.$ = Zepto;
2459
-
2460
- // define `outerWidth` method which has not been realized in Zepto
2461
- Zepto.fn.outerWidth = function(includeMargin) {
2462
- var width = $(this).width();
2463
- if (includeMargin) {
2464
- width += parseInt($(this).css('margin-right'), 10);
2465
- width += parseInt($(this).css('margin-left'), 10);
2466
- }
2467
- return width
2468
- }
2469
-
2470
- } else if (typeof ender != 'undefined') {
2471
- mejs.$ = ender;
2472
- }
2473
- (function ($) {
2474
-
2475
- // default player values
2476
- mejs.MepDefaults = {
2477
- // url to poster (to fix iOS 3.x)
2478
- poster: '',
2479
- // When the video is ended, we can show the poster.
2480
- showPosterWhenEnded: false,
2481
- // default if the <video width> is not specified
2482
- defaultVideoWidth: 480,
2483
- // default if the <video height> is not specified
2484
- defaultVideoHeight: 270,
2485
- // if set, overrides <video width>
2486
- videoWidth: -1,
2487
- // if set, overrides <video height>
2488
- videoHeight: -1,
2489
- // default if the user doesn't specify
2490
- defaultAudioWidth: 400,
2491
- // default if the user doesn't specify
2492
- defaultAudioHeight: 30,
2493
- // default amount to move back when back key is pressed
2494
- defaultSeekBackwardInterval: function(media) {
2495
- return (media.duration * 0.05);
2496
- },
2497
- // default amount to move forward when forward key is pressed
2498
- defaultSeekForwardInterval: function(media) {
2499
- return (media.duration * 0.05);
2500
- },
2501
- // set dimensions via JS instead of CSS
2502
- setDimensions: true,
2503
- // width of audio player
2504
- audioWidth: -1,
2505
- // height of audio player
2506
- audioHeight: -1,
2507
- // initial volume when the player starts (overrided by user cookie)
2508
- startVolume: 0.8,
2509
- // useful for <audio> player loops
2510
- loop: false,
2511
- // rewind to beginning when media ends
2512
- autoRewind: true,
2513
- // resize to media dimensions
2514
- enableAutosize: true,
2515
- /*
2516
- * Time format to use. Default: 'mm:ss'
2517
- * Supported units:
2518
- * h: hour
2519
- * m: minute
2520
- * s: second
2521
- * f: frame count
2522
- * When using 'hh', 'mm', 'ss' or 'ff' we always display 2 digits.
2523
- * If you use 'h', 'm', 's' or 'f' we display 1 digit if possible.
2524
- *
2525
- * Example to display 75 seconds:
2526
- * Format 'mm:ss': 01:15
2527
- * Format 'm:ss': 1:15
2528
- * Format 'm:s': 1:15
2529
- */
2530
- timeFormat: '',
2531
- // forces the hour marker (##:00:00)
2532
- alwaysShowHours: false,
2533
- // show framecount in timecode (##:00:00:00)
2534
- showTimecodeFrameCount: false,
2535
- // used when showTimecodeFrameCount is set to true
2536
- framesPerSecond: 25,
2537
- // automatically calculate the width of the progress bar based on the sizes of other elements
2538
- autosizeProgress : true,
2539
- // Hide controls when playing and mouse is not over the video
2540
- alwaysShowControls: false,
2541
- // Display the video control
2542
- hideVideoControlsOnLoad: false,
2543
- // Enable click video element to toggle play/pause
2544
- clickToPlayPause: true,
2545
- // Time in ms to hide controls
2546
- controlsTimeoutDefault: 1500,
2547
- // Time in ms to trigger the timer when mouse moves
2548
- controlsTimeoutMouseEnter: 2500,
2549
- // Time in ms to trigger the timer when mouse leaves
2550
- controlsTimeoutMouseLeave: 1000,
2551
- // force iPad's native controls
2552
- iPadUseNativeControls: false,
2553
- // force iPhone's native controls
2554
- iPhoneUseNativeControls: false,
2555
- // force Android's native controls
2556
- AndroidUseNativeControls: false,
2557
- // features to show
2558
- features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
2559
- // only for dynamic
2560
- isVideo: true,
2561
- // stretching modes (auto, fill, responsive, none)
2562
- stretching: 'auto',
2563
- // turns keyboard support on and off for this instance
2564
- enableKeyboard: true,
2565
- // when this player starts, it will pause other players
2566
- pauseOtherPlayers: true,
2567
- // array of keyboard actions such as play pause
2568
- keyActions: [
2569
- {
2570
- keys: [
2571
- 32, // SPACE
2572
- 179 // GOOGLE play/pause button
2573
- ],
2574
- action: function(player, media, key, event) {
2575
-
2576
- if (!mejs.MediaFeatures.isFirefox) {
2577
- if (media.paused || media.ended) {
2578
- media.play();
2579
- } else {
2580
- media.pause();
2581
- }
2582
- }
2583
- }
2584
- },
2585
- {
2586
- keys: [38], // UP
2587
- action: function(player, media, key, event) {
2588
- player.container.find('.mejs-volume-slider').css('display','block');
2589
- if (player.isVideo) {
2590
- player.showControls();
2591
- player.startControlsTimer();
2592
- }
2593
-
2594
- var newVolume = Math.min(media.volume + 0.1, 1);
2595
- media.setVolume(newVolume);
2596
- }
2597
- },
2598
- {
2599
- keys: [40], // DOWN
2600
- action: function(player, media, key, event) {
2601
- player.container.find('.mejs-volume-slider').css('display','block');
2602
- if (player.isVideo) {
2603
- player.showControls();
2604
- player.startControlsTimer();
2605
- }
2606
-
2607
- var newVolume = Math.max(media.volume - 0.1, 0);
2608
- media.setVolume(newVolume);
2609
- }
2610
- },
2611
- {
2612
- keys: [
2613
- 37, // LEFT
2614
- 227 // Google TV rewind
2615
- ],
2616
- action: function(player, media, key, event) {
2617
- if (!isNaN(media.duration) && media.duration > 0) {
2618
- if (player.isVideo) {
2619
- player.showControls();
2620
- player.startControlsTimer();
2621
- }
2622
-
2623
- // 5%
2624
- var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0);
2625
- media.setCurrentTime(newTime);
2626
- }
2627
- }
2628
- },
2629
- {
2630
- keys: [
2631
- 39, // RIGHT
2632
- 228 // Google TV forward
2633
- ],
2634
- action: function(player, media, key, event) {
2635
- if (!isNaN(media.duration) && media.duration > 0) {
2636
- if (player.isVideo) {
2637
- player.showControls();
2638
- player.startControlsTimer();
2639
- }
2640
-
2641
- // 5%
2642
- var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
2643
- media.setCurrentTime(newTime);
2644
- }
2645
- }
2646
- },
2647
- {
2648
- keys: [70], // F
2649
- action: function(player, media, key, event) {
2650
- if (typeof player.enterFullScreen != 'undefined') {
2651
- if (player.isFullScreen) {
2652
- player.exitFullScreen();
2653
- } else {
2654
- player.enterFullScreen();
2655
- }
2656
- }
2657
- }
2658
- },
2659
- {
2660
- keys: [77], // M
2661
- action: function(player, media, key, event) {
2662
- player.container.find('.mejs-volume-slider').css('display','block');
2663
- if (player.isVideo) {
2664
- player.showControls();
2665
- player.startControlsTimer();
2666
- }
2667
- if (player.media.muted) {
2668
- player.setMuted(false);
2669
- } else {
2670
- player.setMuted(true);
2671
- }
2672
- }
2673
- }
2674
- ]
2675
- };
2676
-
2677
- mejs.mepIndex = 0;
2678
-
2679
- mejs.players = {};
2680
-
2681
- // wraps a MediaElement object in player controls
2682
- mejs.MediaElementPlayer = function(node, o) {
2683
- // enforce object, even without "new" (via John Resig)
2684
- if ( !(this instanceof mejs.MediaElementPlayer) ) {
2685
- return new mejs.MediaElementPlayer(node, o);
2686
- }
2687
-
2688
- var t = this;
2689
-
2690
- // these will be reset after the MediaElement.success fires
2691
- t.$media = t.$node = $(node);
2692
- t.node = t.media = t.$media[0];
2693
-
2694
- if(!t.node) {
2695
- return;
2696
- }
2697
-
2698
- // check for existing player
2699
- if (typeof t.node.player != 'undefined') {
2700
- return t.node.player;
2701
- }
2702
-
2703
-
2704
- // try to get options from data-mejsoptions
2705
- if (typeof o == 'undefined') {
2706
- o = t.$node.data('mejsoptions');
2707
- }
2708
-
2709
- // extend default options
2710
- t.options = $.extend({},mejs.MepDefaults,o);
2711
-
2712
- if (!t.options.timeFormat) {
2713
- // Generate the time format according to options
2714
- t.options.timeFormat = 'mm:ss';
2715
- if (t.options.alwaysShowHours) {
2716
- t.options.timeFormat = 'hh:mm:ss';
2717
- }
2718
- if (t.options.showTimecodeFrameCount) {
2719
- t.options.timeFormat += ':ff';
2720
- }
2721
- }
2722
-
2723
- mejs.Utility.calculateTimeFormat(0, t.options, t.options.framesPerSecond || 25);
2724
-
2725
- // unique ID
2726
- t.id = 'mep_' + mejs.mepIndex++;
2727
-
2728
- // add to player array (for focus events)
2729
- mejs.players[t.id] = t;
2730
-
2731
- // start up
2732
- t.init();
2733
-
2734
- return t;
2735
- };
2736
-
2737
- // actual player
2738
- mejs.MediaElementPlayer.prototype = {
2739
-
2740
- hasFocus: false,
2741
-
2742
- controlsAreVisible: true,
2743
-
2744
- init: function() {
2745
-
2746
- var
2747
- t = this,
2748
- mf = mejs.MediaFeatures,
2749
- // options for MediaElement (shim)
2750
- meOptions = $.extend(true, {}, t.options, {
2751
- success: function(media, domNode) { t.meReady(media, domNode); },
2752
- error: function(e) { t.handleError(e);}
2753
- }),
2754
- tagName = t.media.tagName.toLowerCase();
2755
-
2756
- t.isDynamic = (tagName !== 'audio' && tagName !== 'video');
2757
-
2758
- if (t.isDynamic) {
2759
- // get video from src or href?
2760
- t.isVideo = t.options.isVideo;
2761
- } else {
2762
- t.isVideo = (tagName !== 'audio' && t.options.isVideo);
2763
- }
2764
-
2765
- // use native controls in iPad, iPhone, and Android
2766
- if ((mf.isiPad && t.options.iPadUseNativeControls) || (mf.isiPhone && t.options.iPhoneUseNativeControls)) {
2767
-
2768
- // add controls and stop
2769
- t.$media.attr('controls', 'controls');
2770
-
2771
- // attempt to fix iOS 3 bug
2772
- //t.$media.removeAttr('poster');
2773
- // no Issue found on iOS3 -ttroxell
2774
-
2775
- // override Apple's autoplay override for iPads
2776
- if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
2777
- t.play();
2778
- }
2779
-
2780
- } else if (mf.isAndroid && t.options.AndroidUseNativeControls) {
2781
-
2782
- // leave default player
2783
-
2784
- } else if (t.isVideo || (!t.isVideo && t.options.features.length)) {
2785
-
2786
- // DESKTOP: use MediaElementPlayer controls
2787
-
2788
- // remove native controls
2789
- t.$media.removeAttr('controls');
2790
- var videoPlayerTitle = t.isVideo ?
2791
- mejs.i18n.t('mejs.video-player') : mejs.i18n.t('mejs.audio-player');
2792
- // insert description for screen readers
2793
- $('<span class="mejs-offscreen">' + videoPlayerTitle + '</span>').insertBefore(t.$media);
2794
- // build container
2795
- t.container =
2796
- $('<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svgAsImg ? 'svg' : 'no-svg') +
2797
- '" tabindex="0" role="application" aria-label="' + videoPlayerTitle + '">'+
2798
- '<div class="mejs-inner">'+
2799
- '<div class="mejs-mediaelement"></div>'+
2800
- '<div class="mejs-layers"></div>'+
2801
- '<div class="mejs-controls"></div>'+
2802
- '<div class="mejs-clear"></div>'+
2803
- '</div>' +
2804
- '</div>')
2805
- .addClass(t.$media[0].className)
2806
- .insertBefore(t.$media)
2807
- .focus(function ( e ) {
2808
- if( !t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) {
2809
- t.showControls(true);
2810
- // In versions older than IE11, the focus causes the playbar to be displayed
2811
- // if user clicks on the Play/Pause button in the control bar once it attempts
2812
- // to hide it
2813
- if (!t.hasMsNativeFullScreen) {
2814
- // If e.relatedTarget appears before container, send focus to play button,
2815
- // else send focus to last control button.
2816
- var btnSelector = '.mejs-playpause-button > button';
2817
-
2818
- if (mejs.Utility.isNodeAfter(e.relatedTarget, t.container[0])) {
2819
- btnSelector = '.mejs-controls .mejs-button:last-child > button';
2820
- }
2821
-
2822
- var button = t.container.find(btnSelector);
2823
- button.focus();
2824
- }
2825
- }
2826
- });
2827
-
2828
- // When no elements in controls, hide bar completely
2829
- if (!t.options.features.length) {
2830
- t.container.css('background', 'transparent').find('.mejs-controls').hide();
2831
- }
2832
-
2833
- if (t.isVideo && t.options.stretching === 'fill' && !t.container.parent('mejs-fill-container').length) {
2834
- // outer container
2835
- t.outerContainer = t.$media.parent();
2836
- t.container.wrap('<div class="mejs-fill-container"/>');
2837
- }
2838
-
2839
- // add classes for user and content
2840
- t.container.addClass(
2841
- (mf.isAndroid ? 'mejs-android ' : '') +
2842
- (mf.isiOS ? 'mejs-ios ' : '') +
2843
- (mf.isiPad ? 'mejs-ipad ' : '') +
2844
- (mf.isiPhone ? 'mejs-iphone ' : '') +
2845
- (t.isVideo ? 'mejs-video ' : 'mejs-audio ')
2846
- );
2847
-
2848
-
2849
- // move the <video/video> tag into the right spot
2850
- t.container.find('.mejs-mediaelement').append(t.$media);
2851
-
2852
- // needs to be assigned here, after iOS remap
2853
- t.node.player = t;
2854
-
2855
- // find parts
2856
- t.controls = t.container.find('.mejs-controls');
2857
- t.layers = t.container.find('.mejs-layers');
2858
-
2859
- // determine the size
2860
-
2861
- /* size priority:
2862
- (1) videoWidth (forced),
2863
- (2) style="width;height;"
2864
- (3) width attribute,
2865
- (4) defaultVideoWidth (for unspecified cases)
2866
- */
2867
-
2868
- var tagType = (t.isVideo ? 'video' : 'audio'),
2869
- capsTagName = tagType.substring(0,1).toUpperCase() + tagType.substring(1);
2870
-
2871
-
2872
-
2873
- if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
2874
- t.width = t.options[tagType + 'Width'];
2875
- } else if (t.media.style.width !== '' && t.media.style.width !== null) {
2876
- t.width = t.media.style.width;
2877
- } else if (t.media.getAttribute('width') !== null) {
2878
- t.width = t.$media.attr('width');
2879
- } else {
2880
- t.width = t.options['default' + capsTagName + 'Width'];
2881
- }
2882
-
2883
- if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
2884
- t.height = t.options[tagType + 'Height'];
2885
- } else if (t.media.style.height !== '' && t.media.style.height !== null) {
2886
- t.height = t.media.style.height;
2887
- } else if (t.$media[0].getAttribute('height') !== null) {
2888
- t.height = t.$media.attr('height');
2889
- } else {
2890
- t.height = t.options['default' + capsTagName + 'Height'];
2891
- }
2892
-
2893
- // set the size, while we wait for the plugins to load below
2894
- t.setPlayerSize(t.width, t.height);
2895
-
2896
- // create MediaElementShim
2897
- meOptions.pluginWidth = t.width;
2898
- meOptions.pluginHeight = t.height;
2899
- }
2900
- // Hide media completely for audio that doesn't have any features
2901
- else if (!t.isVideo && !t.options.features.length) {
2902
- t.$media.hide();
2903
- }
2904
-
2905
- // create MediaElement shim
2906
- mejs.MediaElement(t.$media[0], meOptions);
2907
-
2908
- if (typeof(t.container) !== 'undefined' && t.options.features.length && t.controlsAreVisible) {
2909
- // controls are shown when loaded
2910
- t.container.trigger('controlsshown');
2911
- }
2912
- },
2913
-
2914
- showControls: function(doAnimation) {
2915
- var t = this;
2916
-
2917
- doAnimation = typeof doAnimation == 'undefined' || doAnimation;
2918
-
2919
- if (t.controlsAreVisible)
2920
- return;
2921
-
2922
- if (doAnimation) {
2923
- t.controls
2924
- .removeClass('mejs-offscreen')
2925
- .stop(true, true).fadeIn(200, function() {
2926
- t.controlsAreVisible = true;
2927
- t.container.trigger('controlsshown');
2928
- });
2929
-
2930
- // any additional controls people might add and want to hide
2931
- t.container.find('.mejs-control')
2932
- .removeClass('mejs-offscreen')
2933
- .stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});
2934
-
2935
- } else {
2936
- t.controls
2937
- .removeClass('mejs-offscreen')
2938
- .css('display','block');
2939
-
2940
- // any additional controls people might add and want to hide
2941
- t.container.find('.mejs-control')
2942
- .removeClass('mejs-offscreen')
2943
- .css('display','block');
2944
-
2945
- t.controlsAreVisible = true;
2946
- t.container.trigger('controlsshown');
2947
- }
2948
-
2949
- t.setControlsSize();
2950
-
2951
- },
2952
-
2953
- hideControls: function(doAnimation) {
2954
- var t = this;
2955
-
2956
- doAnimation = typeof doAnimation == 'undefined' || doAnimation;
2957
-
2958
- if (!t.controlsAreVisible || t.options.alwaysShowControls || t.keyboardAction || t.media.paused || t.media.ended)
2959
- return;
2960
-
2961
- if (doAnimation) {
2962
- // fade out main controls
2963
- t.controls.stop(true, true).fadeOut(200, function() {
2964
- $(this)
2965
- .addClass('mejs-offscreen')
2966
- .css('display','block');
2967
-
2968
- t.controlsAreVisible = false;
2969
- t.container.trigger('controlshidden');
2970
- });
2971
-
2972
- // any additional controls people might add and want to hide
2973
- t.container.find('.mejs-control').stop(true, true).fadeOut(200, function() {
2974
- $(this)
2975
- .addClass('mejs-offscreen')
2976
- .css('display','block');
2977
- });
2978
- } else {
2979
-
2980
- // hide main controls
2981
- t.controls
2982
- .addClass('mejs-offscreen')
2983
- .css('display','block');
2984
-
2985
- // hide others
2986
- t.container.find('.mejs-control')
2987
- .addClass('mejs-offscreen')
2988
- .css('display','block');
2989
-
2990
- t.controlsAreVisible = false;
2991
- t.container.trigger('controlshidden');
2992
- }
2993
- },
2994
-
2995
- controlsTimer: null,
2996
-
2997
- startControlsTimer: function(timeout) {
2998
-
2999
- var t = this;
3000
-
3001
- timeout = typeof timeout != 'undefined' ? timeout : t.options.controlsTimeoutDefault;
3002
-
3003
- t.killControlsTimer('start');
3004
-
3005
- t.controlsTimer = setTimeout(function() {
3006
- //
3007
- t.hideControls();
3008
- t.killControlsTimer('hide');
3009
- }, timeout);
3010
- },
3011
-
3012
- killControlsTimer: function(src) {
3013
-
3014
- var t = this;
3015
-
3016
- if (t.controlsTimer !== null) {
3017
- clearTimeout(t.controlsTimer);
3018
- delete t.controlsTimer;
3019
- t.controlsTimer = null;
3020
- }
3021
- },
3022
-
3023
- controlsEnabled: true,
3024
-
3025
- disableControls: function() {
3026
- var t= this;
3027
-
3028
- t.killControlsTimer();
3029
- t.hideControls(false);
3030
- this.controlsEnabled = false;
3031
- },
3032
-
3033
- enableControls: function() {
3034
- var t= this;
3035
-
3036
- t.showControls(false);
3037
-
3038
- t.controlsEnabled = true;
3039
- },
3040
-
3041
- // Sets up all controls and events
3042
- meReady: function(media, domNode) {
3043
-
3044
- var
3045
- t = this,
3046
- mf = mejs.MediaFeatures,
3047
- autoplayAttr = domNode.getAttribute('autoplay'),
3048
- autoplay = !(typeof autoplayAttr == 'undefined' || autoplayAttr === null || autoplayAttr === 'false'),
3049
- featureIndex,
3050
- feature;
3051
-
3052
- // make sure it can't create itself again if a plugin reloads
3053
- if (t.created) {
3054
- return;
3055
- } else {
3056
- t.created = true;
3057
- }
3058
-
3059
- t.media = media;
3060
- t.domNode = domNode;
3061
-
3062
- if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {
3063
-
3064
- // In the event that no features are specified for audio,
3065
- // create only MediaElement instance rather than
3066
- // doing all the work to create a full player
3067
- if (!t.isVideo && !t.options.features.length) {
3068
-
3069
- // force autoplay for HTML5
3070
- if (autoplay && media.pluginType == 'native') {
3071
- t.play();
3072
- }
3073
-
3074
-
3075
- if (t.options.success) {
3076
-
3077
- if (typeof t.options.success == 'string') {
3078
- window[t.options.success](t.media, t.domNode, t);
3079
- } else {
3080
- t.options.success(t.media, t.domNode, t);
3081
- }
3082
- }
3083
-
3084
- return;
3085
- }
3086
-
3087
- // two built in features
3088
- t.buildposter(t, t.controls, t.layers, t.media);
3089
- t.buildkeyboard(t, t.controls, t.layers, t.media);
3090
- t.buildoverlays(t, t.controls, t.layers, t.media);
3091
-
3092
- // grab for use by features
3093
- t.findTracks();
3094
-
3095
- // add user-defined features/controls
3096
- for (featureIndex in t.options.features) {
3097
- feature = t.options.features[featureIndex];
3098
- if (t['build' + feature]) {
3099
- try {
3100
- t['build' + feature](t, t.controls, t.layers, t.media);
3101
- } catch (e) {
3102
- // TODO: report control error
3103
- //throw e;
3104
-
3105
-
3106
- }
3107
- }
3108
- }
3109
-
3110
- t.container.trigger('controlsready');
3111
-
3112
- // reset all layers and controls
3113
- t.setPlayerSize(t.width, t.height);
3114
- t.setControlsSize();
3115
-
3116
-
3117
- // controls fade
3118
- if (t.isVideo) {
3119
-
3120
- if (mejs.MediaFeatures.hasTouch && !t.options.alwaysShowControls) {
3121
-
3122
- // for touch devices (iOS, Android)
3123
- // show/hide without animation on touch
3124
-
3125
- t.$media.bind('touchstart', function() {
3126
-
3127
- // toggle controls
3128
- if (t.controlsAreVisible) {
3129
- t.hideControls(false);
3130
- } else {
3131
- if (t.controlsEnabled) {
3132
- t.showControls(false);
3133
- }
3134
- }
3135
- });
3136
-
3137
- } else {
3138
-
3139
- // create callback here since it needs access to current
3140
- // MediaElement object
3141
- t.clickToPlayPauseCallback = function() {
3142
- //
3143
-
3144
- if (t.options.clickToPlayPause) {
3145
- if (t.media.paused) {
3146
- t.play();
3147
- } else {
3148
- t.pause();
3149
- }
3150
-
3151
- var button = t.$media.closest('.mejs-container').find('.mejs-overlay-button'),
3152
- pressed = button.attr('aria-pressed');
3153
- button.attr('aria-pressed', !pressed);
3154
- }
3155
- };
3156
-
3157
- // click to play/pause
3158
- t.media.addEventListener('click', t.clickToPlayPauseCallback, false);
3159
-
3160
- // show/hide controls
3161
- t.container
3162
- .bind('mouseenter', function () {
3163
- if (t.controlsEnabled) {
3164
- if (!t.options.alwaysShowControls ) {
3165
- t.killControlsTimer('enter');
3166
- t.showControls();
3167
- t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
3168
- }
3169
- }
3170
- })
3171
- .bind('mousemove', function() {
3172
- if (t.controlsEnabled) {
3173
- if (!t.controlsAreVisible) {
3174
- t.showControls();
3175
- }
3176
- if (!t.options.alwaysShowControls) {
3177
- t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
3178
- }
3179
- }
3180
- })
3181
- .bind('mouseleave', function () {
3182
- if (t.controlsEnabled) {
3183
- if (!t.media.paused && !t.options.alwaysShowControls) {
3184
- t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
3185
- }
3186
- }
3187
- });
3188
- }
3189
-
3190
- if(t.options.hideVideoControlsOnLoad) {
3191
- t.hideControls(false);
3192
- }
3193
-
3194
- // check for autoplay
3195
- if (autoplay && !t.options.alwaysShowControls) {
3196
- t.hideControls();
3197
- }
3198
-
3199
- // resizer
3200
- if (t.options.enableAutosize) {
3201
- t.media.addEventListener('loadedmetadata', function(e) {
3202
- // if the <video height> was not set and the options.videoHeight was not set
3203
- // then resize to the real dimensions
3204
- if (t.options.videoHeight <= 0 && t.domNode.getAttribute('height') === null && !isNaN(e.target.videoHeight)) {
3205
- t.setPlayerSize(e.target.videoWidth, e.target.videoHeight);
3206
- t.setControlsSize();
3207
- t.media.setVideoSize(e.target.videoWidth, e.target.videoHeight);
3208
- }
3209
- }, false);
3210
- }
3211
- }
3212
-
3213
- // EVENTS
3214
-
3215
- // FOCUS: when a video starts playing, it takes focus from other players (possibly pausing them)
3216
- t.media.addEventListener('play', function() {
3217
- var playerIndex;
3218
-
3219
- // go through all other players
3220
- for (playerIndex in mejs.players) {
3221
- var p = mejs.players[playerIndex];
3222
- if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
3223
- p.pause();
3224
- }
3225
- p.hasFocus = false;
3226
- }
3227
-
3228
- t.hasFocus = true;
3229
- },false);
3230
-
3231
-
3232
- // ended for all
3233
- t.media.addEventListener('ended', function (e) {
3234
- if(t.options.autoRewind) {
3235
- try{
3236
- t.media.setCurrentTime(0);
3237
- // Fixing an Android stock browser bug, where "seeked" isn't fired correctly after ending the video and jumping to the beginning
3238
- window.setTimeout(function(){
3239
- $(t.container).find('.mejs-overlay-loading').parent().hide();
3240
- }, 20);
3241
- } catch (exp) {
3242
-
3243
- }
3244
- }
3245
- if (t.media.pluginType === 'youtube') {
3246
- t.media.stop();
3247
- } else {
3248
- t.media.pause();
3249
- }
3250
-
3251
- if (t.setProgressRail) {
3252
- t.setProgressRail();
3253
- }
3254
- if (t.setCurrentRail) {
3255
- t.setCurrentRail();
3256
- }
3257
-
3258
- if (t.options.loop) {
3259
- t.play();
3260
- } else if (!t.options.alwaysShowControls && t.controlsEnabled) {
3261
- t.showControls();
3262
- }
3263
- }, false);
3264
-
3265
- // resize on the first play
3266
- t.media.addEventListener('loadedmetadata', function() {
3267
-
3268
- mejs.Utility.calculateTimeFormat(t.duration, t.options, t.options.framesPerSecond || 25);
3269
-
3270
- if (t.updateDuration) {
3271
- t.updateDuration();
3272
- }
3273
- if (t.updateCurrent) {
3274
- t.updateCurrent();
3275
- }
3276
-
3277
- if (!t.isFullScreen) {
3278
- t.setPlayerSize(t.width, t.height);
3279
- t.setControlsSize();
3280
- }
3281
- }, false);
3282
-
3283
- // Only change the time format when necessary
3284
- var duration = null;
3285
- t.media.addEventListener('timeupdate',function() {
3286
- if (duration !== this.duration) {
3287
- duration = this.duration;
3288
- mejs.Utility.calculateTimeFormat(duration, t.options, t.options.framesPerSecond || 25);
3289
-
3290
- // make sure to fill in and resize the controls (e.g., 00:00 => 01:13:15
3291
- if (t.updateDuration) {
3292
- t.updateDuration();
3293
- }
3294
- if (t.updateCurrent) {
3295
- t.updateCurrent();
3296
- }
3297
- t.setControlsSize();
3298
-
3299
- }
3300
- }, false);
3301
-
3302
- t.container.focusout(function (e) {
3303
- if( e.relatedTarget ) { //FF is working on supporting focusout https://bugzilla.mozilla.org/show_bug.cgi?id=687787
3304
- var $target = $(e.relatedTarget);
3305
- if (t.keyboardAction && $target.parents('.mejs-container').length === 0) {
3306
- t.keyboardAction = false;
3307
- if (t.isVideo && !t.options.alwaysShowControls) {
3308
- t.hideControls(true);
3309
- }
3310
-
3311
- }
3312
- }
3313
- });
3314
-
3315
- // webkit has trouble doing this without a delay
3316
- setTimeout(function () {
3317
- t.setPlayerSize(t.width, t.height);
3318
- t.setControlsSize();
3319
- }, 50);
3320
-
3321
- // adjust controls whenever window sizes (used to be in fullscreen only)
3322
- t.globalBind('resize', function() {
3323
-
3324
- // don't resize for fullscreen mode
3325
- if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) {
3326
- t.setPlayerSize(t.width, t.height);
3327
- }
3328
-
3329
- // always adjust controls
3330
- t.setControlsSize();
3331
- });
3332
-
3333
- // This is a work-around for a bug in the YouTube iFrame player, which means
3334
- // we can't use the play() API for the initial playback on iOS or Android;
3335
- // user has to start playback directly by tapping on the iFrame.
3336
- if (t.media.pluginType == 'youtube' && ( mf.isiOS || mf.isAndroid ) ) {
3337
- t.container.find('.mejs-overlay-play').hide();
3338
- t.container.find('.mejs-poster').hide();
3339
- }
3340
- }
3341
-
3342
- // force autoplay for HTML5
3343
- if (autoplay && media.pluginType == 'native') {
3344
- t.play();
3345
- }
3346
-
3347
-
3348
- if (t.options.success) {
3349
-
3350
- if (typeof t.options.success == 'string') {
3351
- window[t.options.success](t.media, t.domNode, t);
3352
- } else {
3353
- t.options.success(t.media, t.domNode, t);
3354
- }
3355
- }
3356
- },
3357
-
3358
- handleError: function(e) {
3359
- var t = this;
3360
-
3361
- if (t.controls) {
3362
- t.controls.hide();
3363
- }
3364
-
3365
- // Tell user that the file cannot be played
3366
- if (t.options.error) {
3367
- t.options.error(e);
3368
- }
3369
- },
3370
-
3371
- setPlayerSize: function(width,height) {
3372
- var t = this;
3373
-
3374
- if( !t.options.setDimensions ) {
3375
- return false;
3376
- }
3377
-
3378
- if (typeof width != 'undefined') {
3379
- t.width = width;
3380
- }
3381
-
3382
- if (typeof height != 'undefined') {
3383
- t.height = height;
3384
- }
3385
-
3386
- // check stretching modes
3387
- switch (t.options.stretching) {
3388
- case 'fill':
3389
- // The 'fill' effect only makes sense on video; for audio we will set the dimensions
3390
- if (t.isVideo) {
3391
- this.setFillMode();
3392
- } else {
3393
- this.setDimensions(t.width, t.height);
3394
- }
3395
- break;
3396
- case 'responsive':
3397
- this.setResponsiveMode();
3398
- break;
3399
- case 'none':
3400
- this.setDimensions(t.width, t.height);
3401
- break;
3402
- // This is the 'auto' mode
3403
- default:
3404
- if (this.hasFluidMode() === true) {
3405
- this.setResponsiveMode();
3406
- } else {
3407
- this.setDimensions(t.width, t.height);
3408
- }
3409
- break;
3410
- }
3411
- },
3412
-
3413
- hasFluidMode: function() {
3414
- var t = this;
3415
-
3416
- // detect 100% mode - use currentStyle for IE since css() doesn't return percentages
3417
- return (t.height.toString().indexOf('%') > 0 || (t.$node.css('max-width') !== 'none' && t.$node.css('max-width') !== 't.width') || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%'));
3418
- },
3419
-
3420
- setResponsiveMode: function() {
3421
- var t = this;
3422
-
3423
- // do we have the native dimensions yet?
3424
- var nativeWidth = (function() {
3425
- if (t.isVideo) {
3426
- if (t.media.videoWidth && t.media.videoWidth > 0) {
3427
- return t.media.videoWidth;
3428
- } else if (t.media.getAttribute('width') !== null) {
3429
- return t.media.getAttribute('width');
3430
- } else {
3431
- return t.options.defaultVideoWidth;
3432
- }
3433
- } else {
3434
- return t.options.defaultAudioWidth;
3435
- }
3436
- })();
3437
-
3438
- var nativeHeight = (function() {
3439
- if (t.isVideo) {
3440
- if (t.media.videoHeight && t.media.videoHeight > 0) {
3441
- return t.media.videoHeight;
3442
- } else if (t.media.getAttribute('height') !== null) {
3443
- return t.media.getAttribute('height');
3444
- } else {
3445
- return t.options.defaultVideoHeight;
3446
- }
3447
- } else {
3448
- return t.options.defaultAudioHeight;
3449
- }
3450
- })();
3451
-
3452
- var parentWidth = t.container.parent().closest(':visible').width(),
3453
- parentHeight = t.container.parent().closest(':visible').height(),
3454
- newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight;
3455
-
3456
- // When we use percent, the newHeight can't be calculated so we get the container height
3457
- if (isNaN(newHeight) || ( parentHeight !== 0 && newHeight > parentHeight && parentHeight > nativeHeight)) {
3458
- newHeight = parentHeight;
3459
- }
3460
-
3461
- if (t.container.parent().length > 0 && t.container.parent()[0].tagName.toLowerCase() === 'body') { // && t.container.siblings().count == 0) {
3462
- parentWidth = $(window).width();
3463
- newHeight = $(window).height();
3464
- }
3465
-
3466
- if ( newHeight && parentWidth ) {
3467
-
3468
- // set outer container size
3469
- t.container
3470
- .width(parentWidth)
3471
- .height(newHeight);
3472
-
3473
- // set native <video> or <audio> and shims
3474
- t.$media.add(t.container.find('.mejs-shim'))
3475
- .width('100%')
3476
- .height('100%');
3477
-
3478
- // if shim is ready, send the size to the embeded plugin
3479
- if (t.isVideo) {
3480
- if (t.media.setVideoSize) {
3481
- t.media.setVideoSize(parentWidth, newHeight);
3482
- }
3483
- }
3484
-
3485
- // set the layers
3486
- t.layers.children('.mejs-layer')
3487
- .width('100%')
3488
- .height('100%');
3489
- }
3490
- },
3491
-
3492
- setFillMode: function() {
3493
- var t = this,
3494
- parent = t.outerContainer;
3495
-
3496
- if (!parent.width()) {
3497
- parent.height(t.$media.width());
3498
- }
3499
-
3500
- if (!parent.height()) {
3501
- parent.height(t.$media.height());
3502
- }
3503
-
3504
- var parentWidth = parent.width(),
3505
- parentHeight = parent.height();
3506
-
3507
- t.setDimensions('100%', '100%');
3508
-
3509
- // This prevents an issue when displaying poster
3510
- t.container.find('.mejs-poster img').css('display', 'block');
3511
-
3512
- targetElement = t.container.find('object, embed, iframe, video');
3513
-
3514
- // calculate new width and height
3515
- var initHeight = t.height,
3516
- initWidth = t.width,
3517
- // scale to the target width
3518
- scaleX1 = parentWidth,
3519
- scaleY1 = (initHeight * parentWidth) / initWidth,
3520
- // scale to the target height
3521
- scaleX2 = (initWidth * parentHeight) / initHeight,
3522
- scaleY2 = parentHeight,
3523
- // now figure out which one we should use
3524
- bScaleOnWidth = !(scaleX2 > parentWidth),
3525
- finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2),
3526
- finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2);
3527
-
3528
- if (bScaleOnWidth) {
3529
- targetElement.height(finalHeight).width(parentWidth);
3530
- if (t.media.setVideoSize) {
3531
- t.media.setVideoSize(parentWidth, finalHeight);
3532
- }
3533
- } else {
3534
- targetElement.height(parentHeight).width(finalWidth);
3535
- if (t.media.setVideoSize) {
3536
- t.media.setVideoSize(finalWidth, parentHeight);
3537
- }
3538
- }
3539
-
3540
- targetElement.css({
3541
- 'margin-left': Math.floor((parentWidth - finalWidth) / 2),
3542
- 'margin-top': 0
3543
- });
3544
- },
3545
-
3546
- setDimensions: function(width, height) {
3547
- var t = this;
3548
-
3549
- t.container
3550
- .width(width)
3551
- .height(height);
3552
-
3553
- t.layers.children('.mejs-layer')
3554
- .width(width)
3555
- .height(height);
3556
- },
3557
-
3558
- setControlsSize: function() {
3559
- var t = this,
3560
- usedWidth = 0,
3561
- railWidth = 0,
3562
- rail = t.controls.find('.mejs-time-rail'),
3563
- total = t.controls.find('.mejs-time-total'),
3564
- others = rail.siblings(),
3565
- lastControl = others.last(),
3566
- lastControlPosition = null,
3567
- avoidAutosizeProgress = t.options && !t.options.autosizeProgress;
3568
-
3569
- // skip calculation if hidden
3570
- if (!t.container.is(':visible') || !rail.length || !rail.is(':visible')) {
3571
- return;
3572
- }
3573
-
3574
- // allow the size to come from custom CSS
3575
- if (avoidAutosizeProgress) {
3576
- // Also, frontends devs can be more flexible
3577
- // due the opportunity of absolute positioning.
3578
- railWidth = parseInt(rail.css('width'), 10);
3579
- }
3580
-
3581
- // attempt to autosize
3582
- if (railWidth === 0 || !railWidth) {
3583
-
3584
- // find the size of all the other controls besides the rail
3585
- others.each(function() {
3586
- var $this = $(this);
3587
- if ($this.css('position') != 'absolute' && $this.is(':visible')) {
3588
- usedWidth += $(this).outerWidth(true);
3589
- }
3590
- });
3591
-
3592
- // fit the rail into the remaining space
3593
- railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
3594
- }
3595
-
3596
- // resize the rail,
3597
- // but then check if the last control (say, the fullscreen button) got pushed down
3598
- // this often happens when zoomed
3599
- do {
3600
- // outer area
3601
- // we only want to set an inline style with the width of the rail
3602
- // if we're trying to autosize.
3603
- if (!avoidAutosizeProgress) {
3604
- rail.width(railWidth);
3605
- }
3606
-
3607
- // dark space
3608
- total.width(railWidth - (total.outerWidth(true) - total.width()));
3609
-
3610
- if (lastControl.css('position') != 'absolute') {
3611
- lastControlPosition = lastControl.length ? lastControl.position() : null;
3612
- railWidth--;
3613
- }
3614
- } while (lastControlPosition !== null && lastControlPosition.top.toFixed(2) > 0 && railWidth > 0);
3615
-
3616
- t.container.trigger('controlsresize');
3617
- },
3618
-
3619
-
3620
- buildposter: function(player, controls, layers, media) {
3621
- var t = this,
3622
- poster =
3623
- $('<div class="mejs-poster mejs-layer">' +
3624
- '</div>')
3625
- .appendTo(layers),
3626
- posterUrl = player.$media.attr('poster');
3627
-
3628
- // prioriy goes to option (this is useful if you need to support iOS 3.x (iOS completely fails with poster)
3629
- if (player.options.poster !== '') {
3630
- posterUrl = player.options.poster;
3631
- }
3632
-
3633
- // second, try the real poster
3634
- if ( posterUrl ) {
3635
- t.setPoster(posterUrl);
3636
- } else {
3637
- poster.hide();
3638
- }
3639
-
3640
- media.addEventListener('play',function() {
3641
- poster.hide();
3642
- }, false);
3643
-
3644
- if(player.options.showPosterWhenEnded && player.options.autoRewind){
3645
- media.addEventListener('ended',function() {
3646
- poster.show();
3647
- }, false);
3648
- }
3649
- },
3650
-
3651
- setPoster: function(url) {
3652
- var t = this,
3653
- posterDiv = t.container.find('.mejs-poster'),
3654
- posterImg = posterDiv.find('img');
3655
-
3656
- if (posterImg.length === 0) {
3657
- posterImg = $('<img width="100%" height="100%" alt="" />').appendTo(posterDiv);
3658
- }
3659
-
3660
- posterImg.attr('src', url);
3661
- posterDiv.css({'background-image' : 'url(' + url + ')'});
3662
- },
3663
-
3664
- buildoverlays: function(player, controls, layers, media) {
3665
- var t = this;
3666
- if (!player.isVideo)
3667
- return;
3668
-
3669
- var
3670
- loading =
3671
- $('<div class="mejs-overlay mejs-layer">'+
3672
- '<div class="mejs-overlay-loading"><span></span></div>'+
3673
- '</div>')
3674
- .hide() // start out hidden
3675
- .appendTo(layers),
3676
- error =
3677
- $('<div class="mejs-overlay mejs-layer">'+
3678
- '<div class="mejs-overlay-error"></div>'+
3679
- '</div>')
3680
- .hide() // start out hidden
3681
- .appendTo(layers),
3682
- // this needs to come last so it's on top
3683
- bigPlay =
3684
- $('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
3685
- '<div class="mejs-overlay-button" role="button" aria-label="' + mejs.i18n.t('mejs.play') + '" aria-pressed="false"></div>'+
3686
- '</div>')
3687
- .appendTo(layers)
3688
- .bind('click', function() { // Removed 'touchstart' due issues on Samsung Android devices where a tap on bigPlay started and immediately stopped the video
3689
- if (t.options.clickToPlayPause) {
3690
- if (media.paused) {
3691
- media.play();
3692
- }
3693
-
3694
- var button = $(this).find('.mejs-overlay-button'),
3695
- pressed = button.attr('aria-pressed');
3696
- button.attr('aria-pressed', !!pressed);
3697
- }
3698
- });
3699
-
3700
- /*
3701
- if (mejs.MediaFeatures.isiOS || mejs.MediaFeatures.isAndroid) {
3702
- bigPlay.remove();
3703
- loading.remove();
3704
- }
3705
- */
3706
-
3707
-
3708
- // show/hide big play button
3709
- media.addEventListener('play',function() {
3710
- bigPlay.hide();
3711
- loading.hide();
3712
- controls.find('.mejs-time-buffering').hide();
3713
- error.hide();
3714
- }, false);
3715
-
3716
- media.addEventListener('playing', function() {
3717
- bigPlay.hide();
3718
- loading.hide();
3719
- controls.find('.mejs-time-buffering').hide();
3720
- error.hide();
3721
- }, false);
3722
-
3723
- media.addEventListener('seeking', function() {
3724
- loading.show();
3725
- controls.find('.mejs-time-buffering').show();
3726
- }, false);
3727
-
3728
- media.addEventListener('seeked', function() {
3729
- loading.hide();
3730
- controls.find('.mejs-time-buffering').hide();
3731
- }, false);
3732
-
3733
- media.addEventListener('pause',function() {
3734
- if (!mejs.MediaFeatures.isiPhone) {
3735
- bigPlay.show();
3736
- }
3737
- }, false);
3738
-
3739
- media.addEventListener('waiting', function() {
3740
- loading.show();
3741
- controls.find('.mejs-time-buffering').show();
3742
- }, false);
3743
-
3744
-
3745
- // show/hide loading
3746
- media.addEventListener('loadeddata',function() {
3747
- // for some reason Chrome is firing this event
3748
- //if (mejs.MediaFeatures.isChrome && media.getAttribute && media.getAttribute('preload') === 'none')
3749
- // return;
3750
-
3751
- loading.show();
3752
- controls.find('.mejs-time-buffering').show();
3753
- // Firing the 'canplay' event after a timeout which isn't getting fired on some Android 4.1 devices (https://github.com/johndyer/mediaelement/issues/1305)
3754
- if (mejs.MediaFeatures.isAndroid) {
3755
- media.canplayTimeout = window.setTimeout(
3756
- function() {
3757
- if (document.createEvent) {
3758
- var evt = document.createEvent('HTMLEvents');
3759
- evt.initEvent('canplay', true, true);
3760
- return media.dispatchEvent(evt);
3761
- }
3762
- }, 300
3763
- );
3764
- }
3765
- }, false);
3766
- media.addEventListener('canplay',function() {
3767
- loading.hide();
3768
- controls.find('.mejs-time-buffering').hide();
3769
- clearTimeout(media.canplayTimeout); // Clear timeout inside 'loadeddata' to prevent 'canplay' to fire twice
3770
- }, false);
3771
-
3772
- // error handling
3773
- media.addEventListener('error',function(e) {
3774
- t.handleError(e);
3775
- loading.hide();
3776
- bigPlay.hide();
3777
- error.show();
3778
- error.find('.mejs-overlay-error').html("Error loading this resource");
3779
- }, false);
3780
-
3781
- media.addEventListener('keydown', function(e) {
3782
- t.onkeydown(player, media, e);
3783
- }, false);
3784
- },
3785
-
3786
- buildkeyboard: function(player, controls, layers, media) {
3787
-
3788
- var t = this;
3789
-
3790
- t.container.keydown(function () {
3791
- t.keyboardAction = true;
3792
- });
3793
-
3794
- // listen for key presses
3795
- t.globalBind('keydown', function(event) {
3796
- player.hasFocus = $(event.target).closest('.mejs-container').length !== 0
3797
- && $(event.target).closest('.mejs-container').attr('id') === player.$media.closest('.mejs-container').attr('id');
3798
- return t.onkeydown(player, media, event);
3799
- });
3800
-
3801
-
3802
- // check if someone clicked outside a player region, then kill its focus
3803
- t.globalBind('click', function(event) {
3804
- player.hasFocus = $(event.target).closest('.mejs-container').length !== 0;
3805
- });
3806
-
3807
- },
3808
- onkeydown: function(player, media, e) {
3809
- if (player.hasFocus && player.options.enableKeyboard) {
3810
- // find a matching key
3811
- for (var i = 0, il = player.options.keyActions.length; i < il; i++) {
3812
- var keyAction = player.options.keyActions[i];
3813
-
3814
- for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
3815
- if (e.keyCode == keyAction.keys[j]) {
3816
- if (typeof(e.preventDefault) == "function") e.preventDefault();
3817
- keyAction.action(player, media, e.keyCode, e);
3818
- return false;
3819
- }
3820
- }
3821
- }
3822
- }
3823
-
3824
- return true;
3825
- },
3826
-
3827
- findTracks: function() {
3828
- var t = this,
3829
- tracktags = t.$media.find('track');
3830
-
3831
- // store for use by plugins
3832
- t.tracks = [];
3833
- tracktags.each(function(index, track) {
3834
-
3835
- track = $(track);
3836
-
3837
- t.tracks.push({
3838
- srclang: (track.attr('srclang')) ? track.attr('srclang').toLowerCase() : '',
3839
- src: track.attr('src'),
3840
- kind: track.attr('kind'),
3841
- label: track.attr('label') || '',
3842
- entries: [],
3843
- isLoaded: false
3844
- });
3845
- });
3846
- },
3847
- changeSkin: function(className) {
3848
- this.container[0].className = 'mejs-container ' + className;
3849
- this.setPlayerSize(this.width, this.height);
3850
- this.setControlsSize();
3851
- },
3852
- play: function() {
3853
- this.load();
3854
- this.media.play();
3855
- },
3856
- pause: function() {
3857
- try {
3858
- this.media.pause();
3859
- } catch (e) {}
3860
- },
3861
- load: function() {
3862
- if (!this.isLoaded) {
3863
- this.media.load();
3864
- }
3865
-
3866
- this.isLoaded = true;
3867
- },
3868
- setMuted: function(muted) {
3869
- this.media.setMuted(muted);
3870
- },
3871
- setCurrentTime: function(time) {
3872
- this.media.setCurrentTime(time);
3873
- },
3874
- getCurrentTime: function() {
3875
- return this.media.currentTime;
3876
- },
3877
- setVolume: function(volume) {
3878
- this.media.setVolume(volume);
3879
- },
3880
- getVolume: function() {
3881
- return this.media.volume;
3882
- },
3883
- setSrc: function(src) {
3884
- var
3885
- t = this;
3886
-
3887
- // If using YouTube, its API is different to load a specific source
3888
- if (t.media.pluginType === 'youtube') {
3889
- var videoId;
3890
-
3891
- if (typeof src !== 'string') {
3892
- var i, media;
3893
-
3894
- for (i=0; i<src.length; i++) {
3895
- media = src[i];
3896
- if (this.canPlayType(media.type)) {
3897
- src = media.src;
3898
- break;
3899
- }
3900
- }
3901
- }
3902
-
3903
- // youtu.be url from share button
3904
- if (src.lastIndexOf('youtu.be') !== -1) {
3905
- videoId = src.substr(src.lastIndexOf('/') + 1);
3906
-
3907
- if (videoId.indexOf('?') !== -1) {
3908
- videoId = videoId.substr(0, videoId.indexOf('?'));
3909
- }
3910
-
3911
- } else {
3912
- // https://www.youtube.com/watch?v=
3913
- var videoIdMatch = src.match(/[?&]v=([^&#]+)|&|#|$/);
3914
-
3915
- if (videoIdMatch) {
3916
- videoId = videoIdMatch[1];
3917
- }
3918
- }
3919
-
3920
- if (t.media.getAttribute('autoplay') !== null) {
3921
- t.media.pluginApi.loadVideoById(videoId);
3922
- } else {
3923
- t.media.pluginApi.cueVideoById(videoId);
3924
- }
3925
-
3926
- }
3927
- else {
3928
- t.media.setSrc(src);
3929
- }
3930
- },
3931
- remove: function() {
3932
- var t = this, featureIndex, feature;
3933
-
3934
- t.container.prev('.mejs-offscreen').remove();
3935
-
3936
- // invoke features cleanup
3937
- for (featureIndex in t.options.features) {
3938
- feature = t.options.features[featureIndex];
3939
- if (t['clean' + feature]) {
3940
- try {
3941
- t['clean' + feature](t);
3942
- } catch (e) {
3943
- // TODO: report control error
3944
- //throw e;
3945
- //
3946
- //
3947
- }
3948
- }
3949
- }
3950
-
3951
- // grab video and put it back in place
3952
- if (!t.isDynamic) {
3953
- t.$media.prop('controls', true);
3954
- // detach events from the video
3955
- // TODO: detach event listeners better than this;
3956
- // also detach ONLY the events attached by this plugin!
3957
- t.$node.clone().insertBefore(t.container).show();
3958
- t.$node.remove();
3959
- } else {
3960
- t.$node.insertBefore(t.container);
3961
- }
3962
-
3963
- if (t.media.pluginType !== 'native') {
3964
- t.media.remove();
3965
- }
3966
-
3967
- // Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api.
3968
- delete mejs.players[t.id];
3969
-
3970
- if (typeof t.container == 'object') {
3971
- t.container.remove();
3972
- }
3973
- t.globalUnbind();
3974
- delete t.node.player;
3975
- },
3976
- rebuildtracks: function(){
3977
- var t = this;
3978
- t.findTracks();
3979
- t.buildtracks(t, t.controls, t.layers, t.media);
3980
- },
3981
- resetSize: function(){
3982
- var t = this;
3983
- // webkit has trouble doing this without a delay
3984
- setTimeout(function () {
3985
- //
3986
- t.setPlayerSize(t.width, t.height);
3987
- t.setControlsSize();
3988
- }, 50);
3989
- }
3990
- };
3991
-
3992
- (function(){
3993
- var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
3994
-
3995
- function splitEvents(events, id) {
3996
- // add player ID as an event namespace so it's easier to unbind them all later
3997
- var ret = {d: [], w: []};
3998
- $.each((events || '').split(' '), function(k, v){
3999
- var eventname = v + '.' + id;
4000
- if (eventname.indexOf('.') === 0) {
4001
- ret.d.push(eventname);
4002
- ret.w.push(eventname);
4003
- }
4004
- else {
4005
- ret[rwindow.test(v) ? 'w' : 'd'].push(eventname);
4006
- }
4007
- });
4008
- ret.d = ret.d.join(' ');
4009
- ret.w = ret.w.join(' ');
4010
- return ret;
4011
- }
4012
-
4013
- mejs.MediaElementPlayer.prototype.globalBind = function(events, data, callback) {
4014
- var t = this;
4015
- var doc = t.node ? t.node.ownerDocument : document;
4016
-
4017
- events = splitEvents(events, t.id);
4018
- if (events.d) $(doc).bind(events.d, data, callback);
4019
- if (events.w) $(window).bind(events.w, data, callback);
4020
- };
4021
-
4022
- mejs.MediaElementPlayer.prototype.globalUnbind = function(events, callback) {
4023
- var t = this;
4024
- var doc = t.node ? t.node.ownerDocument : document;
4025
-
4026
- events = splitEvents(events, t.id);
4027
- if (events.d) $(doc).unbind(events.d, callback);
4028
- if (events.w) $(window).unbind(events.w, callback);
4029
- };
4030
- })();
4031
-
4032
- // turn into jQuery plugin
4033
- if (typeof $ != 'undefined') {
4034
- $.fn.mediaelementplayer = function (options) {
4035
- if (options === false) {
4036
- this.each(function () {
4037
- var player = $(this).data('mediaelementplayer');
4038
- if (player) {
4039
- player.remove();
4040
- }
4041
- $(this).removeData('mediaelementplayer');
4042
- });
4043
- }
4044
- else {
4045
- this.each(function () {
4046
- $(this).data('mediaelementplayer', new mejs.MediaElementPlayer(this, options));
4047
- });
4048
- }
4049
- return this;
4050
- };
4051
-
4052
-
4053
- $(document).ready(function() {
4054
- // auto enable using JSON attribute
4055
- $('.mejs-player').mediaelementplayer();
4056
- });
4057
- }
4058
-
4059
- // push out to window
4060
- window.MediaElementPlayer = mejs.MediaElementPlayer;
4061
-
4062
- })(mejs.$);
4063
-
4064
- (function($) {
4065
-
4066
- $.extend(mejs.MepDefaults, {
4067
- playText: '',
4068
- pauseText: ''
4069
- });
4070
-
4071
-
4072
- // PLAY/pause BUTTON
4073
- $.extend(MediaElementPlayer.prototype, {
4074
- buildplaypause: function(player, controls, layers, media) {
4075
- var
4076
- t = this,
4077
- op = t.options,
4078
- playTitle = op.playText ? op.playText : mejs.i18n.t('mejs.play'),
4079
- pauseTitle = op.pauseText ? op.pauseText : mejs.i18n.t('mejs.pause'),
4080
- play =
4081
- $('<div class="mejs-button mejs-playpause-button mejs-play" >' +
4082
- '<button type="button" aria-controls="' + t.id + '" title="' + playTitle + '" aria-label="' + pauseTitle + '"></button>' +
4083
- '</div>')
4084
- .appendTo(controls)
4085
- .click(function(e) {
4086
- e.preventDefault();
4087
-
4088
- if (media.paused) {
4089
- media.play();
4090
- } else {
4091
- media.pause();
4092
- }
4093
-
4094
- return false;
4095
- }),
4096
- play_btn = play.find('button');
4097
-
4098
-
4099
- function togglePlayPause(which) {
4100
- if ('play' === which) {
4101
- play.removeClass('mejs-play').addClass('mejs-pause');
4102
- play_btn.attr({
4103
- 'title': pauseTitle,
4104
- 'aria-label': pauseTitle
4105
- });
4106
- } else {
4107
- play.removeClass('mejs-pause').addClass('mejs-play');
4108
- play_btn.attr({
4109
- 'title': playTitle,
4110
- 'aria-label': playTitle
4111
- });
4112
- }
4113
- };
4114
- togglePlayPause('pse');
4115
-
4116
-
4117
- media.addEventListener('play',function() {
4118
- togglePlayPause('play');
4119
- }, false);
4120
- media.addEventListener('playing',function() {
4121
- togglePlayPause('play');
4122
- }, false);
4123
-
4124
-
4125
- media.addEventListener('pause',function() {
4126
- togglePlayPause('pse');
4127
- }, false);
4128
- media.addEventListener('paused',function() {
4129
- togglePlayPause('pse');
4130
- }, false);
4131
- }
4132
- });
4133
-
4134
- })(mejs.$);
4135
-
4136
- (function($) {
4137
-
4138
- $.extend(mejs.MepDefaults, {
4139
- stopText: 'Stop'
4140
- });
4141
-
4142
- // STOP BUTTON
4143
- $.extend(MediaElementPlayer.prototype, {
4144
- buildstop: function(player, controls, layers, media) {
4145
- var t = this;
4146
-
4147
- $('<div class="mejs-button mejs-stop-button mejs-stop">' +
4148
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '" aria-label="' + t.options.stopText + '"></button>' +
4149
- '</div>')
4150
- .appendTo(controls)
4151
- .click(function() {
4152
- if (!media.paused) {
4153
- media.pause();
4154
- }
4155
- if (media.currentTime > 0) {
4156
- media.setCurrentTime(0);
4157
- media.pause();
4158
- controls.find('.mejs-time-current').width('0px');
4159
- controls.find('.mejs-time-handle').css('left', '0px');
4160
- controls.find('.mejs-time-float-current').html( mejs.Utility.secondsToTimeCode(0, player.options));
4161
- controls.find('.mejs-currenttime').html( mejs.Utility.secondsToTimeCode(0, player.options));
4162
- layers.find('.mejs-poster').show();
4163
- }
4164
- });
4165
- }
4166
- });
4167
-
4168
- })(mejs.$);
4169
-
4170
- (function($) {
4171
-
4172
- $.extend(mejs.MepDefaults, {
4173
- // Enable tooltip that shows time in progress bar
4174
- enableProgressTooltip: true,
4175
- progressHelpText: ''
4176
- });
4177
-
4178
- // progress/loaded bar
4179
- $.extend(MediaElementPlayer.prototype, {
4180
- buildprogress: function(player, controls, layers, media) {
4181
-
4182
- var
4183
- t = this,
4184
- mouseIsDown = false,
4185
- mouseIsOver = false,
4186
- lastKeyPressTime = 0,
4187
- startedPaused = false,
4188
- autoRewindInitial = player.options.autoRewind,
4189
- progressTitle = t.options.progressHelpText ? t.options.progressHelpText : mejs.i18n.t('mejs.time-help-text'),
4190
- tooltip = player.options.enableProgressTooltip ? '<span class="mejs-time-float">' +
4191
- '<span class="mejs-time-float-current">00:00</span>' +
4192
- '<span class="mejs-time-float-corner"></span>' +
4193
- '</span>' : "";
4194
-
4195
- $('<div class="mejs-time-rail">' +
4196
- '<span class="mejs-time-total mejs-time-slider">' +
4197
- //'<span class="mejs-offscreen">' + progressTitle + '</span>' +
4198
- '<span class="mejs-time-buffering"></span>' +
4199
- '<span class="mejs-time-loaded"></span>' +
4200
- '<span class="mejs-time-current"></span>' +
4201
- '<span class="mejs-time-handle"></span>' +
4202
- tooltip +
4203
- '</span>' +
4204
- '</div>')
4205
- .appendTo(controls);
4206
- controls.find('.mejs-time-buffering').hide();
4207
-
4208
- t.total = controls.find('.mejs-time-total');
4209
- t.loaded = controls.find('.mejs-time-loaded');
4210
- t.current = controls.find('.mejs-time-current');
4211
- t.handle = controls.find('.mejs-time-handle');
4212
- t.timefloat = controls.find('.mejs-time-float');
4213
- t.timefloatcurrent = controls.find('.mejs-time-float-current');
4214
- t.slider = controls.find('.mejs-time-slider');
4215
-
4216
- var handleMouseMove = function (e) {
4217
-
4218
- var offset = t.total.offset(),
4219
- width = t.total.width(),
4220
- percentage = 0,
4221
- newTime = 0,
4222
- pos = 0,
4223
- x;
4224
-
4225
- // mouse or touch position relative to the object
4226
- if (e.originalEvent && e.originalEvent.changedTouches) {
4227
- x = e.originalEvent.changedTouches[0].pageX;
4228
- } else if (e.changedTouches) { // for Zepto
4229
- x = e.changedTouches[0].pageX;
4230
- } else {
4231
- x = e.pageX;
4232
- }
4233
-
4234
- if (media.duration) {
4235
- if (x < offset.left) {
4236
- x = offset.left;
4237
- } else if (x > width + offset.left) {
4238
- x = width + offset.left;
4239
- }
4240
-
4241
- pos = x - offset.left;
4242
- percentage = (pos / width);
4243
- newTime = (percentage <= 0.02) ? 0 : percentage * media.duration;
4244
-
4245
- // seek to where the mouse is
4246
- if (mouseIsDown && newTime !== media.currentTime) {
4247
- media.setCurrentTime(newTime);
4248
- }
4249
-
4250
- // position floating time box
4251
- if (!mejs.MediaFeatures.hasTouch) {
4252
- t.timefloat.css('left', pos);
4253
- t.timefloatcurrent.html( mejs.Utility.secondsToTimeCode(newTime, player.options) );
4254
- t.timefloat.show();
4255
- }
4256
- }
4257
- },
4258
- // Accessibility for slider
4259
- updateSlider = function (e) {
4260
-
4261
- var seconds = media.currentTime,
4262
- timeSliderText = mejs.i18n.t('mejs.time-slider'),
4263
- time = mejs.Utility.secondsToTimeCode(seconds, player.options),
4264
- duration = media.duration;
4265
-
4266
- t.slider.attr({
4267
- 'aria-label': timeSliderText,
4268
- 'aria-valuemin': 0,
4269
- 'aria-valuemax': duration,
4270
- 'aria-valuenow': seconds,
4271
- 'aria-valuetext': time,
4272
- 'role': 'slider',
4273
- 'tabindex': 0
4274
- });
4275
-
4276
- },
4277
- restartPlayer = function () {
4278
- var now = new Date();
4279
- if (now - lastKeyPressTime >= 1000) {
4280
- media.play();
4281
- }
4282
- };
4283
-
4284
- t.slider.bind('focus', function (e) {
4285
- player.options.autoRewind = false;
4286
- });
4287
-
4288
- t.slider.bind('blur', function (e) {
4289
- player.options.autoRewind = autoRewindInitial;
4290
- });
4291
-
4292
- t.slider.bind('keydown', function (e) {
4293
-
4294
- if ((new Date() - lastKeyPressTime) >= 1000) {
4295
- startedPaused = media.paused;
4296
- }
4297
-
4298
- var keyCode = e.keyCode,
4299
- duration = media.duration,
4300
- seekTime = media.currentTime,
4301
- seekForward = player.options.defaultSeekForwardInterval(media),
4302
- seekBackward = player.options.defaultSeekBackwardInterval(media);
4303
-
4304
- switch (keyCode) {
4305
- case 37: // left
4306
- case 40: // Down
4307
- seekTime -= seekBackward;
4308
- break;
4309
- case 39: // Right
4310
- case 38: // Up
4311
- seekTime += seekForward;
4312
- break;
4313
- case 36: // Home
4314
- seekTime = 0;
4315
- break;
4316
- case 35: // end
4317
- seekTime = duration;
4318
- break;
4319
- case 32: // space
4320
- case 13: // enter
4321
- media.paused ? media.play() : media.pause();
4322
- return;
4323
- default:
4324
- return;
4325
- }
4326
-
4327
- seekTime = seekTime < 0 ? 0 : (seekTime >= duration ? duration : Math.floor(seekTime));
4328
- lastKeyPressTime = new Date();
4329
- if (!startedPaused) {
4330
- media.pause();
4331
- }
4332
-
4333
- if (seekTime < media.duration && !startedPaused) {
4334
- setTimeout(restartPlayer, 1100);
4335
- }
4336
-
4337
- media.setCurrentTime(seekTime);
4338
-
4339
- e.preventDefault();
4340
- e.stopPropagation();
4341
- return false;
4342
- });
4343
-
4344
-
4345
- // handle clicks
4346
- //controls.find('.mejs-time-rail').delegate('span', 'click', handleMouseMove);
4347
- t.total
4348
- .bind('mousedown touchstart', function (e) {
4349
- // only handle left clicks or touch
4350
- if (e.which === 1 || e.which === 0) {
4351
- mouseIsDown = true;
4352
- handleMouseMove(e);
4353
- t.globalBind('mousemove.dur touchmove.dur', function(e) {
4354
- handleMouseMove(e);
4355
- });
4356
- t.globalBind('mouseup.dur touchend.dur', function (e) {
4357
- mouseIsDown = false;
4358
- if (typeof t.timefloat !== 'undefined') {
4359
- t.timefloat.hide();
4360
- }
4361
- t.globalUnbind('.dur');
4362
- });
4363
- }
4364
- })
4365
- .bind('mouseenter', function(e) {
4366
- mouseIsOver = true;
4367
- t.globalBind('mousemove.dur', function(e) {
4368
- handleMouseMove(e);
4369
- });
4370
- if (typeof t.timefloat !== 'undefined' && !mejs.MediaFeatures.hasTouch) {
4371
- t.timefloat.show();
4372
- }
4373
- })
4374
- .bind('mouseleave',function(e) {
4375
- mouseIsOver = false;
4376
- if (!mouseIsDown) {
4377
- t.globalUnbind('.dur');
4378
- if (typeof t.timefloat !== 'undefined') {
4379
- t.timefloat.hide();
4380
- }
4381
- }
4382
- });
4383
-
4384
- // loading
4385
- media.addEventListener('progress', function (e) {
4386
- player.setProgressRail(e);
4387
- player.setCurrentRail(e);
4388
- }, false);
4389
-
4390
- // current time
4391
- media.addEventListener('timeupdate', function(e) {
4392
- player.setProgressRail(e);
4393
- player.setCurrentRail(e);
4394
- updateSlider(e);
4395
- }, false);
4396
-
4397
- t.container.on('controlsresize', function(e) {
4398
- player.setProgressRail(e);
4399
- player.setCurrentRail(e);
4400
- });
4401
- },
4402
- setProgressRail: function(e) {
4403
-
4404
- var
4405
- t = this,
4406
- target = (e !== undefined) ? e.target : t.media,
4407
- percent = null;
4408
-
4409
- // newest HTML5 spec has buffered array (FF4, Webkit)
4410
- if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) {
4411
- // account for a real array with multiple values - always read the end of the last buffer
4412
- percent = target.buffered.end(target.buffered.length - 1) / target.duration;
4413
- }
4414
- // Some browsers (e.g., FF3.6 and Safari 5) cannot calculate target.bufferered.end()
4415
- // to be anything other than 0. If the byte count is available we use this instead.
4416
- // Browsers that support the else if do not seem to have the bufferedBytes value and
4417
- // should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8.
4418
- else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) {
4419
- percent = target.bufferedBytes / target.bytesTotal;
4420
- }
4421
- // Firefox 3 with an Ogg file seems to go this way
4422
- else if (e && e.lengthComputable && e.total !== 0) {
4423
- percent = e.loaded / e.total;
4424
- }
4425
-
4426
- // finally update the progress bar
4427
- if (percent !== null) {
4428
- percent = Math.min(1, Math.max(0, percent));
4429
- // update loaded bar
4430
- if (t.loaded && t.total) {
4431
- t.loaded.width(t.total.width() * percent);
4432
- }
4433
- }
4434
- },
4435
- setCurrentRail: function() {
4436
-
4437
- var t = this;
4438
-
4439
- if (t.media.currentTime !== undefined && t.media.duration) {
4440
-
4441
- // update bar and handle
4442
- if (t.total && t.handle) {
4443
- var
4444
- newWidth = Math.round(t.total.width() * t.media.currentTime / t.media.duration),
4445
- handlePos = newWidth - Math.round(t.handle.outerWidth(true) / 2);
4446
-
4447
- t.current.width(newWidth);
4448
- t.handle.css('left', handlePos);
4449
- }
4450
- }
4451
-
4452
- }
4453
- });
4454
- })(mejs.$);
4455
-
4456
- (function($) {
4457
-
4458
- // options
4459
- $.extend(mejs.MepDefaults, {
4460
- duration: -1,
4461
- timeAndDurationSeparator: '<span> | </span>'
4462
- });
4463
-
4464
-
4465
- // current and duration 00:00 / 00:00
4466
- $.extend(MediaElementPlayer.prototype, {
4467
- buildcurrent: function(player, controls, layers, media) {
4468
- var t = this;
4469
-
4470
- $('<div class="mejs-time" role="timer" aria-live="off">' +
4471
- '<span class="mejs-currenttime">' +
4472
- mejs.Utility.secondsToTimeCode(0, player.options) +
4473
- '</span>'+
4474
- '</div>')
4475
- .appendTo(controls);
4476
-
4477
- t.currenttime = t.controls.find('.mejs-currenttime');
4478
-
4479
- media.addEventListener('timeupdate',function() {
4480
- if (t.controlsAreVisible) {
4481
- player.updateCurrent();
4482
- }
4483
-
4484
- }, false);
4485
- },
4486
-
4487
-
4488
- buildduration: function(player, controls, layers, media) {
4489
- var t = this;
4490
-
4491
- if (controls.children().last().find('.mejs-currenttime').length > 0) {
4492
- $(t.options.timeAndDurationSeparator +
4493
- '<span class="mejs-duration">' +
4494
- mejs.Utility.secondsToTimeCode(t.options.duration, t.options) +
4495
- '</span>')
4496
- .appendTo(controls.find('.mejs-time'));
4497
- } else {
4498
-
4499
- // add class to current time
4500
- controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container');
4501
-
4502
- $('<div class="mejs-time mejs-duration-container">'+
4503
- '<span class="mejs-duration">' +
4504
- mejs.Utility.secondsToTimeCode(t.options.duration, t.options) +
4505
- '</span>' +
4506
- '</div>')
4507
- .appendTo(controls);
4508
- }
4509
-
4510
- t.durationD = t.controls.find('.mejs-duration');
4511
-
4512
- media.addEventListener('timeupdate',function() {
4513
- if (t.controlsAreVisible) {
4514
- player.updateDuration();
4515
- }
4516
- }, false);
4517
- },
4518
-
4519
- updateCurrent: function() {
4520
- var t = this;
4521
-
4522
- var currentTime = t.media.currentTime;
4523
-
4524
- if (isNaN(currentTime)) {
4525
- currentTime = 0;
4526
- }
4527
-
4528
- if (t.currenttime) {
4529
- t.currenttime.html(mejs.Utility.secondsToTimeCode(currentTime, t.options));
4530
- }
4531
- },
4532
-
4533
- updateDuration: function() {
4534
- var t = this;
4535
-
4536
- var duration = t.media.duration;
4537
- if (t.options.duration > 0) {
4538
- duration = t.options.duration;
4539
- }
4540
-
4541
- if (isNaN(duration)) {
4542
- duration = 0;
4543
- }
4544
-
4545
- //Toggle the long video class if the video is longer than an hour.
4546
- t.container.toggleClass("mejs-long-video", duration > 3600);
4547
-
4548
- if (t.durationD && duration > 0) {
4549
- t.durationD.html(mejs.Utility.secondsToTimeCode(duration, t.options));
4550
- }
4551
- }
4552
- });
4553
-
4554
- })(mejs.$);
4555
-
4556
- (function ($) {
4557
-
4558
- $.extend(mejs.MepDefaults, {
4559
- muteText: mejs.i18n.t('mejs.mute-toggle'),
4560
- allyVolumeControlText: mejs.i18n.t('mejs.volume-help-text'),
4561
- hideVolumeOnTouchDevices: true,
4562
-
4563
- audioVolume: 'horizontal',
4564
- videoVolume: 'vertical'
4565
- });
4566
-
4567
- $.extend(MediaElementPlayer.prototype, {
4568
- buildvolume: function (player, controls, layers, media) {
4569
-
4570
- // Android and iOS don't support volume controls
4571
- if ((mejs.MediaFeatures.isAndroid || mejs.MediaFeatures.isiOS) && this.options.hideVolumeOnTouchDevices)
4572
- return;
4573
-
4574
- var t = this,
4575
- mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume,
4576
- mute = (mode == 'horizontal') ?
4577
-
4578
- // horizontal version
4579
- $('<div class="mejs-button mejs-volume-button mejs-mute">' +
4580
- '<button type="button" aria-controls="' + t.id +
4581
- '" title="' + t.options.muteText +
4582
- '" aria-label="' + t.options.muteText +
4583
- '"></button>' +
4584
- '</div>' +
4585
- '<a href="javascript:void(0);" class="mejs-horizontal-volume-slider">' + // outer background
4586
- '<span class="mejs-offscreen">' + t.options.allyVolumeControlText + '</span>' +
4587
- '<div class="mejs-horizontal-volume-total"></div>' + // line background
4588
- '<div class="mejs-horizontal-volume-current"></div>' + // current volume
4589
- '<div class="mejs-horizontal-volume-handle"></div>' + // handle
4590
- '</a>'
4591
- )
4592
- .appendTo(controls) :
4593
-
4594
- // vertical version
4595
- $('<div class="mejs-button mejs-volume-button mejs-mute">' +
4596
- '<button type="button" aria-controls="' + t.id +
4597
- '" title="' + t.options.muteText +
4598
- '" aria-label="' + t.options.muteText +
4599
- '"></button>' +
4600
- '<a href="javascript:void(0);" class="mejs-volume-slider">' + // outer background
4601
- '<span class="mejs-offscreen">' + t.options.allyVolumeControlText + '</span>' +
4602
- '<div class="mejs-volume-total"></div>' + // line background
4603
- '<div class="mejs-volume-current"></div>' + // current volume
4604
- '<div class="mejs-volume-handle"></div>' + // handle
4605
- '</a>' +
4606
- '</div>')
4607
- .appendTo(controls),
4608
- volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),
4609
- volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),
4610
- volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
4611
- volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
4612
-
4613
- positionVolumeHandle = function (volume, secondTry) {
4614
-
4615
- if (!volumeSlider.is(':visible') && typeof secondTry == 'undefined') {
4616
- volumeSlider.show();
4617
- positionVolumeHandle(volume, true);
4618
- volumeSlider.hide();
4619
- return;
4620
- }
4621
-
4622
- // correct to 0-1
4623
- volume = Math.max(0, volume);
4624
- volume = Math.min(volume, 1);
4625
-
4626
- // adjust mute button style
4627
- if (volume === 0) {
4628
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
4629
- mute.children('button').attr('title', mejs.i18n.t('mejs.unmute')).attr('aria-label', mejs.i18n.t('mejs.unmute'));
4630
- } else {
4631
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
4632
- mute.children('button').attr('title', mejs.i18n.t('mejs.mute')).attr('aria-label', mejs.i18n.t('mejs.mute'));
4633
- }
4634
-
4635
- // top/left of full size volume slider background
4636
- var totalPosition = volumeTotal.position();
4637
- // position slider
4638
- if (mode == 'vertical') {
4639
- var
4640
- // height of the full size volume slider background
4641
- totalHeight = volumeTotal.height(),
4642
-
4643
- // the new top position based on the current volume
4644
- // 70% volume on 100px height == top:30px
4645
- newTop = totalHeight - (totalHeight * volume);
4646
-
4647
- // handle
4648
- volumeHandle.css('top', Math.round(totalPosition.top + newTop - (volumeHandle.height() / 2)));
4649
-
4650
- // show the current visibility
4651
- volumeCurrent.height(totalHeight - newTop);
4652
- volumeCurrent.css('top', totalPosition.top + newTop);
4653
- } else {
4654
- var
4655
- // height of the full size volume slider background
4656
- totalWidth = volumeTotal.width(),
4657
-
4658
- // the new left position based on the current volume
4659
- newLeft = totalWidth * volume;
4660
-
4661
- // handle
4662
- volumeHandle.css('left', Math.round(totalPosition.left + newLeft - (volumeHandle.width() / 2)));
4663
-
4664
- // rezize the current part of the volume bar
4665
- volumeCurrent.width(Math.round(newLeft));
4666
- }
4667
- },
4668
- handleVolumeMove = function (e) {
4669
-
4670
- var volume = null,
4671
- totalOffset = volumeTotal.offset();
4672
-
4673
- // calculate the new volume based on the moust position
4674
- if (mode === 'vertical') {
4675
-
4676
- var
4677
- railHeight = volumeTotal.height(),
4678
- newY = e.pageY - totalOffset.top;
4679
-
4680
- volume = (railHeight - newY) / railHeight;
4681
-
4682
- // the controls just hide themselves (usually when mouse moves too far up)
4683
- if (totalOffset.top === 0 || totalOffset.left === 0) {
4684
- return;
4685
- }
4686
-
4687
- } else {
4688
- var
4689
- railWidth = volumeTotal.width(),
4690
- newX = e.pageX - totalOffset.left;
4691
-
4692
- volume = newX / railWidth;
4693
- }
4694
-
4695
- // ensure the volume isn't outside 0-1
4696
- volume = Math.max(0, volume);
4697
- volume = Math.min(volume, 1);
4698
-
4699
- // position the slider and handle
4700
- positionVolumeHandle(volume);
4701
-
4702
- // set the media object (this will trigger the volumechanged event)
4703
- if (volume === 0) {
4704
- media.setMuted(true);
4705
- } else {
4706
- media.setMuted(false);
4707
- }
4708
- media.setVolume(volume);
4709
- },
4710
- mouseIsDown = false,
4711
- mouseIsOver = false;
4712
-
4713
- // SLIDER
4714
-
4715
- mute
4716
- .hover(function () {
4717
- volumeSlider.show();
4718
- mouseIsOver = true;
4719
- }, function () {
4720
- mouseIsOver = false;
4721
-
4722
- if (!mouseIsDown && mode == 'vertical') {
4723
- volumeSlider.hide();
4724
- }
4725
- });
4726
-
4727
- var updateVolumeSlider = function (e) {
4728
-
4729
- var volume = Math.floor(media.volume * 100);
4730
-
4731
- volumeSlider.attr({
4732
- 'aria-label': mejs.i18n.t('mejs.volume-slider'),
4733
- 'aria-valuemin': 0,
4734
- 'aria-valuemax': 100,
4735
- 'aria-valuenow': volume,
4736
- 'aria-valuetext': volume + '%',
4737
- 'role': 'slider',
4738
- 'tabindex': 0
4739
- });
4740
-
4741
- };
4742
-
4743
- volumeSlider
4744
- .bind('mouseover', function () {
4745
- mouseIsOver = true;
4746
- })
4747
- .bind('mousedown', function (e) {
4748
- handleVolumeMove(e);
4749
- t.globalBind('mousemove.vol', function (e) {
4750
- handleVolumeMove(e);
4751
- });
4752
- t.globalBind('mouseup.vol', function () {
4753
- mouseIsDown = false;
4754
- t.globalUnbind('.vol');
4755
-
4756
- if (!mouseIsOver && mode == 'vertical') {
4757
- volumeSlider.hide();
4758
- }
4759
- });
4760
- mouseIsDown = true;
4761
-
4762
- return false;
4763
- })
4764
- .bind('keydown', function (e) {
4765
- var keyCode = e.keyCode;
4766
- var volume = media.volume;
4767
- switch (keyCode) {
4768
- case 38: // Up
4769
- volume = Math.min(volume + 0.1, 1);
4770
- break;
4771
- case 40: // Down
4772
- volume = Math.max(0, volume - 0.1);
4773
- break;
4774
- default:
4775
- return true;
4776
- }
4777
-
4778
- mouseIsDown = false;
4779
- positionVolumeHandle(volume);
4780
- media.setVolume(volume);
4781
- return false;
4782
- });
4783
-
4784
- // MUTE button
4785
- mute.find('button').click(function () {
4786
- media.setMuted(!media.muted);
4787
- });
4788
-
4789
- //Keyboard input
4790
- mute.find('button').bind('focus', function () {
4791
- volumeSlider.show();
4792
- });
4793
-
4794
- // listen for volume change events from other sources
4795
- media.addEventListener('volumechange', function (e) {
4796
- if (!mouseIsDown) {
4797
- if (media.muted) {
4798
- positionVolumeHandle(0);
4799
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
4800
- } else {
4801
- positionVolumeHandle(media.volume);
4802
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
4803
- }
4804
- }
4805
- updateVolumeSlider(e);
4806
- }, false);
4807
-
4808
- // mutes the media and sets the volume icon muted if the initial volume is set to 0
4809
- if (player.options.startVolume === 0) {
4810
- media.setMuted(true);
4811
- }
4812
-
4813
- // shim gets the startvolume as a parameter, but we have to set it on the native <video> and <audio> elements
4814
- if (media.pluginType === 'native') {
4815
- media.setVolume(player.options.startVolume);
4816
- }
4817
-
4818
- t.container.on('controlsresize', function () {
4819
- if (media.muted) {
4820
- positionVolumeHandle(0);
4821
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
4822
- } else {
4823
- positionVolumeHandle(media.volume);
4824
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
4825
- }
4826
- });
4827
- }
4828
- });
4829
-
4830
- })(mejs.$);
4831
-
4832
- (function($) {
4833
-
4834
- $.extend(mejs.MepDefaults, {
4835
- usePluginFullScreen: true,
4836
- newWindowCallback: function() { return '';},
4837
- fullscreenText: ''
4838
- });
4839
-
4840
- $.extend(MediaElementPlayer.prototype, {
4841
-
4842
- isFullScreen: false,
4843
-
4844
- isNativeFullScreen: false,
4845
-
4846
- isInIframe: false,
4847
-
4848
- // Possible modes
4849
- // (1) 'native-native' HTML5 video + browser fullscreen (IE10+, etc.)
4850
- // (2) 'plugin-native' plugin video + browser fullscreen (fails in some versions of Firefox)
4851
- // (3) 'fullwindow' Full window (retains all UI)
4852
- // usePluginFullScreen = true
4853
- // (4) 'plugin-click' Flash 1 - click through with pointer events
4854
- // (5) 'plugin-hover' Flash 2 - hover popup in flash (IE6-8)
4855
- fullscreenMode: '',
4856
-
4857
- buildfullscreen: function(player, controls, layers, media) {
4858
-
4859
- if (!player.isVideo)
4860
- return;
4861
-
4862
- player.isInIframe = (window.location != window.parent.location);
4863
-
4864
- // detect on start
4865
- media.addEventListener('loadstart', function() { player.detectFullscreenMode(); });
4866
-
4867
- // build button
4868
- var t = this,
4869
- hideTimeout = null,
4870
- fullscreenTitle = t.options.fullscreenText ? t.options.fullscreenText : mejs.i18n.t('mejs.fullscreen'),
4871
- fullscreenBtn =
4872
- $('<div class="mejs-button mejs-fullscreen-button">' +
4873
- '<button type="button" aria-controls="' + t.id + '" title="' + fullscreenTitle + '" aria-label="' + fullscreenTitle + '"></button>' +
4874
- '</div>')
4875
- .appendTo(controls)
4876
- .on('click', function() {
4877
-
4878
- // toggle fullscreen
4879
- var isFullScreen = (mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || player.isFullScreen;
4880
-
4881
- if (isFullScreen) {
4882
- player.exitFullScreen();
4883
- } else {
4884
- player.enterFullScreen();
4885
- }
4886
- })
4887
- .on('mouseover', function() {
4888
-
4889
- // very old browsers with a plugin
4890
- if (t.fullscreenMode == 'plugin-hover') {
4891
- if (hideTimeout !== null) {
4892
- clearTimeout(hideTimeout);
4893
- delete hideTimeout;
4894
- }
4895
-
4896
- var buttonPos = fullscreenBtn.offset(),
4897
- containerPos = player.container.offset();
4898
-
4899
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true);
4900
- }
4901
-
4902
- })
4903
- .on('mouseout', function() {
4904
-
4905
- if (t.fullscreenMode == 'plugin-hover') {
4906
- if (hideTimeout !== null) {
4907
- clearTimeout(hideTimeout);
4908
- delete hideTimeout;
4909
- }
4910
-
4911
- hideTimeout = setTimeout(function() {
4912
- media.hideFullscreenButton();
4913
- }, 1500);
4914
- }
4915
-
4916
- });
4917
-
4918
-
4919
-
4920
- player.fullscreenBtn = fullscreenBtn;
4921
-
4922
- t.globalBind('keydown',function (e) {
4923
- if (e.keyCode == 27 && ((mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || t.isFullScreen)) {
4924
- player.exitFullScreen();
4925
- }
4926
- });
4927
-
4928
- t.normalHeight = 0;
4929
- t.normalWidth = 0;
4930
-
4931
- // setup native fullscreen event
4932
- if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
4933
-
4934
- // chrome doesn't alays fire this in an iframe
4935
- var fullscreenChanged = function(e) {
4936
- if (player.isFullScreen) {
4937
- if (mejs.MediaFeatures.isFullScreen()) {
4938
- player.isNativeFullScreen = true;
4939
- // reset the controls once we are fully in full screen
4940
- player.setControlsSize();
4941
- } else {
4942
- player.isNativeFullScreen = false;
4943
- // when a user presses ESC
4944
- // make sure to put the player back into place
4945
- player.exitFullScreen();
4946
- }
4947
- }
4948
- };
4949
-
4950
- player.globalBind(mejs.MediaFeatures.fullScreenEventName, fullscreenChanged);
4951
- }
4952
-
4953
- },
4954
-
4955
- detectFullscreenMode: function() {
4956
-
4957
- var t = this,
4958
- mode = '',
4959
- features = mejs.MediaFeatures;
4960
-
4961
- if (features.hasTrueNativeFullScreen && t.media.pluginType === 'native') {
4962
- mode = 'native-native';
4963
- } else if (features.hasTrueNativeFullScreen && t.media.pluginType !== 'native' && !features.hasFirefoxPluginMovingProblem) {
4964
- mode = 'plugin-native';
4965
- } else if (t.usePluginFullScreen) {
4966
- if (mejs.MediaFeatures.supportsPointerEvents) {
4967
- mode = 'plugin-click';
4968
- // this needs some special setup
4969
- t.createPluginClickThrough();
4970
- } else {
4971
- mode = 'plugin-hover';
4972
- }
4973
-
4974
- } else {
4975
- mode = 'fullwindow';
4976
- }
4977
-
4978
-
4979
- t.fullscreenMode = mode;
4980
- return mode;
4981
- },
4982
-
4983
- isPluginClickThroughCreated: false,
4984
-
4985
- createPluginClickThrough: function() {
4986
-
4987
- var t = this;
4988
-
4989
- // don't build twice
4990
- if (t.isPluginClickThroughCreated) {
4991
- return;
4992
- }
4993
-
4994
- // allows clicking through the fullscreen button and controls down directly to Flash
4995
-
4996
- /*
4997
- When a user puts his mouse over the fullscreen button, we disable the controls so that mouse events can go down to flash (pointer-events)
4998
- We then put a divs over the video and on either side of the fullscreen button
4999
- to capture mouse movement and restore the controls once the mouse moves outside of the fullscreen button
5000
- */
5001
-
5002
- var fullscreenIsDisabled = false,
5003
- restoreControls = function() {
5004
- if (fullscreenIsDisabled) {
5005
- // hide the hovers
5006
- for (var i in hoverDivs) {
5007
- hoverDivs[i].hide();
5008
- }
5009
-
5010
- // restore the control bar
5011
- t.fullscreenBtn.css('pointer-events', '');
5012
- t.controls.css('pointer-events', '');
5013
-
5014
- // prevent clicks from pausing video
5015
- t.media.removeEventListener('click', t.clickToPlayPauseCallback);
5016
-
5017
- // store for later
5018
- fullscreenIsDisabled = false;
5019
- }
5020
- },
5021
- hoverDivs = {},
5022
- hoverDivNames = ['top', 'left', 'right', 'bottom'],
5023
- i, len,
5024
- positionHoverDivs = function() {
5025
- var fullScreenBtnOffsetLeft = fullscreenBtn.offset().left - t.container.offset().left,
5026
- fullScreenBtnOffsetTop = fullscreenBtn.offset().top - t.container.offset().top,
5027
- fullScreenBtnWidth = fullscreenBtn.outerWidth(true),
5028
- fullScreenBtnHeight = fullscreenBtn.outerHeight(true),
5029
- containerWidth = t.container.width(),
5030
- containerHeight = t.container.height();
5031
-
5032
- for (i in hoverDivs) {
5033
- hoverDivs[i].css({position: 'absolute', top: 0, left: 0}); //, backgroundColor: '#f00'});
5034
- }
5035
-
5036
- // over video, but not controls
5037
- hoverDivs['top']
5038
- .width( containerWidth )
5039
- .height( fullScreenBtnOffsetTop );
5040
-
5041
- // over controls, but not the fullscreen button
5042
- hoverDivs['left']
5043
- .width( fullScreenBtnOffsetLeft )
5044
- .height( fullScreenBtnHeight )
5045
- .css({top: fullScreenBtnOffsetTop});
5046
-
5047
- // after the fullscreen button
5048
- hoverDivs['right']
5049
- .width( containerWidth - fullScreenBtnOffsetLeft - fullScreenBtnWidth )
5050
- .height( fullScreenBtnHeight )
5051
- .css({top: fullScreenBtnOffsetTop,
5052
- left: fullScreenBtnOffsetLeft + fullScreenBtnWidth});
5053
-
5054
- // under the fullscreen button
5055
- hoverDivs['bottom']
5056
- .width( containerWidth )
5057
- .height( containerHeight - fullScreenBtnHeight - fullScreenBtnOffsetTop )
5058
- .css({top: fullScreenBtnOffsetTop + fullScreenBtnHeight});
5059
- };
5060
-
5061
- t.globalBind('resize', function() {
5062
- positionHoverDivs();
5063
- });
5064
-
5065
- for (i = 0, len = hoverDivNames.length; i < len; i++) {
5066
- hoverDivs[hoverDivNames[i]] = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls).hide();
5067
- }
5068
-
5069
- // on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash
5070
- fullscreenBtn.on('mouseover',function() {
5071
-
5072
- if (!t.isFullScreen) {
5073
-
5074
- var buttonPos = fullscreenBtn.offset(),
5075
- containerPos = player.container.offset();
5076
-
5077
- // move the button in Flash into place
5078
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
5079
-
5080
- // allows click through
5081
- t.fullscreenBtn.css('pointer-events', 'none');
5082
- t.controls.css('pointer-events', 'none');
5083
-
5084
- // restore click-to-play
5085
- t.media.addEventListener('click', t.clickToPlayPauseCallback);
5086
-
5087
- // show the divs that will restore things
5088
- for (i in hoverDivs) {
5089
- hoverDivs[i].show();
5090
- }
5091
-
5092
- positionHoverDivs();
5093
-
5094
- fullscreenIsDisabled = true;
5095
- }
5096
-
5097
- });
5098
-
5099
- // restore controls anytime the user enters or leaves fullscreen
5100
- media.addEventListener('fullscreenchange', function(e) {
5101
- t.isFullScreen = !t.isFullScreen;
5102
- // don't allow plugin click to pause video - messes with
5103
- // plugin's controls
5104
- if (t.isFullScreen) {
5105
- t.media.removeEventListener('click', t.clickToPlayPauseCallback);
5106
- } else {
5107
- t.media.addEventListener('click', t.clickToPlayPauseCallback);
5108
- }
5109
- restoreControls();
5110
- });
5111
-
5112
-
5113
- // the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events
5114
- // so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button
5115
-
5116
- t.globalBind('mousemove', function(e) {
5117
-
5118
- // if the mouse is anywhere but the fullsceen button, then restore it all
5119
- if (fullscreenIsDisabled) {
5120
-
5121
- var fullscreenBtnPos = fullscreenBtn.offset();
5122
-
5123
-
5124
- if (e.pageY < fullscreenBtnPos.top || e.pageY > fullscreenBtnPos.top + fullscreenBtn.outerHeight(true) ||
5125
- e.pageX < fullscreenBtnPos.left || e.pageX > fullscreenBtnPos.left + fullscreenBtn.outerWidth(true)
5126
- ) {
5127
-
5128
- fullscreenBtn.css('pointer-events', '');
5129
- t.controls.css('pointer-events', '');
5130
-
5131
- fullscreenIsDisabled = false;
5132
- }
5133
- }
5134
- });
5135
-
5136
-
5137
- t.isPluginClickThroughCreated = true;
5138
- },
5139
-
5140
- cleanfullscreen: function(player) {
5141
- player.exitFullScreen();
5142
- },
5143
-
5144
- containerSizeTimeout: null,
5145
-
5146
- enterFullScreen: function() {
5147
-
5148
- var t = this;
5149
-
5150
- if (mejs.MediaFeatures.isiOS && mejs.MediaFeatures.hasiOSFullScreen && typeof t.media.webkitEnterFullscreen === 'function') {
5151
- t.media.webkitEnterFullscreen();
5152
- return;
5153
- }
5154
-
5155
- // set it to not show scroll bars so 100% will work
5156
- $(document.documentElement).addClass('mejs-fullscreen');
5157
-
5158
- // store sizing
5159
- t.normalHeight = t.container.height();
5160
- t.normalWidth = t.container.width();
5161
-
5162
-
5163
-
5164
- // attempt to do true fullscreen
5165
- if (t.fullscreenMode === 'native-native' || t.fullscreenMode === 'plugin-native') {
5166
-
5167
- mejs.MediaFeatures.requestFullScreen(t.container[0]);
5168
- //return;
5169
-
5170
- if (t.isInIframe) {
5171
- // sometimes exiting from fullscreen doesn't work
5172
- // notably in Chrome <iframe>. Fixed in version 17
5173
- setTimeout(function checkFullscreen() {
5174
-
5175
- if (t.isNativeFullScreen) {
5176
- var percentErrorMargin = 0.002, // 0.2%
5177
- windowWidth = $(window).width(),
5178
- screenWidth = screen.width,
5179
- absDiff = Math.abs(screenWidth - windowWidth),
5180
- marginError = screenWidth * percentErrorMargin;
5181
-
5182
- // check if the video is suddenly not really fullscreen
5183
- if (absDiff > marginError) {
5184
- // manually exit
5185
- t.exitFullScreen();
5186
- } else {
5187
- // test again
5188
- setTimeout(checkFullscreen, 500);
5189
- }
5190
- }
5191
-
5192
- }, 1000);
5193
- }
5194
-
5195
- } else if (t.fullscreeMode == 'fullwindow') {
5196
- // move into position
5197
-
5198
- }
5199
-
5200
- // make full size
5201
- t.container
5202
- .addClass('mejs-container-fullscreen')
5203
- .width('100%')
5204
- .height('100%');
5205
- //.css({position: 'fixed', left: 0, top: 0, right: 0, bottom: 0, overflow: 'hidden', width: '100%', height: '100%', 'z-index': 1000});
5206
-
5207
- // Only needed for safari 5.1 native full screen, can cause display issues elsewhere
5208
- // Actually, it seems to be needed for IE8, too
5209
- //if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
5210
- t.containerSizeTimeout = setTimeout(function() {
5211
- t.container.css({width: '100%', height: '100%'});
5212
- t.setControlsSize();
5213
- }, 500);
5214
- //}
5215
-
5216
- if (t.media.pluginType === 'native') {
5217
- t.$media
5218
- .width('100%')
5219
- .height('100%');
5220
- } else {
5221
- t.container.find('.mejs-shim')
5222
- .width('100%')
5223
- .height('100%');
5224
-
5225
- setTimeout(function() {
5226
- var win = $(window),
5227
- winW = win.width(),
5228
- winH = win.height();
5229
-
5230
- t.media.setVideoSize(winW,winH);
5231
- }, 500);
5232
- }
5233
-
5234
- t.layers.children('div')
5235
- .width('100%')
5236
- .height('100%');
5237
-
5238
- if (t.fullscreenBtn) {
5239
- t.fullscreenBtn
5240
- .removeClass('mejs-fullscreen')
5241
- .addClass('mejs-unfullscreen');
5242
- }
5243
-
5244
- t.setControlsSize();
5245
- t.isFullScreen = true;
5246
-
5247
- var zoomFactor = Math.min(screen.width / t.width, screen.height / t.height);
5248
- t.container.find('.mejs-captions-text').css('font-size', zoomFactor * 100 + '%');
5249
- t.container.find('.mejs-captions-text').css('line-height', 'normal');
5250
- t.container.find('.mejs-captions-position').css('bottom', '45px');
5251
-
5252
- t.container.trigger('enteredfullscreen');
5253
- },
5254
-
5255
- exitFullScreen: function() {
5256
-
5257
- var t = this;
5258
-
5259
- // Prevent container from attempting to stretch a second time
5260
- clearTimeout(t.containerSizeTimeout);
5261
-
5262
- // firefox can't adjust plugins
5263
- /*
5264
- if (t.media.pluginType !== 'native' && mejs.MediaFeatures.isFirefox) {
5265
- t.media.setFullscreen(false);
5266
- //player.isFullScreen = false;
5267
- return;
5268
- }
5269
- */
5270
-
5271
- // come out of native fullscreen
5272
- if (mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || t.isFullScreen)) {
5273
- mejs.MediaFeatures.cancelFullScreen();
5274
- }
5275
-
5276
- // restore scroll bars to document
5277
- $(document.documentElement).removeClass('mejs-fullscreen');
5278
-
5279
- t.container
5280
- .removeClass('mejs-container-fullscreen')
5281
- .width(t.normalWidth)
5282
- .height(t.normalHeight);
5283
-
5284
- if (t.media.pluginType === 'native') {
5285
- t.$media
5286
- .width(t.normalWidth)
5287
- .height(t.normalHeight);
5288
- } else {
5289
- t.container.find('.mejs-shim')
5290
- .width(t.normalWidth)
5291
- .height(t.normalHeight);
5292
-
5293
- t.media.setVideoSize(t.normalWidth, t.normalHeight);
5294
- }
5295
-
5296
- t.layers.children('div')
5297
- .width(t.normalWidth)
5298
- .height(t.normalHeight);
5299
-
5300
- t.fullscreenBtn
5301
- .removeClass('mejs-unfullscreen')
5302
- .addClass('mejs-fullscreen');
5303
-
5304
- t.setControlsSize();
5305
- t.isFullScreen = false;
5306
-
5307
- t.container.find('.mejs-captions-text').css('font-size','');
5308
- t.container.find('.mejs-captions-text').css('line-height', '');
5309
- t.container.find('.mejs-captions-position').css('bottom', '');
5310
-
5311
- t.container.trigger('exitedfullscreen');
5312
- }
5313
- });
5314
-
5315
- })(mejs.$);
5316
-
5317
- (function($) {
5318
-
5319
- // Speed
5320
- $.extend(mejs.MepDefaults, {
5321
-
5322
- // We also support to pass object like this:
5323
- // [{name: 'Slow', value: '0.75'}, {name: 'Normal', value: '1.00'}, ...]
5324
- speeds: ['2.00', '1.50', '1.25', '1.00', '0.75'],
5325
-
5326
- defaultSpeed: '1.00',
5327
-
5328
- speedChar: 'x'
5329
-
5330
- });
5331
-
5332
- $.extend(MediaElementPlayer.prototype, {
5333
-
5334
- buildspeed: function(player, controls, layers, media) {
5335
- var t = this;
5336
-
5337
- if (t.media.pluginType == 'native') {
5338
- var
5339
- speedButton = null,
5340
- speedSelector = null,
5341
- playbackSpeed = null,
5342
- inputId = null;
5343
-
5344
- var speeds = [];
5345
- var defaultInArray = false;
5346
- for (var i=0, len=t.options.speeds.length; i < len; i++) {
5347
- var s = t.options.speeds[i];
5348
- if (typeof(s) === 'string'){
5349
- speeds.push({
5350
- name: s + t.options.speedChar,
5351
- value: s
5352
- });
5353
- if(s === t.options.defaultSpeed) {
5354
- defaultInArray = true;
5355
- }
5356
- }
5357
- else {
5358
- speeds.push(s);
5359
- if(s.value === t.options.defaultSpeed) {
5360
- defaultInArray = true;
5361
- }
5362
- }
5363
- }
5364
-
5365
- if (!defaultInArray) {
5366
- speeds.push({
5367
- name: t.options.defaultSpeed + t.options.speedChar,
5368
- value: t.options.defaultSpeed
5369
- });
5370
- }
5371
-
5372
- speeds.sort(function(a, b) {
5373
- return parseFloat(b.value) - parseFloat(a.value);
5374
- });
5375
-
5376
- var getSpeedNameFromValue = function(value) {
5377
- for(i=0,len=speeds.length; i <len; i++) {
5378
- if (speeds[i].value === value) {
5379
- return speeds[i].name;
5380
- }
5381
- }
5382
- };
5383
-
5384
- var html = '<div class="mejs-button mejs-speed-button">' +
5385
- '<button type="button">' + getSpeedNameFromValue(t.options.defaultSpeed) + '</button>' +
5386
- '<div class="mejs-speed-selector">' +
5387
- '<ul>';
5388
-
5389
- for (i = 0, il = speeds.length; i<il; i++) {
5390
- inputId = t.id + '-speed-' + speeds[i].value;
5391
- html += '<li>' +
5392
- '<input type="radio" name="speed" ' +
5393
- 'value="' + speeds[i].value + '" ' +
5394
- 'id="' + inputId + '" ' +
5395
- (speeds[i].value === t.options.defaultSpeed ? ' checked' : '') +
5396
- ' />' +
5397
- '<label for="' + inputId + '" ' +
5398
- (speeds[i].value === t.options.defaultSpeed ? ' class="mejs-speed-selected"' : '') +
5399
- '>' + speeds[i].name + '</label>' +
5400
- '</li>';
5401
- }
5402
- html += '</ul></div></div>';
5403
-
5404
- speedButton = $(html).appendTo(controls);
5405
- speedSelector = speedButton.find('.mejs-speed-selector');
5406
-
5407
- playbackSpeed = t.options.defaultSpeed;
5408
-
5409
- media.addEventListener('loadedmetadata', function(e) {
5410
- if (playbackSpeed) {
5411
- media.playbackRate = parseFloat(playbackSpeed);
5412
- }
5413
- }, true);
5414
-
5415
- speedSelector
5416
- .on('click', 'input[type="radio"]', function() {
5417
- var newSpeed = $(this).attr('value');
5418
- playbackSpeed = newSpeed;
5419
- media.playbackRate = parseFloat(newSpeed);
5420
- speedButton.find('button').html(getSpeedNameFromValue(newSpeed));
5421
- speedButton.find('.mejs-speed-selected').removeClass('mejs-speed-selected');
5422
- speedButton.find('input[type="radio"]:checked').next().addClass('mejs-speed-selected');
5423
- });
5424
- speedButton
5425
- .one( 'mouseenter focusin', function() {
5426
- speedSelector
5427
- .height(
5428
- speedButton.find('.mejs-speed-selector ul').outerHeight(true) +
5429
- speedButton.find('.mejs-speed-translations').outerHeight(true))
5430
- .css('top', (-1 * speedSelector.height()) + 'px');
5431
- });
5432
- }
5433
- }
5434
- });
5435
-
5436
- })(mejs.$);
5437
-
5438
- (function($) {
5439
-
5440
- // add extra default options
5441
- $.extend(mejs.MepDefaults, {
5442
- // this will automatically turn on a <track>
5443
- startLanguage: '',
5444
-
5445
- tracksText: '',
5446
-
5447
- // By default, no WAI-ARIA live region - don't make a
5448
- // screen reader speak captions over an audio track.
5449
- tracksAriaLive: false,
5450
-
5451
- // option to remove the [cc] button when no <track kind="subtitles"> are present
5452
- hideCaptionsButtonWhenEmpty: true,
5453
-
5454
- // If true and we only have one track, change captions to popup
5455
- toggleCaptionsButtonWhenOnlyOne: false,
5456
-
5457
- // #id or .class
5458
- slidesSelector: ''
5459
- });
5460
-
5461
- $.extend(MediaElementPlayer.prototype, {
5462
-
5463
- hasChapters: false,
5464
-
5465
- cleartracks: function(player, controls, layers, media){
5466
- if(player) {
5467
- if(player.captions) player.captions.remove();
5468
- if(player.chapters) player.chapters.remove();
5469
- if(player.captionsText) player.captionsText.remove();
5470
- if(player.captionsButton) player.captionsButton.remove();
5471
- }
5472
- },
5473
- buildtracks: function(player, controls, layers, media) {
5474
- if (player.tracks.length === 0)
5475
- return;
5476
-
5477
- var t = this,
5478
- attr = t.options.tracksAriaLive ?
5479
- 'role="log" aria-live="assertive" aria-atomic="false"' : '',
5480
- tracksTitle = t.options.tracksText ? t.options.tracksText : mejs.i18n.t('mejs.captions-subtitles'),
5481
- i,
5482
- kind;
5483
-
5484
- if (t.domNode.textTracks) { // if browser will do native captions, prefer mejs captions, loop through tracks and hide
5485
- for (i = t.domNode.textTracks.length - 1; i >= 0; i--) {
5486
- t.domNode.textTracks[i].mode = "hidden";
5487
- }
5488
- }
5489
- t.cleartracks(player, controls, layers, media);
5490
- player.chapters =
5491
- $('<div class="mejs-chapters mejs-layer"></div>')
5492
- .prependTo(layers).hide();
5493
- player.captions =
5494
- $('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" ' +
5495
- attr + '><span class="mejs-captions-text"></span></div></div>')
5496
- .prependTo(layers).hide();
5497
- player.captionsText = player.captions.find('.mejs-captions-text');
5498
- player.captionsButton =
5499
- $('<div class="mejs-button mejs-captions-button">'+
5500
- '<button type="button" aria-controls="' + t.id + '" title="' + tracksTitle + '" aria-label="' + tracksTitle + '"></button>'+
5501
- '<div class="mejs-captions-selector">'+
5502
- '<ul>'+
5503
- '<li>'+
5504
- '<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' +
5505
- '<label for="' + player.id + '_captions_none">' + mejs.i18n.t('mejs.none') +'</label>'+
5506
- '</li>' +
5507
- '</ul>'+
5508
- '</div>'+
5509
- '</div>')
5510
- .appendTo(controls);
5511
-
5512
-
5513
- var subtitleCount = 0;
5514
- for (i=0; i<player.tracks.length; i++) {
5515
- kind = player.tracks[i].kind;
5516
- if (kind === 'subtitles' || kind === 'captions') {
5517
- subtitleCount++;
5518
- }
5519
- }
5520
-
5521
- // if only one language then just make the button a toggle
5522
- if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount == 1){
5523
- // click
5524
- player.captionsButton.on('click',function() {
5525
- if (player.selectedTrack === null) {
5526
- lang = player.tracks[0].srclang;
5527
- } else {
5528
- lang = 'none';
5529
- }
5530
- player.setTrack(lang);
5531
- });
5532
- } else {
5533
- // hover or keyboard focus
5534
- player.captionsButton.on( 'mouseenter focusin', function() {
5535
- $(this).find('.mejs-captions-selector').removeClass('mejs-offscreen');
5536
- })
5537
-
5538
- // handle clicks to the language radio buttons
5539
- .on('click','input[type=radio]',function() {
5540
- lang = this.value;
5541
- player.setTrack(lang);
5542
- });
5543
-
5544
- player.captionsButton.on( 'mouseleave focusout', function() {
5545
- $(this).find(".mejs-captions-selector").addClass("mejs-offscreen");
5546
- });
5547
-
5548
- }
5549
-
5550
- if (!player.options.alwaysShowControls) {
5551
- // move with controls
5552
- player.container
5553
- .bind('controlsshown', function () {
5554
- // push captions above controls
5555
- player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
5556
-
5557
- })
5558
- .bind('controlshidden', function () {
5559
- if (!media.paused) {
5560
- // move back to normal place
5561
- player.container.find('.mejs-captions-position').removeClass('mejs-captions-position-hover');
5562
- }
5563
- });
5564
- } else {
5565
- player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
5566
- }
5567
-
5568
- player.trackToLoad = -1;
5569
- player.selectedTrack = null;
5570
- player.isLoadingTrack = false;
5571
-
5572
- // add to list
5573
- for (i=0; i<player.tracks.length; i++) {
5574
- kind = player.tracks[i].kind;
5575
- if (kind === 'subtitles' || kind === 'captions') {
5576
- player.addTrackButton(player.tracks[i].srclang, player.tracks[i].label);
5577
- }
5578
- }
5579
-
5580
- // start loading tracks
5581
- player.loadNextTrack();
5582
-
5583
- media.addEventListener('timeupdate',function() {
5584
- player.displayCaptions();
5585
- }, false);
5586
-
5587
- if (player.options.slidesSelector !== '') {
5588
- player.slidesContainer = $(player.options.slidesSelector);
5589
-
5590
- media.addEventListener('timeupdate',function() {
5591
- player.displaySlides();
5592
- }, false);
5593
-
5594
- }
5595
-
5596
- media.addEventListener('loadedmetadata', function() {
5597
- player.displayChapters();
5598
- }, false);
5599
-
5600
- player.container.hover(
5601
- function () {
5602
- // chapters
5603
- if (player.hasChapters) {
5604
- player.chapters.removeClass('mejs-offscreen');
5605
- player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());
5606
- }
5607
- },
5608
- function () {
5609
- if (player.hasChapters && !media.paused) {
5610
- player.chapters.fadeOut(200, function() {
5611
- $(this).addClass('mejs-offscreen');
5612
- $(this).css('display','block');
5613
- });
5614
- }
5615
- });
5616
-
5617
- t.container.on('controlsresize', function() {
5618
- t.adjustLanguageBox();
5619
- });
5620
-
5621
- // check for autoplay
5622
- if (player.node.getAttribute('autoplay') !== null) {
5623
- player.chapters.addClass('mejs-offscreen');
5624
- }
5625
- },
5626
-
5627
- setTrack: function(lang){
5628
-
5629
- var t = this,
5630
- i;
5631
-
5632
- if (lang == 'none') {
5633
- t.selectedTrack = null;
5634
- t.captionsButton.removeClass('mejs-captions-enabled');
5635
- } else {
5636
- for (i=0; i<t.tracks.length; i++) {
5637
- if (t.tracks[i].srclang == lang) {
5638
- if (t.selectedTrack === null)
5639
- t.captionsButton.addClass('mejs-captions-enabled');
5640
- t.selectedTrack = t.tracks[i];
5641
- t.captions.attr('lang', t.selectedTrack.srclang);
5642
- t.displayCaptions();
5643
- break;
5644
- }
5645
- }
5646
- }
5647
- },
5648
-
5649
- loadNextTrack: function() {
5650
- var t = this;
5651
-
5652
- t.trackToLoad++;
5653
- if (t.trackToLoad < t.tracks.length) {
5654
- t.isLoadingTrack = true;
5655
- t.loadTrack(t.trackToLoad);
5656
- } else {
5657
- // add done?
5658
- t.isLoadingTrack = false;
5659
-
5660
- t.checkForTracks();
5661
- }
5662
- },
5663
-
5664
- loadTrack: function(index){
5665
- var
5666
- t = this,
5667
- track = t.tracks[index],
5668
- after = function() {
5669
-
5670
- track.isLoaded = true;
5671
-
5672
- t.enableTrackButton(track.srclang, track.label);
5673
-
5674
- t.loadNextTrack();
5675
-
5676
- };
5677
-
5678
-
5679
- if (track.src !== undefined || track.src !== "") {
5680
- $.ajax({
5681
- url: track.src,
5682
- dataType: "text",
5683
- success: function(d) {
5684
-
5685
- // parse the loaded file
5686
- if (typeof d == "string" && (/<tt\s+xml/ig).exec(d)) {
5687
- track.entries = mejs.TrackFormatParser.dfxp.parse(d);
5688
- } else {
5689
- track.entries = mejs.TrackFormatParser.webvtt.parse(d);
5690
- }
5691
-
5692
- after();
5693
-
5694
- if (track.kind == 'chapters') {
5695
- t.media.addEventListener('play', function() {
5696
- if (t.media.duration > 0) {
5697
- t.displayChapters(track);
5698
- }
5699
- }, false);
5700
- }
5701
-
5702
- if (track.kind == 'slides') {
5703
- t.setupSlides(track);
5704
- }
5705
- },
5706
- error: function() {
5707
- t.removeTrackButton(track.srclang);
5708
- t.loadNextTrack();
5709
- }
5710
- });
5711
- }
5712
- },
5713
-
5714
- enableTrackButton: function(lang, label) {
5715
- var t = this;
5716
-
5717
- if (label === '') {
5718
- label = mejs.language.codes[lang] || lang;
5719
- }
5720
-
5721
- t.captionsButton
5722
- .find('input[value=' + lang + ']')
5723
- .prop('disabled',false)
5724
- .siblings('label')
5725
- .html( label );
5726
-
5727
- // auto select
5728
- if (t.options.startLanguage == lang) {
5729
- $('#' + t.id + '_captions_' + lang).prop('checked', true).trigger('click');
5730
- }
5731
-
5732
- t.adjustLanguageBox();
5733
- },
5734
-
5735
- removeTrackButton: function(lang) {
5736
- var t = this;
5737
-
5738
- t.captionsButton.find('input[value=' + lang + ']').closest('li').remove();
5739
-
5740
- t.adjustLanguageBox();
5741
- },
5742
-
5743
- addTrackButton: function(lang, label) {
5744
- var t = this;
5745
- if (label === '') {
5746
- label = mejs.language.codes[lang] || lang;
5747
- }
5748
-
5749
- t.captionsButton.find('ul').append(
5750
- $('<li>'+
5751
- '<input type="radio" name="' + t.id + '_captions" id="' + t.id + '_captions_' + lang + '" value="' + lang + '" disabled="disabled" />' +
5752
- '<label for="' + t.id + '_captions_' + lang + '">' + label + ' (loading)' + '</label>'+
5753
- '</li>')
5754
- );
5755
-
5756
- t.adjustLanguageBox();
5757
-
5758
- // remove this from the dropdownlist (if it exists)
5759
- t.container.find('.mejs-captions-translations option[value=' + lang + ']').remove();
5760
- },
5761
-
5762
- adjustLanguageBox:function() {
5763
- var t = this;
5764
- // adjust the size of the outer box
5765
- t.captionsButton.find('.mejs-captions-selector').height(
5766
- t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true) +
5767
- t.captionsButton.find('.mejs-captions-translations').outerHeight(true)
5768
- );
5769
- },
5770
-
5771
- checkForTracks: function() {
5772
- var
5773
- t = this,
5774
- hasSubtitles = false;
5775
-
5776
- // check if any subtitles
5777
- if (t.options.hideCaptionsButtonWhenEmpty) {
5778
- for (var i=0; i<t.tracks.length; i++) {
5779
- var kind = t.tracks[i].kind;
5780
- if ((kind === 'subtitles' || kind === 'captions') && t.tracks[i].isLoaded) {
5781
- hasSubtitles = true;
5782
- break;
5783
- }
5784
- }
5785
-
5786
- if (!hasSubtitles) {
5787
- t.captionsButton.hide();
5788
- t.setControlsSize();
5789
- }
5790
- }
5791
- },
5792
-
5793
- displayCaptions: function() {
5794
-
5795
- if (typeof this.tracks == 'undefined')
5796
- return;
5797
-
5798
- var
5799
- t = this,
5800
- i,
5801
- track = t.selectedTrack;
5802
-
5803
- if (track !== null && track.isLoaded) {
5804
- for (i=0; i<track.entries.times.length; i++) {
5805
- if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop) {
5806
- // Set the line before the timecode as a class so the cue can be targeted if needed
5807
- t.captionsText.html(track.entries.text[i]).attr('class', 'mejs-captions-text ' + (track.entries.times[i].identifier || ''));
5808
- t.captions.show().height(0);
5809
- return; // exit out if one is visible;
5810
- }
5811
- }
5812
- t.captions.hide();
5813
- } else {
5814
- t.captions.hide();
5815
- }
5816
- },
5817
-
5818
- setupSlides: function(track) {
5819
- var t = this;
5820
-
5821
- t.slides = track;
5822
- t.slides.entries.imgs = [t.slides.entries.text.length];
5823
- t.showSlide(0);
5824
-
5825
- },
5826
-
5827
- showSlide: function(index) {
5828
- if (typeof this.tracks == 'undefined' || typeof this.slidesContainer == 'undefined') {
5829
- return;
5830
- }
5831
-
5832
- var t = this,
5833
- url = t.slides.entries.text[index],
5834
- img = t.slides.entries.imgs[index];
5835
-
5836
- if (typeof img == 'undefined' || typeof img.fadeIn == 'undefined') {
5837
-
5838
- t.slides.entries.imgs[index] = img = $('<img src="' + url + '">')
5839
- .on('load', function() {
5840
- img.appendTo(t.slidesContainer)
5841
- .hide()
5842
- .fadeIn()
5843
- .siblings(':visible')
5844
- .fadeOut();
5845
-
5846
- });
5847
-
5848
- } else {
5849
-
5850
- if (!img.is(':visible') && !img.is(':animated')) {
5851
-
5852
- //
5853
-
5854
- img.fadeIn()
5855
- .siblings(':visible')
5856
- .fadeOut();
5857
- }
5858
- }
5859
-
5860
- },
5861
-
5862
- displaySlides: function() {
5863
-
5864
- if (typeof this.slides == 'undefined')
5865
- return;
5866
-
5867
- var
5868
- t = this,
5869
- slides = t.slides,
5870
- i;
5871
-
5872
- for (i=0; i<slides.entries.times.length; i++) {
5873
- if (t.media.currentTime >= slides.entries.times[i].start && t.media.currentTime <= slides.entries.times[i].stop){
5874
-
5875
- t.showSlide(i);
5876
-
5877
- return; // exit out if one is visible;
5878
- }
5879
- }
5880
- },
5881
-
5882
- displayChapters: function() {
5883
- var
5884
- t = this,
5885
- i;
5886
-
5887
- for (i=0; i<t.tracks.length; i++) {
5888
- if (t.tracks[i].kind == 'chapters' && t.tracks[i].isLoaded) {
5889
- t.drawChapters(t.tracks[i]);
5890
- t.hasChapters = true;
5891
- break;
5892
- }
5893
- }
5894
- },
5895
-
5896
- drawChapters: function(chapters) {
5897
- var
5898
- t = this,
5899
- i,
5900
- dur,
5901
- //width,
5902
- //left,
5903
- percent = 0,
5904
- usedPercent = 0;
5905
-
5906
- t.chapters.empty();
5907
-
5908
- for (i=0; i<chapters.entries.times.length; i++) {
5909
- dur = chapters.entries.times[i].stop - chapters.entries.times[i].start;
5910
- percent = Math.floor(dur / t.media.duration * 100);
5911
- if (percent + usedPercent > 100 || // too large
5912
- i == chapters.entries.times.length-1 && percent + usedPercent < 100) // not going to fill it in
5913
- {
5914
- percent = 100 - usedPercent;
5915
- }
5916
- //width = Math.floor(t.width * dur / t.media.duration);
5917
- //left = Math.floor(t.width * chapters.entries.times[i].start / t.media.duration);
5918
- //if (left + width > t.width) {
5919
- // width = t.width - left;
5920
- //}
5921
-
5922
- t.chapters.append( $(
5923
- '<div class="mejs-chapter" rel="' + chapters.entries.times[i].start + '" style="left: ' + usedPercent.toString() + '%;width: ' + percent.toString() + '%;">' +
5924
- '<div class="mejs-chapter-block' + ((i==chapters.entries.times.length-1) ? ' mejs-chapter-block-last' : '') + '">' +
5925
- '<span class="ch-title">' + chapters.entries.text[i] + '</span>' +
5926
- '<span class="ch-time">' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start, t.options) + '&ndash;' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop, t.options) + '</span>' +
5927
- '</div>' +
5928
- '</div>'));
5929
- usedPercent += percent;
5930
- }
5931
-
5932
- t.chapters.find('div.mejs-chapter').click(function() {
5933
- t.media.setCurrentTime( parseFloat( $(this).attr('rel') ) );
5934
- if (t.media.paused) {
5935
- t.media.play();
5936
- }
5937
- });
5938
-
5939
- t.chapters.show();
5940
- }
5941
- });
5942
-
5943
-
5944
-
5945
- mejs.language = {
5946
- codes: {
5947
- af:'Afrikaans',
5948
- sq:'Albanian',
5949
- ar:'Arabic',
5950
- be:'Belarusian',
5951
- bg:'Bulgarian',
5952
- ca:'Catalan',
5953
- zh:'Chinese',
5954
- 'zh-cn':'Chinese Simplified',
5955
- 'zh-tw':'Chinese Traditional',
5956
- hr:'Croatian',
5957
- cs:'Czech',
5958
- da:'Danish',
5959
- nl:'Dutch',
5960
- en:'English',
5961
- et:'Estonian',
5962
- fl:'Filipino',
5963
- fi:'Finnish',
5964
- fr:'French',
5965
- gl:'Galician',
5966
- de:'German',
5967
- el:'Greek',
5968
- ht:'Haitian Creole',
5969
- iw:'Hebrew',
5970
- hi:'Hindi',
5971
- hu:'Hungarian',
5972
- is:'Icelandic',
5973
- id:'Indonesian',
5974
- ga:'Irish',
5975
- it:'Italian',
5976
- ja:'Japanese',
5977
- ko:'Korean',
5978
- lv:'Latvian',
5979
- lt:'Lithuanian',
5980
- mk:'Macedonian',
5981
- ms:'Malay',
5982
- mt:'Maltese',
5983
- no:'Norwegian',
5984
- fa:'Persian',
5985
- pl:'Polish',
5986
- pt:'Portuguese',
5987
- // 'pt-pt':'Portuguese (Portugal)',
5988
- ro:'Romanian',
5989
- ru:'Russian',
5990
- sr:'Serbian',
5991
- sk:'Slovak',
5992
- sl:'Slovenian',
5993
- es:'Spanish',
5994
- sw:'Swahili',
5995
- sv:'Swedish',
5996
- tl:'Tagalog',
5997
- th:'Thai',
5998
- tr:'Turkish',
5999
- uk:'Ukrainian',
6000
- vi:'Vietnamese',
6001
- cy:'Welsh',
6002
- yi:'Yiddish'
6003
- }
6004
- };
6005
-
6006
- /*
6007
- Parses WebVTT format which should be formatted as
6008
- ================================
6009
- WEBVTT
6010
-
6011
- 1
6012
- 00:00:01,1 --> 00:00:05,000
6013
- A line of text
6014
-
6015
- 2
6016
- 00:01:15,1 --> 00:02:05,000
6017
- A second line of text
6018
-
6019
- ===============================
6020
-
6021
- Adapted from: http://www.delphiki.com/html5/playr
6022
- */
6023
- mejs.TrackFormatParser = {
6024
- webvtt: {
6025
- pattern_timecode: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
6026
-
6027
- parse: function(trackText) {
6028
- var
6029
- i = 0,
6030
- lines = mejs.TrackFormatParser.split2(trackText, /\r?\n/),
6031
- entries = {text:[], times:[]},
6032
- timecode,
6033
- text,
6034
- identifier;
6035
- for(; i<lines.length; i++) {
6036
- timecode = this.pattern_timecode.exec(lines[i]);
6037
-
6038
- if (timecode && i<lines.length) {
6039
- if ((i - 1) >= 0 && lines[i - 1] !== '') {
6040
- identifier = lines[i - 1];
6041
- }
6042
- i++;
6043
- // grab all the (possibly multi-line) text that follows
6044
- text = lines[i];
6045
- i++;
6046
- while(lines[i] !== '' && i<lines.length){
6047
- text = text + '\n' + lines[i];
6048
- i++;
6049
- }
6050
- text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
6051
- // Text is in a different array so I can use .join
6052
- entries.text.push(text);
6053
- entries.times.push(
6054
- {
6055
- identifier: identifier,
6056
- start: (mejs.Utility.convertSMPTEtoSeconds(timecode[1]) === 0) ? 0.200 : mejs.Utility.convertSMPTEtoSeconds(timecode[1]),
6057
- stop: mejs.Utility.convertSMPTEtoSeconds(timecode[3]),
6058
- settings: timecode[5]
6059
- });
6060
- }
6061
- identifier = '';
6062
- }
6063
- return entries;
6064
- }
6065
- },
6066
- // Thanks to Justin Capella: https://github.com/johndyer/mediaelement/pull/420
6067
- dfxp: {
6068
- parse: function(trackText) {
6069
- trackText = $(trackText).filter("tt");
6070
- var
6071
- i = 0,
6072
- container = trackText.children("div").eq(0),
6073
- lines = container.find("p"),
6074
- styleNode = trackText.find("#" + container.attr("style")),
6075
- styles,
6076
- text,
6077
- entries = {text:[], times:[]};
6078
-
6079
-
6080
- if (styleNode.length) {
6081
- var attributes = styleNode.removeAttr("id").get(0).attributes;
6082
- if (attributes.length) {
6083
- styles = {};
6084
- for (i = 0; i < attributes.length; i++) {
6085
- styles[attributes[i].name.split(":")[1]] = attributes[i].value;
6086
- }
6087
- }
6088
- }
6089
-
6090
- for(i = 0; i<lines.length; i++) {
6091
- var style;
6092
- var _temp_times = {
6093
- start: null,
6094
- stop: null,
6095
- style: null
6096
- };
6097
- if (lines.eq(i).attr("begin")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("begin"));
6098
- if (!_temp_times.start && lines.eq(i-1).attr("end")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i-1).attr("end"));
6099
- if (lines.eq(i).attr("end")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("end"));
6100
- if (!_temp_times.stop && lines.eq(i+1).attr("begin")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i+1).attr("begin"));
6101
- if (styles) {
6102
- style = "";
6103
- for (var _style in styles) {
6104
- style += _style + ":" + styles[_style] + ";";
6105
- }
6106
- }
6107
- if (style) _temp_times.style = style;
6108
- if (_temp_times.start === 0) _temp_times.start = 0.200;
6109
- entries.times.push(_temp_times);
6110
- text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
6111
- entries.text.push(text);
6112
- }
6113
- return entries;
6114
- }
6115
- },
6116
- split2: function (text, regex) {
6117
- // normal version for compliant browsers
6118
- // see below for IE fix
6119
- return text.split(regex);
6120
- }
6121
- };
6122
-
6123
- // test for browsers with bad String.split method.
6124
- if ('x\n\ny'.split(/\n/gi).length != 3) {
6125
- // add super slow IE8 and below version
6126
- mejs.TrackFormatParser.split2 = function(text, regex) {
6127
- var
6128
- parts = [],
6129
- chunk = '',
6130
- i;
6131
-
6132
- for (i=0; i<text.length; i++) {
6133
- chunk += text.substring(i,i+1);
6134
- if (regex.test(chunk)) {
6135
- parts.push(chunk.replace(regex, ''));
6136
- chunk = '';
6137
- }
6138
- }
6139
- parts.push(chunk);
6140
- return parts;
6141
- };
6142
- }
6143
-
6144
- })(mejs.$);
6145
-
6146
- // Source Chooser Plugin
6147
- (function($) {
6148
-
6149
- $.extend(mejs.MepDefaults, {
6150
- sourcechooserText: ''
6151
- });
6152
-
6153
- $.extend(MediaElementPlayer.prototype, {
6154
- buildsourcechooser: function(player, controls, layers, media) {
6155
-
6156
- var
6157
- t = this,
6158
- sourceTitle = t.options.sourcechooserText ? t.options.sourcechooserText : mejs.i18n.t('mejs.source-chooser'),
6159
- hoverTimeout
6160
- ;
6161
-
6162
- player.sourcechooserButton =
6163
- $('<div class="mejs-button mejs-sourcechooser-button">'+
6164
- '<button type="button" role="button" aria-haspopup="true" aria-owns="' + t.id + '" title="' + sourceTitle + '" aria-label="' + sourceTitle + '"></button>'+
6165
- '<div class="mejs-sourcechooser-selector mejs-offscreen" role="menu" aria-expanded="false" aria-hidden="true">'+
6166
- '<ul>'+
6167
- '</ul>'+
6168
- '</div>'+
6169
- '</div>')
6170
- .appendTo(controls)
6171
-
6172
- // hover
6173
- .hover(function() {
6174
- clearTimeout(hoverTimeout);
6175
- player.showSourcechooserSelector();
6176
- }, function() {
6177
- var self = $(this);
6178
- hoverTimeout = setTimeout(function () {
6179
- player.hideSourcechooserSelector();
6180
- }, 500);
6181
- })
6182
-
6183
- // keyboard menu activation
6184
- .on('keydown', function (e) {
6185
- var keyCode = e.keyCode;
6186
-
6187
- switch (keyCode) {
6188
- case 32: // space
6189
- if (!mejs.MediaFeatures.isFirefox) { // space sends the click event in Firefox
6190
- player.showSourcechooserSelector();
6191
- }
6192
- $(this).find('.mejs-sourcechooser-selector')
6193
- .find('input[type=radio]:checked').first().focus();
6194
- break;
6195
- case 13: // enter
6196
- player.showSourcechooserSelector();
6197
- $(this).find('.mejs-sourcechooser-selector')
6198
- .find('input[type=radio]:checked').first().focus();
6199
- break;
6200
- case 27: // esc
6201
- player.hideSourcechooserSelector();
6202
- $(this).find('button').focus();
6203
- break;
6204
- default:
6205
- return true;
6206
- }
6207
- })
6208
-
6209
- // close menu when tabbing away
6210
- .on('focusout', mejs.Utility.debounce(function (e) { // Safari triggers focusout multiple times
6211
- // Firefox does NOT support e.relatedTarget to see which element
6212
- // just lost focus, so wait to find the next focused element
6213
- setTimeout(function () {
6214
- var parent = $(document.activeElement).closest('.mejs-sourcechooser-selector');
6215
- if (!parent.length) {
6216
- // focus is outside the control; close menu
6217
- player.hideSourcechooserSelector();
6218
- }
6219
- }, 0);
6220
- }, 100))
6221
-
6222
- // handle clicks to the source radio buttons
6223
- .delegate('input[type=radio]', 'click', function() {
6224
- // set aria states
6225
- $(this).attr('aria-selected', true).attr('checked', 'checked');
6226
- $(this).closest('.mejs-sourcechooser-selector').find('input[type=radio]').not(this).attr('aria-selected', 'false').removeAttr('checked');
6227
-
6228
- var src = this.value;
6229
-
6230
- if (media.currentSrc != src) {
6231
- var currentTime = media.currentTime;
6232
- var paused = media.paused;
6233
- media.pause();
6234
- media.setSrc(src);
6235
-
6236
- media.addEventListener('loadedmetadata', function(e) {
6237
- media.currentTime = currentTime;
6238
- }, true);
6239
-
6240
- var canPlayAfterSourceSwitchHandler = function(e) {
6241
- if (!paused) {
6242
- media.play();
6243
- }
6244
- media.removeEventListener("canplay", canPlayAfterSourceSwitchHandler, true);
6245
- };
6246
- media.addEventListener('canplay', canPlayAfterSourceSwitchHandler, true);
6247
- media.load();
6248
- }
6249
- })
6250
-
6251
- // Handle click so that screen readers can toggle the menu
6252
- .delegate('button', 'click', function (e) {
6253
- if ($(this).siblings('.mejs-sourcechooser-selector').hasClass('mejs-offscreen')) {
6254
- player.showSourcechooserSelector();
6255
- $(this).siblings('.mejs-sourcechooser-selector').find('input[type=radio]:checked').first().focus();
6256
- } else {
6257
- player.hideSourcechooserSelector();
6258
- }
6259
- });
6260
-
6261
- // add to list
6262
- for (var i in this.node.children) {
6263
- var src = this.node.children[i];
6264
- if (src.nodeName === 'SOURCE' && (media.canPlayType(src.type) == 'probably' || media.canPlayType(src.type) == 'maybe')) {
6265
- player.addSourceButton(src.src, src.title, src.type, media.src == src.src);
6266
- }
6267
- }
6268
- },
6269
-
6270
- addSourceButton: function(src, label, type, isCurrent) {
6271
- var t = this;
6272
- if (label === '' || label == undefined) {
6273
- label = src;
6274
- }
6275
- type = type.split('/')[1];
6276
-
6277
- t.sourcechooserButton.find('ul').append(
6278
- $('<li>'+
6279
- '<input type="radio" name="' + t.id + '_sourcechooser" id="' + t.id + '_sourcechooser_' + label + type + '" role="menuitemradio" value="' + src + '" ' + (isCurrent ? 'checked="checked"' : '') + 'aria-selected="' + isCurrent + '"' + ' />'+
6280
- '<label for="' + t.id + '_sourcechooser_' + label + type + '" aria-hidden="true">' + label + ' (' + type + ')</label>'+
6281
- '</li>')
6282
- );
6283
-
6284
- t.adjustSourcechooserBox();
6285
-
6286
- },
6287
-
6288
- adjustSourcechooserBox: function() {
6289
- var t = this;
6290
- // adjust the size of the outer box
6291
- t.sourcechooserButton.find('.mejs-sourcechooser-selector').height(
6292
- t.sourcechooserButton.find('.mejs-sourcechooser-selector ul').outerHeight(true)
6293
- );
6294
- },
6295
-
6296
- hideSourcechooserSelector: function () {
6297
- this.sourcechooserButton.find('.mejs-sourcechooser-selector')
6298
- .addClass('mejs-offscreen')
6299
- .attr('aria-expanded', 'false')
6300
- .attr('aria-hidden', 'true')
6301
- .find('input[type=radio]') // make radios not fucusable
6302
- .attr('tabindex', '-1');
6303
- },
6304
-
6305
- showSourcechooserSelector: function () {
6306
- this.sourcechooserButton.find('.mejs-sourcechooser-selector')
6307
- .removeClass('mejs-offscreen')
6308
- .attr('aria-expanded', 'true')
6309
- .attr('aria-hidden', 'false')
6310
- .find('input[type=radio]')
6311
- .attr('tabindex', '0');
6312
- }
6313
- });
6314
-
6315
- })(mejs.$);
6316
-
6317
- /*
6318
- * ContextMenu Plugin
6319
- *
6320
- *
6321
- */
6322
-
6323
- (function($) {
6324
-
6325
- $.extend(mejs.MepDefaults,
6326
- { 'contextMenuItems': [
6327
- // demo of a fullscreen option
6328
- {
6329
- render: function(player) {
6330
-
6331
- // check for fullscreen plugin
6332
- if (typeof player.enterFullScreen == 'undefined')
6333
- return null;
6334
-
6335
- if (player.isFullScreen) {
6336
- return mejs.i18n.t('mejs.fullscreen-off');
6337
- } else {
6338
- return mejs.i18n.t('mejs.fullscreen-on');
6339
- }
6340
- },
6341
- click: function(player) {
6342
- if (player.isFullScreen) {
6343
- player.exitFullScreen();
6344
- } else {
6345
- player.enterFullScreen();
6346
- }
6347
- }
6348
- }
6349
- ,
6350
- // demo of a mute/unmute button
6351
- {
6352
- render: function(player) {
6353
- if (player.media.muted) {
6354
- return mejs.i18n.t('mejs.unmute');
6355
- } else {
6356
- return mejs.i18n.t('mejs.mute');
6357
- }
6358
- },
6359
- click: function(player) {
6360
- if (player.media.muted) {
6361
- player.setMuted(false);
6362
- } else {
6363
- player.setMuted(true);
6364
- }
6365
- }
6366
- },
6367
- // separator
6368
- {
6369
- isSeparator: true
6370
- }
6371
- ,
6372
- // demo of simple download video
6373
- {
6374
- render: function(player) {
6375
- return mejs.i18n.t('mejs.download-video');
6376
- },
6377
- click: function(player) {
6378
- window.location.href = player.media.currentSrc;
6379
- }
6380
- }
6381
- ]}
6382
- );
6383
-
6384
-
6385
- $.extend(MediaElementPlayer.prototype, {
6386
- buildcontextmenu: function(player, controls, layers, media) {
6387
-
6388
- // create context menu
6389
- player.contextMenu = $('<div class="mejs-contextmenu"></div>')
6390
- .appendTo($('body'))
6391
- .hide();
6392
-
6393
- // create events for showing context menu
6394
- player.container.bind('contextmenu', function(e) {
6395
- if (player.isContextMenuEnabled) {
6396
- e.preventDefault();
6397
- player.renderContextMenu(e.clientX-1, e.clientY-1);
6398
- return false;
6399
- }
6400
- });
6401
- player.container.bind('click', function() {
6402
- player.contextMenu.hide();
6403
- });
6404
- player.contextMenu.bind('mouseleave', function() {
6405
-
6406
- //
6407
- player.startContextMenuTimer();
6408
-
6409
- });
6410
- },
6411
-
6412
- cleancontextmenu: function(player) {
6413
- player.contextMenu.remove();
6414
- },
6415
-
6416
- isContextMenuEnabled: true,
6417
- enableContextMenu: function() {
6418
- this.isContextMenuEnabled = true;
6419
- },
6420
- disableContextMenu: function() {
6421
- this.isContextMenuEnabled = false;
6422
- },
6423
-
6424
- contextMenuTimeout: null,
6425
- startContextMenuTimer: function() {
6426
- //
6427
-
6428
- var t = this;
6429
-
6430
- t.killContextMenuTimer();
6431
-
6432
- t.contextMenuTimer = setTimeout(function() {
6433
- t.hideContextMenu();
6434
- t.killContextMenuTimer();
6435
- }, 750);
6436
- },
6437
- killContextMenuTimer: function() {
6438
- var timer = this.contextMenuTimer;
6439
-
6440
- //
6441
-
6442
- if (timer != null) {
6443
- clearTimeout(timer);
6444
- delete timer;
6445
- timer = null;
6446
- }
6447
- },
6448
-
6449
- hideContextMenu: function() {
6450
- this.contextMenu.hide();
6451
- },
6452
-
6453
- renderContextMenu: function(x,y) {
6454
-
6455
- // alway re-render the items so that things like "turn fullscreen on" and "turn fullscreen off" are always written correctly
6456
- var t = this,
6457
- html = '',
6458
- items = t.options.contextMenuItems;
6459
-
6460
- for (var i=0, il=items.length; i<il; i++) {
6461
-
6462
- if (items[i].isSeparator) {
6463
- html += '<div class="mejs-contextmenu-separator"></div>';
6464
- } else {
6465
-
6466
- var rendered = items[i].render(t);
6467
-
6468
- // render can return null if the item doesn't need to be used at the moment
6469
- if (rendered != null) {
6470
- html += '<div class="mejs-contextmenu-item" data-itemindex="' + i + '" id="element-' + (Math.random()*1000000) + '">' + rendered + '</div>';
6471
- }
6472
- }
6473
- }
6474
-
6475
- // position and show the context menu
6476
- t.contextMenu
6477
- .empty()
6478
- .append($(html))
6479
- .css({top:y, left:x})
6480
- .show();
6481
-
6482
- // bind events
6483
- t.contextMenu.find('.mejs-contextmenu-item').each(function() {
6484
-
6485
- // which one is this?
6486
- var $dom = $(this),
6487
- itemIndex = parseInt( $dom.data('itemindex'), 10 ),
6488
- item = t.options.contextMenuItems[itemIndex];
6489
-
6490
- // bind extra functionality?
6491
- if (typeof item.show != 'undefined')
6492
- item.show( $dom , t);
6493
-
6494
- // bind click action
6495
- $dom.click(function() {
6496
- // perform click action
6497
- if (typeof item.click != 'undefined')
6498
- item.click(t);
6499
-
6500
- // close
6501
- t.contextMenu.hide();
6502
- });
6503
- });
6504
-
6505
- // stop the controls from hiding
6506
- setTimeout(function() {
6507
- t.killControlsTimer('rev3');
6508
- }, 100);
6509
-
6510
- }
6511
- });
6512
-
6513
- })(mejs.$);
6514
- (function($) {
6515
- // skip back button
6516
-
6517
- $.extend(mejs.MepDefaults, {
6518
- skipBackInterval: 30,
6519
- // %1 will be replaced with skipBackInterval in this string
6520
- skipBackText: ''
6521
- });
6522
-
6523
- $.extend(MediaElementPlayer.prototype, {
6524
- buildskipback: function(player, controls, layers, media) {
6525
- var
6526
- t = this,
6527
- defaultTitle = mejs.i18n.t('mejs.time-skip-back', t.options.skipBackInterval),
6528
- skipTitle = t.options.skipBackText ? t.options.skipBackText : defaultTitle,
6529
- // create the loop button
6530
- loop =
6531
- $('<div class="mejs-button mejs-skip-back-button">' +
6532
- '<button type="button" aria-controls="' + t.id + '" title="' + skipTitle + '" aria-label="' + skipTitle + '">' + t.options.skipBackInterval + '</button>' +
6533
- '</div>')
6534
- // append it to the toolbar
6535
- .appendTo(controls)
6536
- // add a click toggle event
6537
- .click(function() {
6538
- media.setCurrentTime(Math.max(media.currentTime - t.options.skipBackInterval, 0));
6539
- $(this).find('button').blur();
6540
- });
6541
- }
6542
- });
6543
-
6544
- })(mejs.$);
6545
-
6546
- /**
6547
- * Postroll plugin
6548
- */
6549
- (function($) {
6550
-
6551
- $.extend(mejs.MepDefaults, {
6552
- postrollCloseText: ''
6553
- });
6554
-
6555
- // Postroll
6556
- $.extend(MediaElementPlayer.prototype, {
6557
- buildpostroll: function(player, controls, layers, media) {
6558
- var
6559
- t = this,
6560
- postrollTitle = t.options.postrollCloseText ? t.options.postrollCloseText : mejs.i18n.t('mejs.close'),
6561
- postrollLink = t.container.find('link[rel="postroll"]').attr('href');
6562
-
6563
- if (typeof postrollLink !== 'undefined') {
6564
- player.postroll =
6565
- $('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">' + postrollTitle + '</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(layers).hide();
6566
-
6567
- t.media.addEventListener('ended', function (e) {
6568
- $.ajax({
6569
- dataType: 'html',
6570
- url: postrollLink,
6571
- success: function (data, textStatus) {
6572
- layers.find('.mejs-postroll-layer-content').html(data);
6573
- }
6574
- });
6575
- player.postroll.show();
6576
- }, false);
6577
- }
6578
- }
6579
- });
6580
-
6581
- })(mejs.$);
6582
- /*
6583
- MediaElement-Markers is a MediaElement.js plugin that lets you add Visual Cues in the progress time rail.
6584
- This plugin also lets you register a custom callback function that will be called everytime the play position reaches a marker.
6585
- Marker position and a reference to the MediaElement Player object is passed to the registered callback function for any post processing. Marker color is configurable.
6586
-
6587
- */
6588
-
6589
- (function ($) {
6590
- // markers
6591
-
6592
- $.extend(mejs.MepDefaults, {
6593
- markerColor: '#E9BC3D', //default marker color
6594
- markers: [],
6595
- markerCallback: function () {
6596
-
6597
- }
6598
- });
6599
-
6600
- $.extend(MediaElementPlayer.prototype, {
6601
- buildmarkers: function (player, controls, layers, media) {
6602
- var t = this,
6603
- i = 0,
6604
- currentPos = -1,
6605
- currentMarker = -1,
6606
- lastPlayPos = -1, //Track backward seek
6607
- lastMarkerCallBack = -1; //Prevents successive firing of callbacks
6608
-
6609
- for (i = 0; i < player.options.markers.length; ++i) {
6610
- controls.find('.mejs-time-total').append('<span class="mejs-time-marker"></span>');
6611
- }
6612
-
6613
- media.addEventListener('durationchange', function (e) {
6614
- player.setmarkers(controls);
6615
- });
6616
- media.addEventListener('timeupdate', function (e) {
6617
- currentPos = Math.floor(media.currentTime);
6618
- if (lastPlayPos > currentPos) {
6619
- if (lastMarkerCallBack > currentPos) {
6620
- lastMarkerCallBack = -1;
6621
- }
6622
- } else {
6623
- lastPlayPos = currentPos;
6624
- }
6625
-
6626
- for (i = 0; i < player.options.markers.length; ++i) {
6627
- currentMarker = Math.floor(player.options.markers[i]);
6628
- if (currentPos === currentMarker && currentMarker !== lastMarkerCallBack) {
6629
- player.options.markerCallback(media, media.currentTime); //Fires the callback function
6630
- lastMarkerCallBack = currentMarker;
6631
- }
6632
- }
6633
-
6634
- }, false);
6635
-
6636
- },
6637
- setmarkers: function (controls) {
6638
- var t = this,
6639
- i = 0,
6640
- left;
6641
-
6642
- for (i = 0; i < t.options.markers.length; ++i) {
6643
- if (Math.floor(t.options.markers[i]) <= t.media.duration && Math.floor(t.options.markers[i]) >= 0) {
6644
- left = 100 * Math.floor(t.options.markers[i]) / t.media.duration;
6645
- $(controls.find('.mejs-time-marker')[i]).css({
6646
- "width": "1px",
6647
- "left": left+"%",
6648
- "background": t.options.markerColor
6649
- });
6650
- }
6651
- }
6652
-
6653
- }
6654
- });
6655
- })(mejs.$);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mediaelement-and-player.min.js DELETED
@@ -1,43 +0,0 @@
1
- /*!
2
- *
3
- * MediaElement.js
4
- * HTML5 <video> and <audio> shim and player
5
- * http://mediaelementjs.com/
6
- *
7
- * Creates a JavaScript object that mimics HTML5 MediaElement API
8
- * for browsers that don't understand HTML5 or can't play the provided codec
9
- * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
10
- *
11
- * Copyright 2010-2014, John Dyer (http://j.hn)
12
- * License: MIT
13
- *
14
- */
15
- var mejs=mejs||{};mejs.version="2.23.5",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mp4","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL","audio/ogg"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;i<len;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}},determineScheme:function(a){return a&&-1!=a.indexOf("://")?a.substr(0,a.indexOf("://")+3):"//"},debounce:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},isNodeAfter:function(a,b){return!!(a&&b&&"function"==typeof a.compareDocumentPosition&&a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_PRECEDING)}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svgAsImg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.supportsPointerEvents=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}(),c.hasFirefoxPluginMovingProblem=!1,c.hasiOSFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasiOSFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasiOSFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasiOSFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?1==this.pluginApi.getPlayerState()&&this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?this.pluginApi.setVolume(100*a):this.pluginApi.setVolume(a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b,c){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:null},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id)}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,customError:"",success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=h?f.getAttribute("src"):f.getAttribute("href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"",c.scheme=mejs.Utility.determineScheme(c.url),"native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!==a.tagName.toLowerCase(),scheme:""};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),r.isVideo&&mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),r.isVideo&&mejs.MediaFeatures.isChromium&&(a.canPlayType=function(a){return null!==a.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),c&&("auto"===b.mode||"auto_plugin"===b.mode||"native"===b.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||b.httpsBasicAuthSite!==!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("mejs.download-file")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}if(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),"flash"===a.method||"silverlight"===a.method){var r="audio/mp4"===j.getAttribute("type"),s=j.getElementsByTagName("source");if(s&&!r)for(var p=0,t=s.length;t>p;p++)"audio/mp4"===s[p].getAttribute("type")&&(r=!0);i=["id="+m,"isvideo="+(a.isVideo||r?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&("flash"==a.method?i.push("file="+mejs.Utility.encodeUrl(a.url)):i.push("file="+a.url)),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),window[m+"_init"]=function(){switch(n.pluginType){case"flash":n.pluginElement=n.pluginApi=document.getElementById(m);break;case"silverlight":n.pluginElement=document.getElementById(n.id),n.pluginApi=n.pluginElement.Content.MediaElementJS}null!=n.pluginApi&&n.success&&n.success(n,j)},window[m+"_event"]=function(a,b){var c,d,e;c={type:a,target:n};for(d in b)n[d]=b[d],c[d]=b[d];e=b.bufferedTime||0,c.target.buffered=c.buffered={start:function(a){return 0},end:function(a){return e},length:1},n.dispatchEvent(c)}}switch(a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var u;if(-1!=a.url.lastIndexOf("youtu.be"))u=a.url.substr(a.url.lastIndexOf("/")+1),-1!=u.indexOf("?")&&(u=u.substr(0,u.indexOf("?")));else{var v=a.url.match(/[?&]v=([^&#]+)|&|#|$/);v&&(u=v[1])}youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:u,height:l,width:k,scheme:a.scheme,variables:b.youtubeIframeVars},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,b);break;case"vimeo":var w=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="'+a.scheme+"player.vimeo.com/video/"+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+w+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+w+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var x=$f(o.childNodes[0]),y=-1;x.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}x.playVideo=function(){x.api("play")},x.stopVideo=function(){x.api("unload")},x.pauseVideo=function(){x.api("pause")},x.seekTo=function(a){x.api("seekTo",a)},x.setVolume=function(a){x.api("setVolume",a)},x.setMuted=function(a){a?(x.lastVolume=x.api("getVolume"),x.api("setVolume",0)):(x.api("setVolume",x.lastVolume),delete x.lastVolume)},x.getPlayerState=function(){return y},x.addEvent("play",function(){y=1,a(x,n,"play"),a(x,n,"playing")}),x.addEvent("pause",function(){y=2,a(x,n,"pause")}),x.addEvent("finish",function(){y=0,a(x,n,"ended")}),x.addEvent("playProgress",function(b){a(x,n,"timeupdate",b)}),x.addEvent("seek",function(b){y=3,a(x,n,"seeked",b)}),x.addEvent("loadProgress",function(b){y=3,a(x,n,"progress",b)}),n.pluginElement=o,n.pluginApi=x,n.success(n,n.pluginElement)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b,c,d){var e,f=a.htmlMediaElement;for(e in mejs.HtmlMediaElement)f[e]=mejs.HtmlMediaElement[e];return b.success(f,f),f}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(a){if(!this.isIframeStarted){var b=document.createElement("script");b.src=a.scheme+"www.youtube.com/player_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(a),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c={controls:0,wmode:"transparent"},d=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:mejs.$.extend({},c,a.variables),events:{onReady:function(c){d.setVideoSize=function(a,b){d.setSize(a,b)},a.pluginMediaElement.pluginApi=d,a.pluginMediaElement.pluginElement=document.getElementById(a.containerId),b.success(b,b.pluginElement),mejs.YouTubeApi.createEvent(d,b,"canplay"),setInterval(function(){mejs.YouTubeApi.createEvent(d,b,"timeupdate")},250),"undefined"!=typeof b.attributes.autoplay&&d.playVideo()},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,d,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(a){return 0},end:function(a){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c=a.scheme+"www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+a.scheme+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,b.success(d,d.pluginElement),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b,c,d){var e={"default":"en",locale:{language:c.i18n&&c.i18n.locale.language||"",strings:c.i18n&&c.i18n.locale.strings||{}},pluralForms:[function(){return arguments[1]},function(){var a=arguments;return 1===a[0]?a[1]:a[2]},function(){var a=arguments;return[0,1].indexOf(a[0])>-1?a[1]:a[2]},function(){var a=arguments;return a[0]%10===1&&a[0]%100!==11?a[1]:0!==a[0]?a[2]:a[3]},function(){var a=arguments;return 1===a[0]||11===a[0]?a[1]:2===a[0]||12===a[0]?a[2]:a[0]>2&&a[0]<20?a[3]:a[4]},function(){return 1===args[0]?args[1]:0===args[0]||args[0]%100>0&&args[0]%100<20?args[2]:args[3]},function(){var a=arguments;return a[0]%10===1&&a[0]%100!==11?a[1]:a[0]%10>=2&&(a[0]%100<10||a[0]%100>=20)?a[2]:[3]},function(){var a=arguments;return a[0]%10===1&&a[0]%100!==11?a[1]:a[0]%10>=2&&a[0]%10<=4&&(a[0]%100<10||a[0]%100>=20)?a[2]:a[3]},function(){var a=arguments;return 1===a[0]?a[1]:a[0]>=2&&a[0]<=4?a[2]:a[3]},function(){var a=arguments;return 1===a[0]?a[1]:a[0]%10>=2&&a[0]%10<=4&&(a[0]%100<10||a[0]%100>=20)?a[2]:a[3]},function(){var a=arguments;return a[0]%100===1?a[2]:a[0]%100===2?a[3]:a[0]%100===3||a[0]%100===4?a[4]:a[1]},function(){var a=arguments;return 1===a[0]?a[1]:2===a[0]?a[2]:a[0]>2&&a[0]<7?a[3]:a[0]>6&&a[0]<11?a[4]:a[5]},function(){var a=arguments;return 0===a[0]?a[1]:1===a[0]?a[2]:2===a[0]?a[3]:a[0]%100>=3&&a[0]%100<=10?a[4]:a[0]%100>=11?a[5]:a[6]},function(){var a=arguments;return 1===a[0]?a[1]:0===a[0]||a[0]%100>1&&a[0]%100<11?a[2]:a[0]%100>10&&a[0]%100<20?a[3]:a[4]},function(){var a=arguments;return a[0]%10===1?a[1]:a[0]%10===2?a[2]:a[3]},function(){var a=arguments;return 11!==a[0]&&a[0]%10===1?a[1]:a[2]},function(){var a=arguments;return 1===a[0]?a[1]:a[0]%10>=2&&a[0]%10<=4&&(a[0]%100<10||a[0]%100>=20)?a[2]:a[3]},function(){var a=arguments;return 1===a[0]?a[1]:2===a[0]?a[2]:8!==a[0]&&11!==a[0]?a[3]:a[4]},function(){var a=arguments;return 0===a[0]?a[1]:a[2]},function(){var a=arguments;return 1===a[0]?a[1]:2===a[0]?a[2]:3===a[0]?a[3]:a[4]},function(){var a=arguments;return 0===a[0]?a[1]:1===a[0]?a[2]:a[3]}],getLanguage:function(){var a=e.locale.language||e["default"];return/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/.exec(a)?a:e["default"]},t:function(a,b){if("string"==typeof a&&a.length){var c,d,f=e.getLanguage(),g=function(a,b,c){return"object"!=typeof a||"number"!=typeof b||"number"!=typeof c?a:"string"==typeof a?a:e.pluralForms[c].apply(null,[b].concat(a))},h=function(a){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return a.replace(/[&<>"]/g,function(a){return b[a]})};return e.locale.strings&&e.locale.strings[f]&&(c=e.locale.strings[f][a],"number"==typeof b&&(d=e.locale.strings[f]["mejs.plural-form"],c=g.apply(null,[c,b,d]))),!c&&e.locale.strings&&e.locale.strings[e["default"]]&&(c=e.locale.strings[e["default"]][a],"number"==typeof b&&(d=e.locale.strings[e["default"]]["mejs.plural-form"],c=g.apply(null,[c,b,d]))),c=c||a,"number"==typeof b&&(c=c.replace("%1",b)),h(c)}return a}};"undefined"!=typeof mejsL10n&&(e.locale.language=mejsL10n.language),c.i18n=e}(document,window,mejs),function(a,b){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!
16
- * This is a i18n.locale language object.
17
- *
18
- * English; This can serve as a template for other languages to translate
19
- *
20
- * @author
21
- * TBD
22
- * Sascha Greuel (Twitter: @SoftCreatR)
23
- *
24
- * @see
25
- * me-i18n.js
26
- *
27
- * @params
28
- * - exports - CommonJS, window ..
29
- */
30
- function(a){"use strict";void 0===a.en&&(a.en={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.fullscreen-off":"Turn off Fullscreen","mejs.fullscreen-on":"Go Fullscreen","mejs.download-video":"Download Video","mejs.fullscreen":"Fullscreen","mejs.time-jump-forward":["Jump forward 1 second","Jump forward %1 seconds"],"mejs.play":"Play","mejs.pause":"Pause","mejs.close":"Close","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.time-skip-back":["Skip back 1 second","Skip back %1 seconds"],"mejs.captions-subtitles":"Captions/Subtitles","mejs.none":"None","mejs.mute-toggle":"Mute Toggle","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.ad-skip":"Skip ad","mejs.ad-skip-info":["Skip in 1 second","Skip in %1 seconds"],"mejs.source-chooser":"Source Chooser"})}(mejs.i18n.locale.strings),/*!
31
- *
32
- * MediaElementPlayer
33
- * http://mediaelementjs.com/
34
- *
35
- * Creates a controller bar for HTML5 <video> add <audio> tags
36
- * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
37
- *
38
- * Copyright 2010-2013, John Dyer (http://j.hn/)
39
- * License: MIT
40
- *
41
- */
42
- "undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(a){var b=$(this).width();return a&&(b+=parseInt($(this).css("margin-right"),10),b+=parseInt($(this).css("margin-left"),10)),b}):"undefined"!=typeof ender&&(mejs.$=ender),function(a){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return.05*a.duration},defaultSeekForwardInterval:function(a){return.05*a.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,controlsTimeoutDefault:1500,controlsTimeoutMouseEnter:2500,controlsTimeoutMouseLeave:1e3,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,stretching:"auto",enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(a,b,c,d){mejs.MediaFeatures.isFirefox||(b.paused||b.ended?b.play():b.pause())}},{keys:[38],action:function(a,b,c,d){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.min(b.volume+.1,1);b.setVolume(e)}},{keys:[40],action:function(a,b,c,d){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.max(b.volume-.1,0);b.setVolume(e)}},{keys:[37,227],action:function(a,b,c,d){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(e)}}},{keys:[39,228],action:function(a,b,c,d){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(e)}}},{keys:[70],action:function(a,b,c,d){"undefined"!=typeof a.enterFullScreen&&(a.isFullScreen?a.exitFullScreen():a.enterFullScreen())}},{keys:[77],action:function(a,b,c,d){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer()),a.media.muted?a.setMuted(!1):a.setMuted(!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(b,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(b,c);var d=this;return d.$media=d.$node=a(b),d.node=d.media=d.$media[0],d.node?"undefined"!=typeof d.node.player?d.node.player:("undefined"==typeof c&&(c=d.$node.data("mejsoptions")),d.options=a.extend({},mejs.MepDefaults,c),d.options.timeFormat||(d.options.timeFormat="mm:ss",d.options.alwaysShowHours&&(d.options.timeFormat="hh:mm:ss"),d.options.showTimecodeFrameCount&&(d.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,d.options,d.options.framesPerSecond||25),d.id="mep_"+mejs.mepIndex++,mejs.players[d.id]=d,d.init(),d):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var b=this,c=mejs.MediaFeatures,d=a.extend(!0,{},b.options,{success:function(a,c){b.meReady(a,c)},error:function(a){b.handleError(a)}}),e=b.media.tagName.toLowerCase();if(b.isDynamic="audio"!==e&&"video"!==e,b.isDynamic?b.isVideo=b.options.isVideo:b.isVideo="audio"!==e&&b.options.isVideo,c.isiPad&&b.options.iPadUseNativeControls||c.isiPhone&&b.options.iPhoneUseNativeControls)b.$media.attr("controls","controls"),c.isiPad&&null!==b.media.getAttribute("autoplay")&&b.play();else if(c.isAndroid&&b.options.AndroidUseNativeControls);else if(b.isVideo||!b.isVideo&&b.options.features.length){b.$media.removeAttr("controls");var f=b.isVideo?mejs.i18n.t("mejs.video-player"):mejs.i18n.t("mejs.audio-player");a('<span class="mejs-offscreen">'+f+"</span>").insertBefore(b.$media),b.container=a('<div id="'+b.id+'" class="mejs-container '+(mejs.MediaFeatures.svgAsImg?"svg":"no-svg")+'" tabindex="0" role="application" aria-label="'+f+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media).focus(function(a){if(!b.controlsAreVisible&&!b.hasFocus&&b.controlsEnabled&&(b.showControls(!0),!b.hasMsNativeFullScreen)){var c=".mejs-playpause-button > button";mejs.Utility.isNodeAfter(a.relatedTarget,b.container[0])&&(c=".mejs-controls .mejs-button:last-child > button");var d=b.container.find(c);d.focus()}}),b.options.features.length||b.container.css("background","transparent").find(".mejs-controls").hide(),b.isVideo&&"fill"===b.options.stretching&&!b.container.parent("mejs-fill-container").length&&(b.outerContainer=b.$media.parent(),b.container.wrap('<div class="mejs-fill-container"/>')),b.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(b.isVideo?"mejs-video ":"mejs-audio ")),b.container.find(".mejs-mediaelement").append(b.$media),b.node.player=b,b.controls=b.container.find(".mejs-controls"),b.layers=b.container.find(".mejs-layers");var g=b.isVideo?"video":"audio",h=g.substring(0,1).toUpperCase()+g.substring(1);b.options[g+"Width"]>0||b.options[g+"Width"].toString().indexOf("%")>-1?b.width=b.options[g+"Width"]:""!==b.media.style.width&&null!==b.media.style.width?b.width=b.media.style.width:null!==b.media.getAttribute("width")?b.width=b.$media.attr("width"):b.width=b.options["default"+h+"Width"],b.options[g+"Height"]>0||b.options[g+"Height"].toString().indexOf("%")>-1?b.height=b.options[g+"Height"]:""!==b.media.style.height&&null!==b.media.style.height?b.height=b.media.style.height:null!==b.$media[0].getAttribute("height")?b.height=b.$media.attr("height"):b.height=b.options["default"+h+"Height"],b.setPlayerSize(b.width,b.height),d.pluginWidth=b.width,d.pluginHeight=b.height}else b.isVideo||b.options.features.length||b.$media.hide();mejs.MediaElement(b.$media[0],d),"undefined"!=typeof b.container&&b.options.features.length&&b.controlsAreVisible&&b.container.trigger("controlsshown")},showControls:function(a){var b=this;a="undefined"==typeof a||a,b.controlsAreVisible||(a?(b.controls.removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0,b.container.trigger("controlsshown")}),b.container.find(".mejs-control").removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0})):(b.controls.removeClass("mejs-offscreen").css("display","block"),b.container.find(".mejs-control").removeClass("mejs-offscreen").css("display","block"),b.controlsAreVisible=!0,b.container.trigger("controlsshown")),b.setControlsSize())},hideControls:function(b){var c=this;b="undefined"==typeof b||b,!c.controlsAreVisible||c.options.alwaysShowControls||c.keyboardAction||c.media.paused||c.media.ended||(b?(c.controls.stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")}),c.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block")})):(c.controls.addClass("mejs-offscreen").css("display","block"),c.container.find(".mejs-control").addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(a){var b=this;a="undefined"!=typeof a?a:b.options.controlsTimeoutDefault,b.killControlsTimer("start"),b.controlsTimer=setTimeout(function(){b.hideControls(),b.killControlsTimer("hide")},a)},killControlsTimer:function(a){var b=this;null!==b.controlsTimer&&(clearTimeout(b.controlsTimer),delete b.controlsTimer,b.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var a=this;a.killControlsTimer(),a.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var a=this;a.showControls(!1),a.controlsEnabled=!0},meReady:function(b,c){var d,e,f=this,g=mejs.MediaFeatures,h=c.getAttribute("autoplay"),i=!("undefined"==typeof h||null===h||"false"===h);if(!f.created){if(f.created=!0,f.media=b,f.domNode=c,!(g.isAndroid&&f.options.AndroidUseNativeControls||g.isiPad&&f.options.iPadUseNativeControls||g.isiPhone&&f.options.iPhoneUseNativeControls)){if(!f.isVideo&&!f.options.features.length)return i&&"native"==b.pluginType&&f.play(),void(f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f)));f.buildposter(f,f.controls,f.layers,f.media),f.buildkeyboard(f,f.controls,f.layers,f.media),f.buildoverlays(f,f.controls,f.layers,f.media),f.findTracks();for(d in f.options.features)if(e=f.options.features[d],f["build"+e])try{f["build"+e](f,f.controls,f.layers,f.media)}catch(j){}f.container.trigger("controlsready"),f.setPlayerSize(f.width,f.height),f.setControlsSize(),f.isVideo&&(mejs.MediaFeatures.hasTouch&&!f.options.alwaysShowControls?f.$media.bind("touchstart",function(){f.controlsAreVisible?f.hideControls(!1):f.controlsEnabled&&f.showControls(!1)}):(f.clickToPlayPauseCallback=function(){if(f.options.clickToPlayPause){f.media.paused?f.play():f.pause();var a=f.$media.closest(".mejs-container").find(".mejs-overlay-button"),b=a.attr("aria-pressed");a.attr("aria-pressed",!b)}},f.media.addEventListener("click",f.clickToPlayPauseCallback,!1),f.container.bind("mouseenter",function(){f.controlsEnabled&&(f.options.alwaysShowControls||(f.killControlsTimer("enter"),f.showControls(),f.startControlsTimer(f.options.controlsTimeoutMouseEnter)))}).bind("mousemove",function(){f.controlsEnabled&&(f.controlsAreVisible||f.showControls(),f.options.alwaysShowControls||f.startControlsTimer(f.options.controlsTimeoutMouseEnter))}).bind("mouseleave",function(){f.controlsEnabled&&(f.media.paused||f.options.alwaysShowControls||f.startControlsTimer(f.options.controlsTimeoutMouseLeave))})),f.options.hideVideoControlsOnLoad&&f.hideControls(!1),i&&!f.options.alwaysShowControls&&f.hideControls(),f.options.enableAutosize&&f.media.addEventListener("loadedmetadata",function(a){f.options.videoHeight<=0&&null===f.domNode.getAttribute("height")&&!isNaN(a.target.videoHeight)&&(f.setPlayerSize(a.target.videoWidth,a.target.videoHeight),f.setControlsSize(),f.media.setVideoSize(a.target.videoWidth,a.target.videoHeight))},!1)),f.media.addEventListener("play",function(){var a;for(a in mejs.players){var b=mejs.players[a];b.id==f.id||!f.options.pauseOtherPlayers||b.paused||b.ended||b.pause(),b.hasFocus=!1}f.hasFocus=!0},!1),f.media.addEventListener("ended",function(b){if(f.options.autoRewind)try{f.media.setCurrentTime(0),window.setTimeout(function(){a(f.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(c){}"youtube"===f.media.pluginType?f.media.stop():f.media.pause(),f.setProgressRail&&f.setProgressRail(),f.setCurrentRail&&f.setCurrentRail(),f.options.loop?f.play():!f.options.alwaysShowControls&&f.controlsEnabled&&f.showControls()},!1),f.media.addEventListener("loadedmetadata",function(){mejs.Utility.calculateTimeFormat(f.duration,f.options,f.options.framesPerSecond||25),f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.isFullScreen||(f.setPlayerSize(f.width,f.height),f.setControlsSize())},!1);var k=null;f.media.addEventListener("timeupdate",function(){k!==this.duration&&(k=this.duration,mejs.Utility.calculateTimeFormat(k,f.options,f.options.framesPerSecond||25),f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.setControlsSize())},!1),f.container.focusout(function(b){if(b.relatedTarget){var c=a(b.relatedTarget);f.keyboardAction&&0===c.parents(".mejs-container").length&&(f.keyboardAction=!1,f.isVideo&&!f.options.alwaysShowControls&&f.hideControls(!0))}}),setTimeout(function(){f.setPlayerSize(f.width,f.height),f.setControlsSize()},50),f.globalBind("resize",function(){f.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||f.setPlayerSize(f.width,f.height),f.setControlsSize()}),"youtube"==f.media.pluginType&&(g.isiOS||g.isAndroid)&&(f.container.find(".mejs-overlay-play").hide(),f.container.find(".mejs-poster").hide())}i&&"native"==b.pluginType&&f.play(),f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f))}},handleError:function(a){var b=this;b.controls&&b.controls.hide(),b.options.error&&b.options.error(a)},setPlayerSize:function(a,b){var c=this;if(!c.options.setDimensions)return!1;switch("undefined"!=typeof a&&(c.width=a),"undefined"!=typeof b&&(c.height=b),c.options.stretching){case"fill":c.isVideo?this.setFillMode():this.setDimensions(c.width,c.height);break;case"responsive":this.setResponsiveMode();break;case"none":this.setDimensions(c.width,c.height);break;default:this.hasFluidMode()===!0?this.setResponsiveMode():this.setDimensions(c.width,c.height)}},hasFluidMode:function(){var a=this;return a.height.toString().indexOf("%")>0||"none"!==a.$node.css("max-width")&&"t.width"!==a.$node.css("max-width")||a.$node[0].currentStyle&&"100%"===a.$node[0].currentStyle.maxWidth},setResponsiveMode:function(){var b=this,c=function(){return b.isVideo?b.media.videoWidth&&b.media.videoWidth>0?b.media.videoWidth:null!==b.media.getAttribute("width")?b.media.getAttribute("width"):b.options.defaultVideoWidth:b.options.defaultAudioWidth}(),d=function(){return b.isVideo?b.media.videoHeight&&b.media.videoHeight>0?b.media.videoHeight:null!==b.media.getAttribute("height")?b.media.getAttribute("height"):b.options.defaultVideoHeight:b.options.defaultAudioHeight}(),e=b.container.parent().closest(":visible").width(),f=b.container.parent().closest(":visible").height(),g=b.isVideo||!b.options.autosizeProgress?parseInt(e*d/c,10):d;(isNaN(g)||0!==f&&g>f&&f>d)&&(g=f),b.container.parent().length>0&&"body"===b.container.parent()[0].tagName.toLowerCase()&&(e=a(window).width(),g=a(window).height()),g&&e&&(b.container.width(e).height(g),b.$media.add(b.container.find(".mejs-shim")).width("100%").height("100%"),b.isVideo&&b.media.setVideoSize&&b.media.setVideoSize(e,g),b.layers.children(".mejs-layer").width("100%").height("100%"))},setFillMode:function(){var a=this,b=a.outerContainer;b.width()||b.height(a.$media.width()),b.height()||b.height(a.$media.height());var c=b.width(),d=b.height();a.setDimensions("100%","100%"),a.container.find(".mejs-poster img").css("display","block"),targetElement=a.container.find("object, embed, iframe, video");var e=a.height,f=a.width,g=c,h=e*c/f,i=f*d/e,j=d,k=!(i>c),l=k?Math.floor(g):Math.floor(i),m=k?Math.floor(h):Math.floor(j);k?(targetElement.height(m).width(c),a.media.setVideoSize&&a.media.setVideoSize(c,m)):(targetElement.height(d).width(l),a.media.setVideoSize&&a.media.setVideoSize(l,d)),targetElement.css({"margin-left":Math.floor((c-l)/2),"margin-top":0})},setDimensions:function(a,b){var c=this;c.container.width(a).height(b),c.layers.children(".mejs-layer").width(a).height(b)},setControlsSize:function(){var b=this,c=0,d=0,e=b.controls.find(".mejs-time-rail"),f=b.controls.find(".mejs-time-total"),g=e.siblings(),h=g.last(),i=null,j=b.options&&!b.options.autosizeProgress;if(b.container.is(":visible")&&e.length&&e.is(":visible")){j&&(d=parseInt(e.css("width"),10)),0!==d&&d||(g.each(function(){var b=a(this);"absolute"!=b.css("position")&&b.is(":visible")&&(c+=a(this).outerWidth(!0))}),d=b.controls.width()-c-(e.outerWidth(!0)-e.width()));do j||e.width(d),f.width(d-(f.outerWidth(!0)-f.width())),"absolute"!=h.css("position")&&(i=h.length?h.position():null,d--);while(null!==i&&i.top.toFixed(2)>0&&d>0);b.container.trigger("controlsresize")}},buildposter:function(b,c,d,e){var f=this,g=a('<div class="mejs-poster mejs-layer"></div>').appendTo(d),h=b.$media.attr("poster");""!==b.options.poster&&(h=b.options.poster),h?f.setPoster(h):g.hide(),e.addEventListener("play",function(){g.hide()},!1),b.options.showPosterWhenEnded&&b.options.autoRewind&&e.addEventListener("ended",function(){g.show()},!1)},setPoster:function(b){var c=this,d=c.container.find(".mejs-poster"),e=d.find("img");0===e.length&&(e=a('<img width="100%" height="100%" alt="" />').appendTo(d)),e.attr("src",b),d.css({"background-image":"url("+b+")"})},buildoverlays:function(b,c,d,e){var f=this;if(b.isVideo){var g=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),h=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),i=a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button" role="button" aria-label="'+mejs.i18n.t("mejs.play")+'" aria-pressed="false"></div></div>').appendTo(d).bind("click",function(){if(f.options.clickToPlayPause){e.paused&&e.play();var b=a(this).find(".mejs-overlay-button"),c=b.attr("aria-pressed");b.attr("aria-pressed",!!c)}});e.addEventListener("play",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("playing",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("seeking",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("seeked",function(){g.hide(),c.find(".mejs-time-buffering").hide()},!1),e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||i.show()},!1),e.addEventListener("waiting",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("loadeddata",function(){g.show(),c.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(e.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var a=document.createEvent("HTMLEvents");return a.initEvent("canplay",!0,!0),e.dispatchEvent(a)}},300))},!1),e.addEventListener("canplay",function(){g.hide(),c.find(".mejs-time-buffering").hide(),clearTimeout(e.canplayTimeout)},!1),e.addEventListener("error",function(a){f.handleError(a),g.hide(),i.hide(),h.show(),h.find(".mejs-overlay-error").html("Error loading this resource")},!1),e.addEventListener("keydown",function(a){f.onkeydown(b,e,a)},!1)}},buildkeyboard:function(b,c,d,e){var f=this;f.container.keydown(function(){f.keyboardAction=!0}),f.globalBind("keydown",function(c){return b.hasFocus=0!==a(c.target).closest(".mejs-container").length&&a(c.target).closest(".mejs-container").attr("id")===b.$media.closest(".mejs-container").attr("id"),f.onkeydown(b,e,c)}),f.globalBind("click",function(c){b.hasFocus=0!==a(c.target).closest(".mejs-container").length})},onkeydown:function(a,b,c){if(a.hasFocus&&a.options.enableKeyboard)for(var d=0,e=a.options.keyActions.length;e>d;d++)for(var f=a.options.keyActions[d],g=0,h=f.keys.length;h>g;g++)if(c.keyCode==f.keys[g])return"function"==typeof c.preventDefault&&c.preventDefault(),f.action(a,b,c.keyCode,c),!1;return!0},findTracks:function(){var b=this,c=b.$media.find("track");b.tracks=[],c.each(function(c,d){d=a(d),b.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(a){this.container[0].className="mejs-container "+a,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){var b=this;if("youtube"===b.media.pluginType){var c;if("string"!=typeof a){var d,e;for(d=0;d<a.length;d++)if(e=a[d],this.canPlayType(e.type)){a=e.src;break}}if(-1!==a.lastIndexOf("youtu.be"))c=a.substr(a.lastIndexOf("/")+1),-1!==c.indexOf("?")&&(c=c.substr(0,c.indexOf("?")));else{var f=a.match(/[?&]v=([^&#]+)|&|#|$/);f&&(c=f[1])}null!==b.media.getAttribute("autoplay")?b.media.pluginApi.loadVideoById(c):b.media.pluginApi.cueVideoById(c)}else b.media.setSrc(a)},remove:function(){var a,b,c=this;c.container.prev(".mejs-offscreen").remove();for(a in c.options.features)if(b=c.options.features[a],c["clean"+b])try{c["clean"+b](c)}catch(d){}c.isDynamic?c.$node.insertBefore(c.container):(c.$media.prop("controls",!0),c.$node.clone().insertBefore(c.container).show(),c.$node.remove()),"native"!==c.media.pluginType&&c.media.remove(),delete mejs.players[c.id],"object"==typeof c.container&&c.container.remove(),c.globalUnbind(),delete c.node.player},rebuildtracks:function(){var a=this;a.findTracks(),a.buildtracks(a,a.controls,a.layers,a.media)},resetSize:function(){var a=this;setTimeout(function(){a.setPlayerSize(a.width,a.height),a.setControlsSize()},50)}},function(){function b(b,d){var e={d:[],w:[]};return a.each((b||"").split(" "),function(a,b){var f=b+"."+d;0===f.indexOf(".")?(e.d.push(f),e.w.push(f)):e[c.test(b)?"w":"d"].push(f)}),e.d=e.d.join(" "),e.w=e.w.join(" "),e}var c=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,d,e){var f=this,g=f.node?f.node.ownerDocument:document;c=b(c,f.id),c.d&&a(g).bind(c.d,d,e),c.w&&a(window).bind(c.w,d,e)},mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){var e=this,f=e.node?e.node.ownerDocument:document;c=b(c,e.id),c.d&&a(f).unbind(c.d,d),c.w&&a(window).unbind(c.w,d)}}(),"undefined"!=typeof a&&(a.fn.mediaelementplayer=function(b){return b===!1?this.each(function(){var b=a(this).data("mediaelementplayer");b&&b.remove(),a(this).removeData("mediaelementplayer")}):this.each(function(){a(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,b))}),this},a(document).ready(function(){a(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(a){a.extend(mejs.MepDefaults,{playText:"",pauseText:""}),a.extend(MediaElementPlayer.prototype,{buildplaypause:function(b,c,d,e){function f(a){"play"===a?(k.removeClass("mejs-play").addClass("mejs-pause"),l.attr({title:j,"aria-label":j})):(k.removeClass("mejs-pause").addClass("mejs-play"),l.attr({title:i,"aria-label":i}))}var g=this,h=g.options,i=h.playText?h.playText:mejs.i18n.t("mejs.play"),j=h.pauseText?h.pauseText:mejs.i18n.t("mejs.pause"),k=a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+g.id+'" title="'+i+'" aria-label="'+j+'"></button></div>').appendTo(c).click(function(a){return a.preventDefault(),e.paused?e.play():e.pause(),!1}),l=k.find("button");f("pse"),e.addEventListener("play",function(){f("play")},!1),e.addEventListener("playing",function(){f("play")},!1),e.addEventListener("pause",function(){f("pse")},!1),e.addEventListener("paused",function(){f("pse")},!1)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"}),a.extend(MediaElementPlayer.prototype,{buildstop:function(b,c,d,e){var f=this;a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+f.id+'" title="'+f.options.stopText+'" aria-label="'+f.options.stopText+'"></button></div>').appendTo(c).click(function(){e.paused||e.pause(),e.currentTime>0&&(e.setCurrentTime(0),e.pause(),c.find(".mejs-time-current").width("0px"),c.find(".mejs-time-handle").css("left","0px"),c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,b.options)),c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,b.options)),d.find(".mejs-poster").show())})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{enableProgressTooltip:!0,progressHelpText:""}),a.extend(MediaElementPlayer.prototype,{buildprogress:function(b,c,d,e){var f=this,g=!1,h=!1,i=0,j=!1,k=b.options.autoRewind,l=(f.options.progressHelpText?f.options.progressHelpText:mejs.i18n.t("mejs.time-help-text"),b.options.enableProgressTooltip?'<span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span>':"");a('<div class="mejs-time-rail"><span class="mejs-time-total mejs-time-slider"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span>'+l+"</span></div>").appendTo(c),c.find(".mejs-time-buffering").hide(),f.total=c.find(".mejs-time-total"),f.loaded=c.find(".mejs-time-loaded"),f.current=c.find(".mejs-time-current"),f.handle=c.find(".mejs-time-handle"),f.timefloat=c.find(".mejs-time-float"),f.timefloatcurrent=c.find(".mejs-time-float-current"),f.slider=c.find(".mejs-time-slider");var m=function(a){var c,d=f.total.offset(),h=f.total.width(),i=0,j=0,k=0;c=a.originalEvent&&a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.changedTouches?a.changedTouches[0].pageX:a.pageX,e.duration&&(c<d.left?c=d.left:c>h+d.left&&(c=h+d.left),k=c-d.left,i=k/h,j=.02>=i?0:i*e.duration,g&&j!==e.currentTime&&e.setCurrentTime(j),mejs.MediaFeatures.hasTouch||(f.timefloat.css("left",k),f.timefloatcurrent.html(mejs.Utility.secondsToTimeCode(j,b.options)),f.timefloat.show()))},n=function(a){var c=e.currentTime,d=mejs.i18n.t("mejs.time-slider"),g=mejs.Utility.secondsToTimeCode(c,b.options),h=e.duration;f.slider.attr({"aria-label":d,"aria-valuemin":0,"aria-valuemax":h,"aria-valuenow":c,"aria-valuetext":g,role:"slider",tabindex:0})},o=function(){var a=new Date;a-i>=1e3&&e.play()};f.slider.bind("focus",function(a){b.options.autoRewind=!1}),f.slider.bind("blur",function(a){b.options.autoRewind=k}),f.slider.bind("keydown",function(a){new Date-i>=1e3&&(j=e.paused);var c=a.keyCode,d=e.duration,f=e.currentTime,g=b.options.defaultSeekForwardInterval(e),h=b.options.defaultSeekBackwardInterval(e);switch(c){case 37:case 40:f-=h;break;case 39:case 38:f+=g;break;case 36:f=0;break;case 35:f=d;break;case 32:case 13:return void(e.paused?e.play():e.pause());default:return}return f=0>f?0:f>=d?d:Math.floor(f),i=new Date,j||e.pause(),f<e.duration&&!j&&setTimeout(o,1100),e.setCurrentTime(f),a.preventDefault(),a.stopPropagation(),!1}),f.total.bind("mousedown touchstart",function(a){(1===a.which||0===a.which)&&(g=!0,m(a),f.globalBind("mousemove.dur touchmove.dur",function(a){m(a)}),f.globalBind("mouseup.dur touchend.dur",function(a){g=!1,"undefined"!=typeof f.timefloat&&f.timefloat.hide(),f.globalUnbind(".dur")}))}).bind("mouseenter",function(a){h=!0,f.globalBind("mousemove.dur",function(a){m(a)}),"undefined"==typeof f.timefloat||mejs.MediaFeatures.hasTouch||f.timefloat.show()}).bind("mouseleave",function(a){h=!1,g||(f.globalUnbind(".dur"),"undefined"!=typeof f.timefloat&&f.timefloat.hide())}),e.addEventListener("progress",function(a){b.setProgressRail(a),b.setCurrentRail(a)},!1),e.addEventListener("timeupdate",function(a){b.setProgressRail(a),b.setCurrentRail(a),n(a)},!1),f.container.on("controlsresize",function(a){b.setProgressRail(a),b.setCurrentRail(a)})},setProgressRail:function(a){var b=this,c=void 0!==a?a.target:b.media,d=null;c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration?d=c.buffered.end(c.buffered.length-1)/c.duration:c&&void 0!==c.bytesTotal&&c.bytesTotal>0&&void 0!==c.bufferedBytes?d=c.bufferedBytes/c.bytesTotal:a&&a.lengthComputable&&0!==a.total&&(d=a.loaded/a.total),null!==d&&(d=Math.min(1,Math.max(0,d)),b.loaded&&b.total&&b.loaded.width(b.total.width()*d))},setCurrentRail:function(){var a=this;if(void 0!==a.media.currentTime&&a.media.duration&&a.total&&a.handle){var b=Math.round(a.total.width()*a.media.currentTime/a.media.duration),c=b-Math.round(a.handle.outerWidth(!0)/2);a.current.width(b),a.handle.css("left",c)}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"}),a.extend(MediaElementPlayer.prototype,{buildcurrent:function(b,c,d,e){var f=this;a('<div class="mejs-time" role="timer" aria-live="off"><span class="mejs-currenttime">'+mejs.Utility.secondsToTimeCode(0,b.options)+"</span></div>").appendTo(c),f.currenttime=f.controls.find(".mejs-currenttime"),e.addEventListener("timeupdate",function(){f.controlsAreVisible&&b.updateCurrent()},!1)},buildduration:function(b,c,d,e){var f=this;c.children().last().find(".mejs-currenttime").length>0?a(f.options.timeAndDurationSeparator+'<span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span>").appendTo(c.find(".mejs-time")):(c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span></div>").appendTo(c)),f.durationD=f.controls.find(".mejs-duration"),e.addEventListener("timeupdate",function(){f.controlsAreVisible&&b.updateDuration()},!1)},updateCurrent:function(){var a=this,b=a.media.currentTime;isNaN(b)&&(b=0),a.currenttime&&a.currenttime.html(mejs.Utility.secondsToTimeCode(b,a.options))},updateDuration:function(){var a=this,b=a.media.duration;a.options.duration>0&&(b=a.options.duration),isNaN(b)&&(b=0),a.container.toggleClass("mejs-long-video",b>3600),a.durationD&&b>0&&a.durationD.html(mejs.Utility.secondsToTimeCode(b,a.options))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("mejs.mute-toggle"),allyVolumeControlText:mejs.i18n.t("mejs.volume-help-text"),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),a.extend(MediaElementPlayer.prototype,{buildvolume:function(b,c,d,e){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var f=this,g=f.isVideo?f.options.videoVolume:f.options.audioVolume,h="horizontal"==g?a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button></div><a href="javascript:void(0);" class="mejs-horizontal-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></a>').appendTo(c):a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button><a href="javascript:void(0);" class="mejs-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></a></div>').appendTo(c),i=f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),j=f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),k=f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),l=f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(a,b){if(!i.is(":visible")&&"undefined"==typeof b)return i.show(),m(a,!0),void i.hide();a=Math.max(0,a),a=Math.min(a,1),0===a?(h.removeClass("mejs-mute").addClass("mejs-unmute"),h.children("button").attr("title",mejs.i18n.t("mejs.unmute")).attr("aria-label",mejs.i18n.t("mejs.unmute"))):(h.removeClass("mejs-unmute").addClass("mejs-mute"),h.children("button").attr("title",mejs.i18n.t("mejs.mute")).attr("aria-label",mejs.i18n.t("mejs.mute")));var c=j.position();if("vertical"==g){var d=j.height(),e=d-d*a;l.css("top",Math.round(c.top+e-l.height()/2)),k.height(d-e),k.css("top",c.top+e)}else{var f=j.width(),n=f*a;l.css("left",Math.round(c.left+n-l.width()/2)),k.width(Math.round(n))}},n=function(a){var b=null,c=j.offset();if("vertical"===g){var d=j.height(),f=a.pageY-c.top;if(b=(d-f)/d,0===c.top||0===c.left)return}else{var h=j.width(),i=a.pageX-c.left;b=i/h;
43
- }b=Math.max(0,b),b=Math.min(b,1),m(b),0===b?e.setMuted(!0):e.setMuted(!1),e.setVolume(b)},o=!1,p=!1;h.hover(function(){i.show(),p=!0},function(){p=!1,o||"vertical"!=g||i.hide()});var q=function(a){var b=Math.floor(100*e.volume);i.attr({"aria-label":mejs.i18n.t("mejs.volume-slider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":b,"aria-valuetext":b+"%",role:"slider",tabindex:0})};i.bind("mouseover",function(){p=!0}).bind("mousedown",function(a){return n(a),f.globalBind("mousemove.vol",function(a){n(a)}),f.globalBind("mouseup.vol",function(){o=!1,f.globalUnbind(".vol"),p||"vertical"!=g||i.hide()}),o=!0,!1}).bind("keydown",function(a){var b=a.keyCode,c=e.volume;switch(b){case 38:c=Math.min(c+.1,1);break;case 40:c=Math.max(0,c-.1);break;default:return!0}return o=!1,m(c),e.setVolume(c),!1}),h.find("button").click(function(){e.setMuted(!e.muted)}),h.find("button").bind("focus",function(){i.show()}),e.addEventListener("volumechange",function(a){o||(e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))),q(a)},!1),0===b.options.startVolume&&e.setMuted(!0),"native"===e.pluginType&&e.setVolume(b.options.startVolume),f.container.on("controlsresize",function(){e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:""}),a.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,fullscreenMode:"",buildfullscreen:function(b,c,d,e){if(b.isVideo){b.isInIframe=window.location!=window.parent.location,e.addEventListener("loadstart",function(){b.detectFullscreenMode()});var f=this,g=null,h=f.options.fullscreenText?f.options.fullscreenText:mejs.i18n.t("mejs.fullscreen"),i=a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+f.id+'" title="'+h+'" aria-label="'+h+'"></button></div>').appendTo(c).on("click",function(){var a=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen;a?b.exitFullScreen():b.enterFullScreen()}).on("mouseover",function(){if("plugin-hover"==f.fullscreenMode){null!==g&&(clearTimeout(g),delete g);var a=i.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!0)}}).on("mouseout",function(){"plugin-hover"==f.fullscreenMode&&(null!==g&&(clearTimeout(g),delete g),g=setTimeout(function(){e.hideFullscreenButton()},1500))});if(b.fullscreenBtn=i,f.globalBind("keydown",function(a){27==a.keyCode&&(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||f.isFullScreen)&&b.exitFullScreen()}),f.normalHeight=0,f.normalWidth=0,mejs.MediaFeatures.hasTrueNativeFullScreen){var j=function(a){b.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(b.isNativeFullScreen=!0,b.setControlsSize()):(b.isNativeFullScreen=!1,b.exitFullScreen()))};b.globalBind(mejs.MediaFeatures.fullScreenEventName,j)}}},detectFullscreenMode:function(){var a=this,b="",c=mejs.MediaFeatures;return c.hasTrueNativeFullScreen&&"native"===a.media.pluginType?b="native-native":c.hasTrueNativeFullScreen&&"native"!==a.media.pluginType&&!c.hasFirefoxPluginMovingProblem?b="plugin-native":a.usePluginFullScreen?mejs.MediaFeatures.supportsPointerEvents?(b="plugin-click",a.createPluginClickThrough()):b="plugin-hover":b="fullwindow",a.fullscreenMode=b,b},isPluginClickThroughCreated:!1,createPluginClickThrough:function(){var b=this;if(!b.isPluginClickThroughCreated){var c,d,e=!1,f=function(){if(e){for(var a in g)g[a].hide();b.fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),b.media.removeEventListener("click",b.clickToPlayPauseCallback),e=!1}},g={},h=["top","left","right","bottom"],i=function(){var a=fullscreenBtn.offset().left-b.container.offset().left,d=fullscreenBtn.offset().top-b.container.offset().top,e=fullscreenBtn.outerWidth(!0),f=fullscreenBtn.outerHeight(!0),h=b.container.width(),i=b.container.height();for(c in g)g[c].css({position:"absolute",top:0,left:0});g.top.width(h).height(d),g.left.width(a).height(f).css({top:d}),g.right.width(h-a-e).height(f).css({top:d,left:a+e}),g.bottom.width(h).height(i-f-d).css({top:d+f})};for(b.globalBind("resize",function(){i()}),c=0,d=h.length;d>c;c++)g[h[c]]=a('<div class="mejs-fullscreen-hover" />').appendTo(b.container).mouseover(f).hide();fullscreenBtn.on("mouseover",function(){if(!b.isFullScreen){var a=fullscreenBtn.offset(),d=player.container.offset();media.positionFullscreenButton(a.left-d.left,a.top-d.top,!1),b.fullscreenBtn.css("pointer-events","none"),b.controls.css("pointer-events","none"),b.media.addEventListener("click",b.clickToPlayPauseCallback);for(c in g)g[c].show();i(),e=!0}}),media.addEventListener("fullscreenchange",function(a){b.isFullScreen=!b.isFullScreen,b.isFullScreen?b.media.removeEventListener("click",b.clickToPlayPauseCallback):b.media.addEventListener("click",b.clickToPlayPauseCallback),f()}),b.globalBind("mousemove",function(a){if(e){var c=fullscreenBtn.offset();(a.pageY<c.top||a.pageY>c.top+fullscreenBtn.outerHeight(!0)||a.pageX<c.left||a.pageX>c.left+fullscreenBtn.outerWidth(!0))&&(fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),e=!1)}}),b.isPluginClickThroughCreated=!0}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var b=this;if(mejs.MediaFeatures.isiOS&&mejs.MediaFeatures.hasiOSFullScreen&&"function"==typeof b.media.webkitEnterFullscreen)return void b.media.webkitEnterFullscreen();a(document.documentElement).addClass("mejs-fullscreen"),b.normalHeight=b.container.height(),b.normalWidth=b.container.width(),"native-native"===b.fullscreenMode||"plugin-native"===b.fullscreenMode?(mejs.MediaFeatures.requestFullScreen(b.container[0]),b.isInIframe&&setTimeout(function d(){if(b.isNativeFullScreen){var c=.002,e=a(window).width(),f=screen.width,g=Math.abs(f-e),h=f*c;g>h?b.exitFullScreen():setTimeout(d,500)}},1e3)):"fullwindow"==b.fullscreeMode,b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),b.containerSizeTimeout=setTimeout(function(){b.container.css({width:"100%",height:"100%"}),b.setControlsSize()},500),"native"===b.media.pluginType?b.$media.width("100%").height("100%"):(b.container.find(".mejs-shim").width("100%").height("100%"),setTimeout(function(){var c=a(window),d=c.width(),e=c.height();b.media.setVideoSize(d,e)},500)),b.layers.children("div").width("100%").height("100%"),b.fullscreenBtn&&b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),b.setControlsSize(),b.isFullScreen=!0;var c=Math.min(screen.width/b.width,screen.height/b.height);b.container.find(".mejs-captions-text").css("font-size",100*c+"%"),b.container.find(".mejs-captions-text").css("line-height","normal"),b.container.find(".mejs-captions-position").css("bottom","45px"),b.container.trigger("enteredfullscreen")},exitFullScreen:function(){var b=this;clearTimeout(b.containerSizeTimeout),mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),a(document.documentElement).removeClass("mejs-fullscreen"),b.container.removeClass("mejs-container-fullscreen").width(b.normalWidth).height(b.normalHeight),"native"===b.media.pluginType?b.$media.width(b.normalWidth).height(b.normalHeight):(b.container.find(".mejs-shim").width(b.normalWidth).height(b.normalHeight),b.media.setVideoSize(b.normalWidth,b.normalHeight)),b.layers.children("div").width(b.normalWidth).height(b.normalHeight),b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),b.setControlsSize(),b.isFullScreen=!1,b.container.find(".mejs-captions-text").css("font-size",""),b.container.find(".mejs-captions-text").css("line-height",""),b.container.find(".mejs-captions-position").css("bottom",""),b.container.trigger("exitedfullscreen")}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),a.extend(MediaElementPlayer.prototype,{buildspeed:function(b,c,d,e){var f=this;if("native"==f.media.pluginType){for(var g=null,h=null,i=null,j=null,k=[],l=!1,m=0,n=f.options.speeds.length;n>m;m++){var o=f.options.speeds[m];"string"==typeof o?(k.push({name:o+f.options.speedChar,value:o}),o===f.options.defaultSpeed&&(l=!0)):(k.push(o),o.value===f.options.defaultSpeed&&(l=!0))}l||k.push({name:f.options.defaultSpeed+f.options.speedChar,value:f.options.defaultSpeed}),k.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});var p=function(a){for(m=0,n=k.length;n>m;m++)if(k[m].value===a)return k[m].name},q='<div class="mejs-button mejs-speed-button"><button type="button">'+p(f.options.defaultSpeed)+'</button><div class="mejs-speed-selector"><ul>';for(m=0,il=k.length;m<il;m++)j=f.id+"-speed-"+k[m].value,q+='<li><input type="radio" name="speed" value="'+k[m].value+'" id="'+j+'" '+(k[m].value===f.options.defaultSpeed?" checked":"")+' /><label for="'+j+'" '+(k[m].value===f.options.defaultSpeed?' class="mejs-speed-selected"':"")+">"+k[m].name+"</label></li>";q+="</ul></div></div>",g=a(q).appendTo(c),h=g.find(".mejs-speed-selector"),i=f.options.defaultSpeed,e.addEventListener("loadedmetadata",function(a){i&&(e.playbackRate=parseFloat(i))},!0),h.on("click",'input[type="radio"]',function(){var b=a(this).attr("value");i=b,e.playbackRate=parseFloat(b),g.find("button").html(p(b)),g.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),g.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),g.one("mouseenter focusin",function(){h.height(g.find(".mejs-speed-selector ul").outerHeight(!0)+g.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*h.height()+"px")})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"",tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),a.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(a,b,c,d){a&&(a.captions&&a.captions.remove(),a.chapters&&a.chapters.remove(),a.captionsText&&a.captionsText.remove(),a.captionsButton&&a.captionsButton.remove())},buildtracks:function(b,c,d,e){if(0!==b.tracks.length){var f,g,h=this,i=h.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"",j=h.options.tracksText?h.options.tracksText:mejs.i18n.t("mejs.captions-subtitles");if(h.domNode.textTracks)for(f=h.domNode.textTracks.length-1;f>=0;f--)h.domNode.textTracks[f].mode="hidden";h.cleartracks(b,c,d,e),b.chapters=a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(),b.captions=a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+i+'><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(),b.captionsText=b.captions.find(".mejs-captions-text"),b.captionsButton=a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+h.id+'" title="'+j+'" aria-label="'+j+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+b.id+'_captions" id="'+b.id+'_captions_none" value="none" checked="checked" /><label for="'+b.id+'_captions_none">'+mejs.i18n.t("mejs.none")+"</label></li></ul></div></div>").appendTo(c);var k=0;for(f=0;f<b.tracks.length;f++)g=b.tracks[f].kind,("subtitles"===g||"captions"===g)&&k++;for(h.options.toggleCaptionsButtonWhenOnlyOne&&1==k?b.captionsButton.on("click",function(){null===b.selectedTrack?lang=b.tracks[0].srclang:lang="none",b.setTrack(lang)}):(b.captionsButton.on("mouseenter focusin",function(){a(this).find(".mejs-captions-selector").removeClass("mejs-offscreen")}).on("click","input[type=radio]",function(){lang=this.value,b.setTrack(lang)}),b.captionsButton.on("mouseleave focusout",function(){a(this).find(".mejs-captions-selector").addClass("mejs-offscreen")})),b.options.alwaysShowControls?b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):b.container.bind("controlsshown",function(){b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")}),b.trackToLoad=-1,b.selectedTrack=null,b.isLoadingTrack=!1,f=0;f<b.tracks.length;f++)g=b.tracks[f].kind,("subtitles"===g||"captions"===g)&&b.addTrackButton(b.tracks[f].srclang,b.tracks[f].label);b.loadNextTrack(),e.addEventListener("timeupdate",function(){b.displayCaptions()},!1),""!==b.options.slidesSelector&&(b.slidesContainer=a(b.options.slidesSelector),e.addEventListener("timeupdate",function(){b.displaySlides()},!1)),e.addEventListener("loadedmetadata",function(){b.displayChapters()},!1),b.container.hover(function(){b.hasChapters&&(b.chapters.removeClass("mejs-offscreen"),b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))},function(){b.hasChapters&&!e.paused&&b.chapters.fadeOut(200,function(){a(this).addClass("mejs-offscreen"),a(this).css("display","block")})}),h.container.on("controlsresize",function(){h.adjustLanguageBox()}),null!==b.node.getAttribute("autoplay")&&b.chapters.addClass("mejs-offscreen")}},setTrack:function(a){var b,c=this;if("none"==a)c.selectedTrack=null,c.captionsButton.removeClass("mejs-captions-enabled");else for(b=0;b<c.tracks.length;b++)if(c.tracks[b].srclang==a){null===c.selectedTrack&&c.captionsButton.addClass("mejs-captions-enabled"),c.selectedTrack=c.tracks[b],c.captions.attr("lang",c.selectedTrack.srclang),c.displayCaptions();break}},loadNextTrack:function(){var a=this;a.trackToLoad++,a.trackToLoad<a.tracks.length?(a.isLoadingTrack=!0,a.loadTrack(a.trackToLoad)):(a.isLoadingTrack=!1,a.checkForTracks())},loadTrack:function(b){var c=this,d=c.tracks[b],e=function(){d.isLoaded=!0,c.enableTrackButton(d.srclang,d.label),c.loadNextTrack()};(void 0!==d.src||""!==d.src)&&a.ajax({url:d.src,dataType:"text",success:function(a){"string"==typeof a&&/<tt\s+xml/gi.exec(a)?d.entries=mejs.TrackFormatParser.dfxp.parse(a):d.entries=mejs.TrackFormatParser.webvtt.parse(a),e(),"chapters"==d.kind&&c.media.addEventListener("play",function(){c.media.duration>0&&c.displayChapters(d)},!1),"slides"==d.kind&&c.setupSlides(d)},error:function(){c.removeTrackButton(d.srclang),c.loadNextTrack()}})},enableTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("input[value="+b+"]").prop("disabled",!1).siblings("label").html(c),d.options.startLanguage==b&&a("#"+d.id+"_captions_"+b).prop("checked",!0).trigger("click"),d.adjustLanguageBox()},removeTrackButton:function(a){var b=this;b.captionsButton.find("input[value="+a+"]").closest("li").remove(),b.adjustLanguageBox()},addTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("ul").append(a('<li><input type="radio" name="'+d.id+'_captions" id="'+d.id+"_captions_"+b+'" value="'+b+'" disabled="disabled" /><label for="'+d.id+"_captions_"+b+'">'+c+" (loading)</label></li>")),d.adjustLanguageBox(),d.container.find(".mejs-captions-translations option[value="+b+"]").remove()},adjustLanguageBox:function(){var a=this;a.captionsButton.find(".mejs-captions-selector").height(a.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+a.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var a=this,b=!1;if(a.options.hideCaptionsButtonWhenEmpty){for(var c=0;c<a.tracks.length;c++){var d=a.tracks[c].kind;if(("subtitles"===d||"captions"===d)&&a.tracks[c].isLoaded){b=!0;break}}b||(a.captionsButton.hide(),a.setControlsSize())}},displayCaptions:function(){if("undefined"!=typeof this.tracks){var a,b=this,c=b.selectedTrack;if(null!==c&&c.isLoaded){for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return b.captionsText.html(c.entries.text[a]).attr("class","mejs-captions-text "+(c.entries.times[a].identifier||"")),void b.captions.show().height(0);b.captions.hide()}else b.captions.hide()}},setupSlides:function(a){var b=this;b.slides=a,b.slides.entries.imgs=[b.slides.entries.text.length],b.showSlide(0)},showSlide:function(b){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var c=this,d=c.slides.entries.text[b],e=c.slides.entries.imgs[b];"undefined"==typeof e||"undefined"==typeof e.fadeIn?c.slides.entries.imgs[b]=e=a('<img src="'+d+'">').on("load",function(){e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):e.is(":visible")||e.is(":animated")||e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var a,b=this,c=b.slides;for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return void b.showSlide(a)}},displayChapters:function(){var a,b=this;for(a=0;a<b.tracks.length;a++)if("chapters"==b.tracks[a].kind&&b.tracks[a].isLoaded){b.drawChapters(b.tracks[a]),b.hasChapters=!0;break}},drawChapters:function(b){var c,d,e=this,f=0,g=0;for(e.chapters.empty(),c=0;c<b.entries.times.length;c++)d=b.entries.times[c].stop-b.entries.times[c].start,f=Math.floor(d/e.media.duration*100),(f+g>100||c==b.entries.times.length-1&&100>f+g)&&(f=100-g),e.chapters.append(a('<div class="mejs-chapter" rel="'+b.entries.times[c].start+'" style="left: '+g.toString()+"%;width: "+f.toString()+'%;"><div class="mejs-chapter-block'+(c==b.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+b.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(b.entries.times[c].start,e.options)+"&ndash;"+mejs.Utility.secondsToTimeCode(b.entries.times[c].stop,e.options)+"</span></div></div>")),g+=f;e.chapters.find("div.mejs-chapter").click(function(){e.media.setCurrentTime(parseFloat(a(this).attr("rel"))),e.media.paused&&e.media.play()}),e.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(b){for(var c,d,e,f=0,g=mejs.TrackFormatParser.split2(b,/\r?\n/),h={text:[],times:[]};f<g.length;f++){if(c=this.pattern_timecode.exec(g[f]),c&&f<g.length){for(f-1>=0&&""!==g[f-1]&&(e=g[f-1]),f++,d=g[f],f++;""!==g[f]&&f<g.length;)d=d+"\n"+g[f],f++;d=a.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),h.text.push(d),h.times.push({identifier:e,start:0===mejs.Utility.convertSMPTEtoSeconds(c[1])?.2:mejs.Utility.convertSMPTEtoSeconds(c[1]),stop:mejs.Utility.convertSMPTEtoSeconds(c[3]),settings:c[5]})}e=""}return h}},dfxp:{parse:function(b){b=a(b).filter("tt");var c,d,e=0,f=b.children("div").eq(0),g=f.find("p"),h=b.find("#"+f.attr("style")),i={text:[],times:[]};if(h.length){var j=h.removeAttr("id").get(0).attributes;if(j.length)for(c={},e=0;e<j.length;e++)c[j[e].name.split(":")[1]]=j[e].value}for(e=0;e<g.length;e++){var k,l={start:null,stop:null,style:null};if(g.eq(e).attr("begin")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("begin"))),!l.start&&g.eq(e-1).attr("end")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e-1).attr("end"))),g.eq(e).attr("end")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("end"))),!l.stop&&g.eq(e+1).attr("begin")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e+1).attr("begin"))),c){k="";for(var m in c)k+=m+":"+c[m]+";"}k&&(l.style=k),0===l.start&&(l.start=.2),i.times.push(l),d=a.trim(g.eq(e).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.text.push(d)}return i}},split2:function(a,b){return a.split(b)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(a,b){var c,d=[],e="";for(c=0;c<a.length;c++)e+=a.substring(c,c+1),b.test(e)&&(d.push(e.replace(b,"")),e="");return d.push(e),d})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{sourcechooserText:""}),a.extend(MediaElementPlayer.prototype,{buildsourcechooser:function(b,c,d,e){var f,g=this,h=g.options.sourcechooserText?g.options.sourcechooserText:mejs.i18n.t("mejs.source-chooser");b.sourcechooserButton=a('<div class="mejs-button mejs-sourcechooser-button"><button type="button" role="button" aria-haspopup="true" aria-owns="'+g.id+'" title="'+h+'" aria-label="'+h+'"></button><div class="mejs-sourcechooser-selector mejs-offscreen" role="menu" aria-expanded="false" aria-hidden="true"><ul></ul></div></div>').appendTo(c).hover(function(){clearTimeout(f),b.showSourcechooserSelector()},function(){a(this);f=setTimeout(function(){b.hideSourcechooserSelector()},500)}).on("keydown",function(c){var d=c.keyCode;switch(d){case 32:mejs.MediaFeatures.isFirefox||b.showSourcechooserSelector(),a(this).find(".mejs-sourcechooser-selector").find("input[type=radio]:checked").first().focus();break;case 13:b.showSourcechooserSelector(),a(this).find(".mejs-sourcechooser-selector").find("input[type=radio]:checked").first().focus();break;case 27:b.hideSourcechooserSelector(),a(this).find("button").focus();break;default:return!0}}).on("focusout",mejs.Utility.debounce(function(c){setTimeout(function(){var c=a(document.activeElement).closest(".mejs-sourcechooser-selector");c.length||b.hideSourcechooserSelector()},0)},100)).delegate("input[type=radio]","click",function(){a(this).attr("aria-selected",!0).attr("checked","checked"),a(this).closest(".mejs-sourcechooser-selector").find("input[type=radio]").not(this).attr("aria-selected","false").removeAttr("checked");var b=this.value;if(e.currentSrc!=b){var c=e.currentTime,d=e.paused;e.pause(),e.setSrc(b),e.addEventListener("loadedmetadata",function(a){e.currentTime=c},!0);var f=function(a){d||e.play(),e.removeEventListener("canplay",f,!0)};e.addEventListener("canplay",f,!0),e.load()}}).delegate("button","click",function(c){a(this).siblings(".mejs-sourcechooser-selector").hasClass("mejs-offscreen")?(b.showSourcechooserSelector(),a(this).siblings(".mejs-sourcechooser-selector").find("input[type=radio]:checked").first().focus()):b.hideSourcechooserSelector()});for(var i in this.node.children){var j=this.node.children[i];"SOURCE"!==j.nodeName||"probably"!=e.canPlayType(j.type)&&"maybe"!=e.canPlayType(j.type)||b.addSourceButton(j.src,j.title,j.type,e.src==j.src)}},addSourceButton:function(b,c,d,e){var f=this;(""===c||void 0==c)&&(c=b),d=d.split("/")[1],f.sourcechooserButton.find("ul").append(a('<li><input type="radio" name="'+f.id+'_sourcechooser" id="'+f.id+"_sourcechooser_"+c+d+'" role="menuitemradio" value="'+b+'" '+(e?'checked="checked"':"")+'aria-selected="'+e+'" /><label for="'+f.id+"_sourcechooser_"+c+d+'" aria-hidden="true">'+c+" ("+d+")</label></li>")),f.adjustSourcechooserBox()},adjustSourcechooserBox:function(){var a=this;a.sourcechooserButton.find(".mejs-sourcechooser-selector").height(a.sourcechooserButton.find(".mejs-sourcechooser-selector ul").outerHeight(!0))},hideSourcechooserSelector:function(){this.sourcechooserButton.find(".mejs-sourcechooser-selector").addClass("mejs-offscreen").attr("aria-expanded","false").attr("aria-hidden","true").find("input[type=radio]").attr("tabindex","-1")},showSourcechooserSelector:function(){this.sourcechooserButton.find(".mejs-sourcechooser-selector").removeClass("mejs-offscreen").attr("aria-expanded","true").attr("aria-hidden","false").find("input[type=radio]").attr("tabindex","0")}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){return"undefined"==typeof a.enterFullScreen?null:a.isFullScreen?mejs.i18n.t("mejs.fullscreen-off"):mejs.i18n.t("mejs.fullscreen-on")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("mejs.unmute"):mejs.i18n.t("mejs.mute")},click:function(a){a.media.muted?a.setMuted(!1):a.setMuted(!0)}},{isSeparator:!0},{render:function(a){return mejs.i18n.t("mejs.download-video")},click:function(a){window.location.href=a.media.currentSrc}}]}),a.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(b,c,d,e){b.contextMenu=a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(),b.container.bind("contextmenu",function(a){return b.isContextMenuEnabled?(a.preventDefault(),b.renderContextMenu(a.clientX-1,a.clientY-1),!1):void 0}),b.container.bind("click",function(){b.contextMenu.hide()}),b.contextMenu.bind("mouseleave",function(){b.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer(),a.contextMenuTimer=setTimeout(function(){a.hideContextMenu(),a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;null!=a&&(clearTimeout(a),delete a,a=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,c){for(var d=this,e="",f=d.options.contextMenuItems,g=0,h=f.length;h>g;g++)if(f[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var i=f[g].render(d);null!=i&&(e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+1e6*Math.random()+'">'+i+"</div>")}d.contextMenu.empty().append(a(e)).css({top:c,left:b}).show(),d.contextMenu.find(".mejs-contextmenu-item").each(function(){var b=a(this),c=parseInt(b.data("itemindex"),10),e=d.options.contextMenuItems[c];"undefined"!=typeof e.show&&e.show(b,d),b.click(function(){"undefined"!=typeof e.click&&e.click(d),d.contextMenu.hide()})}),setTimeout(function(){d.killControlsTimer("rev3")},100)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:""}),a.extend(MediaElementPlayer.prototype,{buildskipback:function(b,c,d,e){var f=this,g=mejs.i18n.t("mejs.time-skip-back",f.options.skipBackInterval),h=f.options.skipBackText?f.options.skipBackText:g;a('<div class="mejs-button mejs-skip-back-button"><button type="button" aria-controls="'+f.id+'" title="'+h+'" aria-label="'+h+'">'+f.options.skipBackInterval+"</button></div>").appendTo(c).click(function(){e.setCurrentTime(Math.max(e.currentTime-f.options.skipBackInterval,0)),a(this).find("button").blur()})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{postrollCloseText:""}),a.extend(MediaElementPlayer.prototype,{buildpostroll:function(b,c,d,e){var f=this,g=f.options.postrollCloseText?f.options.postrollCloseText:mejs.i18n.t("mejs.close"),h=f.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof h&&(b.postroll=a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+g+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(),f.media.addEventListener("ended",function(c){a.ajax({dataType:"html",url:h,success:function(a,b){d.find(".mejs-postroll-layer-content").html(a)}}),b.postroll.show()},!1))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{markerColor:"#E9BC3D",markers:[],markerCallback:function(){}}),a.extend(MediaElementPlayer.prototype,{buildmarkers:function(a,b,c,d){var e=0,f=-1,g=-1,h=-1,i=-1;for(e=0;e<a.options.markers.length;++e)b.find(".mejs-time-total").append('<span class="mejs-time-marker"></span>');d.addEventListener("durationchange",function(c){a.setmarkers(b)}),d.addEventListener("timeupdate",function(b){for(f=Math.floor(d.currentTime),h>f?i>f&&(i=-1):h=f,e=0;e<a.options.markers.length;++e)g=Math.floor(a.options.markers[e]),f===g&&g!==i&&(a.options.markerCallback(d,d.currentTime),i=g)},!1)},setmarkers:function(b){var c,d=this,e=0;for(e=0;e<d.options.markers.length;++e)Math.floor(d.options.markers[e])<=d.media.duration&&Math.floor(d.options.markers[e])>=0&&(c=100*Math.floor(d.options.markers[e])/d.media.duration,a(b.find(".mejs-time-marker")[e]).css({width:"1px",left:c+"%",background:d.options.markerColor}))}})}(mejs.$);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mediaelement.js DELETED
@@ -1,2441 +0,0 @@
1
- /*!
2
- *
3
- * MediaElement.js
4
- * HTML5 <video> and <audio> shim and player
5
- * http://mediaelementjs.com/
6
- *
7
- * Creates a JavaScript object that mimics HTML5 MediaElement API
8
- * for browsers that don't understand HTML5 or can't play the provided codec
9
- * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
10
- *
11
- * Copyright 2010-2014, John Dyer (http://j.hn)
12
- * License: MIT
13
- *
14
- */
15
- // Namespace
16
- var mejs = mejs || {};
17
-
18
- // version number
19
- mejs.version = '2.23.5';
20
-
21
-
22
- // player number (for missing, same id attr)
23
- mejs.meIndex = 0;
24
-
25
- // media types accepted by plugins
26
- mejs.plugins = {
27
- silverlight: [
28
- {version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
29
- ],
30
- flash: [
31
- {version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/rtmp','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a', 'audio/mp4', 'audio/mpeg', 'video/dailymotion', 'video/x-dailymotion', 'application/x-mpegURL', 'audio/ogg']}
32
- // 'video/youtube', 'video/x-youtube',
33
- // ,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
34
- ],
35
- youtube: [
36
- {version: null, types: ['video/youtube', 'video/x-youtube', 'audio/youtube', 'audio/x-youtube']}
37
- ],
38
- vimeo: [
39
- {version: null, types: ['video/vimeo', 'video/x-vimeo']}
40
- ]
41
- };
42
-
43
- /*
44
- Utility methods
45
- */
46
- mejs.Utility = {
47
- encodeUrl: function(url) {
48
- return encodeURIComponent(url); //.replace(/\?/gi,'%3F').replace(/=/gi,'%3D').replace(/&/gi,'%26');
49
- },
50
- escapeHTML: function(s) {
51
- return s.toString().split('&').join('&amp;').split('<').join('&lt;').split('"').join('&quot;');
52
- },
53
- absolutizeUrl: function(url) {
54
- var el = document.createElement('div');
55
- el.innerHTML = '<a href="' + this.escapeHTML(url) + '">x</a>';
56
- return el.firstChild.href;
57
- },
58
- getScriptPath: function(scriptNames) {
59
- var
60
- i = 0,
61
- j,
62
- codePath = '',
63
- testname = '',
64
- slashPos,
65
- filenamePos,
66
- scriptUrl,
67
- scriptPath,
68
- scriptFilename,
69
- scripts = document.getElementsByTagName('script'),
70
- il = scripts.length,
71
- jl = scriptNames.length;
72
-
73
- // go through all <script> tags
74
- for (; i < il; i++) {
75
- scriptUrl = scripts[i].src;
76
- slashPos = scriptUrl.lastIndexOf('/');
77
- if (slashPos > -1) {
78
- scriptFilename = scriptUrl.substring(slashPos + 1);
79
- scriptPath = scriptUrl.substring(0, slashPos + 1);
80
- } else {
81
- scriptFilename = scriptUrl;
82
- scriptPath = '';
83
- }
84
-
85
- // see if any <script> tags have a file name that matches the
86
- for (j = 0; j < jl; j++) {
87
- testname = scriptNames[j];
88
- filenamePos = scriptFilename.indexOf(testname);
89
- if (filenamePos > -1) {
90
- codePath = scriptPath;
91
- break;
92
- }
93
- }
94
-
95
- // if we found a path, then break and return it
96
- if (codePath !== '') {
97
- break;
98
- }
99
- }
100
-
101
- // send the best path back
102
- return codePath;
103
- },
104
- /*
105
- * Calculate the time format to use. We have a default format set in the
106
- * options but it can be imcomplete. We ajust it according to the media
107
- * duration.
108
- *
109
- * We support format like 'hh:mm:ss:ff'.
110
- */
111
- calculateTimeFormat: function(time, options, fps) {
112
- if (time < 0) {
113
- time = 0;
114
- }
115
-
116
- if(typeof fps == 'undefined') {
117
- fps = 25;
118
- }
119
-
120
- var format = options.timeFormat,
121
- firstChar = format[0],
122
- firstTwoPlaces = (format[1] == format[0]),
123
- separatorIndex = firstTwoPlaces? 2: 1,
124
- separator = ':',
125
- hours = Math.floor(time / 3600) % 24,
126
- minutes = Math.floor(time / 60) % 60,
127
- seconds = Math.floor(time % 60),
128
- frames = Math.floor(((time % 1)*fps).toFixed(3)),
129
- lis = [
130
- [frames, 'f'],
131
- [seconds, 's'],
132
- [minutes, 'm'],
133
- [hours, 'h']
134
- ];
135
-
136
- // Try to get the separator from the format
137
- if (format.length < separatorIndex) {
138
- separator = format[separatorIndex];
139
- }
140
-
141
- var required = false;
142
-
143
- for (var i=0, len=lis.length; i < len; i++) {
144
- if (format.indexOf(lis[i][1]) !== -1) {
145
- required=true;
146
- }
147
- else if (required) {
148
- var hasNextValue = false;
149
- for (var j=i; j < len; j++) {
150
- if (lis[j][0] > 0) {
151
- hasNextValue = true;
152
- break;
153
- }
154
- }
155
-
156
- if (! hasNextValue) {
157
- break;
158
- }
159
-
160
- if (!firstTwoPlaces) {
161
- format = firstChar + format;
162
- }
163
- format = lis[i][1] + separator + format;
164
- if (firstTwoPlaces) {
165
- format = lis[i][1] + format;
166
- }
167
- firstChar = lis[i][1];
168
- }
169
- }
170
- options.currentTimeFormat = format;
171
- },
172
- /*
173
- * Prefix the given number by zero if it is lower than 10.
174
- */
175
- twoDigitsString: function(n) {
176
- if (n < 10) {
177
- return '0' + n;
178
- }
179
- return String(n);
180
- },
181
- secondsToTimeCode: function(time, options) {
182
- if (time < 0) {
183
- time = 0;
184
- }
185
-
186
- // Maintain backward compatibility with method signature before v2.18.
187
- if (typeof options !== 'object') {
188
- var format = 'm:ss';
189
- format = arguments[1] ? 'hh:mm:ss' : format; // forceHours
190
- format = arguments[2] ? format + ':ff' : format; // showFrameCount
191
-
192
- options = {
193
- currentTimeFormat: format,
194
- framesPerSecond: arguments[3] || 25
195
- };
196
- }
197
-
198
- var fps = options.framesPerSecond;
199
- if(typeof fps === 'undefined') {
200
- fps = 25;
201
- }
202
-
203
- var format = options.currentTimeFormat,
204
- hours = Math.floor(time / 3600) % 24,
205
- minutes = Math.floor(time / 60) % 60,
206
- seconds = Math.floor(time % 60),
207
- frames = Math.floor(((time % 1)*fps).toFixed(3));
208
- lis = [
209
- [frames, 'f'],
210
- [seconds, 's'],
211
- [minutes, 'm'],
212
- [hours, 'h']
213
- ];
214
-
215
- var res = format;
216
- for (i=0,len=lis.length; i < len; i++) {
217
- res = res.replace(lis[i][1]+lis[i][1], this.twoDigitsString(lis[i][0]));
218
- res = res.replace(lis[i][1], lis[i][0]);
219
- }
220
- return res;
221
- },
222
-
223
- timeCodeToSeconds: function(hh_mm_ss_ff, forceHours, showFrameCount, fps){
224
- if (typeof showFrameCount == 'undefined') {
225
- showFrameCount=false;
226
- } else if(typeof fps == 'undefined') {
227
- fps = 25;
228
- }
229
-
230
- var tc_array = hh_mm_ss_ff.split(":"),
231
- tc_hh = parseInt(tc_array[0], 10),
232
- tc_mm = parseInt(tc_array[1], 10),
233
- tc_ss = parseInt(tc_array[2], 10),
234
- tc_ff = 0,
235
- tc_in_seconds = 0;
236
-
237
- if (showFrameCount) {
238
- tc_ff = parseInt(tc_array[3])/fps;
239
- }
240
-
241
- tc_in_seconds = ( tc_hh * 3600 ) + ( tc_mm * 60 ) + tc_ss + tc_ff;
242
-
243
- return tc_in_seconds;
244
- },
245
-
246
-
247
- convertSMPTEtoSeconds: function (SMPTE) {
248
- if (typeof SMPTE != 'string')
249
- return false;
250
-
251
- SMPTE = SMPTE.replace(',', '.');
252
-
253
- var secs = 0,
254
- decimalLen = (SMPTE.indexOf('.') != -1) ? SMPTE.split('.')[1].length : 0,
255
- multiplier = 1;
256
-
257
- SMPTE = SMPTE.split(':').reverse();
258
-
259
- for (var i = 0; i < SMPTE.length; i++) {
260
- multiplier = 1;
261
- if (i > 0) {
262
- multiplier = Math.pow(60, i);
263
- }
264
- secs += Number(SMPTE[i]) * multiplier;
265
- }
266
- return Number(secs.toFixed(decimalLen));
267
- },
268
-
269
- /* borrowed from SWFObject: http://code.google.com/p/swfobject/source/browse/trunk/swfobject/src/swfobject.js#474 */
270
- removeSwf: function(id) {
271
- var obj = document.getElementById(id);
272
- if (obj && /object|embed/i.test(obj.nodeName)) {
273
- if (mejs.MediaFeatures.isIE) {
274
- obj.style.display = "none";
275
- (function(){
276
- if (obj.readyState == 4) {
277
- mejs.Utility.removeObjectInIE(id);
278
- } else {
279
- setTimeout(arguments.callee, 10);
280
- }
281
- })();
282
- } else {
283
- obj.parentNode.removeChild(obj);
284
- }
285
- }
286
- },
287
- removeObjectInIE: function(id) {
288
- var obj = document.getElementById(id);
289
- if (obj) {
290
- for (var i in obj) {
291
- if (typeof obj[i] == "function") {
292
- obj[i] = null;
293
- }
294
- }
295
- obj.parentNode.removeChild(obj);
296
- }
297
- },
298
- determineScheme: function(url) {
299
- if (url && url.indexOf("://") != -1) {
300
- return url.substr(0, url.indexOf("://")+3);
301
- }
302
- return "//"; // let user agent figure this out
303
- },
304
-
305
- // taken from underscore
306
- debounce: function(func, wait, immediate) {
307
- var timeout;
308
- return function() {
309
- var context = this, args = arguments;
310
- var later = function() {
311
- timeout = null;
312
- if (!immediate) func.apply(context, args);
313
- };
314
- var callNow = immediate && !timeout;
315
- clearTimeout(timeout);
316
- timeout = setTimeout(later, wait);
317
- if (callNow) func.apply(context, args);
318
- };
319
- },
320
-
321
- /**
322
- * Returns true if targetNode appears after sourceNode in the dom.
323
- * @param {HTMLElement} sourceNode - the source node for comparison
324
- * @param {HTMLElement} targetNode - the node to compare against sourceNode
325
- */
326
- isNodeAfter: function(sourceNode, targetNode) {
327
- return !!(
328
- sourceNode &&
329
- targetNode &&
330
- typeof sourceNode.compareDocumentPosition === 'function' &&
331
- sourceNode.compareDocumentPosition(targetNode) & Node.DOCUMENT_POSITION_PRECEDING
332
- );
333
- }
334
- };
335
-
336
-
337
- // Core detector, plugins are added below
338
- mejs.PluginDetector = {
339
-
340
- // main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]);
341
- hasPluginVersion: function(plugin, v) {
342
- var pv = this.plugins[plugin];
343
- v[1] = v[1] || 0;
344
- v[2] = v[2] || 0;
345
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
346
- },
347
-
348
- // cached values
349
- nav: window.navigator,
350
- ua: window.navigator.userAgent.toLowerCase(),
351
-
352
- // stored version numbers
353
- plugins: [],
354
-
355
- // runs detectPlugin() and stores the version number
356
- addPlugin: function(p, pluginName, mimeType, activeX, axDetect) {
357
- this.plugins[p] = this.detectPlugin(pluginName, mimeType, activeX, axDetect);
358
- },
359
-
360
- // get the version number from the mimetype (all but IE) or ActiveX (IE)
361
- detectPlugin: function(pluginName, mimeType, activeX, axDetect) {
362
-
363
- var version = [0,0,0],
364
- description,
365
- i,
366
- ax;
367
-
368
- // Firefox, Webkit, Opera
369
- if (typeof(this.nav.plugins) != 'undefined' && typeof this.nav.plugins[pluginName] == 'object') {
370
- description = this.nav.plugins[pluginName].description;
371
- if (description && !(typeof this.nav.mimeTypes != 'undefined' && this.nav.mimeTypes[mimeType] && !this.nav.mimeTypes[mimeType].enabledPlugin)) {
372
- version = description.replace(pluginName, '').replace(/^\s+/,'').replace(/\sr/gi,'.').split('.');
373
- for (i=0; i<version.length; i++) {
374
- version[i] = parseInt(version[i].match(/\d+/), 10);
375
- }
376
- }
377
- // Internet Explorer / ActiveX
378
- } else if (typeof(window.ActiveXObject) != 'undefined') {
379
- try {
380
- ax = new ActiveXObject(activeX);
381
- if (ax) {
382
- version = axDetect(ax);
383
- }
384
- }
385
- catch (e) { }
386
- }
387
- return version;
388
- }
389
- };
390
-
391
- // Add Flash detection
392
- mejs.PluginDetector.addPlugin('flash','Shockwave Flash','application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash', function(ax) {
393
- // adapted from SWFObject
394
- var version = [],
395
- d = ax.GetVariable("$version");
396
- if (d) {
397
- d = d.split(" ")[1].split(",");
398
- version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
399
- }
400
- return version;
401
- });
402
-
403
- // Add Silverlight detection
404
- mejs.PluginDetector.addPlugin('silverlight','Silverlight Plug-In','application/x-silverlight-2','AgControl.AgControl', function (ax) {
405
- // Silverlight cannot report its version number to IE
406
- // but it does have a isVersionSupported function, so we have to loop through it to get a version number.
407
- // adapted from http://www.silverlightversion.com/
408
- var v = [0,0,0,0],
409
- loopMatch = function(ax, v, i, n) {
410
- while(ax.isVersionSupported(v[0]+ "."+ v[1] + "." + v[2] + "." + v[3])){
411
- v[i]+=n;
412
- }
413
- v[i] -= n;
414
- };
415
- loopMatch(ax, v, 0, 1);
416
- loopMatch(ax, v, 1, 1);
417
- loopMatch(ax, v, 2, 10000); // the third place in the version number is usually 5 digits (4.0.xxxxx)
418
- loopMatch(ax, v, 2, 1000);
419
- loopMatch(ax, v, 2, 100);
420
- loopMatch(ax, v, 2, 10);
421
- loopMatch(ax, v, 2, 1);
422
- loopMatch(ax, v, 3, 1);
423
-
424
- return v;
425
- });
426
- // add adobe acrobat
427
- /*
428
- PluginDetector.addPlugin('acrobat','Adobe Acrobat','application/pdf','AcroPDF.PDF', function (ax) {
429
- var version = [],
430
- d = ax.GetVersions().split(',')[0].split('=')[1].split('.');
431
-
432
- if (d) {
433
- version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
434
- }
435
- return version;
436
- });
437
- */
438
- // necessary detection (fixes for <IE9)
439
- mejs.MediaFeatures = {
440
- init: function() {
441
- var
442
- t = this,
443
- d = document,
444
- nav = mejs.PluginDetector.nav,
445
- ua = mejs.PluginDetector.ua.toLowerCase(),
446
- i,
447
- v,
448
- html5Elements = ['source','track','audio','video'];
449
-
450
- // detect browsers (only the ones that have some kind of quirk we need to work around)
451
- t.isiPad = (ua.match(/ipad/i) !== null);
452
- t.isiPhone = (ua.match(/iphone/i) !== null);
453
- t.isiOS = t.isiPhone || t.isiPad;
454
- t.isAndroid = (ua.match(/android/i) !== null);
455
- t.isBustedAndroid = (ua.match(/android 2\.[12]/) !== null);
456
- t.isBustedNativeHTTPS = (location.protocol === 'https:' && (ua.match(/android [12]\./) !== null || ua.match(/macintosh.* version.* safari/) !== null));
457
- t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1 || nav.appName.toLowerCase().match(/trident/gi) !== null);
458
- t.isChrome = (ua.match(/chrome/gi) !== null);
459
- t.isChromium = (ua.match(/chromium/gi) !== null);
460
- t.isFirefox = (ua.match(/firefox/gi) !== null);
461
- t.isWebkit = (ua.match(/webkit/gi) !== null);
462
- t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit && !t.isIE;
463
- t.isOpera = (ua.match(/opera/gi) !== null);
464
- t.hasTouch = ('ontouchstart' in window); // && window.ontouchstart != null); // this breaks iOS 7
465
-
466
- // Borrowed from `Modernizr.svgasimg`, sources:
467
- // - https://github.com/Modernizr/Modernizr/issues/687
468
- // - https://github.com/Modernizr/Modernizr/pull/1209/files
469
- t.svgAsImg = !!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1');
470
-
471
- // create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection
472
- for (i=0; i<html5Elements.length; i++) {
473
- v = document.createElement(html5Elements[i]);
474
- }
475
-
476
- t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid);
477
-
478
- // Fix for IE9 on Windows 7N / Windows 7KN (Media Player not installer)
479
- try{
480
- v.canPlayType("video/mp4");
481
- }catch(e){
482
- t.supportsMediaTag = false;
483
- }
484
-
485
- t.supportsPointerEvents = (function() {
486
- // TAKEN FROM MODERNIZR
487
- var element = document.createElement('x'),
488
- documentElement = document.documentElement,
489
- getComputedStyle = window.getComputedStyle,
490
- supports;
491
- if(!('pointerEvents' in element.style)){
492
- return false;
493
- }
494
- element.style.pointerEvents = 'auto';
495
- element.style.pointerEvents = 'x';
496
- documentElement.appendChild(element);
497
- supports = getComputedStyle &&
498
- getComputedStyle(element, '').pointerEvents === 'auto';
499
- documentElement.removeChild(element);
500
- return !!supports;
501
- })();
502
-
503
-
504
- // Older versions of Firefox can't move plugins around without it resetting,
505
- t.hasFirefoxPluginMovingProblem = false;
506
-
507
- // detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails)
508
-
509
- // iOS
510
- t.hasiOSFullScreen = (typeof v.webkitEnterFullscreen !== 'undefined');
511
-
512
- // W3C
513
- t.hasNativeFullscreen = (typeof v.requestFullscreen !== 'undefined');
514
-
515
- // webkit/firefox/IE11+
516
- t.hasWebkitNativeFullScreen = (typeof v.webkitRequestFullScreen !== 'undefined');
517
- t.hasMozNativeFullScreen = (typeof v.mozRequestFullScreen !== 'undefined');
518
- t.hasMsNativeFullScreen = (typeof v.msRequestFullscreen !== 'undefined');
519
-
520
- t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen || t.hasMsNativeFullScreen);
521
- t.nativeFullScreenEnabled = t.hasTrueNativeFullScreen;
522
-
523
- // Enabled?
524
- if (t.hasMozNativeFullScreen) {
525
- t.nativeFullScreenEnabled = document.mozFullScreenEnabled;
526
- } else if (t.hasMsNativeFullScreen) {
527
- t.nativeFullScreenEnabled = document.msFullscreenEnabled;
528
- }
529
-
530
- if (t.isChrome) {
531
- t.hasiOSFullScreen = false;
532
- }
533
-
534
- if (t.hasTrueNativeFullScreen) {
535
-
536
- t.fullScreenEventName = '';
537
- if (t.hasWebkitNativeFullScreen) {
538
- t.fullScreenEventName = 'webkitfullscreenchange';
539
-
540
- } else if (t.hasMozNativeFullScreen) {
541
- t.fullScreenEventName = 'mozfullscreenchange';
542
-
543
- } else if (t.hasMsNativeFullScreen) {
544
- t.fullScreenEventName = 'MSFullscreenChange';
545
- }
546
-
547
- t.isFullScreen = function() {
548
- if (t.hasMozNativeFullScreen) {
549
- return d.mozFullScreen;
550
-
551
- } else if (t.hasWebkitNativeFullScreen) {
552
- return d.webkitIsFullScreen;
553
-
554
- } else if (t.hasMsNativeFullScreen) {
555
- return d.msFullscreenElement !== null;
556
- }
557
- }
558
-
559
- t.requestFullScreen = function(el) {
560
-
561
- if (t.hasWebkitNativeFullScreen) {
562
- el.webkitRequestFullScreen();
563
-
564
- } else if (t.hasMozNativeFullScreen) {
565
- el.mozRequestFullScreen();
566
-
567
- } else if (t.hasMsNativeFullScreen) {
568
- el.msRequestFullscreen();
569
-
570
- }
571
- }
572
-
573
- t.cancelFullScreen = function() {
574
- if (t.hasWebkitNativeFullScreen) {
575
- document.webkitCancelFullScreen();
576
-
577
- } else if (t.hasMozNativeFullScreen) {
578
- document.mozCancelFullScreen();
579
-
580
- } else if (t.hasMsNativeFullScreen) {
581
- document.msExitFullscreen();
582
-
583
- }
584
- }
585
-
586
- }
587
-
588
-
589
- // OS X 10.5 can't do this even if it says it can :(
590
- if (t.hasiOSFullScreen && ua.match(/mac os x 10_5/i)) {
591
- t.hasNativeFullScreen = false;
592
- t.hasiOSFullScreen = false;
593
- }
594
-
595
- }
596
- };
597
- mejs.MediaFeatures.init();
598
-
599
- /*
600
- extension methods to <video> or <audio> object to bring it into parity with PluginMediaElement (see below)
601
- */
602
- mejs.HtmlMediaElement = {
603
- pluginType: 'native',
604
- isFullScreen: false,
605
-
606
- setCurrentTime: function (time) {
607
- this.currentTime = time;
608
- },
609
-
610
- setMuted: function (muted) {
611
- this.muted = muted;
612
- },
613
-
614
- setVolume: function (volume) {
615
- this.volume = volume;
616
- },
617
-
618
- // for parity with the plugin versions
619
- stop: function () {
620
- this.pause();
621
- },
622
-
623
- // This can be a url string
624
- // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
625
- setSrc: function (url) {
626
-
627
- // Fix for IE9 which can't set .src when there are <source> elements. Awesome, right?
628
- var
629
- existingSources = this.getElementsByTagName('source');
630
- while (existingSources.length > 0){
631
- this.removeChild(existingSources[0]);
632
- }
633
-
634
- if (typeof url == 'string') {
635
- this.src = url;
636
- } else {
637
- var i, media;
638
-
639
- for (i=0; i<url.length; i++) {
640
- media = url[i];
641
- if (this.canPlayType(media.type)) {
642
- this.src = media.src;
643
- break;
644
- }
645
- }
646
- }
647
- },
648
-
649
- setVideoSize: function (width, height) {
650
- this.width = width;
651
- this.height = height;
652
- }
653
- };
654
-
655
- /*
656
- Mimics the <video/audio> element by calling Flash's External Interface or Silverlights [ScriptableMember]
657
- */
658
- mejs.PluginMediaElement = function (pluginid, pluginType, mediaUrl) {
659
- this.id = pluginid;
660
- this.pluginType = pluginType;
661
- this.src = mediaUrl;
662
- this.events = {};
663
- this.attributes = {};
664
- };
665
-
666
- // JavaScript values and ExternalInterface methods that match HTML5 video properties methods
667
- // http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html
668
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
669
- mejs.PluginMediaElement.prototype = {
670
-
671
- // special
672
- pluginElement: null,
673
- pluginType: '',
674
- isFullScreen: false,
675
-
676
- // not implemented :(
677
- playbackRate: -1,
678
- defaultPlaybackRate: -1,
679
- seekable: [],
680
- played: [],
681
-
682
- // HTML5 read-only properties
683
- paused: true,
684
- ended: false,
685
- seeking: false,
686
- duration: 0,
687
- error: null,
688
- tagName: '',
689
-
690
- // HTML5 get/set properties, but only set (updated by event handlers)
691
- muted: false,
692
- volume: 1,
693
- currentTime: 0,
694
-
695
- // HTML5 methods
696
- play: function () {
697
- if (this.pluginApi != null) {
698
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
699
- this.pluginApi.playVideo();
700
- } else {
701
- this.pluginApi.playMedia();
702
- }
703
- this.paused = false;
704
- }
705
- },
706
- load: function () {
707
- if (this.pluginApi != null) {
708
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
709
- } else {
710
- this.pluginApi.loadMedia();
711
- }
712
-
713
- this.paused = false;
714
- }
715
- },
716
- pause: function () {
717
- if (this.pluginApi != null) {
718
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
719
- if( this.pluginApi.getPlayerState() == 1 ) {
720
- this.pluginApi.pauseVideo();
721
- }
722
- } else {
723
- this.pluginApi.pauseMedia();
724
- }
725
-
726
-
727
- this.paused = true;
728
- }
729
- },
730
- stop: function () {
731
- if (this.pluginApi != null) {
732
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
733
- this.pluginApi.stopVideo();
734
- } else {
735
- this.pluginApi.stopMedia();
736
- }
737
- this.paused = true;
738
- }
739
- },
740
- canPlayType: function(type) {
741
- var i,
742
- j,
743
- pluginInfo,
744
- pluginVersions = mejs.plugins[this.pluginType];
745
-
746
- for (i=0; i<pluginVersions.length; i++) {
747
- pluginInfo = pluginVersions[i];
748
-
749
- // test if user has the correct plugin version
750
- if (mejs.PluginDetector.hasPluginVersion(this.pluginType, pluginInfo.version)) {
751
-
752
- // test for plugin playback types
753
- for (j=0; j<pluginInfo.types.length; j++) {
754
- // find plugin that can play the type
755
- if (type == pluginInfo.types[j]) {
756
- return 'probably';
757
- }
758
- }
759
- }
760
- }
761
-
762
- return '';
763
- },
764
-
765
- positionFullscreenButton: function(x,y,visibleAndAbove) {
766
- if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
767
- this.pluginApi.positionFullscreenButton(Math.floor(x),Math.floor(y),visibleAndAbove);
768
- }
769
- },
770
-
771
- hideFullscreenButton: function() {
772
- if (this.pluginApi != null && this.pluginApi.hideFullscreenButton) {
773
- this.pluginApi.hideFullscreenButton();
774
- }
775
- },
776
-
777
-
778
- // custom methods since not all JavaScript implementations support get/set
779
-
780
- // This can be a url string
781
- // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
782
- setSrc: function (url) {
783
- if (typeof url == 'string') {
784
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(url));
785
- this.src = mejs.Utility.absolutizeUrl(url);
786
- } else {
787
- var i, media;
788
-
789
- for (i=0; i<url.length; i++) {
790
- media = url[i];
791
- if (this.canPlayType(media.type)) {
792
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(media.src));
793
- this.src = mejs.Utility.absolutizeUrl(media.src);
794
- break;
795
- }
796
- }
797
- }
798
-
799
- },
800
- setCurrentTime: function (time) {
801
- if (this.pluginApi != null) {
802
- if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
803
- this.pluginApi.seekTo(time);
804
- } else {
805
- this.pluginApi.setCurrentTime(time);
806
- }
807
-
808
-
809
-
810
- this.currentTime = time;
811
- }
812
- },
813
- setVolume: function (volume) {
814
- if (this.pluginApi != null) {
815
- // same on YouTube and MEjs
816
- if (this.pluginType == 'youtube') {
817
- this.pluginApi.setVolume(volume * 100);
818
- } else {
819
- this.pluginApi.setVolume(volume);
820
- }
821
- this.volume = volume;
822
- }
823
- },
824
- setMuted: function (muted) {
825
- if (this.pluginApi != null) {
826
- if (this.pluginType == 'youtube') {
827
- if (muted) {
828
- this.pluginApi.mute();
829
- } else {
830
- this.pluginApi.unMute();
831
- }
832
- this.muted = muted;
833
- this.dispatchEvent({type:'volumechange'});
834
- } else {
835
- this.pluginApi.setMuted(muted);
836
- }
837
- this.muted = muted;
838
- }
839
- },
840
-
841
- // additional non-HTML5 methods
842
- setVideoSize: function (width, height) {
843
-
844
- //if (this.pluginType == 'flash' || this.pluginType == 'silverlight') {
845
- if (this.pluginElement && this.pluginElement.style) {
846
- this.pluginElement.style.width = width + 'px';
847
- this.pluginElement.style.height = height + 'px';
848
- }
849
- if (this.pluginApi != null && this.pluginApi.setVideoSize) {
850
- this.pluginApi.setVideoSize(width, height);
851
- }
852
- //}
853
- },
854
-
855
- setFullscreen: function (fullscreen) {
856
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
857
- this.pluginApi.setFullscreen(fullscreen);
858
- }
859
- },
860
-
861
- enterFullScreen: function() {
862
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
863
- this.setFullscreen(true);
864
- }
865
-
866
- },
867
-
868
- exitFullScreen: function() {
869
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
870
- this.setFullscreen(false);
871
- }
872
- },
873
-
874
- // start: fake events
875
- addEventListener: function (eventName, callback, bubble) {
876
- this.events[eventName] = this.events[eventName] || [];
877
- this.events[eventName].push(callback);
878
- },
879
- removeEventListener: function (eventName, callback) {
880
- if (!eventName) { this.events = {}; return true; }
881
- var callbacks = this.events[eventName];
882
- if (!callbacks) return true;
883
- if (!callback) { this.events[eventName] = []; return true; }
884
- for (var i = 0; i < callbacks.length; i++) {
885
- if (callbacks[i] === callback) {
886
- this.events[eventName].splice(i, 1);
887
- return true;
888
- }
889
- }
890
- return false;
891
- },
892
- dispatchEvent: function (event) {
893
- var i,
894
- args,
895
- callbacks = this.events[event.type];
896
-
897
- if (callbacks) {
898
- for (i = 0; i < callbacks.length; i++) {
899
- callbacks[i].apply(this, [event]);
900
- }
901
- }
902
- },
903
- // end: fake events
904
-
905
- // fake DOM attribute methods
906
- hasAttribute: function(name){
907
- return (name in this.attributes);
908
- },
909
- removeAttribute: function(name){
910
- delete this.attributes[name];
911
- },
912
- getAttribute: function(name){
913
- if (this.hasAttribute(name)) {
914
- return this.attributes[name];
915
- }
916
- return null;
917
- },
918
- setAttribute: function(name, value){
919
- this.attributes[name] = value;
920
- },
921
-
922
- remove: function() {
923
- mejs.Utility.removeSwf(this.pluginElement.id);
924
- }
925
- };
926
-
927
- /*
928
- Default options
929
- */
930
- mejs.MediaElementDefaults = {
931
- // allows testing on HTML5, flash, silverlight
932
- // auto: attempts to detect what the browser can do
933
- // auto_plugin: prefer plugins and then attempt native HTML5
934
- // native: forces HTML5 playback
935
- // shim: disallows HTML5, will attempt either Flash or Silverlight
936
- // none: forces fallback view
937
- mode: 'auto',
938
- // remove or reorder to change plugin priority and availability
939
- plugins: ['flash','silverlight','youtube','vimeo'],
940
- // shows debug errors on screen
941
- enablePluginDebug: false,
942
- // use plugin for browsers that have trouble with Basic Authentication on HTTPS sites
943
- httpsBasicAuthSite: false,
944
- // overrides the type specified, useful for dynamic instantiation
945
- type: '',
946
- // path to Flash and Silverlight plugins
947
- pluginPath: mejs.Utility.getScriptPath(['mediaelement.js','mediaelement.min.js','mediaelement-and-player.js','mediaelement-and-player.min.js']),
948
- // name of flash file
949
- flashName: 'flashmediaelement.swf',
950
- // streamer for RTMP streaming
951
- flashStreamer: '',
952
- // set to 'always' for CDN version
953
- flashScriptAccess: 'sameDomain',
954
- // turns on the smoothing filter in Flash
955
- enablePluginSmoothing: false,
956
- // enabled pseudo-streaming (seek) on .mp4 files
957
- enablePseudoStreaming: false,
958
- // start query parameter sent to server for pseudo-streaming
959
- pseudoStreamingStartQueryParam: 'start',
960
- // name of silverlight file
961
- silverlightName: 'silverlightmediaelement.xap',
962
- // default if the <video width> is not specified
963
- defaultVideoWidth: 480,
964
- // default if the <video height> is not specified
965
- defaultVideoHeight: 270,
966
- // overrides <video width>
967
- pluginWidth: -1,
968
- // overrides <video height>
969
- pluginHeight: -1,
970
- // additional plugin variables in 'key=value' form
971
- pluginVars: [],
972
- // rate in milliseconds for Flash and Silverlight to fire the timeupdate event
973
- // larger number is less accurate, but less strain on plugin->JavaScript bridge
974
- timerRate: 250,
975
- // initial volume for player
976
- startVolume: 0.8,
977
- // custom error message in case media cannot be played; otherwise, Download File
978
- // link will be displayed
979
- customError: "",
980
- success: function () { },
981
- error: function () { }
982
- };
983
-
984
- /*
985
- Determines if a browser supports the <video> or <audio> element
986
- and returns either the native element or a Flash/Silverlight version that
987
- mimics HTML5 MediaElement
988
- */
989
- mejs.MediaElement = function (el, o) {
990
- return mejs.HtmlMediaElementShim.create(el,o);
991
- };
992
-
993
- mejs.HtmlMediaElementShim = {
994
-
995
- create: function(el, o) {
996
- var
997
- options = {},
998
- htmlMediaElement = (typeof(el) == 'string') ? document.getElementById(el) : el,
999
- tagName = htmlMediaElement.tagName.toLowerCase(),
1000
- isMediaTag = (tagName === 'audio' || tagName === 'video'),
1001
- src = (isMediaTag) ? htmlMediaElement.getAttribute('src') : htmlMediaElement.getAttribute('href'),
1002
- poster = htmlMediaElement.getAttribute('poster'),
1003
- autoplay = htmlMediaElement.getAttribute('autoplay'),
1004
- preload = htmlMediaElement.getAttribute('preload'),
1005
- controls = htmlMediaElement.getAttribute('controls'),
1006
- playback,
1007
- prop;
1008
-
1009
- // extend options
1010
- for (prop in mejs.MediaElementDefaults) {
1011
- options[prop] = mejs.MediaElementDefaults[prop];
1012
- }
1013
- for (prop in o) {
1014
- options[prop] = o[prop];
1015
- }
1016
-
1017
-
1018
- // clean up attributes
1019
- src = (typeof src == 'undefined' || src === null || src == '') ? null : src;
1020
- poster = (typeof poster == 'undefined' || poster === null) ? '' : poster;
1021
- preload = (typeof preload == 'undefined' || preload === null || preload === 'false') ? 'none' : preload;
1022
- autoplay = !(typeof autoplay == 'undefined' || autoplay === null || autoplay === 'false');
1023
- controls = !(typeof controls == 'undefined' || controls === null || controls === 'false');
1024
-
1025
- // test for HTML5 and plugin capabilities
1026
- playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src);
1027
- playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '';
1028
- playback.scheme = mejs.Utility.determineScheme(playback.url);
1029
-
1030
- if (playback.method == 'native') {
1031
- // second fix for android
1032
- if (mejs.MediaFeatures.isBustedAndroid) {
1033
- htmlMediaElement.src = playback.url;
1034
- htmlMediaElement.addEventListener('click', function() {
1035
- htmlMediaElement.play();
1036
- }, false);
1037
- }
1038
-
1039
- // add methods to native HTMLMediaElement
1040
- return this.updateNative(playback, options, autoplay, preload);
1041
- } else if (playback.method !== '') {
1042
- // create plugin to mimic HTMLMediaElement
1043
-
1044
- return this.createPlugin( playback, options, poster, autoplay, preload, controls);
1045
- } else {
1046
- // boo, no HTML5, no Flash, no Silverlight.
1047
- this.createErrorMessage( playback, options, poster );
1048
-
1049
- return this;
1050
- }
1051
- },
1052
-
1053
- determinePlayback: function(htmlMediaElement, options, supportsMediaTag, isMediaTag, src) {
1054
- var
1055
- mediaFiles = [],
1056
- i,
1057
- j,
1058
- k,
1059
- l,
1060
- n,
1061
- type,
1062
- result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() !== 'audio'), scheme: ''},
1063
- pluginName,
1064
- pluginVersions,
1065
- pluginInfo,
1066
- dummy,
1067
- media;
1068
-
1069
- // STEP 1: Get URL and type from <video src> or <source src>
1070
-
1071
- // supplied type overrides <video type> and <source type>
1072
- if (typeof options.type != 'undefined' && options.type !== '') {
1073
-
1074
- // accept either string or array of types
1075
- if (typeof options.type == 'string') {
1076
- mediaFiles.push({type:options.type, url:src});
1077
- } else {
1078
-
1079
- for (i=0; i<options.type.length; i++) {
1080
- mediaFiles.push({type:options.type[i], url:src});
1081
- }
1082
- }
1083
-
1084
- // test for src attribute first
1085
- } else if (src !== null) {
1086
- type = this.formatType(src, htmlMediaElement.getAttribute('type'));
1087
- mediaFiles.push({type:type, url:src});
1088
-
1089
- // then test for <source> elements
1090
- } else {
1091
- // test <source> types to see if they are usable
1092
- for (i = 0; i < htmlMediaElement.childNodes.length; i++) {
1093
- n = htmlMediaElement.childNodes[i];
1094
- if (n.nodeType == 1 && n.tagName.toLowerCase() == 'source') {
1095
- src = n.getAttribute('src');
1096
- type = this.formatType(src, n.getAttribute('type'));
1097
- media = n.getAttribute('media');
1098
-
1099
- if (!media || !window.matchMedia || (window.matchMedia && window.matchMedia(media).matches)) {
1100
- mediaFiles.push({type:type, url:src});
1101
- }
1102
- }
1103
- }
1104
- }
1105
-
1106
- // in the case of dynamicly created players
1107
- // check for audio types
1108
- if (!isMediaTag && mediaFiles.length > 0 && mediaFiles[0].url !== null && this.getTypeFromFile(mediaFiles[0].url).indexOf('audio') > -1) {
1109
- result.isVideo = false;
1110
- }
1111
-
1112
-
1113
- // STEP 2: Test for playback method
1114
-
1115
- // special case for Android which sadly doesn't implement the canPlayType function (always returns '')
1116
- if (result.isVideo && mejs.MediaFeatures.isBustedAndroid) {
1117
- htmlMediaElement.canPlayType = function(type) {
1118
- return (type.match(/video\/(mp4|m4v)/gi) !== null) ? 'maybe' : '';
1119
- };
1120
- }
1121
-
1122
- // special case for Chromium to specify natively supported video codecs (i.e. WebM and Theora)
1123
- if (result.isVideo && mejs.MediaFeatures.isChromium) {
1124
- htmlMediaElement.canPlayType = function(type) {
1125
- return (type.match(/video\/(webm|ogv|ogg)/gi) !== null) ? 'maybe' : '';
1126
- };
1127
- }
1128
-
1129
- // test for native playback first
1130
- if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native') && !(mejs.MediaFeatures.isBustedNativeHTTPS && options.httpsBasicAuthSite === true)) {
1131
-
1132
- if (!isMediaTag) {
1133
-
1134
- // create a real HTML5 Media Element
1135
- dummy = document.createElement( result.isVideo ? 'video' : 'audio');
1136
- htmlMediaElement.parentNode.insertBefore(dummy, htmlMediaElement);
1137
- htmlMediaElement.style.display = 'none';
1138
-
1139
- // use this one from now on
1140
- result.htmlMediaElement = htmlMediaElement = dummy;
1141
- }
1142
-
1143
- for (i=0; i<mediaFiles.length; i++) {
1144
- // normal check
1145
- if (mediaFiles[i].type == "video/m3u8" || htmlMediaElement.canPlayType(mediaFiles[i].type).replace(/no/, '') !== ''
1146
- // special case for Mac/Safari 5.0.3 which answers '' to canPlayType('audio/mp3') but 'maybe' to canPlayType('audio/mpeg')
1147
- || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/mp3/,'mpeg')).replace(/no/, '') !== ''
1148
- // special case for m4a supported by detecting mp4 support
1149
- || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/m4a/,'mp4')).replace(/no/, '') !== '') {
1150
- result.method = 'native';
1151
- result.url = mediaFiles[i].url;
1152
- break;
1153
- }
1154
- }
1155
-
1156
- if (result.method === 'native') {
1157
- if (result.url !== null) {
1158
- htmlMediaElement.src = result.url;
1159
- }
1160
-
1161
- // if `auto_plugin` mode, then cache the native result but try plugins.
1162
- if (options.mode !== 'auto_plugin') {
1163
- return result;
1164
- }
1165
- }
1166
- }
1167
-
1168
- // if native playback didn't work, then test plugins
1169
- if (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'shim') {
1170
- for (i=0; i<mediaFiles.length; i++) {
1171
- type = mediaFiles[i].type;
1172
-
1173
- // test all plugins in order of preference [silverlight, flash]
1174
- for (j=0; j<options.plugins.length; j++) {
1175
-
1176
- pluginName = options.plugins[j];
1177
-
1178
- // test version of plugin (for future features)
1179
- pluginVersions = mejs.plugins[pluginName];
1180
-
1181
- for (k=0; k<pluginVersions.length; k++) {
1182
- pluginInfo = pluginVersions[k];
1183
-
1184
- // test if user has the correct plugin version
1185
-
1186
- // for youtube/vimeo
1187
- if (pluginInfo.version == null ||
1188
-
1189
- mejs.PluginDetector.hasPluginVersion(pluginName, pluginInfo.version)) {
1190
-
1191
- // test for plugin playback types
1192
- for (l=0; l<pluginInfo.types.length; l++) {
1193
- // find plugin that can play the type
1194
- if (type.toLowerCase() == pluginInfo.types[l].toLowerCase()) {
1195
- result.method = pluginName;
1196
- result.url = mediaFiles[i].url;
1197
- return result;
1198
- }
1199
- }
1200
- }
1201
- }
1202
- }
1203
- }
1204
- }
1205
-
1206
- // at this point, being in 'auto_plugin' mode implies that we tried plugins but failed.
1207
- // if we have native support then return that.
1208
- if (options.mode === 'auto_plugin' && result.method === 'native') {
1209
- return result;
1210
- }
1211
-
1212
- // what if there's nothing to play? just grab the first available
1213
- if (result.method === '' && mediaFiles.length > 0) {
1214
- result.url = mediaFiles[0].url;
1215
- }
1216
-
1217
- return result;
1218
- },
1219
-
1220
- formatType: function(url, type) {
1221
- // if no type is supplied, fake it with the extension
1222
- if (url && !type) {
1223
- return this.getTypeFromFile(url);
1224
- } else {
1225
- // only return the mime part of the type in case the attribute contains the codec
1226
- // see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
1227
- // `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
1228
-
1229
- if (type && ~type.indexOf(';')) {
1230
- return type.substr(0, type.indexOf(';'));
1231
- } else {
1232
- return type;
1233
- }
1234
- }
1235
- },
1236
-
1237
- getTypeFromFile: function(url) {
1238
- url = url.split('?')[0];
1239
- var
1240
- ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase(),
1241
- av = /(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext) ? 'video/' : 'audio/';
1242
- return this.getTypeFromExtension(ext, av);
1243
- },
1244
-
1245
- getTypeFromExtension: function(ext, av) {
1246
- av = av || '';
1247
-
1248
- switch (ext) {
1249
- case 'mp4':
1250
- case 'm4v':
1251
- case 'm4a':
1252
- case 'f4v':
1253
- case 'f4a':
1254
- return av + 'mp4';
1255
- case 'flv':
1256
- return av + 'x-flv';
1257
- case 'webm':
1258
- case 'webma':
1259
- case 'webmv':
1260
- return av + 'webm';
1261
- case 'ogg':
1262
- case 'oga':
1263
- case 'ogv':
1264
- return av + 'ogg';
1265
- case 'm3u8':
1266
- return 'application/x-mpegurl';
1267
- case 'ts':
1268
- return av + 'mp2t';
1269
- default:
1270
- return av + ext;
1271
- }
1272
- },
1273
-
1274
- createErrorMessage: function(playback, options, poster) {
1275
- var
1276
- htmlMediaElement = playback.htmlMediaElement,
1277
- errorContainer = document.createElement('div'),
1278
- errorContent = options.customError;
1279
-
1280
- errorContainer.className = 'me-cannotplay';
1281
-
1282
- try {
1283
- errorContainer.style.width = htmlMediaElement.width + 'px';
1284
- errorContainer.style.height = htmlMediaElement.height + 'px';
1285
- } catch (e) {}
1286
-
1287
- if (!errorContent) {
1288
- errorContent = '<a href="' + playback.url + '">';
1289
-
1290
- if (poster !== '') {
1291
- errorContent += '<img src="' + poster + '" width="100%" height="100%" alt="" />';
1292
- }
1293
-
1294
- errorContent += '<span>' + mejs.i18n.t('mejs.download-file') + '</span></a>';
1295
- }
1296
-
1297
- errorContainer.innerHTML = errorContent;
1298
-
1299
- htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
1300
- htmlMediaElement.style.display = 'none';
1301
-
1302
- options.error(htmlMediaElement);
1303
- },
1304
-
1305
- createPlugin:function(playback, options, poster, autoplay, preload, controls) {
1306
- var
1307
- htmlMediaElement = playback.htmlMediaElement,
1308
- width = 1,
1309
- height = 1,
1310
- pluginid = 'me_' + playback.method + '_' + (mejs.meIndex++),
1311
- pluginMediaElement = new mejs.PluginMediaElement(pluginid, playback.method, playback.url),
1312
- container = document.createElement('div'),
1313
- specialIEContainer,
1314
- node,
1315
- initVars;
1316
-
1317
- // copy tagName from html media element
1318
- pluginMediaElement.tagName = htmlMediaElement.tagName;
1319
-
1320
- // copy attributes from html media element to plugin media element
1321
- for (var i = 0; i < htmlMediaElement.attributes.length; i++) {
1322
- var attribute = htmlMediaElement.attributes[i];
1323
- if (attribute.specified) {
1324
- pluginMediaElement.setAttribute(attribute.name, attribute.value);
1325
- }
1326
- }
1327
-
1328
- // check for placement inside a <p> tag (sometimes WYSIWYG editors do this)
1329
- node = htmlMediaElement.parentNode;
1330
-
1331
- while (node !== null && node.tagName != null && node.tagName.toLowerCase() !== 'body' &&
1332
- node.parentNode != null && node.parentNode.tagName != null && node.parentNode.constructor != null && node.parentNode.constructor.name === "ShadowRoot") {
1333
- if (node.parentNode.tagName.toLowerCase() === 'p') {
1334
- node.parentNode.parentNode.insertBefore(node, node.parentNode);
1335
- break;
1336
- }
1337
- node = node.parentNode;
1338
- }
1339
-
1340
- if (playback.isVideo) {
1341
- width = (options.pluginWidth > 0) ? options.pluginWidth : (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
1342
- height = (options.pluginHeight > 0) ? options.pluginHeight : (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
1343
-
1344
- // in case of '%' make sure it's encoded
1345
- width = mejs.Utility.encodeUrl(width);
1346
- height = mejs.Utility.encodeUrl(height);
1347
-
1348
- } else {
1349
- if (options.enablePluginDebug) {
1350
- width = 320;
1351
- height = 240;
1352
- }
1353
- }
1354
-
1355
- // register plugin
1356
- pluginMediaElement.success = options.success;
1357
-
1358
- // add container (must be added to DOM before inserting HTML for IE)
1359
- container.className = 'me-plugin';
1360
- container.id = pluginid + '_container';
1361
-
1362
- if (playback.isVideo) {
1363
- htmlMediaElement.parentNode.insertBefore(container, htmlMediaElement);
1364
- } else {
1365
- document.body.insertBefore(container, document.body.childNodes[0]);
1366
- }
1367
-
1368
- if (playback.method === 'flash' || playback.method === 'silverlight') {
1369
-
1370
- var canPlayVideo = htmlMediaElement.getAttribute('type') === 'audio/mp4',
1371
- childrenSources = htmlMediaElement.getElementsByTagName('source');
1372
-
1373
- if (childrenSources && !canPlayVideo) {
1374
- for (var i = 0, total = childrenSources.length; i < total; i++) {
1375
- if (childrenSources[i].getAttribute('type') === 'audio/mp4') {
1376
- canPlayVideo = true;
1377
- }
1378
- }
1379
- }
1380
-
1381
- // flash/silverlight vars
1382
- initVars = [
1383
- 'id=' + pluginid,
1384
- 'isvideo=' + ((playback.isVideo || canPlayVideo) ? "true" : "false"),
1385
- 'autoplay=' + ((autoplay) ? "true" : "false"),
1386
- 'preload=' + preload,
1387
- 'width=' + width,
1388
- 'startvolume=' + options.startVolume,
1389
- 'timerrate=' + options.timerRate,
1390
- 'flashstreamer=' + options.flashStreamer,
1391
- 'height=' + height,
1392
- 'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
1393
-
1394
- if (playback.url !== null) {
1395
- if (playback.method == 'flash') {
1396
- initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
1397
- } else {
1398
- initVars.push('file=' + playback.url);
1399
- }
1400
- }
1401
- if (options.enablePluginDebug) {
1402
- initVars.push('debug=true');
1403
- }
1404
- if (options.enablePluginSmoothing) {
1405
- initVars.push('smoothing=true');
1406
- }
1407
- if (options.enablePseudoStreaming) {
1408
- initVars.push('pseudostreaming=true');
1409
- }
1410
- if (controls) {
1411
- initVars.push('controls=true'); // shows controls in the plugin if desired
1412
- }
1413
- if (options.pluginVars) {
1414
- initVars = initVars.concat(options.pluginVars);
1415
- }
1416
-
1417
- // call from plugin
1418
- window[pluginid + '_init'] = function() {
1419
- switch (pluginMediaElement.pluginType) {
1420
- case 'flash':
1421
- pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(pluginid);
1422
- break;
1423
- case 'silverlight':
1424
- pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
1425
- pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
1426
- break;
1427
- }
1428
-
1429
- if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
1430
- pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
1431
- }
1432
- };
1433
-
1434
- // event call from plugin
1435
- window[pluginid + '_event'] = function(eventName, values) {
1436
-
1437
- var
1438
- e,
1439
- i,
1440
- bufferedTime;
1441
-
1442
- // fake event object to mimic real HTML media event.
1443
- e = {
1444
- type: eventName,
1445
- target: pluginMediaElement
1446
- };
1447
-
1448
- // attach all values to element and event object
1449
- for (i in values) {
1450
- pluginMediaElement[i] = values[i];
1451
- e[i] = values[i];
1452
- }
1453
-
1454
- // fake the newer W3C buffered TimeRange (loaded and total have been removed)
1455
- bufferedTime = values.bufferedTime || 0;
1456
-
1457
- e.target.buffered = e.buffered = {
1458
- start: function(index) {
1459
- return 0;
1460
- },
1461
- end: function (index) {
1462
- return bufferedTime;
1463
- },
1464
- length: 1
1465
- };
1466
-
1467
- pluginMediaElement.dispatchEvent(e);
1468
- }
1469
-
1470
-
1471
- }
1472
-
1473
- switch (playback.method) {
1474
- case 'silverlight':
1475
- container.innerHTML =
1476
- '<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + pluginid + '" name="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
1477
- '<param name="initParams" value="' + initVars.join(',') + '" />' +
1478
- '<param name="windowless" value="true" />' +
1479
- '<param name="background" value="black" />' +
1480
- '<param name="minRuntimeVersion" value="3.0.0.0" />' +
1481
- '<param name="autoUpgrade" value="true" />' +
1482
- '<param name="source" value="' + options.pluginPath + options.silverlightName + '" />' +
1483
- '</object>';
1484
- break;
1485
-
1486
- case 'flash':
1487
-
1488
- if (mejs.MediaFeatures.isIE) {
1489
- specialIEContainer = document.createElement('div');
1490
- container.appendChild(specialIEContainer);
1491
- specialIEContainer.outerHTML =
1492
- '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
1493
- 'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
1494
- '<param name="movie" value="' + options.pluginPath + options.flashName + '?' + (new Date().getTime()) + '" />' +
1495
- '<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
1496
- '<param name="quality" value="high" />' +
1497
- '<param name="bgcolor" value="#000000" />' +
1498
- '<param name="wmode" value="transparent" />' +
1499
- '<param name="allowScriptAccess" value="' + options.flashScriptAccess + '" />' +
1500
- '<param name="allowFullScreen" value="true" />' +
1501
- '<param name="scale" value="default" />' +
1502
- '</object>';
1503
-
1504
- } else {
1505
-
1506
- container.innerHTML =
1507
- '<embed id="' + pluginid + '" name="' + pluginid + '" ' +
1508
- 'play="true" ' +
1509
- 'loop="false" ' +
1510
- 'quality="high" ' +
1511
- 'bgcolor="#000000" ' +
1512
- 'wmode="transparent" ' +
1513
- 'allowScriptAccess="' + options.flashScriptAccess + '" ' +
1514
- 'allowFullScreen="true" ' +
1515
- 'type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" ' +
1516
- 'src="' + options.pluginPath + options.flashName + '" ' +
1517
- 'flashvars="' + initVars.join('&') + '" ' +
1518
- 'width="' + width + '" ' +
1519
- 'height="' + height + '" ' +
1520
- 'scale="default"' +
1521
- 'class="mejs-shim"></embed>';
1522
- }
1523
- break;
1524
-
1525
- case 'youtube':
1526
-
1527
-
1528
- var videoId;
1529
- // youtu.be url from share button
1530
- if (playback.url.lastIndexOf("youtu.be") != -1) {
1531
- videoId = playback.url.substr(playback.url.lastIndexOf('/')+1);
1532
- if (videoId.indexOf('?') != -1) {
1533
- videoId = videoId.substr(0, videoId.indexOf('?'));
1534
- }
1535
- }
1536
- else {
1537
- // https://www.youtube.com/watch?v=
1538
- var videoIdMatch = playback.url.match( /[?&]v=([^&#]+)|&|#|$/ );
1539
- if ( videoIdMatch ) {
1540
- videoId = videoIdMatch[1];
1541
- }
1542
- }
1543
- youtubeSettings = {
1544
- container: container,
1545
- containerId: container.id,
1546
- pluginMediaElement: pluginMediaElement,
1547
- pluginId: pluginid,
1548
- videoId: videoId,
1549
- height: height,
1550
- width: width,
1551
- scheme: playback.scheme,
1552
- variables: options.youtubeIframeVars
1553
- };
1554
-
1555
- // favor iframe version of YouTube
1556
- if (window.postMessage) {
1557
- mejs.YouTubeApi.enqueueIframe(youtubeSettings);
1558
- } else if (mejs.PluginDetector.hasPluginVersion('flash', [10,0,0]) ) {
1559
- mejs.YouTubeApi.createFlash(youtubeSettings, options);
1560
- }
1561
- break;
1562
-
1563
- // DEMO Code. Does NOT work.
1564
- case 'vimeo':
1565
- var player_id = pluginid + "_player";
1566
- pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
1567
-
1568
- container.innerHTML ='<iframe src="' + playback.scheme + 'player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
1569
- if (typeof($f) == 'function') { // froogaloop available
1570
- var player = $f(container.childNodes[0]),
1571
- playerState = -1;
1572
-
1573
- player.addEvent('ready', function() {
1574
-
1575
- player.playVideo = function() {
1576
- player.api( 'play' );
1577
- };
1578
- player.stopVideo = function() {
1579
- player.api( 'unload' );
1580
- };
1581
- player.pauseVideo = function() {
1582
- player.api( 'pause' );
1583
- };
1584
- player.seekTo = function( seconds ) {
1585
- player.api( 'seekTo', seconds );
1586
- };
1587
- player.setVolume = function( volume ) {
1588
- player.api( 'setVolume', volume );
1589
- };
1590
- player.setMuted = function( muted ) {
1591
- if( muted ) {
1592
- player.lastVolume = player.api( 'getVolume' );
1593
- player.api( 'setVolume', 0 );
1594
- } else {
1595
- player.api( 'setVolume', player.lastVolume );
1596
- delete player.lastVolume;
1597
- }
1598
- };
1599
- // parity with YT player
1600
- player.getPlayerState = function() {
1601
- return playerState;
1602
- };
1603
-
1604
- function createEvent(player, pluginMediaElement, eventName, e) {
1605
- var event = {
1606
- type: eventName,
1607
- target: pluginMediaElement
1608
- };
1609
- if (eventName == 'timeupdate') {
1610
- pluginMediaElement.currentTime = event.currentTime = e.seconds;
1611
- pluginMediaElement.duration = event.duration = e.duration;
1612
- }
1613
- pluginMediaElement.dispatchEvent(event);
1614
- }
1615
-
1616
- player.addEvent('play', function() {
1617
- playerState = 1;
1618
- createEvent(player, pluginMediaElement, 'play');
1619
- createEvent(player, pluginMediaElement, 'playing');
1620
- });
1621
-
1622
- player.addEvent('pause', function() {
1623
- playerState = 2;
1624
- createEvent(player, pluginMediaElement, 'pause');
1625
- });
1626
-
1627
- player.addEvent('finish', function() {
1628
- playerState = 0;
1629
- createEvent(player, pluginMediaElement, 'ended');
1630
- });
1631
-
1632
- player.addEvent('playProgress', function(e) {
1633
- createEvent(player, pluginMediaElement, 'timeupdate', e);
1634
- });
1635
-
1636
- player.addEvent('seek', function(e) {
1637
- playerState = 3;
1638
- createEvent(player, pluginMediaElement, 'seeked', e);
1639
- });
1640
-
1641
- player.addEvent('loadProgress', function(e) {
1642
- playerState = 3;
1643
- createEvent(player, pluginMediaElement, 'progress', e);
1644
- });
1645
-
1646
- pluginMediaElement.pluginElement = container;
1647
- pluginMediaElement.pluginApi = player;
1648
-
1649
- pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
1650
- });
1651
- }
1652
- else {
1653
- console.warn("You need to include froogaloop for vimeo to work");
1654
- }
1655
- break;
1656
- }
1657
- // hide original element
1658
- htmlMediaElement.style.display = 'none';
1659
- // prevent browser from autoplaying when using a plugin
1660
- htmlMediaElement.removeAttribute('autoplay');
1661
-
1662
- return pluginMediaElement;
1663
- },
1664
-
1665
- updateNative: function(playback, options, autoplay, preload) {
1666
-
1667
- var htmlMediaElement = playback.htmlMediaElement,
1668
- m;
1669
-
1670
-
1671
- // add methods to video object to bring it into parity with Flash Object
1672
- for (m in mejs.HtmlMediaElement) {
1673
- htmlMediaElement[m] = mejs.HtmlMediaElement[m];
1674
- }
1675
-
1676
- /*
1677
- Chrome now supports preload="none"
1678
- if (mejs.MediaFeatures.isChrome) {
1679
-
1680
- // special case to enforce preload attribute (Chrome doesn't respect this)
1681
- if (preload === 'none' && !autoplay) {
1682
-
1683
- // forces the browser to stop loading (note: fails in IE9)
1684
- htmlMediaElement.src = '';
1685
- htmlMediaElement.load();
1686
- htmlMediaElement.canceledPreload = true;
1687
-
1688
- htmlMediaElement.addEventListener('play',function() {
1689
- if (htmlMediaElement.canceledPreload) {
1690
- htmlMediaElement.src = playback.url;
1691
- htmlMediaElement.load();
1692
- htmlMediaElement.play();
1693
- htmlMediaElement.canceledPreload = false;
1694
- }
1695
- }, false);
1696
- // for some reason Chrome forgets how to autoplay sometimes.
1697
- } else if (autoplay) {
1698
- htmlMediaElement.load();
1699
- htmlMediaElement.play();
1700
- }
1701
- }
1702
- */
1703
-
1704
- // fire success code
1705
- options.success(htmlMediaElement, htmlMediaElement);
1706
-
1707
- return htmlMediaElement;
1708
- }
1709
- };
1710
-
1711
- /*
1712
- - test on IE (object vs. embed)
1713
- - determine when to use iframe (Firefox, Safari, Mobile) vs. Flash (Chrome, IE)
1714
- - fullscreen?
1715
- */
1716
-
1717
- // YouTube Flash and Iframe API
1718
- mejs.YouTubeApi = {
1719
- isIframeStarted: false,
1720
- isIframeLoaded: false,
1721
- loadIframeApi: function(yt) {
1722
- if (!this.isIframeStarted) {
1723
- var tag = document.createElement('script');
1724
- tag.src = yt.scheme + "www.youtube.com/player_api";
1725
- var firstScriptTag = document.getElementsByTagName('script')[0];
1726
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
1727
- this.isIframeStarted = true;
1728
- }
1729
- },
1730
- iframeQueue: [],
1731
- enqueueIframe: function(yt) {
1732
-
1733
- if (this.isLoaded) {
1734
- this.createIframe(yt);
1735
- } else {
1736
- this.loadIframeApi(yt);
1737
- this.iframeQueue.push(yt);
1738
- }
1739
- },
1740
- createIframe: function(settings) {
1741
-
1742
- var
1743
- pluginMediaElement = settings.pluginMediaElement,
1744
- defaultVars = {controls:0, wmode:'transparent'},
1745
- player = new YT.Player(settings.containerId, {
1746
- height: settings.height,
1747
- width: settings.width,
1748
- videoId: settings.videoId,
1749
- playerVars: mejs.$.extend({}, defaultVars, settings.variables),
1750
- events: {
1751
- 'onReady': function(e) {
1752
-
1753
- // wrapper to match
1754
- player.setVideoSize = function(width, height) {
1755
- player.setSize(width, height);
1756
- };
1757
-
1758
- // hook up iframe object to MEjs
1759
- settings.pluginMediaElement.pluginApi = player;
1760
- settings.pluginMediaElement.pluginElement = document.getElementById(settings.containerId);
1761
-
1762
- // init mejs
1763
- pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
1764
-
1765
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'canplay');
1766
-
1767
- // create timer
1768
- setInterval(function() {
1769
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
1770
- }, 250);
1771
-
1772
- if (typeof pluginMediaElement.attributes.autoplay !== 'undefined') {
1773
- player.playVideo();
1774
- }
1775
- },
1776
- 'onStateChange': function(e) {
1777
-
1778
- mejs.YouTubeApi.handleStateChange(e.data, player, pluginMediaElement);
1779
-
1780
- }
1781
- }
1782
- });
1783
- },
1784
-
1785
- createEvent: function (player, pluginMediaElement, eventName) {
1786
- var event = {
1787
- type: eventName,
1788
- target: pluginMediaElement
1789
- };
1790
-
1791
- if (player && player.getDuration) {
1792
-
1793
- // time
1794
- pluginMediaElement.currentTime = event.currentTime = player.getCurrentTime();
1795
- pluginMediaElement.duration = event.duration = player.getDuration();
1796
-
1797
- // state
1798
- event.paused = pluginMediaElement.paused;
1799
- event.ended = pluginMediaElement.ended;
1800
-
1801
- // sound
1802
- event.muted = player.isMuted();
1803
- event.volume = player.getVolume() / 100;
1804
-
1805
- // progress
1806
- event.bytesTotal = player.getVideoBytesTotal();
1807
- event.bufferedBytes = player.getVideoBytesLoaded();
1808
-
1809
- // fake the W3C buffered TimeRange
1810
- var bufferedTime = event.bufferedBytes / event.bytesTotal * event.duration;
1811
-
1812
- event.target.buffered = event.buffered = {
1813
- start: function(index) {
1814
- return 0;
1815
- },
1816
- end: function (index) {
1817
- return bufferedTime;
1818
- },
1819
- length: 1
1820
- };
1821
-
1822
- }
1823
-
1824
- // send event up the chain
1825
- pluginMediaElement.dispatchEvent(event);
1826
- },
1827
-
1828
- iFrameReady: function() {
1829
-
1830
- this.isLoaded = true;
1831
- this.isIframeLoaded = true;
1832
-
1833
- while (this.iframeQueue.length > 0) {
1834
- var settings = this.iframeQueue.pop();
1835
- this.createIframe(settings);
1836
- }
1837
- },
1838
-
1839
- // FLASH!
1840
- flashPlayers: {},
1841
- createFlash: function(settings) {
1842
-
1843
- this.flashPlayers[settings.pluginId] = settings;
1844
-
1845
- /*
1846
- settings.container.innerHTML =
1847
- '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
1848
- 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
1849
- '<param name="allowScriptAccess" value="sameDomain">' +
1850
- '<param name="wmode" value="transparent">' +
1851
- '</object>';
1852
- */
1853
-
1854
- var specialIEContainer,
1855
- youtubeUrl = settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
1856
-
1857
- if (mejs.MediaFeatures.isIE) {
1858
-
1859
- specialIEContainer = document.createElement('div');
1860
- settings.container.appendChild(specialIEContainer);
1861
- specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + settings.scheme + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
1862
- 'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' +
1863
- '<param name="movie" value="' + youtubeUrl + '" />' +
1864
- '<param name="wmode" value="transparent" />' +
1865
- '<param name="allowScriptAccess" value="' + options.flashScriptAccess + '" />' +
1866
- '<param name="allowFullScreen" value="true" />' +
1867
- '</object>';
1868
- } else {
1869
- settings.container.innerHTML =
1870
- '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + youtubeUrl + '" ' +
1871
- 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
1872
- '<param name="allowScriptAccess" value="' + options.flashScriptAccess + '">' +
1873
- '<param name="wmode" value="transparent">' +
1874
- '</object>';
1875
- }
1876
-
1877
- },
1878
-
1879
- flashReady: function(id) {
1880
- var
1881
- settings = this.flashPlayers[id],
1882
- player = document.getElementById(id),
1883
- pluginMediaElement = settings.pluginMediaElement;
1884
-
1885
- // hook up and return to MediaELementPlayer.success
1886
- pluginMediaElement.pluginApi =
1887
- pluginMediaElement.pluginElement = player;
1888
-
1889
- settings.success(pluginMediaElement, pluginMediaElement.pluginElement);
1890
-
1891
- // load the youtube video
1892
- player.cueVideoById(settings.videoId);
1893
-
1894
- var callbackName = settings.containerId + '_callback';
1895
-
1896
- window[callbackName] = function(e) {
1897
- mejs.YouTubeApi.handleStateChange(e, player, pluginMediaElement);
1898
- };
1899
-
1900
- player.addEventListener('onStateChange', callbackName);
1901
-
1902
- setInterval(function() {
1903
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
1904
- }, 250);
1905
-
1906
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'canplay');
1907
- },
1908
-
1909
- handleStateChange: function(youTubeState, player, pluginMediaElement) {
1910
- switch (youTubeState) {
1911
- case -1: // not started
1912
- pluginMediaElement.paused = true;
1913
- pluginMediaElement.ended = true;
1914
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'loadedmetadata');
1915
- //createYouTubeEvent(player, pluginMediaElement, 'loadeddata');
1916
- break;
1917
- case 0:
1918
- pluginMediaElement.paused = false;
1919
- pluginMediaElement.ended = true;
1920
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'ended');
1921
- break;
1922
- case 1:
1923
- pluginMediaElement.paused = false;
1924
- pluginMediaElement.ended = false;
1925
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'play');
1926
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'playing');
1927
- break;
1928
- case 2:
1929
- pluginMediaElement.paused = true;
1930
- pluginMediaElement.ended = false;
1931
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'pause');
1932
- break;
1933
- case 3: // buffering
1934
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'progress');
1935
- break;
1936
- case 5:
1937
- // cued?
1938
- break;
1939
-
1940
- }
1941
-
1942
- }
1943
- }
1944
- // IFRAME
1945
- window.onYouTubePlayerAPIReady = function() {
1946
- mejs.YouTubeApi.iFrameReady();
1947
- };
1948
- // FLASH
1949
- window.onYouTubePlayerReady = function(id) {
1950
- mejs.YouTubeApi.flashReady(id);
1951
- };
1952
-
1953
- window.mejs = mejs;
1954
- window.MediaElement = mejs.MediaElement;
1955
-
1956
- /**
1957
- * Localize strings
1958
- *
1959
- * Include translations from JS files and method to pluralize properly strings.
1960
- *
1961
- */
1962
- (function (doc, win, mejs, undefined) {
1963
-
1964
- var i18n = {
1965
- /**
1966
- * @type {String}
1967
- */
1968
- 'default': 'en',
1969
-
1970
- /**
1971
- * @type {String[]}
1972
- */
1973
- locale: {
1974
- language: (mejs.i18n && mejs.i18n.locale.language) || '',
1975
- strings: (mejs.i18n && mejs.i18n.locale.strings) || {}
1976
- },
1977
-
1978
- /**
1979
- * Filters for available languages.
1980
- *
1981
- * This plural forms are grouped in family groups based on
1982
- * https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
1983
- * with some additions and corrections according to the Localization Guide list
1984
- * (http://localization-guide.readthedocs.io/en/latest/l10n/pluralforms.html)
1985
- *
1986
- * Arguments are dynamic following the structure:
1987
- * - argument1 : Number to determine form
1988
- * - argument2...argumentN: Possible matches
1989
- *
1990
- * @type {Function[]}
1991
- */
1992
- pluralForms: [
1993
- // 0: Chinese, Japanese, Korean, Persian, Turkish, Thai, Lao, Aymará,
1994
- // Tibetan, Chiga, Dzongkha, Indonesian, Lojban, Georgian, Kazakh, Khmer, Kyrgyz, Malay,
1995
- // Burmese, Yakut, Sundanese, Tatar, Uyghur, Vietnamese, Wolof
1996
- function () {
1997
- return arguments[1];
1998
- },
1999
- // 1: Danish, Dutch, English, Faroese, Frisian, German, Norwegian, Swedish, Estonian, Finnish,
2000
- // Hungarian, Basque, Greek, Hebrew, Italian, Portuguese, Spanish, Catalan, Afrikaans,
2001
- // Angika, Assamese, Asturian, Azerbaijani, Bulgarian, Bengali, Bodo, Aragonese, Dogri,
2002
- // Esperanto, Argentinean Spanish, Fulah, Friulian, Galician, Gujarati, Hausa,
2003
- // Hindi, Chhattisgarhi, Armenian, Interlingua, Greenlandic, Kannada, Kurdish, Letzeburgesch,
2004
- // Maithili, Malayalam, Mongolian, Manipuri, Marathi, Nahuatl, Neapolitan, Norwegian Bokmal,
2005
- // Nepali, Norwegian Nynorsk, Norwegian (old code), Northern Sotho, Oriya, Punjabi, Papiamento,
2006
- // Piemontese, Pashto, Romansh, Kinyarwanda, Santali, Scots, Sindhi, Northern Sami, Sinhala,
2007
- // Somali, Songhay, Albanian, Swahili, Tamil, Telugu, Turkmen, Urdu, Yoruba
2008
- function () {
2009
- var args = arguments;
2010
- if (args[0] === 1) {
2011
- return args[1];
2012
- } else {
2013
- return args[2];
2014
- }
2015
- },
2016
- // 2: French, Brazilian Portuguese, Acholi, Akan, Amharic, Mapudungun, Breton, Filipino,
2017
- // Gun, Lingala, Mauritian Creole, Malagasy, Maori, Occitan, Tajik, Tigrinya, Uzbek, Walloon
2018
- function () {
2019
- var args = arguments;
2020
- if ([0, 1].indexOf(args[0]) > -1) {
2021
- return args[1];
2022
- } else {
2023
- return args[2];
2024
- }
2025
- },
2026
- // 3: Latvian
2027
- function () {
2028
- var args = arguments;
2029
- if (args[0] % 10 === 1 && args[0] % 100 !== 11) {
2030
- return args[1];
2031
- } else if (args[0] !== 0) {
2032
- return args[2];
2033
- } else {
2034
- return args[3];
2035
- }
2036
- },
2037
- // 4: Scottish Gaelic
2038
- function () {
2039
- var args = arguments;
2040
- if (args[0] === 1 || args[0] === 11) {
2041
- return args[1];
2042
- } else if (args[0] === 2 || args[0] === 12) {
2043
- return args[2];
2044
- } else if (args[0] > 2 && args[0] < 20) {
2045
- return args[3];
2046
- } else {
2047
- return args[4];
2048
- }
2049
- },
2050
- // 5: Romanian
2051
- function () {
2052
- if (args[0] === 1) {
2053
- return args[1];
2054
- } else if (args[0] === 0 || (args[0] % 100 > 0 && args[0] % 100 < 20)) {
2055
- return args[2];
2056
- } else {
2057
- return args[3];
2058
- }
2059
- },
2060
- // 6: Lithuanian
2061
- function () {
2062
- var args = arguments;
2063
- if (args[0] % 10 === 1 && args[0] % 100 !== 11) {
2064
- return args[1];
2065
- } else if (args[0] % 10 >= 2 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2066
- return args[2];
2067
- } else {
2068
- return [3];
2069
- }
2070
- },
2071
- // 7: Belarusian, Bosnian, Croatian, Serbian, Russian, Ukrainian
2072
- function () {
2073
- var args = arguments;
2074
- if (args[0] % 10 === 1 && args[0] % 100 !== 11) {
2075
- return args[1];
2076
- } else if (args[0] % 10 >= 2 && args[0] % 10 <= 4 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2077
- return args[2];
2078
- } else {
2079
- return args[3];
2080
- }
2081
- },
2082
- // 8: Slovak, Czech
2083
- function () {
2084
- var args = arguments;
2085
- if (args[0] === 1) {
2086
- return args[1];
2087
- } else if (args[0] >= 2 && args[0] <= 4) {
2088
- return args[2];
2089
- } else {
2090
- return args[3];
2091
- }
2092
- },
2093
- // 9: Polish
2094
- function () {
2095
- var args = arguments;
2096
- if (args[0] === 1) {
2097
- return args[1];
2098
- } else if (args[0] % 10 >= 2 && args[0] % 10 <= 4 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2099
- return args[2];
2100
- } else {
2101
- return args[3];
2102
- }
2103
- },
2104
- // 10: Slovenian
2105
- function () {
2106
- var args = arguments;
2107
- if (args[0] % 100 === 1) {
2108
- return args[2];
2109
- } else if (args[0] % 100 === 2) {
2110
- return args[3];
2111
- } else if (args[0] % 100 === 3 || args[0] % 100 === 4) {
2112
- return args[4];
2113
- } else {
2114
- return args[1];
2115
- }
2116
- },
2117
- // 11: Irish Gaelic
2118
- function () {
2119
- var args = arguments;
2120
- if (args[0] === 1) {
2121
- return args[1];
2122
- } else if (args[0] === 2) {
2123
- return args[2];
2124
- } else if (args[0] > 2 && args[0] < 7) {
2125
- return args[3];
2126
- } else if (args[0] > 6 && args[0] < 11) {
2127
- return args[4];
2128
- } else {
2129
- return args[5];
2130
- }
2131
- },
2132
- // 12: Arabic
2133
- function () {
2134
- var args = arguments;
2135
- if (args[0] === 0) {
2136
- return args[1];
2137
- } else if (args[0] === 1) {
2138
- return args[2];
2139
- } else if (args[0] === 2) {
2140
- return args[3];
2141
- } else if (args[0] % 100 >= 3 && args[0] % 100 <= 10) {
2142
- return args[4];
2143
- } else if (args[0] % 100 >= 11) {
2144
- return args[5];
2145
- } else {
2146
- return args[6];
2147
- }
2148
- },
2149
- // 13: Maltese
2150
- function () {
2151
- var args = arguments;
2152
- if (args[0] === 1) {
2153
- return args[1];
2154
- } else if (args[0] === 0 || (args[0] % 100 > 1 && args[0] % 100 < 11)) {
2155
- return args[2];
2156
- } else if (args[0] % 100 > 10 && args[0] % 100 < 20) {
2157
- return args[3];
2158
- } else {
2159
- return args[4];
2160
- }
2161
-
2162
- },
2163
- // 14: Macedonian
2164
- function () {
2165
- var args = arguments;
2166
- if (args[0] % 10 === 1) {
2167
- return args[1];
2168
- } else if (args[0] % 10 === 2) {
2169
- return args[2];
2170
- } else {
2171
- return args[3];
2172
- }
2173
- },
2174
- // 15: Icelandic
2175
- function () {
2176
- var args = arguments;
2177
- if (args[0] !== 11 && args[0] % 10 === 1) {
2178
- return args[1];
2179
- } else {
2180
- return args[2];
2181
- }
2182
- },
2183
- // New additions
2184
-
2185
- // 16: Kashubian
2186
- // Note: in https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
2187
- // Breton is listed as #16 but in the Localization Guide it belongs to the group 2
2188
- function () {
2189
- var args = arguments;
2190
- if (args[0] === 1) {
2191
- return args[1];
2192
- } else if (args[0] % 10 >= 2 && args[0] % 10 <= 4 && (args[0] % 100 < 10 || args[0] % 100 >= 20)) {
2193
- return args[2];
2194
- } else {
2195
- return args[3];
2196
- }
2197
- },
2198
- // 17: Welsh
2199
- function () {
2200
- var args = arguments;
2201
- if (args[0] === 1) {
2202
- return args[1];
2203
- } else if (args[0] === 2) {
2204
- return args[2];
2205
- } else if (args[0] !== 8 && args[0] !== 11) {
2206
- return args[3];
2207
- } else {
2208
- return args[4];
2209
- }
2210
- },
2211
- // 18: Javanese
2212
- function () {
2213
- var args = arguments;
2214
- if (args[0] === 0) {
2215
- return args[1];
2216
- } else {
2217
- return args[2];
2218
- }
2219
- },
2220
- // 19: Cornish
2221
- function () {
2222
- var args = arguments;
2223
- if (args[0] === 1) {
2224
- return args[1];
2225
- } else if (args[0] === 2) {
2226
- return args[2];
2227
- } else if (args[0] === 3) {
2228
- return args[3];
2229
- } else {
2230
- return args[4];
2231
- }
2232
- },
2233
- // 20: Mandinka
2234
- function () {
2235
- var args = arguments;
2236
- if (args[0] === 0) {
2237
- return args[1];
2238
- } else if (args[0] === 1) {
2239
- return args[2];
2240
- } else {
2241
- return args[3];
2242
- }
2243
- }
2244
- ],
2245
- /**
2246
- * Get specified language
2247
- *
2248
- */
2249
- getLanguage: function () {
2250
- var language = i18n.locale.language || i18n['default'];
2251
- return /^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/.exec(language) ? language : i18n['default'];
2252
- },
2253
-
2254
- /**
2255
- * Translate a string to a specified language, including optionally a number to pluralize translation
2256
- *
2257
- * @param {String} message
2258
- * @param {Number} pluralParam
2259
- * @return {String}
2260
- */
2261
- t: function (message, pluralParam) {
2262
-
2263
- if (typeof message === 'string' && message.length) {
2264
-
2265
- var
2266
- language = i18n.getLanguage(),
2267
- str,
2268
- pluralForm,
2269
- /**
2270
- * Modify string using algorithm to detect plural forms.
2271
- *
2272
- * @private
2273
- * @see http://stackoverflow.com/questions/1353408/messageformat-in-javascript-parameters-in-localized-ui-strings
2274
- * @param {String|String[]} input - String or array of strings to pick the plural form
2275
- * @param {Number} number - Number to determine the proper plural form
2276
- * @param {Number} form - Number of language family to apply plural form
2277
- * @return {String}
2278
- */
2279
- plural = function (input, number, form) {
2280
-
2281
- if (typeof input !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
2282
- return input;
2283
- }
2284
-
2285
- if (typeof input === 'string') {
2286
- return input;
2287
- }
2288
-
2289
- // Perform plural form or return original text
2290
- return i18n.pluralForms[form].apply(null, [number].concat(input));
2291
- },
2292
- /**
2293
- *
2294
- * @param {String} input
2295
- * @return {String}
2296
- */
2297
- escapeHTML = function (input) {
2298
- var map = {
2299
- '&': '&amp;',
2300
- '<': '&lt;',
2301
- '>': '&gt;',
2302
- '"': '&quot;'
2303
- };
2304
-
2305
- return input.replace(/[&<>"]/g, function(c) {
2306
- return map[c];
2307
- });
2308
- }
2309
- ;
2310
-
2311
- // Fetch the localized version of the string
2312
- if (i18n.locale.strings && i18n.locale.strings[language]) {
2313
- str = i18n.locale.strings[language][message];
2314
- if (typeof pluralParam === 'number') {
2315
- pluralForm = i18n.locale.strings[language]['mejs.plural-form'];
2316
- str = plural.apply(null, [str, pluralParam, pluralForm]);
2317
- }
2318
- }
2319
-
2320
- // Fallback to default language if requested uid is not translated
2321
- if (!str && i18n.locale.strings && i18n.locale.strings[i18n['default']]) {
2322
- str = i18n.locale.strings[i18n['default']][message];
2323
- if (typeof pluralParam === 'number') {
2324
- pluralForm = i18n.locale.strings[i18n['default']]['mejs.plural-form'];
2325
- str = plural.apply(null, [str, pluralParam, pluralForm]);
2326
-
2327
- }
2328
- }
2329
-
2330
- // As a last resort, use the requested uid, to mimic original behavior of i18n utils (in which uid was the english text)
2331
- str = str || message;
2332
-
2333
- // Replace token
2334
- if (typeof pluralParam === 'number') {
2335
- str = str.replace('%1', pluralParam);
2336
- }
2337
-
2338
- return escapeHTML(str);
2339
-
2340
- }
2341
-
2342
- return message;
2343
- }
2344
-
2345
- };
2346
-
2347
- // i18n fixes for compatibility with WordPress
2348
- if (typeof mejsL10n !== 'undefined') {
2349
- i18n.locale.language = mejsL10n.language;
2350
- }
2351
-
2352
- // Register variable
2353
- mejs.i18n = i18n;
2354
-
2355
-
2356
- }(document, window, mejs));
2357
-
2358
- // i18n fixes for compatibility with WordPress
2359
- ;(function (mejs, undefined) {
2360
-
2361
- "use strict";
2362
-
2363
- if (typeof mejsL10n !== 'undefined') {
2364
- mejs[mejsL10n.language] = mejsL10n.strings;
2365
- }
2366
-
2367
- }(mejs.i18n.locale.strings));
2368
- /*!
2369
- * This is a i18n.locale language object.
2370
- *
2371
- * English; This can serve as a template for other languages to translate
2372
- *
2373
- * @author
2374
- * TBD
2375
- * Sascha Greuel (Twitter: @SoftCreatR)
2376
- *
2377
- * @see
2378
- * me-i18n.js
2379
- *
2380
- * @params
2381
- * - exports - CommonJS, window ..
2382
- */
2383
- (function (exports) {
2384
- "use strict";
2385
-
2386
- if (exports.en === undefined) {
2387
- exports.en = {
2388
- "mejs.plural-form": 1,
2389
-
2390
- // me-shim
2391
- "mejs.download-file": "Download File",
2392
-
2393
- // mep-feature-contextmenu
2394
- "mejs.fullscreen-off": "Turn off Fullscreen",
2395
- "mejs.fullscreen-on": "Go Fullscreen",
2396
- "mejs.download-video": "Download Video",
2397
-
2398
- // mep-feature-fullscreen
2399
- "mejs.fullscreen": "Fullscreen",
2400
-
2401
- // mep-feature-jumpforward
2402
- "mejs.time-jump-forward": ["Jump forward 1 second", "Jump forward %1 seconds"],
2403
-
2404
- // mep-feature-playpause
2405
- "mejs.play": "Play",
2406
- "mejs.pause": "Pause",
2407
-
2408
- // mep-feature-postroll
2409
- "mejs.close": "Close",
2410
-
2411
- // mep-feature-progress
2412
- "mejs.time-slider": "Time Slider",
2413
- "mejs.time-help-text": "Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.",
2414
-
2415
- // mep-feature-skipback
2416
- "mejs.time-skip-back": ["Skip back 1 second", "Skip back %1 seconds"],
2417
-
2418
- // mep-feature-tracks
2419
- "mejs.captions-subtitles": "Captions/Subtitles",
2420
- "mejs.none": "None",
2421
-
2422
- // mep-feature-volume
2423
- "mejs.mute-toggle": "Mute Toggle",
2424
- "mejs.volume-help-text": "Use Up/Down Arrow keys to increase or decrease volume.",
2425
- "mejs.unmute": "Unmute",
2426
- "mejs.mute": "Mute",
2427
- "mejs.volume-slider": "Volume Slider",
2428
-
2429
- // mep-player
2430
- "mejs.video-player": "Video Player",
2431
- "mejs.audio-player": "Audio Player",
2432
-
2433
- // mep-feature-ads
2434
- "mejs.ad-skip": "Skip ad",
2435
- "mejs.ad-skip-info": ["Skip in 1 second", "Skip in %1 seconds"],
2436
-
2437
- // mep-feature-sourcechooser
2438
- "mejs.source-chooser": "Source Chooser"
2439
- };
2440
- }
2441
- }(mejs.i18n.locale.strings));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mediaelement.min.js DELETED
@@ -1,30 +0,0 @@
1
- /*!
2
- *
3
- * MediaElement.js
4
- * HTML5 <video> and <audio> shim and player
5
- * http://mediaelementjs.com/
6
- *
7
- * Creates a JavaScript object that mimics HTML5 MediaElement API
8
- * for browsers that don't understand HTML5 or can't play the provided codec
9
- * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
10
- *
11
- * Copyright 2010-2014, John Dyer (http://j.hn)
12
- * License: MIT
13
- *
14
- */
15
- var mejs=mejs||{};mejs.version="2.23.5",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mp4","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL","audio/ogg"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;i<len;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}},determineScheme:function(a){return a&&-1!=a.indexOf("://")?a.substr(0,a.indexOf("://")+3):"//"},debounce:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},isNodeAfter:function(a,b){return!!(a&&b&&"function"==typeof a.compareDocumentPosition&&a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_PRECEDING)}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svgAsImg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.supportsPointerEvents=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}(),c.hasFirefoxPluginMovingProblem=!1,c.hasiOSFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasiOSFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasiOSFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasiOSFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?1==this.pluginApi.getPlayerState()&&this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?this.pluginApi.setVolume(100*a):this.pluginApi.setVolume(a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b,c){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:null},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id)}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,customError:"",success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=h?f.getAttribute("src"):f.getAttribute("href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"",c.scheme=mejs.Utility.determineScheme(c.url),"native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!==a.tagName.toLowerCase(),scheme:""};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),r.isVideo&&mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),r.isVideo&&mejs.MediaFeatures.isChromium&&(a.canPlayType=function(a){return null!==a.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),c&&("auto"===b.mode||"auto_plugin"===b.mode||"native"===b.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||b.httpsBasicAuthSite!==!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("mejs.download-file")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}if(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),"flash"===a.method||"silverlight"===a.method){var r="audio/mp4"===j.getAttribute("type"),s=j.getElementsByTagName("source");if(s&&!r)for(var p=0,t=s.length;t>p;p++)"audio/mp4"===s[p].getAttribute("type")&&(r=!0);i=["id="+m,"isvideo="+(a.isVideo||r?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&("flash"==a.method?i.push("file="+mejs.Utility.encodeUrl(a.url)):i.push("file="+a.url)),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),window[m+"_init"]=function(){switch(n.pluginType){case"flash":n.pluginElement=n.pluginApi=document.getElementById(m);break;case"silverlight":n.pluginElement=document.getElementById(n.id),n.pluginApi=n.pluginElement.Content.MediaElementJS}null!=n.pluginApi&&n.success&&n.success(n,j)},window[m+"_event"]=function(a,b){var c,d,e;c={type:a,target:n};for(d in b)n[d]=b[d],c[d]=b[d];e=b.bufferedTime||0,c.target.buffered=c.buffered={start:function(a){return 0},end:function(a){return e},length:1},n.dispatchEvent(c)}}switch(a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var u;if(-1!=a.url.lastIndexOf("youtu.be"))u=a.url.substr(a.url.lastIndexOf("/")+1),-1!=u.indexOf("?")&&(u=u.substr(0,u.indexOf("?")));else{var v=a.url.match(/[?&]v=([^&#]+)|&|#|$/);v&&(u=v[1])}youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:u,height:l,width:k,scheme:a.scheme,variables:b.youtubeIframeVars},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,b);break;case"vimeo":var w=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="'+a.scheme+"player.vimeo.com/video/"+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+w+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+w+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var x=$f(o.childNodes[0]),y=-1;x.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}x.playVideo=function(){x.api("play")},x.stopVideo=function(){x.api("unload")},x.pauseVideo=function(){x.api("pause")},x.seekTo=function(a){x.api("seekTo",a)},x.setVolume=function(a){x.api("setVolume",a)},x.setMuted=function(a){a?(x.lastVolume=x.api("getVolume"),x.api("setVolume",0)):(x.api("setVolume",x.lastVolume),delete x.lastVolume)},x.getPlayerState=function(){return y},x.addEvent("play",function(){y=1,a(x,n,"play"),a(x,n,"playing")}),x.addEvent("pause",function(){y=2,a(x,n,"pause")}),x.addEvent("finish",function(){y=0,a(x,n,"ended")}),x.addEvent("playProgress",function(b){a(x,n,"timeupdate",b)}),x.addEvent("seek",function(b){y=3,a(x,n,"seeked",b)}),x.addEvent("loadProgress",function(b){y=3,a(x,n,"progress",b)}),n.pluginElement=o,n.pluginApi=x,n.success(n,n.pluginElement)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b,c,d){var e,f=a.htmlMediaElement;for(e in mejs.HtmlMediaElement)f[e]=mejs.HtmlMediaElement[e];return b.success(f,f),f}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(a){if(!this.isIframeStarted){var b=document.createElement("script");b.src=a.scheme+"www.youtube.com/player_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(a),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c={controls:0,wmode:"transparent"},d=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:mejs.$.extend({},c,a.variables),events:{onReady:function(c){d.setVideoSize=function(a,b){d.setSize(a,b)},a.pluginMediaElement.pluginApi=d,a.pluginMediaElement.pluginElement=document.getElementById(a.containerId),b.success(b,b.pluginElement),mejs.YouTubeApi.createEvent(d,b,"canplay"),setInterval(function(){mejs.YouTubeApi.createEvent(d,b,"timeupdate")},250),"undefined"!=typeof b.attributes.autoplay&&d.playVideo()},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,d,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(a){return 0},end:function(a){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c=a.scheme+"www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+a.scheme+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,b.success(d,d.pluginElement),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b,c,d){var e={"default":"en",locale:{language:c.i18n&&c.i18n.locale.language||"",strings:c.i18n&&c.i18n.locale.strings||{}},pluralForms:[function(){return arguments[1]},function(){var a=arguments;return 1===a[0]?a[1]:a[2]},function(){var a=arguments;return[0,1].indexOf(a[0])>-1?a[1]:a[2]},function(){var a=arguments;return a[0]%10===1&&a[0]%100!==11?a[1]:0!==a[0]?a[2]:a[3]},function(){var a=arguments;return 1===a[0]||11===a[0]?a[1]:2===a[0]||12===a[0]?a[2]:a[0]>2&&a[0]<20?a[3]:a[4]},function(){return 1===args[0]?args[1]:0===args[0]||args[0]%100>0&&args[0]%100<20?args[2]:args[3]},function(){var a=arguments;return a[0]%10===1&&a[0]%100!==11?a[1]:a[0]%10>=2&&(a[0]%100<10||a[0]%100>=20)?a[2]:[3]},function(){var a=arguments;return a[0]%10===1&&a[0]%100!==11?a[1]:a[0]%10>=2&&a[0]%10<=4&&(a[0]%100<10||a[0]%100>=20)?a[2]:a[3]},function(){var a=arguments;return 1===a[0]?a[1]:a[0]>=2&&a[0]<=4?a[2]:a[3]},function(){var a=arguments;return 1===a[0]?a[1]:a[0]%10>=2&&a[0]%10<=4&&(a[0]%100<10||a[0]%100>=20)?a[2]:a[3]},function(){var a=arguments;return a[0]%100===1?a[2]:a[0]%100===2?a[3]:a[0]%100===3||a[0]%100===4?a[4]:a[1]},function(){var a=arguments;return 1===a[0]?a[1]:2===a[0]?a[2]:a[0]>2&&a[0]<7?a[3]:a[0]>6&&a[0]<11?a[4]:a[5]},function(){var a=arguments;return 0===a[0]?a[1]:1===a[0]?a[2]:2===a[0]?a[3]:a[0]%100>=3&&a[0]%100<=10?a[4]:a[0]%100>=11?a[5]:a[6]},function(){var a=arguments;return 1===a[0]?a[1]:0===a[0]||a[0]%100>1&&a[0]%100<11?a[2]:a[0]%100>10&&a[0]%100<20?a[3]:a[4]},function(){var a=arguments;return a[0]%10===1?a[1]:a[0]%10===2?a[2]:a[3]},function(){var a=arguments;return 11!==a[0]&&a[0]%10===1?a[1]:a[2]},function(){var a=arguments;return 1===a[0]?a[1]:a[0]%10>=2&&a[0]%10<=4&&(a[0]%100<10||a[0]%100>=20)?a[2]:a[3]},function(){var a=arguments;return 1===a[0]?a[1]:2===a[0]?a[2]:8!==a[0]&&11!==a[0]?a[3]:a[4]},function(){var a=arguments;return 0===a[0]?a[1]:a[2]},function(){var a=arguments;return 1===a[0]?a[1]:2===a[0]?a[2]:3===a[0]?a[3]:a[4]},function(){var a=arguments;return 0===a[0]?a[1]:1===a[0]?a[2]:a[3]}],getLanguage:function(){var a=e.locale.language||e["default"];return/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/.exec(a)?a:e["default"]},t:function(a,b){if("string"==typeof a&&a.length){var c,d,f=e.getLanguage(),g=function(a,b,c){return"object"!=typeof a||"number"!=typeof b||"number"!=typeof c?a:"string"==typeof a?a:e.pluralForms[c].apply(null,[b].concat(a))},h=function(a){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return a.replace(/[&<>"]/g,function(a){return b[a]})};return e.locale.strings&&e.locale.strings[f]&&(c=e.locale.strings[f][a],"number"==typeof b&&(d=e.locale.strings[f]["mejs.plural-form"],c=g.apply(null,[c,b,d]))),!c&&e.locale.strings&&e.locale.strings[e["default"]]&&(c=e.locale.strings[e["default"]][a],"number"==typeof b&&(d=e.locale.strings[e["default"]]["mejs.plural-form"],c=g.apply(null,[c,b,d]))),c=c||a,"number"==typeof b&&(c=c.replace("%1",b)),h(c)}return a}};"undefined"!=typeof mejsL10n&&(e.locale.language=mejsL10n.language),c.i18n=e}(document,window,mejs),function(a,b){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!
16
- * This is a i18n.locale language object.
17
- *
18
- * English; This can serve as a template for other languages to translate
19
- *
20
- * @author
21
- * TBD
22
- * Sascha Greuel (Twitter: @SoftCreatR)
23
- *
24
- * @see
25
- * me-i18n.js
26
- *
27
- * @params
28
- * - exports - CommonJS, window ..
29
- */
30
- function(a){"use strict";void 0===a.en&&(a.en={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.fullscreen-off":"Turn off Fullscreen","mejs.fullscreen-on":"Go Fullscreen","mejs.download-video":"Download Video","mejs.fullscreen":"Fullscreen","mejs.time-jump-forward":["Jump forward 1 second","Jump forward %1 seconds"],"mejs.play":"Play","mejs.pause":"Pause","mejs.close":"Close","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.time-skip-back":["Skip back 1 second","Skip back %1 seconds"],"mejs.captions-subtitles":"Captions/Subtitles","mejs.none":"None","mejs.mute-toggle":"Mute Toggle","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.ad-skip":"Skip ad","mejs.ad-skip-info":["Skip in 1 second","Skip in %1 seconds"],"mejs.source-chooser":"Source Chooser"})}(mejs.i18n.locale.strings);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mediaelementplayer.css DELETED
@@ -1,1007 +0,0 @@
1
- .mejs-offscreen{
2
- /* Accessibility: hide screen reader texts (and prefer "top" for RTL languages). Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */
3
- clip: rect(1px 1px 1px 1px); /* IE6, IE7 - no likey commas */
4
- clip: rect(1px, 1px, 1px, 1px); /* IE8-IE11 - we likey commas, no support for clip-path */
5
- clip-path: polygon(0px 0px, 0px 0px,0px 0px, 0px 0px);
6
- position: absolute !important;
7
- height: 1px;
8
- width: 1px;
9
- overflow: hidden;
10
- }
11
-
12
- .mejs-container {
13
- position: relative;
14
- background: #000;
15
- font-family: "Helvetica", Arial, serif;
16
- text-align: left;
17
- vertical-align: top;
18
- text-indent: 0;
19
- }
20
-
21
- .mejs-fill-container,.mejs-fill-container .mejs-container{
22
- width: 100%;
23
- height: 100%;
24
- }
25
-
26
- .mejs-fill-container{
27
- overflow: hidden;
28
- }
29
-
30
- .mejs-container:focus {
31
- outline: none;
32
- }
33
-
34
- .me-plugin {
35
- position: absolute;
36
- }
37
-
38
- .mejs-embed, .mejs-embed body {
39
- width: 100%;
40
- height: 100%;
41
- margin: 0;
42
- padding: 0;
43
- background: #000;
44
- overflow: hidden;
45
- }
46
-
47
- .mejs-fullscreen {
48
- /* set it to not show scroll bars so 100% will work */
49
- overflow: hidden !important;
50
- }
51
-
52
- .mejs-container-fullscreen {
53
- position: fixed;
54
- left: 0;
55
- top: 0;
56
- right: 0;
57
- bottom: 0;
58
- overflow: hidden;
59
- z-index: 1000;
60
- }
61
- .mejs-container-fullscreen .mejs-mediaelement,
62
- .mejs-container-fullscreen video {
63
- width: 100%;
64
- height: 100%;
65
- }
66
-
67
- .mejs-clear {
68
- clear: both;
69
- }
70
-
71
- /* Start: LAYERS */
72
- .mejs-background {
73
- position: absolute;
74
- top: 0;
75
- left: 0;
76
- }
77
-
78
- .mejs-mediaelement {
79
- position: absolute;
80
- top: 0;
81
- left: 0;
82
- width: 100%;
83
- height: 100%;
84
- }
85
-
86
- .mejs-poster {
87
- position: absolute;
88
- top: 0;
89
- left: 0;
90
- background-size: contain ;
91
- background-position: 50% 50% ;
92
- background-repeat: no-repeat ;
93
- }
94
- :root .mejs-poster img {
95
- display: none ;
96
- }
97
-
98
- .mejs-poster img {
99
- border: 0;
100
- padding: 0;
101
- }
102
-
103
- .mejs-overlay {
104
- position: absolute;
105
- top: 0;
106
- left: 0;
107
- }
108
-
109
- .mejs-overlay-play {
110
- cursor: pointer;
111
- }
112
-
113
- .mejs-overlay-button {
114
- position: absolute;
115
- top: 50%;
116
- left: 50%;
117
- width: 100px;
118
- height: 100px;
119
- margin: -50px 0 0 -50px;
120
- background: url("bigplay.svg") no-repeat;
121
- }
122
-
123
- .no-svg .mejs-overlay-button {
124
- background-image: url("bigplay.png");
125
- }
126
-
127
- .mejs-overlay:hover .mejs-overlay-button {
128
- background-position: 0 -100px ;
129
- }
130
-
131
- .mejs-overlay-loading {
132
- position: absolute;
133
- top: 50%;
134
- left: 50%;
135
- width: 80px;
136
- height: 80px;
137
- margin: -40px 0 0 -40px;
138
- background: #333;
139
- background: url("background.png");
140
- background: rgba(0, 0, 0, 0.9);
141
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9)));
142
- background: -webkit-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
143
- background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
144
- background: -o-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
145
- background: -ms-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
146
- background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9));
147
- }
148
-
149
- .mejs-overlay-loading span {
150
- display: block;
151
- width: 80px;
152
- height: 80px;
153
- background: transparent url("loading.gif") 50% 50% no-repeat;
154
- }
155
-
156
- /* End: LAYERS */
157
-
158
- /* Start: CONTROL BAR */
159
- .mejs-container .mejs-controls {
160
- position: absolute;
161
- list-style-type: none;
162
- margin: 0;
163
- padding: 0;
164
- bottom: 0;
165
- left: 0;
166
- background: url("background.png");
167
- background: rgba(0, 0, 0, 0.7);
168
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
169
- background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
170
- background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
171
- background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
172
- background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
173
- background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
174
- height: 30px;
175
- width: 100%;
176
- }
177
- .mejs-container .mejs-controls div {
178
- list-style-type: none;
179
- background-image: none;
180
- display: block;
181
- float: left;
182
- margin: 0;
183
- padding: 0;
184
- width: 26px;
185
- height: 26px;
186
- font-size: 11px;
187
- line-height: 11px;
188
- font-family: "Helvetica", Arial, serif;
189
- border: 0;
190
- }
191
-
192
- .mejs-controls .mejs-button button {
193
- cursor: pointer;
194
- display: block;
195
- font-size: 0;
196
- line-height: 0;
197
- text-decoration: none;
198
- margin: 7px 5px;
199
- padding: 0;
200
- position: absolute;
201
- height: 16px;
202
- width: 16px;
203
- border: 0;
204
- background: transparent url("controls.svg") no-repeat;
205
- }
206
-
207
- .no-svg .mejs-controls .mejs-button button {
208
- background-image: url("controls.png");
209
- }
210
-
211
- /* :focus for accessibility */
212
- .mejs-controls .mejs-button button:focus {
213
- outline: dotted 1px #999;
214
- }
215
-
216
- /* End: CONTROL BAR */
217
-
218
- /* Start: Time (Current / Duration) */
219
- .mejs-container .mejs-controls .mejs-time {
220
- color: #fff;
221
- display: block;
222
- height: 17px;
223
- width: auto;
224
- padding: 10px 3px 0 3px ;
225
- overflow: hidden;
226
- text-align: center;
227
- -moz-box-sizing: content-box;
228
- -webkit-box-sizing: content-box;
229
- box-sizing: content-box;
230
- }
231
-
232
- .mejs-container .mejs-controls .mejs-time a {
233
- color: #fff;
234
- font-size: 11px;
235
- line-height: 12px;
236
- display: block;
237
- float: left;
238
- margin: 1px 2px 0 0;
239
- width: auto;
240
- }
241
- /* End: Time (Current / Duration) */
242
-
243
- /* Start: Play/Pause/Stop */
244
- .mejs-controls .mejs-play button {
245
- background-position: 0 0;
246
- }
247
-
248
- .mejs-controls .mejs-pause button {
249
- background-position: 0 -16px;
250
- }
251
-
252
- .mejs-controls .mejs-stop button {
253
- background-position: -112px 0;
254
- }
255
- /* Start: Play/Pause/Stop */
256
-
257
- /* Start: Progress Bar */
258
- .mejs-controls div.mejs-time-rail {
259
- direction: ltr;
260
- width: 200px;
261
- padding-top: 5px;
262
- }
263
-
264
- .mejs-controls .mejs-time-rail span, .mejs-controls .mejs-time-rail a {
265
- display: block;
266
- position: absolute;
267
- width: 180px;
268
- height: 10px;
269
- -webkit-border-radius: 2px;
270
- -moz-border-radius: 2px;
271
- border-radius: 2px;
272
- cursor: pointer;
273
- }
274
-
275
- .mejs-controls .mejs-time-rail .mejs-time-total {
276
- margin: 5px;
277
- background: #333;
278
- background: rgba(50,50,50,0.8);
279
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
280
- background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
281
- background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
282
- background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
283
- background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
284
- background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
285
- }
286
-
287
- .mejs-controls .mejs-time-rail .mejs-time-buffering {
288
- width: 100%;
289
- background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
290
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
291
- background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
292
- background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
293
- background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
294
- background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
295
- -webkit-background-size: 15px 15px;
296
- -moz-background-size: 15px 15px;
297
- -o-background-size: 15px 15px;
298
- background-size: 15px 15px;
299
- -webkit-animation: buffering-stripes 2s linear infinite;
300
- -moz-animation: buffering-stripes 2s linear infinite;
301
- -ms-animation: buffering-stripes 2s linear infinite;
302
- -o-animation: buffering-stripes 2s linear infinite;
303
- animation: buffering-stripes 2s linear infinite;
304
- }
305
-
306
- @-webkit-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
307
- @-moz-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
308
- @-ms-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
309
- @-o-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
310
- @keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
311
-
312
- .mejs-controls .mejs-time-rail .mejs-time-loaded {
313
- background: #3caac8;
314
- background: rgba(60,170,200,0.8);
315
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(44,124,145,0.8)), to(rgba(78,183,212,0.8)));
316
- background: -webkit-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
317
- background: -moz-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
318
- background: -o-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
319
- background: -ms-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
320
- background: linear-gradient(rgba(44,124,145,0.8), rgba(78,183,212,0.8));
321
- width: 0;
322
- }
323
-
324
- .mejs-controls .mejs-time-rail .mejs-time-current {
325
- background: #fff;
326
- background: rgba(255,255,255,0.8);
327
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
328
- background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
329
- background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
330
- background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
331
- background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
332
- background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8));
333
- width: 0;
334
- }
335
-
336
- .mejs-controls .mejs-time-rail .mejs-time-handle {
337
- display: none;
338
- position: absolute;
339
- margin: 0;
340
- width: 10px;
341
- background: #fff;
342
- -webkit-border-radius: 5px;
343
- -moz-border-radius: 5px;
344
- border-radius: 5px;
345
- cursor: pointer;
346
- border: solid 2px #333;
347
- top: -2px;
348
- text-align: center;
349
- }
350
-
351
- .mejs-controls .mejs-time-rail .mejs-time-float {
352
- position: absolute;
353
- display: none;
354
- background: #eee;
355
- width: 36px;
356
- height: 17px;
357
- border: solid 1px #333;
358
- top: -26px;
359
- margin-left: -18px;
360
- text-align: center;
361
- color: #111;
362
- }
363
-
364
- .mejs-controls .mejs-time-rail .mejs-time-float-current {
365
- margin: 2px;
366
- width: 30px;
367
- display: block;
368
- text-align: center;
369
- left: 0;
370
- }
371
-
372
- .mejs-controls .mejs-time-rail .mejs-time-float-corner {
373
- position: absolute;
374
- display: block;
375
- width: 0;
376
- height: 0;
377
- line-height: 0;
378
- border: solid 5px #eee;
379
- border-color: #eee transparent transparent transparent;
380
- -webkit-border-radius: 0;
381
- -moz-border-radius: 0;
382
- border-radius: 0;
383
- top: 15px;
384
- left: 13px;
385
- }
386
-
387
- .mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float {
388
- width: 48px;
389
- }
390
-
391
- .mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current {
392
- width: 44px;
393
- }
394
-
395
- .mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner {
396
- left: 18px;
397
- }
398
-
399
- /*
400
- .mejs-controls .mejs-time-rail:hover .mejs-time-handle {
401
- visibility:visible;
402
- }
403
- */
404
- /* End: Progress Bar */
405
-
406
- /* Start: Fullscreen */
407
- .mejs-controls .mejs-fullscreen-button button {
408
- background-position: -32px 0;
409
- }
410
-
411
- .mejs-controls .mejs-unfullscreen button {
412
- background-position: -32px -16px;
413
- }
414
- /* End: Fullscreen */
415
-
416
-
417
- /* Start: Mute/Volume */
418
- .mejs-controls .mejs-volume-button {
419
- }
420
-
421
- .mejs-controls .mejs-mute button {
422
- background-position: -16px -16px;
423
- }
424
-
425
- .mejs-controls .mejs-unmute button {
426
- background-position: -16px 0;
427
- }
428
-
429
- .mejs-controls .mejs-volume-button {
430
- position: relative;
431
- }
432
-
433
- .mejs-controls .mejs-volume-button .mejs-volume-slider {
434
- display: none;
435
- height: 115px;
436
- width: 25px;
437
- background: url("background.png");
438
- background: rgba(50, 50, 50, 0.7);
439
- -webkit-border-radius: 0;
440
- -moz-border-radius: 0;
441
- border-radius: 0;
442
- top: -115px;
443
- left: 0;
444
- z-index: 1;
445
- position: absolute;
446
- margin: 0;
447
- }
448
-
449
- .mejs-controls .mejs-volume-button:hover {
450
- -webkit-border-radius: 0 0 4px 4px;
451
- -moz-border-radius: 0 0 4px 4px;
452
- border-radius: 0 0 4px 4px;
453
- }
454
-
455
- /*
456
- .mejs-controls .mejs-volume-button:hover .mejs-volume-slider {
457
- display: block;
458
- }
459
- */
460
-
461
- .mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total {
462
- position: absolute;
463
- left: 11px;
464
- top: 8px;
465
- width: 2px;
466
- height: 100px;
467
- background: #ddd;
468
- background: rgba(255, 255, 255, 0.5);
469
- margin: 0;
470
- }
471
-
472
- .mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current {
473
- position: absolute;
474
- left: 11px;
475
- top: 8px;
476
- width: 2px;
477
- height: 100px;
478
- background: #ddd;
479
- background: rgba(255, 255, 255, 0.9);
480
- margin: 0;
481
- }
482
-
483
- .mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle {
484
- position: absolute;
485
- left: 4px;
486
- top: -3px;
487
- width: 16px;
488
- height: 6px;
489
- background: #ddd;
490
- background: rgba(255, 255, 255, 0.9);
491
- cursor: N-resize;
492
- -webkit-border-radius: 1px;
493
- -moz-border-radius: 1px;
494
- border-radius: 1px;
495
- margin: 0;
496
- }
497
-
498
- /* horizontal version */
499
- .mejs-controls a.mejs-horizontal-volume-slider {
500
- height: 26px;
501
- width: 56px;
502
- position: relative;
503
- display: block;
504
- float: left;
505
- vertical-align: middle;
506
- }
507
-
508
- .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
509
- position: absolute;
510
- left: 0;
511
- top: 11px;
512
- width: 50px;
513
- height: 8px;
514
- margin: 0;
515
- padding: 0;
516
- font-size: 1px;
517
- -webkit-border-radius: 2px;
518
- -moz-border-radius: 2px;
519
- border-radius: 2px;
520
- background: #333;
521
- background: rgba(50,50,50,0.8);
522
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
523
- background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
524
- background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
525
- background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
526
- background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
527
- background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
528
- }
529
-
530
- .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
531
- position: absolute;
532
- left: 0;
533
- top: 11px;
534
- width: 50px;
535
- height: 8px;
536
- margin: 0;
537
- padding: 0;
538
- font-size: 1px;
539
- -webkit-border-radius: 2px;
540
- -moz-border-radius: 2px;
541
- border-radius: 2px;
542
- background: #fff;
543
- background: rgba(255,255,255,0.8);
544
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
545
- background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
546
- background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
547
- background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
548
- background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
549
- background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8));
550
- }
551
-
552
- .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle {
553
- display: none;
554
- }
555
-
556
- /* End: Mute/Volume */
557
-
558
- /* Start: Track (Captions and Chapters) */
559
- .mejs-controls .mejs-captions-button {
560
- position: relative;
561
- }
562
-
563
- .mejs-controls .mejs-captions-button button {
564
- background-position: -48px 0;
565
- }
566
- .mejs-controls .mejs-captions-button .mejs-captions-selector {
567
- visibility: hidden;
568
- position: absolute;
569
- bottom: 26px;
570
- right: -51px;
571
- width: 85px;
572
- height: 100px;
573
- background: url("background.png");
574
- background: rgba(50,50,50,0.7);
575
- border: solid 1px transparent;
576
- padding: 10px 10px 0 10px;
577
- overflow: hidden;
578
- -webkit-border-radius: 0;
579
- -moz-border-radius: 0;
580
- border-radius: 0;
581
- }
582
-
583
- .mejs-controls .mejs-captions-button:hover .mejs-captions-selector {
584
- visibility: visible;
585
- }
586
-
587
- .mejs-controls .mejs-captions-button .mejs-captions-selector ul {
588
- margin: 0;
589
- padding: 0;
590
- display: block;
591
- list-style-type: none !important;
592
- overflow: hidden;
593
- }
594
-
595
- .mejs-controls .mejs-captions-button .mejs-captions-selector ul li {
596
- margin: 0 0 6px 0;
597
- padding: 0;
598
- list-style-type: none !important;
599
- display: block;
600
- color: #fff;
601
- overflow: hidden;
602
- }
603
-
604
- .mejs-controls .mejs-captions-button .mejs-captions-selector ul li input {
605
- clear: both;
606
- float: left;
607
- margin: 3px 3px 0 5px;
608
- }
609
-
610
- .mejs-controls .mejs-captions-button .mejs-captions-selector ul li label {
611
- width: 55px;
612
- float: left;
613
- padding: 4px 0 0 0;
614
- line-height: 15px;
615
- font-family: "Helvetica", Arial, serif;
616
- font-size: 10px;
617
- }
618
-
619
- .mejs-controls .mejs-captions-button .mejs-captions-translations {
620
- font-size: 10px;
621
- margin: 0 0 5px 0;
622
- }
623
-
624
- .mejs-chapters {
625
- position: absolute;
626
- top: 0;
627
- left: 0;
628
- border-right: solid 1px #fff;
629
- width: 10000px;
630
- z-index: 1;
631
- }
632
-
633
- .mejs-chapters .mejs-chapter {
634
- position: absolute;
635
- float: left;
636
- background: #222;
637
- background: rgba(0, 0, 0, 0.7);
638
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
639
- background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
640
- background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
641
- background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
642
- background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
643
- background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
644
- filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232,endColorstr=#000000);
645
- overflow: hidden;
646
- border: 0;
647
- }
648
-
649
- .mejs-chapters .mejs-chapter .mejs-chapter-block {
650
- font-size: 11px;
651
- color: #fff;
652
- padding: 5px;
653
- display: block;
654
- border-right: solid 1px #333;
655
- border-bottom: solid 1px #333;
656
- cursor: pointer;
657
- }
658
-
659
- .mejs-chapters .mejs-chapter .mejs-chapter-block-last {
660
- border-right: none;
661
- }
662
-
663
- .mejs-chapters .mejs-chapter .mejs-chapter-block:hover {
664
- background: #666;
665
- background: rgba(102,102,102, 0.7);
666
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(102,102,102,0.7)), to(rgba(50,50,50,0.6)));
667
- background: -webkit-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
668
- background: -moz-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
669
- background: -o-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
670
- background: -ms-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
671
- background: linear-gradient(rgba(102,102,102,0.7), rgba(50,50,50,0.6));
672
- filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666,endColorstr=#323232);
673
- }
674
-
675
- .mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title {
676
- font-size: 12px;
677
- font-weight: bold;
678
- display: block;
679
- white-space: nowrap;
680
- text-overflow: ellipsis;
681
- margin: 0 0 3px 0;
682
- line-height: 12px;
683
- }
684
-
685
- .mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan {
686
- font-size: 12px;
687
- line-height: 12px;
688
- margin: 3px 0 4px 0;
689
- display: block;
690
- white-space: nowrap;
691
- text-overflow: ellipsis;
692
- }
693
-
694
- .mejs-captions-layer {
695
- position: absolute;
696
- bottom: 0;
697
- left: 0;
698
- text-align:center;
699
- line-height: 20px;
700
- font-size: 16px;
701
- color: #fff;
702
- }
703
-
704
- .mejs-captions-layer a {
705
- color: #fff;
706
- text-decoration: underline;
707
- }
708
-
709
- .mejs-captions-layer[lang=ar] {
710
- font-size: 20px;
711
- font-weight: normal;
712
- }
713
-
714
- .mejs-captions-position {
715
- position: absolute;
716
- width: 100%;
717
- bottom: 15px;
718
- left: 0;
719
- }
720
-
721
- .mejs-captions-position-hover {
722
- bottom: 35px;
723
- }
724
-
725
- .mejs-captions-text {
726
- padding: 0;
727
- background: url("background.png");
728
- background: rgba(20, 20, 20, 0.5);
729
- white-space: pre-wrap;
730
- -webkit-box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
731
- box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
732
- }
733
- /* End: Track (Captions and Chapters) */
734
-
735
- /* Start: Error */
736
- .me-cannotplay {
737
- }
738
-
739
- .me-cannotplay a {
740
- color: #fff;
741
- font-weight: bold;
742
- }
743
-
744
- .me-cannotplay span {
745
- padding: 15px;
746
- display: block;
747
- }
748
- /* End: Error */
749
-
750
-
751
- /* Start: Loop */
752
- .mejs-controls .mejs-loop-off button {
753
- background-position: -64px -16px;
754
- }
755
-
756
- .mejs-controls .mejs-loop-on button {
757
- background-position: -64px 0;
758
- }
759
-
760
- /* End: Loop */
761
-
762
- /* Start: backlight */
763
- .mejs-controls .mejs-backlight-off button {
764
- background-position: -80px -16px;
765
- }
766
-
767
- .mejs-controls .mejs-backlight-on button {
768
- background-position: -80px 0;
769
- }
770
- /* End: backlight */
771
-
772
- /* Start: Picture Controls */
773
- .mejs-controls .mejs-picturecontrols-button {
774
- background-position: -96px 0;
775
- }
776
- /* End: Picture Controls */
777
-
778
-
779
- /* context menu */
780
- .mejs-contextmenu {
781
- position: absolute;
782
- width: 150px;
783
- padding: 10px;
784
- border-radius: 4px;
785
- top: 0;
786
- left: 0;
787
- background: #fff;
788
- border: solid 1px #999;
789
- z-index: 1001; /* make sure it shows on fullscreen */
790
- }
791
- .mejs-contextmenu .mejs-contextmenu-separator {
792
- height: 1px;
793
- font-size: 0;
794
- margin: 5px 6px;
795
- background: #333;
796
- }
797
-
798
- .mejs-contextmenu .mejs-contextmenu-item {
799
- font-family: "Helvetica", Arial, serif;
800
- font-size: 12px;
801
- padding: 4px 6px;
802
- cursor: pointer;
803
- color: #333;
804
- }
805
- .mejs-contextmenu .mejs-contextmenu-item:hover {
806
- background: #2C7C91;
807
- color: #fff;
808
- }
809
-
810
- /* Start: Source Chooser */
811
- .mejs-controls .mejs-sourcechooser-button {
812
- position: relative;
813
- }
814
-
815
- .mejs-controls .mejs-sourcechooser-button button {
816
- background-position: -128px 0;
817
- }
818
-
819
- .mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector {
820
- position: absolute;
821
- bottom: 26px;
822
- right: -10px;
823
- width: 130px;
824
- height: 100px;
825
- background: url("background.png");
826
- background: rgba(50,50,50,0.7);
827
- border: solid 1px transparent;
828
- padding: 10px;
829
- overflow: hidden;
830
- -webkit-border-radius: 0;
831
- -moz-border-radius: 0;
832
- border-radius: 0;
833
- }
834
-
835
- .mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul {
836
- margin: 0;
837
- padding: 0;
838
- display: block;
839
- list-style-type: none !important;
840
- overflow: hidden;
841
- }
842
-
843
- .mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li {
844
- margin: 0 0 6px 0;
845
- padding: 0;
846
- list-style-type: none !important;
847
- display: block;
848
- color: #fff;
849
- overflow: hidden;
850
- }
851
-
852
- .mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input {
853
- clear: both;
854
- float: left;
855
- margin: 3px 3px 0 5px;
856
- }
857
-
858
- .mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label {
859
- width: 100px;
860
- float: left;
861
- padding: 4px 0 0 0;
862
- line-height: 15px;
863
- font-family: "Helvetica", Arial, serif;
864
- font-size: 10px;
865
- }
866
- /* End: Source Chooser */
867
-
868
- /* Start: Postroll */
869
- .mejs-postroll-layer {
870
- position: absolute;
871
- bottom: 0;
872
- left: 0;
873
- width: 100%;
874
- height: 100%;
875
- background: url("background.png");
876
- background: rgba(50,50,50,0.7);
877
- z-index: 1000;
878
- overflow: hidden;
879
- }
880
- .mejs-postroll-layer-content {
881
- width: 100%;
882
- height: 100%;
883
- }
884
- .mejs-postroll-close {
885
- position: absolute;
886
- right: 0;
887
- top: 0;
888
- background: url("background.png");
889
- background: rgba(50,50,50,0.7);
890
- color: #fff;
891
- padding: 4px;
892
- z-index: 100;
893
- cursor: pointer;
894
- }
895
- /* End: Postroll */
896
-
897
-
898
- /* Start: Speed */
899
- div.mejs-speed-button {
900
- width: 46px !important;
901
- position: relative;
902
- }
903
-
904
- .mejs-controls .mejs-button.mejs-speed-button button {
905
- background: transparent;
906
- width: 36px;
907
- font-size: 11px;
908
- line-height: normal;
909
- color: #ffffff;
910
- }
911
-
912
- .mejs-controls .mejs-speed-button .mejs-speed-selector {
913
- display: none;
914
- position: absolute;
915
- top: -100px;
916
- left: -10px;
917
- width: 60px;
918
- height: 100px;
919
- background: url("background.png");
920
- background: rgba(50, 50, 50, 0.7);
921
- border: solid 1px transparent;
922
- padding: 0;
923
- overflow: hidden;
924
- -webkit-border-radius: 0;
925
- -moz-border-radius: 0;
926
- border-radius: 0;
927
- }
928
-
929
-
930
- .mejs-controls .mejs-speed-button:hover > .mejs-speed-selector {
931
- display: block;
932
- }
933
-
934
- .mejs-controls .mejs-speed-button .mejs-speed-selector ul li label.mejs-speed-selected {
935
- color: rgba(33, 248, 248, 1);
936
- }
937
-
938
- .mejs-controls .mejs-speed-button .mejs-speed-selector ul {
939
- margin: 0;
940
- padding: 0;
941
- display: block;
942
- list-style-type: none !important;
943
- overflow: hidden;
944
- }
945
-
946
- .mejs-controls .mejs-speed-button .mejs-speed-selector ul li {
947
- margin: 0 0 6px 0;
948
- padding: 0 10px;
949
- list-style-type: none !important;
950
- display: block;
951
- color: #fff;
952
- overflow: hidden;
953
- }
954
-
955
- .mejs-controls .mejs-speed-button .mejs-speed-selector ul li input {
956
- clear: both;
957
- float: left;
958
- margin: 3px 3px 0 5px;
959
- display: none;
960
- }
961
-
962
- .mejs-controls .mejs-speed-button .mejs-speed-selector ul li label {
963
- width: 60px;
964
- float: left;
965
- padding: 4px 0 0 0;
966
- line-height: 15px;
967
- font-family: "Helvetica", Arial, serif;
968
- font-size: 11px;
969
- color: white;
970
- margin-left: 5px;
971
- cursor: pointer;
972
- }
973
-
974
- .mejs-controls .mejs-speed-button .mejs-speed-selector ul li:hover {
975
- background-color: rgb(200, 200, 200) !important;
976
- background-color: rgba(255,255,255,.4) !important;
977
- }
978
- /* End: Speed */
979
-
980
- /* Start: Jump Forward */
981
-
982
- .mejs-controls .mejs-button.mejs-jump-forward-button {
983
- background: transparent url("jumpforward.png") no-repeat 3px 3px;
984
- }
985
- .mejs-controls .mejs-button.mejs-jump-forward-button button {
986
- background: transparent;
987
- font-size: 9px;
988
- line-height: normal;
989
- color: #ffffff;
990
- }
991
-
992
- /* End: Jump Forward */
993
-
994
- /* Start: Skip Back */
995
-
996
- .mejs-controls .mejs-button.mejs-skip-back-button {
997
- background: transparent url("skipback.png") no-repeat 3px 3px;
998
- }
999
- .mejs-controls .mejs-button.mejs-skip-back-button button {
1000
- background: transparent;
1001
- font-size: 9px;
1002
- line-height: normal;
1003
- color: #ffffff;
1004
- }
1005
-
1006
- /* End: Skip Back */
1007
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mediaelementplayer.js DELETED
@@ -1,4213 +0,0 @@
1
- /*!
2
- *
3
- * MediaElementPlayer
4
- * http://mediaelementjs.com/
5
- *
6
- * Creates a controller bar for HTML5 <video> add <audio> tags
7
- * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
8
- *
9
- * Copyright 2010-2013, John Dyer (http://j.hn/)
10
- * License: MIT
11
- *
12
- */
13
- if (typeof jQuery != 'undefined') {
14
- mejs.$ = jQuery;
15
- } else if (typeof Zepto != 'undefined') {
16
- mejs.$ = Zepto;
17
-
18
- // define `outerWidth` method which has not been realized in Zepto
19
- Zepto.fn.outerWidth = function(includeMargin) {
20
- var width = $(this).width();
21
- if (includeMargin) {
22
- width += parseInt($(this).css('margin-right'), 10);
23
- width += parseInt($(this).css('margin-left'), 10);
24
- }
25
- return width
26
- }
27
-
28
- } else if (typeof ender != 'undefined') {
29
- mejs.$ = ender;
30
- }
31
- (function ($) {
32
-
33
- // default player values
34
- mejs.MepDefaults = {
35
- // url to poster (to fix iOS 3.x)
36
- poster: '',
37
- // When the video is ended, we can show the poster.
38
- showPosterWhenEnded: false,
39
- // default if the <video width> is not specified
40
- defaultVideoWidth: 480,
41
- // default if the <video height> is not specified
42
- defaultVideoHeight: 270,
43
- // if set, overrides <video width>
44
- videoWidth: -1,
45
- // if set, overrides <video height>
46
- videoHeight: -1,
47
- // default if the user doesn't specify
48
- defaultAudioWidth: 400,
49
- // default if the user doesn't specify
50
- defaultAudioHeight: 30,
51
- // default amount to move back when back key is pressed
52
- defaultSeekBackwardInterval: function(media) {
53
- return (media.duration * 0.05);
54
- },
55
- // default amount to move forward when forward key is pressed
56
- defaultSeekForwardInterval: function(media) {
57
- return (media.duration * 0.05);
58
- },
59
- // set dimensions via JS instead of CSS
60
- setDimensions: true,
61
- // width of audio player
62
- audioWidth: -1,
63
- // height of audio player
64
- audioHeight: -1,
65
- // initial volume when the player starts (overrided by user cookie)
66
- startVolume: 0.8,
67
- // useful for <audio> player loops
68
- loop: false,
69
- // rewind to beginning when media ends
70
- autoRewind: true,
71
- // resize to media dimensions
72
- enableAutosize: true,
73
- /*
74
- * Time format to use. Default: 'mm:ss'
75
- * Supported units:
76
- * h: hour
77
- * m: minute
78
- * s: second
79
- * f: frame count
80
- * When using 'hh', 'mm', 'ss' or 'ff' we always display 2 digits.
81
- * If you use 'h', 'm', 's' or 'f' we display 1 digit if possible.
82
- *
83
- * Example to display 75 seconds:
84
- * Format 'mm:ss': 01:15
85
- * Format 'm:ss': 1:15
86
- * Format 'm:s': 1:15
87
- */
88
- timeFormat: '',
89
- // forces the hour marker (##:00:00)
90
- alwaysShowHours: false,
91
- // show framecount in timecode (##:00:00:00)
92
- showTimecodeFrameCount: false,
93
- // used when showTimecodeFrameCount is set to true
94
- framesPerSecond: 25,
95
- // automatically calculate the width of the progress bar based on the sizes of other elements
96
- autosizeProgress : true,
97
- // Hide controls when playing and mouse is not over the video
98
- alwaysShowControls: false,
99
- // Display the video control
100
- hideVideoControlsOnLoad: false,
101
- // Enable click video element to toggle play/pause
102
- clickToPlayPause: true,
103
- // Time in ms to hide controls
104
- controlsTimeoutDefault: 1500,
105
- // Time in ms to trigger the timer when mouse moves
106
- controlsTimeoutMouseEnter: 2500,
107
- // Time in ms to trigger the timer when mouse leaves
108
- controlsTimeoutMouseLeave: 1000,
109
- // force iPad's native controls
110
- iPadUseNativeControls: false,
111
- // force iPhone's native controls
112
- iPhoneUseNativeControls: false,
113
- // force Android's native controls
114
- AndroidUseNativeControls: false,
115
- // features to show
116
- features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
117
- // only for dynamic
118
- isVideo: true,
119
- // stretching modes (auto, fill, responsive, none)
120
- stretching: 'auto',
121
- // turns keyboard support on and off for this instance
122
- enableKeyboard: true,
123
- // when this player starts, it will pause other players
124
- pauseOtherPlayers: true,
125
- // array of keyboard actions such as play pause
126
- keyActions: [
127
- {
128
- keys: [
129
- 32, // SPACE
130
- 179 // GOOGLE play/pause button
131
- ],
132
- action: function(player, media, key, event) {
133
-
134
- if (!mejs.MediaFeatures.isFirefox) {
135
- if (media.paused || media.ended) {
136
- media.play();
137
- } else {
138
- media.pause();
139
- }
140
- }
141
- }
142
- },
143
- {
144
- keys: [38], // UP
145
- action: function(player, media, key, event) {
146
- player.container.find('.mejs-volume-slider').css('display','block');
147
- if (player.isVideo) {
148
- player.showControls();
149
- player.startControlsTimer();
150
- }
151
-
152
- var newVolume = Math.min(media.volume + 0.1, 1);
153
- media.setVolume(newVolume);
154
- }
155
- },
156
- {
157
- keys: [40], // DOWN
158
- action: function(player, media, key, event) {
159
- player.container.find('.mejs-volume-slider').css('display','block');
160
- if (player.isVideo) {
161
- player.showControls();
162
- player.startControlsTimer();
163
- }
164
-
165
- var newVolume = Math.max(media.volume - 0.1, 0);
166
- media.setVolume(newVolume);
167
- }
168
- },
169
- {
170
- keys: [
171
- 37, // LEFT
172
- 227 // Google TV rewind
173
- ],
174
- action: function(player, media, key, event) {
175
- if (!isNaN(media.duration) && media.duration > 0) {
176
- if (player.isVideo) {
177
- player.showControls();
178
- player.startControlsTimer();
179
- }
180
-
181
- // 5%
182
- var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0);
183
- media.setCurrentTime(newTime);
184
- }
185
- }
186
- },
187
- {
188
- keys: [
189
- 39, // RIGHT
190
- 228 // Google TV forward
191
- ],
192
- action: function(player, media, key, event) {
193
- if (!isNaN(media.duration) && media.duration > 0) {
194
- if (player.isVideo) {
195
- player.showControls();
196
- player.startControlsTimer();
197
- }
198
-
199
- // 5%
200
- var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
201
- media.setCurrentTime(newTime);
202
- }
203
- }
204
- },
205
- {
206
- keys: [70], // F
207
- action: function(player, media, key, event) {
208
- if (typeof player.enterFullScreen != 'undefined') {
209
- if (player.isFullScreen) {
210
- player.exitFullScreen();
211
- } else {
212
- player.enterFullScreen();
213
- }
214
- }
215
- }
216
- },
217
- {
218
- keys: [77], // M
219
- action: function(player, media, key, event) {
220
- player.container.find('.mejs-volume-slider').css('display','block');
221
- if (player.isVideo) {
222
- player.showControls();
223
- player.startControlsTimer();
224
- }
225
- if (player.media.muted) {
226
- player.setMuted(false);
227
- } else {
228
- player.setMuted(true);
229
- }
230
- }
231
- }
232
- ]
233
- };
234
-
235
- mejs.mepIndex = 0;
236
-
237
- mejs.players = {};
238
-
239
- // wraps a MediaElement object in player controls
240
- mejs.MediaElementPlayer = function(node, o) {
241
- // enforce object, even without "new" (via John Resig)
242
- if ( !(this instanceof mejs.MediaElementPlayer) ) {
243
- return new mejs.MediaElementPlayer(node, o);
244
- }
245
-
246
- var t = this;
247
-
248
- // these will be reset after the MediaElement.success fires
249
- t.$media = t.$node = $(node);
250
- t.node = t.media = t.$media[0];
251
-
252
- if(!t.node) {
253
- return;
254
- }
255
-
256
- // check for existing player
257
- if (typeof t.node.player != 'undefined') {
258
- return t.node.player;
259
- }
260
-
261
-
262
- // try to get options from data-mejsoptions
263
- if (typeof o == 'undefined') {
264
- o = t.$node.data('mejsoptions');
265
- }
266
-
267
- // extend default options
268
- t.options = $.extend({},mejs.MepDefaults,o);
269
-
270
- if (!t.options.timeFormat) {
271
- // Generate the time format according to options
272
- t.options.timeFormat = 'mm:ss';
273
- if (t.options.alwaysShowHours) {
274
- t.options.timeFormat = 'hh:mm:ss';
275
- }
276
- if (t.options.showTimecodeFrameCount) {
277
- t.options.timeFormat += ':ff';
278
- }
279
- }
280
-
281
- mejs.Utility.calculateTimeFormat(0, t.options, t.options.framesPerSecond || 25);
282
-
283
- // unique ID
284
- t.id = 'mep_' + mejs.mepIndex++;
285
-
286
- // add to player array (for focus events)
287
- mejs.players[t.id] = t;
288
-
289
- // start up
290
- t.init();
291
-
292
- return t;
293
- };
294
-
295
- // actual player
296
- mejs.MediaElementPlayer.prototype = {
297
-
298
- hasFocus: false,
299
-
300
- controlsAreVisible: true,
301
-
302
- init: function() {
303
-
304
- var
305
- t = this,
306
- mf = mejs.MediaFeatures,
307
- // options for MediaElement (shim)
308
- meOptions = $.extend(true, {}, t.options, {
309
- success: function(media, domNode) { t.meReady(media, domNode); },
310
- error: function(e) { t.handleError(e);}
311
- }),
312
- tagName = t.media.tagName.toLowerCase();
313
-
314
- t.isDynamic = (tagName !== 'audio' && tagName !== 'video');
315
-
316
- if (t.isDynamic) {
317
- // get video from src or href?
318
- t.isVideo = t.options.isVideo;
319
- } else {
320
- t.isVideo = (tagName !== 'audio' && t.options.isVideo);
321
- }
322
-
323
- // use native controls in iPad, iPhone, and Android
324
- if ((mf.isiPad && t.options.iPadUseNativeControls) || (mf.isiPhone && t.options.iPhoneUseNativeControls)) {
325
-
326
- // add controls and stop
327
- t.$media.attr('controls', 'controls');
328
-
329
- // attempt to fix iOS 3 bug
330
- //t.$media.removeAttr('poster');
331
- // no Issue found on iOS3 -ttroxell
332
-
333
- // override Apple's autoplay override for iPads
334
- if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
335
- t.play();
336
- }
337
-
338
- } else if (mf.isAndroid && t.options.AndroidUseNativeControls) {
339
-
340
- // leave default player
341
-
342
- } else if (t.isVideo || (!t.isVideo && t.options.features.length)) {
343
-
344
- // DESKTOP: use MediaElementPlayer controls
345
-
346
- // remove native controls
347
- t.$media.removeAttr('controls');
348
- var videoPlayerTitle = t.isVideo ?
349
- mejs.i18n.t('mejs.video-player') : mejs.i18n.t('mejs.audio-player');
350
- // insert description for screen readers
351
- $('<span class="mejs-offscreen">' + videoPlayerTitle + '</span>').insertBefore(t.$media);
352
- // build container
353
- t.container =
354
- $('<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svgAsImg ? 'svg' : 'no-svg') +
355
- '" tabindex="0" role="application" aria-label="' + videoPlayerTitle + '">'+
356
- '<div class="mejs-inner">'+
357
- '<div class="mejs-mediaelement"></div>'+
358
- '<div class="mejs-layers"></div>'+
359
- '<div class="mejs-controls"></div>'+
360
- '<div class="mejs-clear"></div>'+
361
- '</div>' +
362
- '</div>')
363
- .addClass(t.$media[0].className)
364
- .insertBefore(t.$media)
365
- .focus(function ( e ) {
366
- if( !t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) {
367
- t.showControls(true);
368
- // In versions older than IE11, the focus causes the playbar to be displayed
369
- // if user clicks on the Play/Pause button in the control bar once it attempts
370
- // to hide it
371
- if (!t.hasMsNativeFullScreen) {
372
- // If e.relatedTarget appears before container, send focus to play button,
373
- // else send focus to last control button.
374
- var btnSelector = '.mejs-playpause-button > button';
375
-
376
- if (mejs.Utility.isNodeAfter(e.relatedTarget, t.container[0])) {
377
- btnSelector = '.mejs-controls .mejs-button:last-child > button';
378
- }
379
-
380
- var button = t.container.find(btnSelector);
381
- button.focus();
382
- }
383
- }
384
- });
385
-
386
- // When no elements in controls, hide bar completely
387
- if (!t.options.features.length) {
388
- t.container.css('background', 'transparent').find('.mejs-controls').hide();
389
- }
390
-
391
- if (t.isVideo && t.options.stretching === 'fill' && !t.container.parent('mejs-fill-container').length) {
392
- // outer container
393
- t.outerContainer = t.$media.parent();
394
- t.container.wrap('<div class="mejs-fill-container"/>');
395
- }
396
-
397
- // add classes for user and content
398
- t.container.addClass(
399
- (mf.isAndroid ? 'mejs-android ' : '') +
400
- (mf.isiOS ? 'mejs-ios ' : '') +
401
- (mf.isiPad ? 'mejs-ipad ' : '') +
402
- (mf.isiPhone ? 'mejs-iphone ' : '') +
403
- (t.isVideo ? 'mejs-video ' : 'mejs-audio ')
404
- );
405
-
406
-
407
- // move the <video/video> tag into the right spot
408
- t.container.find('.mejs-mediaelement').append(t.$media);
409
-
410
- // needs to be assigned here, after iOS remap
411
- t.node.player = t;
412
-
413
- // find parts
414
- t.controls = t.container.find('.mejs-controls');
415
- t.layers = t.container.find('.mejs-layers');
416
-
417
- // determine the size
418
-
419
- /* size priority:
420
- (1) videoWidth (forced),
421
- (2) style="width;height;"
422
- (3) width attribute,
423
- (4) defaultVideoWidth (for unspecified cases)
424
- */
425
-
426
- var tagType = (t.isVideo ? 'video' : 'audio'),
427
- capsTagName = tagType.substring(0,1).toUpperCase() + tagType.substring(1);
428
-
429
-
430
-
431
- if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
432
- t.width = t.options[tagType + 'Width'];
433
- } else if (t.media.style.width !== '' && t.media.style.width !== null) {
434
- t.width = t.media.style.width;
435
- } else if (t.media.getAttribute('width') !== null) {
436
- t.width = t.$media.attr('width');
437
- } else {
438
- t.width = t.options['default' + capsTagName + 'Width'];
439
- }
440
-
441
- if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
442
- t.height = t.options[tagType + 'Height'];
443
- } else if (t.media.style.height !== '' && t.media.style.height !== null) {
444
- t.height = t.media.style.height;
445
- } else if (t.$media[0].getAttribute('height') !== null) {
446
- t.height = t.$media.attr('height');
447
- } else {
448
- t.height = t.options['default' + capsTagName + 'Height'];
449
- }
450
-
451
- // set the size, while we wait for the plugins to load below
452
- t.setPlayerSize(t.width, t.height);
453
-
454
- // create MediaElementShim
455
- meOptions.pluginWidth = t.width;
456
- meOptions.pluginHeight = t.height;
457
- }
458
- // Hide media completely for audio that doesn't have any features
459
- else if (!t.isVideo && !t.options.features.length) {
460
- t.$media.hide();
461
- }
462
-
463
- // create MediaElement shim
464
- mejs.MediaElement(t.$media[0], meOptions);
465
-
466
- if (typeof(t.container) !== 'undefined' && t.options.features.length && t.controlsAreVisible) {
467
- // controls are shown when loaded
468
- t.container.trigger('controlsshown');
469
- }
470
- },
471
-
472
- showControls: function(doAnimation) {
473
- var t = this;
474
-
475
- doAnimation = typeof doAnimation == 'undefined' || doAnimation;
476
-
477
- if (t.controlsAreVisible)
478
- return;
479
-
480
- if (doAnimation) {
481
- t.controls
482
- .removeClass('mejs-offscreen')
483
- .stop(true, true).fadeIn(200, function() {
484
- t.controlsAreVisible = true;
485
- t.container.trigger('controlsshown');
486
- });
487
-
488
- // any additional controls people might add and want to hide
489
- t.container.find('.mejs-control')
490
- .removeClass('mejs-offscreen')
491
- .stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});
492
-
493
- } else {
494
- t.controls
495
- .removeClass('mejs-offscreen')
496
- .css('display','block');
497
-
498
- // any additional controls people might add and want to hide
499
- t.container.find('.mejs-control')
500
- .removeClass('mejs-offscreen')
501
- .css('display','block');
502
-
503
- t.controlsAreVisible = true;
504
- t.container.trigger('controlsshown');
505
- }
506
-
507
- t.setControlsSize();
508
-
509
- },
510
-
511
- hideControls: function(doAnimation) {
512
- var t = this;
513
-
514
- doAnimation = typeof doAnimation == 'undefined' || doAnimation;
515
-
516
- if (!t.controlsAreVisible || t.options.alwaysShowControls || t.keyboardAction || t.media.paused || t.media.ended)
517
- return;
518
-
519
- if (doAnimation) {
520
- // fade out main controls
521
- t.controls.stop(true, true).fadeOut(200, function() {
522
- $(this)
523
- .addClass('mejs-offscreen')
524
- .css('display','block');
525
-
526
- t.controlsAreVisible = false;
527
- t.container.trigger('controlshidden');
528
- });
529
-
530
- // any additional controls people might add and want to hide
531
- t.container.find('.mejs-control').stop(true, true).fadeOut(200, function() {
532
- $(this)
533
- .addClass('mejs-offscreen')
534
- .css('display','block');
535
- });
536
- } else {
537
-
538
- // hide main controls
539
- t.controls
540
- .addClass('mejs-offscreen')
541
- .css('display','block');
542
-
543
- // hide others
544
- t.container.find('.mejs-control')
545
- .addClass('mejs-offscreen')
546
- .css('display','block');
547
-
548
- t.controlsAreVisible = false;
549
- t.container.trigger('controlshidden');
550
- }
551
- },
552
-
553
- controlsTimer: null,
554
-
555
- startControlsTimer: function(timeout) {
556
-
557
- var t = this;
558
-
559
- timeout = typeof timeout != 'undefined' ? timeout : t.options.controlsTimeoutDefault;
560
-
561
- t.killControlsTimer('start');
562
-
563
- t.controlsTimer = setTimeout(function() {
564
- //
565
- t.hideControls();
566
- t.killControlsTimer('hide');
567
- }, timeout);
568
- },
569
-
570
- killControlsTimer: function(src) {
571
-
572
- var t = this;
573
-
574
- if (t.controlsTimer !== null) {
575
- clearTimeout(t.controlsTimer);
576
- delete t.controlsTimer;
577
- t.controlsTimer = null;
578
- }
579
- },
580
-
581
- controlsEnabled: true,
582
-
583
- disableControls: function() {
584
- var t= this;
585
-
586
- t.killControlsTimer();
587
- t.hideControls(false);
588
- this.controlsEnabled = false;
589
- },
590
-
591
- enableControls: function() {
592
- var t= this;
593
-
594
- t.showControls(false);
595
-
596
- t.controlsEnabled = true;
597
- },
598
-
599
- // Sets up all controls and events
600
- meReady: function(media, domNode) {
601
-
602
- var
603
- t = this,
604
- mf = mejs.MediaFeatures,
605
- autoplayAttr = domNode.getAttribute('autoplay'),
606
- autoplay = !(typeof autoplayAttr == 'undefined' || autoplayAttr === null || autoplayAttr === 'false'),
607
- featureIndex,
608
- feature;
609
-
610
- // make sure it can't create itself again if a plugin reloads
611
- if (t.created) {
612
- return;
613
- } else {
614
- t.created = true;
615
- }
616
-
617
- t.media = media;
618
- t.domNode = domNode;
619
-
620
- if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {
621
-
622
- // In the event that no features are specified for audio,
623
- // create only MediaElement instance rather than
624
- // doing all the work to create a full player
625
- if (!t.isVideo && !t.options.features.length) {
626
-
627
- // force autoplay for HTML5
628
- if (autoplay && media.pluginType == 'native') {
629
- t.play();
630
- }
631
-
632
-
633
- if (t.options.success) {
634
-
635
- if (typeof t.options.success == 'string') {
636
- window[t.options.success](t.media, t.domNode, t);
637
- } else {
638
- t.options.success(t.media, t.domNode, t);
639
- }
640
- }
641
-
642
- return;
643
- }
644
-
645
- // two built in features
646
- t.buildposter(t, t.controls, t.layers, t.media);
647
- t.buildkeyboard(t, t.controls, t.layers, t.media);
648
- t.buildoverlays(t, t.controls, t.layers, t.media);
649
-
650
- // grab for use by features
651
- t.findTracks();
652
-
653
- // add user-defined features/controls
654
- for (featureIndex in t.options.features) {
655
- feature = t.options.features[featureIndex];
656
- if (t['build' + feature]) {
657
- try {
658
- t['build' + feature](t, t.controls, t.layers, t.media);
659
- } catch (e) {
660
- // TODO: report control error
661
- //throw e;
662
-
663
-
664
- }
665
- }
666
- }
667
-
668
- t.container.trigger('controlsready');
669
-
670
- // reset all layers and controls
671
- t.setPlayerSize(t.width, t.height);
672
- t.setControlsSize();
673
-
674
-
675
- // controls fade
676
- if (t.isVideo) {
677
-
678
- if (mejs.MediaFeatures.hasTouch && !t.options.alwaysShowControls) {
679
-
680
- // for touch devices (iOS, Android)
681
- // show/hide without animation on touch
682
-
683
- t.$media.bind('touchstart', function() {
684
-
685
- // toggle controls
686
- if (t.controlsAreVisible) {
687
- t.hideControls(false);
688
- } else {
689
- if (t.controlsEnabled) {
690
- t.showControls(false);
691
- }
692
- }
693
- });
694
-
695
- } else {
696
-
697
- // create callback here since it needs access to current
698
- // MediaElement object
699
- t.clickToPlayPauseCallback = function() {
700
- //
701
-
702
- if (t.options.clickToPlayPause) {
703
- if (t.media.paused) {
704
- t.play();
705
- } else {
706
- t.pause();
707
- }
708
-
709
- var button = t.$media.closest('.mejs-container').find('.mejs-overlay-button'),
710
- pressed = button.attr('aria-pressed');
711
- button.attr('aria-pressed', !pressed);
712
- }
713
- };
714
-
715
- // click to play/pause
716
- t.media.addEventListener('click', t.clickToPlayPauseCallback, false);
717
-
718
- // show/hide controls
719
- t.container
720
- .bind('mouseenter', function () {
721
- if (t.controlsEnabled) {
722
- if (!t.options.alwaysShowControls ) {
723
- t.killControlsTimer('enter');
724
- t.showControls();
725
- t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
726
- }
727
- }
728
- })
729
- .bind('mousemove', function() {
730
- if (t.controlsEnabled) {
731
- if (!t.controlsAreVisible) {
732
- t.showControls();
733
- }
734
- if (!t.options.alwaysShowControls) {
735
- t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
736
- }
737
- }
738
- })
739
- .bind('mouseleave', function () {
740
- if (t.controlsEnabled) {
741
- if (!t.media.paused && !t.options.alwaysShowControls) {
742
- t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
743
- }
744
- }
745
- });
746
- }
747
-
748
- if(t.options.hideVideoControlsOnLoad) {
749
- t.hideControls(false);
750
- }
751
-
752
- // check for autoplay
753
- if (autoplay && !t.options.alwaysShowControls) {
754
- t.hideControls();
755
- }
756
-
757
- // resizer
758
- if (t.options.enableAutosize) {
759
- t.media.addEventListener('loadedmetadata', function(e) {
760
- // if the <video height> was not set and the options.videoHeight was not set
761
- // then resize to the real dimensions
762
- if (t.options.videoHeight <= 0 && t.domNode.getAttribute('height') === null && !isNaN(e.target.videoHeight)) {
763
- t.setPlayerSize(e.target.videoWidth, e.target.videoHeight);
764
- t.setControlsSize();
765
- t.media.setVideoSize(e.target.videoWidth, e.target.videoHeight);
766
- }
767
- }, false);
768
- }
769
- }
770
-
771
- // EVENTS
772
-
773
- // FOCUS: when a video starts playing, it takes focus from other players (possibly pausing them)
774
- t.media.addEventListener('play', function() {
775
- var playerIndex;
776
-
777
- // go through all other players
778
- for (playerIndex in mejs.players) {
779
- var p = mejs.players[playerIndex];
780
- if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
781
- p.pause();
782
- }
783
- p.hasFocus = false;
784
- }
785
-
786
- t.hasFocus = true;
787
- },false);
788
-
789
-
790
- // ended for all
791
- t.media.addEventListener('ended', function (e) {
792
- if(t.options.autoRewind) {
793
- try{
794
- t.media.setCurrentTime(0);
795
- // Fixing an Android stock browser bug, where "seeked" isn't fired correctly after ending the video and jumping to the beginning
796
- window.setTimeout(function(){
797
- $(t.container).find('.mejs-overlay-loading').parent().hide();
798
- }, 20);
799
- } catch (exp) {
800
-
801
- }
802
- }
803
- if (t.media.pluginType === 'youtube') {
804
- t.media.stop();
805
- } else {
806
- t.media.pause();
807
- }
808
-
809
- if (t.setProgressRail) {
810
- t.setProgressRail();
811
- }
812
- if (t.setCurrentRail) {
813
- t.setCurrentRail();
814
- }
815
-
816
- if (t.options.loop) {
817
- t.play();
818
- } else if (!t.options.alwaysShowControls && t.controlsEnabled) {
819
- t.showControls();
820
- }
821
- }, false);
822
-
823
- // resize on the first play
824
- t.media.addEventListener('loadedmetadata', function() {
825
-
826
- mejs.Utility.calculateTimeFormat(t.duration, t.options, t.options.framesPerSecond || 25);
827
-
828
- if (t.updateDuration) {
829
- t.updateDuration();
830
- }
831
- if (t.updateCurrent) {
832
- t.updateCurrent();
833
- }
834
-
835
- if (!t.isFullScreen) {
836
- t.setPlayerSize(t.width, t.height);
837
- t.setControlsSize();
838
- }
839
- }, false);
840
-
841
- // Only change the time format when necessary
842
- var duration = null;
843
- t.media.addEventListener('timeupdate',function() {
844
- if (duration !== this.duration) {
845
- duration = this.duration;
846
- mejs.Utility.calculateTimeFormat(duration, t.options, t.options.framesPerSecond || 25);
847
-
848
- // make sure to fill in and resize the controls (e.g., 00:00 => 01:13:15
849
- if (t.updateDuration) {
850
- t.updateDuration();
851
- }
852
- if (t.updateCurrent) {
853
- t.updateCurrent();
854
- }
855
- t.setControlsSize();
856
-
857
- }
858
- }, false);
859
-
860
- t.container.focusout(function (e) {
861
- if( e.relatedTarget ) { //FF is working on supporting focusout https://bugzilla.mozilla.org/show_bug.cgi?id=687787
862
- var $target = $(e.relatedTarget);
863
- if (t.keyboardAction && $target.parents('.mejs-container').length === 0) {
864
- t.keyboardAction = false;
865
- if (t.isVideo && !t.options.alwaysShowControls) {
866
- t.hideControls(true);
867
- }
868
-
869
- }
870
- }
871
- });
872
-
873
- // webkit has trouble doing this without a delay
874
- setTimeout(function () {
875
- t.setPlayerSize(t.width, t.height);
876
- t.setControlsSize();
877
- }, 50);
878
-
879
- // adjust controls whenever window sizes (used to be in fullscreen only)
880
- t.globalBind('resize', function() {
881
-
882
- // don't resize for fullscreen mode
883
- if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) {
884
- t.setPlayerSize(t.width, t.height);
885
- }
886
-
887
- // always adjust controls
888
- t.setControlsSize();
889
- });
890
-
891
- // This is a work-around for a bug in the YouTube iFrame player, which means
892
- // we can't use the play() API for the initial playback on iOS or Android;
893
- // user has to start playback directly by tapping on the iFrame.
894
- if (t.media.pluginType == 'youtube' && ( mf.isiOS || mf.isAndroid ) ) {
895
- t.container.find('.mejs-overlay-play').hide();
896
- t.container.find('.mejs-poster').hide();
897
- }
898
- }
899
-
900
- // force autoplay for HTML5
901
- if (autoplay && media.pluginType == 'native') {
902
- t.play();
903
- }
904
-
905
-
906
- if (t.options.success) {
907
-
908
- if (typeof t.options.success == 'string') {
909
- window[t.options.success](t.media, t.domNode, t);
910
- } else {
911
- t.options.success(t.media, t.domNode, t);
912
- }
913
- }
914
- },
915
-
916
- handleError: function(e) {
917
- var t = this;
918
-
919
- if (t.controls) {
920
- t.controls.hide();
921
- }
922
-
923
- // Tell user that the file cannot be played
924
- if (t.options.error) {
925
- t.options.error(e);
926
- }
927
- },
928
-
929
- setPlayerSize: function(width,height) {
930
- var t = this;
931
-
932
- if( !t.options.setDimensions ) {
933
- return false;
934
- }
935
-
936
- if (typeof width != 'undefined') {
937
- t.width = width;
938
- }
939
-
940
- if (typeof height != 'undefined') {
941
- t.height = height;
942
- }
943
-
944
- // check stretching modes
945
- switch (t.options.stretching) {
946
- case 'fill':
947
- // The 'fill' effect only makes sense on video; for audio we will set the dimensions
948
- if (t.isVideo) {
949
- this.setFillMode();
950
- } else {
951
- this.setDimensions(t.width, t.height);
952
- }
953
- break;
954
- case 'responsive':
955
- this.setResponsiveMode();
956
- break;
957
- case 'none':
958
- this.setDimensions(t.width, t.height);
959
- break;
960
- // This is the 'auto' mode
961
- default:
962
- if (this.hasFluidMode() === true) {
963
- this.setResponsiveMode();
964
- } else {
965
- this.setDimensions(t.width, t.height);
966
- }
967
- break;
968
- }
969
- },
970
-
971
- hasFluidMode: function() {
972
- var t = this;
973
-
974
- // detect 100% mode - use currentStyle for IE since css() doesn't return percentages
975
- return (t.height.toString().indexOf('%') > 0 || (t.$node.css('max-width') !== 'none' && t.$node.css('max-width') !== 't.width') || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%'));
976
- },
977
-
978
- setResponsiveMode: function() {
979
- var t = this;
980
-
981
- // do we have the native dimensions yet?
982
- var nativeWidth = (function() {
983
- if (t.isVideo) {
984
- if (t.media.videoWidth && t.media.videoWidth > 0) {
985
- return t.media.videoWidth;
986
- } else if (t.media.getAttribute('width') !== null) {
987
- return t.media.getAttribute('width');
988
- } else {
989
- return t.options.defaultVideoWidth;
990
- }
991
- } else {
992
- return t.options.defaultAudioWidth;
993
- }
994
- })();
995
-
996
- var nativeHeight = (function() {
997
- if (t.isVideo) {
998
- if (t.media.videoHeight && t.media.videoHeight > 0) {
999
- return t.media.videoHeight;
1000
- } else if (t.media.getAttribute('height') !== null) {
1001
- return t.media.getAttribute('height');
1002
- } else {
1003
- return t.options.defaultVideoHeight;
1004
- }
1005
- } else {
1006
- return t.options.defaultAudioHeight;
1007
- }
1008
- })();
1009
-
1010
- var parentWidth = t.container.parent().closest(':visible').width(),
1011
- parentHeight = t.container.parent().closest(':visible').height(),
1012
- newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight;
1013
-
1014
- // When we use percent, the newHeight can't be calculated so we get the container height
1015
- if (isNaN(newHeight) || ( parentHeight !== 0 && newHeight > parentHeight && parentHeight > nativeHeight)) {
1016
- newHeight = parentHeight;
1017
- }
1018
-
1019
- if (t.container.parent().length > 0 && t.container.parent()[0].tagName.toLowerCase() === 'body') { // && t.container.siblings().count == 0) {
1020
- parentWidth = $(window).width();
1021
- newHeight = $(window).height();
1022
- }
1023
-
1024
- if ( newHeight && parentWidth ) {
1025
-
1026
- // set outer container size
1027
- t.container
1028
- .width(parentWidth)
1029
- .height(newHeight);
1030
-
1031
- // set native <video> or <audio> and shims
1032
- t.$media.add(t.container.find('.mejs-shim'))
1033
- .width('100%')
1034
- .height('100%');
1035
-
1036
- // if shim is ready, send the size to the embeded plugin
1037
- if (t.isVideo) {
1038
- if (t.media.setVideoSize) {
1039
- t.media.setVideoSize(parentWidth, newHeight);
1040
- }
1041
- }
1042
-
1043
- // set the layers
1044
- t.layers.children('.mejs-layer')
1045
- .width('100%')
1046
- .height('100%');
1047
- }
1048
- },
1049
-
1050
- setFillMode: function() {
1051
- var t = this,
1052
- parent = t.outerContainer;
1053
-
1054
- if (!parent.width()) {
1055
- parent.height(t.$media.width());
1056
- }
1057
-
1058
- if (!parent.height()) {
1059
- parent.height(t.$media.height());
1060
- }
1061
-
1062
- var parentWidth = parent.width(),
1063
- parentHeight = parent.height();
1064
-
1065
- t.setDimensions('100%', '100%');
1066
-
1067
- // This prevents an issue when displaying poster
1068
- t.container.find('.mejs-poster img').css('display', 'block');
1069
-
1070
- targetElement = t.container.find('object, embed, iframe, video');
1071
-
1072
- // calculate new width and height
1073
- var initHeight = t.height,
1074
- initWidth = t.width,
1075
- // scale to the target width
1076
- scaleX1 = parentWidth,
1077
- scaleY1 = (initHeight * parentWidth) / initWidth,
1078
- // scale to the target height
1079
- scaleX2 = (initWidth * parentHeight) / initHeight,
1080
- scaleY2 = parentHeight,
1081
- // now figure out which one we should use
1082
- bScaleOnWidth = !(scaleX2 > parentWidth),
1083
- finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2),
1084
- finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2);
1085
-
1086
- if (bScaleOnWidth) {
1087
- targetElement.height(finalHeight).width(parentWidth);
1088
- if (t.media.setVideoSize) {
1089
- t.media.setVideoSize(parentWidth, finalHeight);
1090
- }
1091
- } else {
1092
- targetElement.height(parentHeight).width(finalWidth);
1093
- if (t.media.setVideoSize) {
1094
- t.media.setVideoSize(finalWidth, parentHeight);
1095
- }
1096
- }
1097
-
1098
- targetElement.css({
1099
- 'margin-left': Math.floor((parentWidth - finalWidth) / 2),
1100
- 'margin-top': 0
1101
- });
1102
- },
1103
-
1104
- setDimensions: function(width, height) {
1105
- var t = this;
1106
-
1107
- t.container
1108
- .width(width)
1109
- .height(height);
1110
-
1111
- t.layers.children('.mejs-layer')
1112
- .width(width)
1113
- .height(height);
1114
- },
1115
-
1116
- setControlsSize: function() {
1117
- var t = this,
1118
- usedWidth = 0,
1119
- railWidth = 0,
1120
- rail = t.controls.find('.mejs-time-rail'),
1121
- total = t.controls.find('.mejs-time-total'),
1122
- others = rail.siblings(),
1123
- lastControl = others.last(),
1124
- lastControlPosition = null,
1125
- avoidAutosizeProgress = t.options && !t.options.autosizeProgress;
1126
-
1127
- // skip calculation if hidden
1128
- if (!t.container.is(':visible') || !rail.length || !rail.is(':visible')) {
1129
- return;
1130
- }
1131
-
1132
- // allow the size to come from custom CSS
1133
- if (avoidAutosizeProgress) {
1134
- // Also, frontends devs can be more flexible
1135
- // due the opportunity of absolute positioning.
1136
- railWidth = parseInt(rail.css('width'), 10);
1137
- }
1138
-
1139
- // attempt to autosize
1140
- if (railWidth === 0 || !railWidth) {
1141
-
1142
- // find the size of all the other controls besides the rail
1143
- others.each(function() {
1144
- var $this = $(this);
1145
- if ($this.css('position') != 'absolute' && $this.is(':visible')) {
1146
- usedWidth += $(this).outerWidth(true);
1147
- }
1148
- });
1149
-
1150
- // fit the rail into the remaining space
1151
- railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
1152
- }
1153
-
1154
- // resize the rail,
1155
- // but then check if the last control (say, the fullscreen button) got pushed down
1156
- // this often happens when zoomed
1157
- do {
1158
- // outer area
1159
- // we only want to set an inline style with the width of the rail
1160
- // if we're trying to autosize.
1161
- if (!avoidAutosizeProgress) {
1162
- rail.width(railWidth);
1163
- }
1164
-
1165
- // dark space
1166
- total.width(railWidth - (total.outerWidth(true) - total.width()));
1167
-
1168
- if (lastControl.css('position') != 'absolute') {
1169
- lastControlPosition = lastControl.length ? lastControl.position() : null;
1170
- railWidth--;
1171
- }
1172
- } while (lastControlPosition !== null && lastControlPosition.top.toFixed(2) > 0 && railWidth > 0);
1173
-
1174
- t.container.trigger('controlsresize');
1175
- },
1176
-
1177
-
1178
- buildposter: function(player, controls, layers, media) {
1179
- var t = this,
1180
- poster =
1181
- $('<div class="mejs-poster mejs-layer">' +
1182
- '</div>')
1183
- .appendTo(layers),
1184
- posterUrl = player.$media.attr('poster');
1185
-
1186
- // prioriy goes to option (this is useful if you need to support iOS 3.x (iOS completely fails with poster)
1187
- if (player.options.poster !== '') {
1188
- posterUrl = player.options.poster;
1189
- }
1190
-
1191
- // second, try the real poster
1192
- if ( posterUrl ) {
1193
- t.setPoster(posterUrl);
1194
- } else {
1195
- poster.hide();
1196
- }
1197
-
1198
- media.addEventListener('play',function() {
1199
- poster.hide();
1200
- }, false);
1201
-
1202
- if(player.options.showPosterWhenEnded && player.options.autoRewind){
1203
- media.addEventListener('ended',function() {
1204
- poster.show();
1205
- }, false);
1206
- }
1207
- },
1208
-
1209
- setPoster: function(url) {
1210
- var t = this,
1211
- posterDiv = t.container.find('.mejs-poster'),
1212
- posterImg = posterDiv.find('img');
1213
-
1214
- if (posterImg.length === 0) {
1215
- posterImg = $('<img width="100%" height="100%" alt="" />').appendTo(posterDiv);
1216
- }
1217
-
1218
- posterImg.attr('src', url);
1219
- posterDiv.css({'background-image' : 'url(' + url + ')'});
1220
- },
1221
-
1222
- buildoverlays: function(player, controls, layers, media) {
1223
- var t = this;
1224
- if (!player.isVideo)
1225
- return;
1226
-
1227
- var
1228
- loading =
1229
- $('<div class="mejs-overlay mejs-layer">'+
1230
- '<div class="mejs-overlay-loading"><span></span></div>'+
1231
- '</div>')
1232
- .hide() // start out hidden
1233
- .appendTo(layers),
1234
- error =
1235
- $('<div class="mejs-overlay mejs-layer">'+
1236
- '<div class="mejs-overlay-error"></div>'+
1237
- '</div>')
1238
- .hide() // start out hidden
1239
- .appendTo(layers),
1240
- // this needs to come last so it's on top
1241
- bigPlay =
1242
- $('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
1243
- '<div class="mejs-overlay-button" role="button" aria-label="' + mejs.i18n.t('mejs.play') + '" aria-pressed="false"></div>'+
1244
- '</div>')
1245
- .appendTo(layers)
1246
- .bind('click', function() { // Removed 'touchstart' due issues on Samsung Android devices where a tap on bigPlay started and immediately stopped the video
1247
- if (t.options.clickToPlayPause) {
1248
- if (media.paused) {
1249
- media.play();
1250
- }
1251
-
1252
- var button = $(this).find('.mejs-overlay-button'),
1253
- pressed = button.attr('aria-pressed');
1254
- button.attr('aria-pressed', !!pressed);
1255
- }
1256
- });
1257
-
1258
- /*
1259
- if (mejs.MediaFeatures.isiOS || mejs.MediaFeatures.isAndroid) {
1260
- bigPlay.remove();
1261
- loading.remove();
1262
- }
1263
- */
1264
-
1265
-
1266
- // show/hide big play button
1267
- media.addEventListener('play',function() {
1268
- bigPlay.hide();
1269
- loading.hide();
1270
- controls.find('.mejs-time-buffering').hide();
1271
- error.hide();
1272
- }, false);
1273
-
1274
- media.addEventListener('playing', function() {
1275
- bigPlay.hide();
1276
- loading.hide();
1277
- controls.find('.mejs-time-buffering').hide();
1278
- error.hide();
1279
- }, false);
1280
-
1281
- media.addEventListener('seeking', function() {
1282
- loading.show();
1283
- controls.find('.mejs-time-buffering').show();
1284
- }, false);
1285
-
1286
- media.addEventListener('seeked', function() {
1287
- loading.hide();
1288
- controls.find('.mejs-time-buffering').hide();
1289
- }, false);
1290
-
1291
- media.addEventListener('pause',function() {
1292
- if (!mejs.MediaFeatures.isiPhone) {
1293
- bigPlay.show();
1294
- }
1295
- }, false);
1296
-
1297
- media.addEventListener('waiting', function() {
1298
- loading.show();
1299
- controls.find('.mejs-time-buffering').show();
1300
- }, false);
1301
-
1302
-
1303
- // show/hide loading
1304
- media.addEventListener('loadeddata',function() {
1305
- // for some reason Chrome is firing this event
1306
- //if (mejs.MediaFeatures.isChrome && media.getAttribute && media.getAttribute('preload') === 'none')
1307
- // return;
1308
-
1309
- loading.show();
1310
- controls.find('.mejs-time-buffering').show();
1311
- // Firing the 'canplay' event after a timeout which isn't getting fired on some Android 4.1 devices (https://github.com/johndyer/mediaelement/issues/1305)
1312
- if (mejs.MediaFeatures.isAndroid) {
1313
- media.canplayTimeout = window.setTimeout(
1314
- function() {
1315
- if (document.createEvent) {
1316
- var evt = document.createEvent('HTMLEvents');
1317
- evt.initEvent('canplay', true, true);
1318
- return media.dispatchEvent(evt);
1319
- }
1320
- }, 300
1321
- );
1322
- }
1323
- }, false);
1324
- media.addEventListener('canplay',function() {
1325
- loading.hide();
1326
- controls.find('.mejs-time-buffering').hide();
1327
- clearTimeout(media.canplayTimeout); // Clear timeout inside 'loadeddata' to prevent 'canplay' to fire twice
1328
- }, false);
1329
-
1330
- // error handling
1331
- media.addEventListener('error',function(e) {
1332
- t.handleError(e);
1333
- loading.hide();
1334
- bigPlay.hide();
1335
- error.show();
1336
- error.find('.mejs-overlay-error').html("Error loading this resource");
1337
- }, false);
1338
-
1339
- media.addEventListener('keydown', function(e) {
1340
- t.onkeydown(player, media, e);
1341
- }, false);
1342
- },
1343
-
1344
- buildkeyboard: function(player, controls, layers, media) {
1345
-
1346
- var t = this;
1347
-
1348
- t.container.keydown(function () {
1349
- t.keyboardAction = true;
1350
- });
1351
-
1352
- // listen for key presses
1353
- t.globalBind('keydown', function(event) {
1354
- player.hasFocus = $(event.target).closest('.mejs-container').length !== 0
1355
- && $(event.target).closest('.mejs-container').attr('id') === player.$media.closest('.mejs-container').attr('id');
1356
- return t.onkeydown(player, media, event);
1357
- });
1358
-
1359
-
1360
- // check if someone clicked outside a player region, then kill its focus
1361
- t.globalBind('click', function(event) {
1362
- player.hasFocus = $(event.target).closest('.mejs-container').length !== 0;
1363
- });
1364
-
1365
- },
1366
- onkeydown: function(player, media, e) {
1367
- if (player.hasFocus && player.options.enableKeyboard) {
1368
- // find a matching key
1369
- for (var i = 0, il = player.options.keyActions.length; i < il; i++) {
1370
- var keyAction = player.options.keyActions[i];
1371
-
1372
- for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
1373
- if (e.keyCode == keyAction.keys[j]) {
1374
- if (typeof(e.preventDefault) == "function") e.preventDefault();
1375
- keyAction.action(player, media, e.keyCode, e);
1376
- return false;
1377
- }
1378
- }
1379
- }
1380
- }
1381
-
1382
- return true;
1383
- },
1384
-
1385
- findTracks: function() {
1386
- var t = this,
1387
- tracktags = t.$media.find('track');
1388
-
1389
- // store for use by plugins
1390
- t.tracks = [];
1391
- tracktags.each(function(index, track) {
1392
-
1393
- track = $(track);
1394
-
1395
- t.tracks.push({
1396
- srclang: (track.attr('srclang')) ? track.attr('srclang').toLowerCase() : '',
1397
- src: track.attr('src'),
1398
- kind: track.attr('kind'),
1399
- label: track.attr('label') || '',
1400
- entries: [],
1401
- isLoaded: false
1402
- });
1403
- });
1404
- },
1405
- changeSkin: function(className) {
1406
- this.container[0].className = 'mejs-container ' + className;
1407
- this.setPlayerSize(this.width, this.height);
1408
- this.setControlsSize();
1409
- },
1410
- play: function() {
1411
- this.load();
1412
- this.media.play();
1413
- },
1414
- pause: function() {
1415
- try {
1416
- this.media.pause();
1417
- } catch (e) {}
1418
- },
1419
- load: function() {
1420
- if (!this.isLoaded) {
1421
- this.media.load();
1422
- }
1423
-
1424
- this.isLoaded = true;
1425
- },
1426
- setMuted: function(muted) {
1427
- this.media.setMuted(muted);
1428
- },
1429
- setCurrentTime: function(time) {
1430
- this.media.setCurrentTime(time);
1431
- },
1432
- getCurrentTime: function() {
1433
- return this.media.currentTime;
1434
- },
1435
- setVolume: function(volume) {
1436
- this.media.setVolume(volume);
1437
- },
1438
- getVolume: function() {
1439
- return this.media.volume;
1440
- },
1441
- setSrc: function(src) {
1442
- var
1443
- t = this;
1444
-
1445
- // If using YouTube, its API is different to load a specific source
1446
- if (t.media.pluginType === 'youtube') {
1447
- var videoId;
1448
-
1449
- if (typeof src !== 'string') {
1450
- var i, media;
1451
-
1452
- for (i=0; i<src.length; i++) {
1453
- media = src[i];
1454
- if (this.canPlayType(media.type)) {
1455
- src = media.src;
1456
- break;
1457
- }
1458
- }
1459
- }
1460
-
1461
- // youtu.be url from share button
1462
- if (src.lastIndexOf('youtu.be') !== -1) {
1463
- videoId = src.substr(src.lastIndexOf('/') + 1);
1464
-
1465
- if (videoId.indexOf('?') !== -1) {
1466
- videoId = videoId.substr(0, videoId.indexOf('?'));
1467
- }
1468
-
1469
- } else {
1470
- // https://www.youtube.com/watch?v=
1471
- var videoIdMatch = src.match(/[?&]v=([^&#]+)|&|#|$/);
1472
-
1473
- if (videoIdMatch) {
1474
- videoId = videoIdMatch[1];
1475
- }
1476
- }
1477
-
1478
- if (t.media.getAttribute('autoplay') !== null) {
1479
- t.media.pluginApi.loadVideoById(videoId);
1480
- } else {
1481
- t.media.pluginApi.cueVideoById(videoId);
1482
- }
1483
-
1484
- }
1485
- else {
1486
- t.media.setSrc(src);
1487
- }
1488
- },
1489
- remove: function() {
1490
- var t = this, featureIndex, feature;
1491
-
1492
- t.container.prev('.mejs-offscreen').remove();
1493
-
1494
- // invoke features cleanup
1495
- for (featureIndex in t.options.features) {
1496
- feature = t.options.features[featureIndex];
1497
- if (t['clean' + feature]) {
1498
- try {
1499
- t['clean' + feature](t);
1500
- } catch (e) {
1501
- // TODO: report control error
1502
- //throw e;
1503
- //
1504
- //
1505
- }
1506
- }
1507
- }
1508
-
1509
- // grab video and put it back in place
1510
- if (!t.isDynamic) {
1511
- t.$media.prop('controls', true);
1512
- // detach events from the video
1513
- // TODO: detach event listeners better than this;
1514
- // also detach ONLY the events attached by this plugin!
1515
- t.$node.clone().insertBefore(t.container).show();
1516
- t.$node.remove();
1517
- } else {
1518
- t.$node.insertBefore(t.container);
1519
- }
1520
-
1521
- if (t.media.pluginType !== 'native') {
1522
- t.media.remove();
1523
- }
1524
-
1525
- // Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api.
1526
- delete mejs.players[t.id];
1527
-
1528
- if (typeof t.container == 'object') {
1529
- t.container.remove();
1530
- }
1531
- t.globalUnbind();
1532
- delete t.node.player;
1533
- },
1534
- rebuildtracks: function(){
1535
- var t = this;
1536
- t.findTracks();
1537
- t.buildtracks(t, t.controls, t.layers, t.media);
1538
- },
1539
- resetSize: function(){
1540
- var t = this;
1541
- // webkit has trouble doing this without a delay
1542
- setTimeout(function () {
1543
- //
1544
- t.setPlayerSize(t.width, t.height);
1545
- t.setControlsSize();
1546
- }, 50);
1547
- }
1548
- };
1549
-
1550
- (function(){
1551
- var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
1552
-
1553
- function splitEvents(events, id) {
1554
- // add player ID as an event namespace so it's easier to unbind them all later
1555
- var ret = {d: [], w: []};
1556
- $.each((events || '').split(' '), function(k, v){
1557
- var eventname = v + '.' + id;
1558
- if (eventname.indexOf('.') === 0) {
1559
- ret.d.push(eventname);
1560
- ret.w.push(eventname);
1561
- }
1562
- else {
1563
- ret[rwindow.test(v) ? 'w' : 'd'].push(eventname);
1564
- }
1565
- });
1566
- ret.d = ret.d.join(' ');
1567
- ret.w = ret.w.join(' ');
1568
- return ret;
1569
- }
1570
-
1571
- mejs.MediaElementPlayer.prototype.globalBind = function(events, data, callback) {
1572
- var t = this;
1573
- var doc = t.node ? t.node.ownerDocument : document;
1574
-
1575
- events = splitEvents(events, t.id);
1576
- if (events.d) $(doc).bind(events.d, data, callback);
1577
- if (events.w) $(window).bind(events.w, data, callback);
1578
- };
1579
-
1580
- mejs.MediaElementPlayer.prototype.globalUnbind = function(events, callback) {
1581
- var t = this;
1582
- var doc = t.node ? t.node.ownerDocument : document;
1583
-
1584
- events = splitEvents(events, t.id);
1585
- if (events.d) $(doc).unbind(events.d, callback);
1586
- if (events.w) $(window).unbind(events.w, callback);
1587
- };
1588
- })();
1589
-
1590
- // turn into jQuery plugin
1591
- if (typeof $ != 'undefined') {
1592
- $.fn.mediaelementplayer = function (options) {
1593
- if (options === false) {
1594
- this.each(function () {
1595
- var player = $(this).data('mediaelementplayer');
1596
- if (player) {
1597
- player.remove();
1598
- }
1599
- $(this).removeData('mediaelementplayer');
1600
- });
1601
- }
1602
- else {
1603
- this.each(function () {
1604
- $(this).data('mediaelementplayer', new mejs.MediaElementPlayer(this, options));
1605
- });
1606
- }
1607
- return this;
1608
- };
1609
-
1610
-
1611
- $(document).ready(function() {
1612
- // auto enable using JSON attribute
1613
- $('.mejs-player').mediaelementplayer();
1614
- });
1615
- }
1616
-
1617
- // push out to window
1618
- window.MediaElementPlayer = mejs.MediaElementPlayer;
1619
-
1620
- })(mejs.$);
1621
-
1622
- (function($) {
1623
-
1624
- $.extend(mejs.MepDefaults, {
1625
- playText: '',
1626
- pauseText: ''
1627
- });
1628
-
1629
-
1630
- // PLAY/pause BUTTON
1631
- $.extend(MediaElementPlayer.prototype, {
1632
- buildplaypause: function(player, controls, layers, media) {
1633
- var
1634
- t = this,
1635
- op = t.options,
1636
- playTitle = op.playText ? op.playText : mejs.i18n.t('mejs.play'),
1637
- pauseTitle = op.pauseText ? op.pauseText : mejs.i18n.t('mejs.pause'),
1638
- play =
1639
- $('<div class="mejs-button mejs-playpause-button mejs-play" >' +
1640
- '<button type="button" aria-controls="' + t.id + '" title="' + playTitle + '" aria-label="' + pauseTitle + '"></button>' +
1641
- '</div>')
1642
- .appendTo(controls)
1643
- .click(function(e) {
1644
- e.preventDefault();
1645
-
1646
- if (media.paused) {
1647
- media.play();
1648
- } else {
1649
- media.pause();
1650
- }
1651
-
1652
- return false;
1653
- }),
1654
- play_btn = play.find('button');
1655
-
1656
-
1657
- function togglePlayPause(which) {
1658
- if ('play' === which) {
1659
- play.removeClass('mejs-play').addClass('mejs-pause');
1660
- play_btn.attr({
1661
- 'title': pauseTitle,
1662
- 'aria-label': pauseTitle
1663
- });
1664
- } else {
1665
- play.removeClass('mejs-pause').addClass('mejs-play');
1666
- play_btn.attr({
1667
- 'title': playTitle,
1668
- 'aria-label': playTitle
1669
- });
1670
- }
1671
- };
1672
- togglePlayPause('pse');
1673
-
1674
-
1675
- media.addEventListener('play',function() {
1676
- togglePlayPause('play');
1677
- }, false);
1678
- media.addEventListener('playing',function() {
1679
- togglePlayPause('play');
1680
- }, false);
1681
-
1682
-
1683
- media.addEventListener('pause',function() {
1684
- togglePlayPause('pse');
1685
- }, false);
1686
- media.addEventListener('paused',function() {
1687
- togglePlayPause('pse');
1688
- }, false);
1689
- }
1690
- });
1691
-
1692
- })(mejs.$);
1693
-
1694
- (function($) {
1695
-
1696
- $.extend(mejs.MepDefaults, {
1697
- stopText: 'Stop'
1698
- });
1699
-
1700
- // STOP BUTTON
1701
- $.extend(MediaElementPlayer.prototype, {
1702
- buildstop: function(player, controls, layers, media) {
1703
- var t = this;
1704
-
1705
- $('<div class="mejs-button mejs-stop-button mejs-stop">' +
1706
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '" aria-label="' + t.options.stopText + '"></button>' +
1707
- '</div>')
1708
- .appendTo(controls)
1709
- .click(function() {
1710
- if (!media.paused) {
1711
- media.pause();
1712
- }
1713
- if (media.currentTime > 0) {
1714
- media.setCurrentTime(0);
1715
- media.pause();
1716
- controls.find('.mejs-time-current').width('0px');
1717
- controls.find('.mejs-time-handle').css('left', '0px');
1718
- controls.find('.mejs-time-float-current').html( mejs.Utility.secondsToTimeCode(0, player.options));
1719
- controls.find('.mejs-currenttime').html( mejs.Utility.secondsToTimeCode(0, player.options));
1720
- layers.find('.mejs-poster').show();
1721
- }
1722
- });
1723
- }
1724
- });
1725
-
1726
- })(mejs.$);
1727
-
1728
- (function($) {
1729
-
1730
- $.extend(mejs.MepDefaults, {
1731
- // Enable tooltip that shows time in progress bar
1732
- enableProgressTooltip: true,
1733
- progressHelpText: ''
1734
- });
1735
-
1736
- // progress/loaded bar
1737
- $.extend(MediaElementPlayer.prototype, {
1738
- buildprogress: function(player, controls, layers, media) {
1739
-
1740
- var
1741
- t = this,
1742
- mouseIsDown = false,
1743
- mouseIsOver = false,
1744
- lastKeyPressTime = 0,
1745
- startedPaused = false,
1746
- autoRewindInitial = player.options.autoRewind,
1747
- progressTitle = t.options.progressHelpText ? t.options.progressHelpText : mejs.i18n.t('mejs.time-help-text'),
1748
- tooltip = player.options.enableProgressTooltip ? '<span class="mejs-time-float">' +
1749
- '<span class="mejs-time-float-current">00:00</span>' +
1750
- '<span class="mejs-time-float-corner"></span>' +
1751
- '</span>' : "";
1752
-
1753
- $('<div class="mejs-time-rail">' +
1754
- '<span class="mejs-time-total mejs-time-slider">' +
1755
- //'<span class="mejs-offscreen">' + progressTitle + '</span>' +
1756
- '<span class="mejs-time-buffering"></span>' +
1757
- '<span class="mejs-time-loaded"></span>' +
1758
- '<span class="mejs-time-current"></span>' +
1759
- '<span class="mejs-time-handle"></span>' +
1760
- tooltip +
1761
- '</span>' +
1762
- '</div>')
1763
- .appendTo(controls);
1764
- controls.find('.mejs-time-buffering').hide();
1765
-
1766
- t.total = controls.find('.mejs-time-total');
1767
- t.loaded = controls.find('.mejs-time-loaded');
1768
- t.current = controls.find('.mejs-time-current');
1769
- t.handle = controls.find('.mejs-time-handle');
1770
- t.timefloat = controls.find('.mejs-time-float');
1771
- t.timefloatcurrent = controls.find('.mejs-time-float-current');
1772
- t.slider = controls.find('.mejs-time-slider');
1773
-
1774
- var handleMouseMove = function (e) {
1775
-
1776
- var offset = t.total.offset(),
1777
- width = t.total.width(),
1778
- percentage = 0,
1779
- newTime = 0,
1780
- pos = 0,
1781
- x;
1782
-
1783
- // mouse or touch position relative to the object
1784
- if (e.originalEvent && e.originalEvent.changedTouches) {
1785
- x = e.originalEvent.changedTouches[0].pageX;
1786
- } else if (e.changedTouches) { // for Zepto
1787
- x = e.changedTouches[0].pageX;
1788
- } else {
1789
- x = e.pageX;
1790
- }
1791
-
1792
- if (media.duration) {
1793
- if (x < offset.left) {
1794
- x = offset.left;
1795
- } else if (x > width + offset.left) {
1796
- x = width + offset.left;
1797
- }
1798
-
1799
- pos = x - offset.left;
1800
- percentage = (pos / width);
1801
- newTime = (percentage <= 0.02) ? 0 : percentage * media.duration;
1802
-
1803
- // seek to where the mouse is
1804
- if (mouseIsDown && newTime !== media.currentTime) {
1805
- media.setCurrentTime(newTime);
1806
- }
1807
-
1808
- // position floating time box
1809
- if (!mejs.MediaFeatures.hasTouch) {
1810
- t.timefloat.css('left', pos);
1811
- t.timefloatcurrent.html( mejs.Utility.secondsToTimeCode(newTime, player.options) );
1812
- t.timefloat.show();
1813
- }
1814
- }
1815
- },
1816
- // Accessibility for slider
1817
- updateSlider = function (e) {
1818
-
1819
- var seconds = media.currentTime,
1820
- timeSliderText = mejs.i18n.t('mejs.time-slider'),
1821
- time = mejs.Utility.secondsToTimeCode(seconds, player.options),
1822
- duration = media.duration;
1823
-
1824
- t.slider.attr({
1825
- 'aria-label': timeSliderText,
1826
- 'aria-valuemin': 0,
1827
- 'aria-valuemax': duration,
1828
- 'aria-valuenow': seconds,
1829
- 'aria-valuetext': time,
1830
- 'role': 'slider',
1831
- 'tabindex': 0
1832
- });
1833
-
1834
- },
1835
- restartPlayer = function () {
1836
- var now = new Date();
1837
- if (now - lastKeyPressTime >= 1000) {
1838
- media.play();
1839
- }
1840
- };
1841
-
1842
- t.slider.bind('focus', function (e) {
1843
- player.options.autoRewind = false;
1844
- });
1845
-
1846
- t.slider.bind('blur', function (e) {
1847
- player.options.autoRewind = autoRewindInitial;
1848
- });
1849
-
1850
- t.slider.bind('keydown', function (e) {
1851
-
1852
- if ((new Date() - lastKeyPressTime) >= 1000) {
1853
- startedPaused = media.paused;
1854
- }
1855
-
1856
- var keyCode = e.keyCode,
1857
- duration = media.duration,
1858
- seekTime = media.currentTime,
1859
- seekForward = player.options.defaultSeekForwardInterval(media),
1860
- seekBackward = player.options.defaultSeekBackwardInterval(media);
1861
-
1862
- switch (keyCode) {
1863
- case 37: // left
1864
- case 40: // Down
1865
- seekTime -= seekBackward;
1866
- break;
1867
- case 39: // Right
1868
- case 38: // Up
1869
- seekTime += seekForward;
1870
- break;
1871
- case 36: // Home
1872
- seekTime = 0;
1873
- break;
1874
- case 35: // end
1875
- seekTime = duration;
1876
- break;
1877
- case 32: // space
1878
- case 13: // enter
1879
- media.paused ? media.play() : media.pause();
1880
- return;
1881
- default:
1882
- return;
1883
- }
1884
-
1885
- seekTime = seekTime < 0 ? 0 : (seekTime >= duration ? duration : Math.floor(seekTime));
1886
- lastKeyPressTime = new Date();
1887
- if (!startedPaused) {
1888
- media.pause();
1889
- }
1890
-
1891
- if (seekTime < media.duration && !startedPaused) {
1892
- setTimeout(restartPlayer, 1100);
1893
- }
1894
-
1895
- media.setCurrentTime(seekTime);
1896
-
1897
- e.preventDefault();
1898
- e.stopPropagation();
1899
- return false;
1900
- });
1901
-
1902
-
1903
- // handle clicks
1904
- //controls.find('.mejs-time-rail').delegate('span', 'click', handleMouseMove);
1905
- t.total
1906
- .bind('mousedown touchstart', function (e) {
1907
- // only handle left clicks or touch
1908
- if (e.which === 1 || e.which === 0) {
1909
- mouseIsDown = true;
1910
- handleMouseMove(e);
1911
- t.globalBind('mousemove.dur touchmove.dur', function(e) {
1912
- handleMouseMove(e);
1913
- });
1914
- t.globalBind('mouseup.dur touchend.dur', function (e) {
1915
- mouseIsDown = false;
1916
- if (typeof t.timefloat !== 'undefined') {
1917
- t.timefloat.hide();
1918
- }
1919
- t.globalUnbind('.dur');
1920
- });
1921
- }
1922
- })
1923
- .bind('mouseenter', function(e) {
1924
- mouseIsOver = true;
1925
- t.globalBind('mousemove.dur', function(e) {
1926
- handleMouseMove(e);
1927
- });
1928
- if (typeof t.timefloat !== 'undefined' && !mejs.MediaFeatures.hasTouch) {
1929
- t.timefloat.show();
1930
- }
1931
- })
1932
- .bind('mouseleave',function(e) {
1933
- mouseIsOver = false;
1934
- if (!mouseIsDown) {
1935
- t.globalUnbind('.dur');
1936
- if (typeof t.timefloat !== 'undefined') {
1937
- t.timefloat.hide();
1938
- }
1939
- }
1940
- });
1941
-
1942
- // loading
1943
- media.addEventListener('progress', function (e) {
1944
- player.setProgressRail(e);
1945
- player.setCurrentRail(e);
1946
- }, false);
1947
-
1948
- // current time
1949
- media.addEventListener('timeupdate', function(e) {
1950
- player.setProgressRail(e);
1951
- player.setCurrentRail(e);
1952
- updateSlider(e);
1953
- }, false);
1954
-
1955
- t.container.on('controlsresize', function(e) {
1956
- player.setProgressRail(e);
1957
- player.setCurrentRail(e);
1958
- });
1959
- },
1960
- setProgressRail: function(e) {
1961
-
1962
- var
1963
- t = this,
1964
- target = (e !== undefined) ? e.target : t.media,
1965
- percent = null;
1966
-
1967
- // newest HTML5 spec has buffered array (FF4, Webkit)
1968
- if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) {
1969
- // account for a real array with multiple values - always read the end of the last buffer
1970
- percent = target.buffered.end(target.buffered.length - 1) / target.duration;
1971
- }
1972
- // Some browsers (e.g., FF3.6 and Safari 5) cannot calculate target.bufferered.end()
1973
- // to be anything other than 0. If the byte count is available we use this instead.
1974
- // Browsers that support the else if do not seem to have the bufferedBytes value and
1975
- // should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8.
1976
- else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) {
1977
- percent = target.bufferedBytes / target.bytesTotal;
1978
- }
1979
- // Firefox 3 with an Ogg file seems to go this way
1980
- else if (e && e.lengthComputable && e.total !== 0) {
1981
- percent = e.loaded / e.total;
1982
- }
1983
-
1984
- // finally update the progress bar
1985
- if (percent !== null) {
1986
- percent = Math.min(1, Math.max(0, percent));
1987
- // update loaded bar
1988
- if (t.loaded && t.total) {
1989
- t.loaded.width(t.total.width() * percent);
1990
- }
1991
- }
1992
- },
1993
- setCurrentRail: function() {
1994
-
1995
- var t = this;
1996
-
1997
- if (t.media.currentTime !== undefined && t.media.duration) {
1998
-
1999
- // update bar and handle
2000
- if (t.total && t.handle) {
2001
- var
2002
- newWidth = Math.round(t.total.width() * t.media.currentTime / t.media.duration),
2003
- handlePos = newWidth - Math.round(t.handle.outerWidth(true) / 2);
2004
-
2005
- t.current.width(newWidth);
2006
- t.handle.css('left', handlePos);
2007
- }
2008
- }
2009
-
2010
- }
2011
- });
2012
- })(mejs.$);
2013
-
2014
- (function($) {
2015
-
2016
- // options
2017
- $.extend(mejs.MepDefaults, {
2018
- duration: -1,
2019
- timeAndDurationSeparator: '<span> | </span>'
2020
- });
2021
-
2022
-
2023
- // current and duration 00:00 / 00:00
2024
- $.extend(MediaElementPlayer.prototype, {
2025
- buildcurrent: function(player, controls, layers, media) {
2026
- var t = this;
2027
-
2028
- $('<div class="mejs-time" role="timer" aria-live="off">' +
2029
- '<span class="mejs-currenttime">' +
2030
- mejs.Utility.secondsToTimeCode(0, player.options) +
2031
- '</span>'+
2032
- '</div>')
2033
- .appendTo(controls);
2034
-
2035
- t.currenttime = t.controls.find('.mejs-currenttime');
2036
-
2037
- media.addEventListener('timeupdate',function() {
2038
- if (t.controlsAreVisible) {
2039
- player.updateCurrent();
2040
- }
2041
-
2042
- }, false);
2043
- },
2044
-
2045
-
2046
- buildduration: function(player, controls, layers, media) {
2047
- var t = this;
2048
-
2049
- if (controls.children().last().find('.mejs-currenttime').length > 0) {
2050
- $(t.options.timeAndDurationSeparator +
2051
- '<span class="mejs-duration">' +
2052
- mejs.Utility.secondsToTimeCode(t.options.duration, t.options) +
2053
- '</span>')
2054
- .appendTo(controls.find('.mejs-time'));
2055
- } else {
2056
-
2057
- // add class to current time
2058
- controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container');
2059
-
2060
- $('<div class="mejs-time mejs-duration-container">'+
2061
- '<span class="mejs-duration">' +
2062
- mejs.Utility.secondsToTimeCode(t.options.duration, t.options) +
2063
- '</span>' +
2064
- '</div>')
2065
- .appendTo(controls);
2066
- }
2067
-
2068
- t.durationD = t.controls.find('.mejs-duration');
2069
-
2070
- media.addEventListener('timeupdate',function() {
2071
- if (t.controlsAreVisible) {
2072
- player.updateDuration();
2073
- }
2074
- }, false);
2075
- },
2076
-
2077
- updateCurrent: function() {
2078
- var t = this;
2079
-
2080
- var currentTime = t.media.currentTime;
2081
-
2082
- if (isNaN(currentTime)) {
2083
- currentTime = 0;
2084
- }
2085
-
2086
- if (t.currenttime) {
2087
- t.currenttime.html(mejs.Utility.secondsToTimeCode(currentTime, t.options));
2088
- }
2089
- },
2090
-
2091
- updateDuration: function() {
2092
- var t = this;
2093
-
2094
- var duration = t.media.duration;
2095
- if (t.options.duration > 0) {
2096
- duration = t.options.duration;
2097
- }
2098
-
2099
- if (isNaN(duration)) {
2100
- duration = 0;
2101
- }
2102
-
2103
- //Toggle the long video class if the video is longer than an hour.
2104
- t.container.toggleClass("mejs-long-video", duration > 3600);
2105
-
2106
- if (t.durationD && duration > 0) {
2107
- t.durationD.html(mejs.Utility.secondsToTimeCode(duration, t.options));
2108
- }
2109
- }
2110
- });
2111
-
2112
- })(mejs.$);
2113
-
2114
- (function ($) {
2115
-
2116
- $.extend(mejs.MepDefaults, {
2117
- muteText: mejs.i18n.t('mejs.mute-toggle'),
2118
- allyVolumeControlText: mejs.i18n.t('mejs.volume-help-text'),
2119
- hideVolumeOnTouchDevices: true,
2120
-
2121
- audioVolume: 'horizontal',
2122
- videoVolume: 'vertical'
2123
- });
2124
-
2125
- $.extend(MediaElementPlayer.prototype, {
2126
- buildvolume: function (player, controls, layers, media) {
2127
-
2128
- // Android and iOS don't support volume controls
2129
- if ((mejs.MediaFeatures.isAndroid || mejs.MediaFeatures.isiOS) && this.options.hideVolumeOnTouchDevices)
2130
- return;
2131
-
2132
- var t = this,
2133
- mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume,
2134
- mute = (mode == 'horizontal') ?
2135
-
2136
- // horizontal version
2137
- $('<div class="mejs-button mejs-volume-button mejs-mute">' +
2138
- '<button type="button" aria-controls="' + t.id +
2139
- '" title="' + t.options.muteText +
2140
- '" aria-label="' + t.options.muteText +
2141
- '"></button>' +
2142
- '</div>' +
2143
- '<a href="javascript:void(0);" class="mejs-horizontal-volume-slider">' + // outer background
2144
- '<span class="mejs-offscreen">' + t.options.allyVolumeControlText + '</span>' +
2145
- '<div class="mejs-horizontal-volume-total"></div>' + // line background
2146
- '<div class="mejs-horizontal-volume-current"></div>' + // current volume
2147
- '<div class="mejs-horizontal-volume-handle"></div>' + // handle
2148
- '</a>'
2149
- )
2150
- .appendTo(controls) :
2151
-
2152
- // vertical version
2153
- $('<div class="mejs-button mejs-volume-button mejs-mute">' +
2154
- '<button type="button" aria-controls="' + t.id +
2155
- '" title="' + t.options.muteText +
2156
- '" aria-label="' + t.options.muteText +
2157
- '"></button>' +
2158
- '<a href="javascript:void(0);" class="mejs-volume-slider">' + // outer background
2159
- '<span class="mejs-offscreen">' + t.options.allyVolumeControlText + '</span>' +
2160
- '<div class="mejs-volume-total"></div>' + // line background
2161
- '<div class="mejs-volume-current"></div>' + // current volume
2162
- '<div class="mejs-volume-handle"></div>' + // handle
2163
- '</a>' +
2164
- '</div>')
2165
- .appendTo(controls),
2166
- volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),
2167
- volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),
2168
- volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
2169
- volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
2170
-
2171
- positionVolumeHandle = function (volume, secondTry) {
2172
-
2173
- if (!volumeSlider.is(':visible') && typeof secondTry == 'undefined') {
2174
- volumeSlider.show();
2175
- positionVolumeHandle(volume, true);
2176
- volumeSlider.hide();
2177
- return;
2178
- }
2179
-
2180
- // correct to 0-1
2181
- volume = Math.max(0, volume);
2182
- volume = Math.min(volume, 1);
2183
-
2184
- // adjust mute button style
2185
- if (volume === 0) {
2186
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
2187
- mute.children('button').attr('title', mejs.i18n.t('mejs.unmute')).attr('aria-label', mejs.i18n.t('mejs.unmute'));
2188
- } else {
2189
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
2190
- mute.children('button').attr('title', mejs.i18n.t('mejs.mute')).attr('aria-label', mejs.i18n.t('mejs.mute'));
2191
- }
2192
-
2193
- // top/left of full size volume slider background
2194
- var totalPosition = volumeTotal.position();
2195
- // position slider
2196
- if (mode == 'vertical') {
2197
- var
2198
- // height of the full size volume slider background
2199
- totalHeight = volumeTotal.height(),
2200
-
2201
- // the new top position based on the current volume
2202
- // 70% volume on 100px height == top:30px
2203
- newTop = totalHeight - (totalHeight * volume);
2204
-
2205
- // handle
2206
- volumeHandle.css('top', Math.round(totalPosition.top + newTop - (volumeHandle.height() / 2)));
2207
-
2208
- // show the current visibility
2209
- volumeCurrent.height(totalHeight - newTop);
2210
- volumeCurrent.css('top', totalPosition.top + newTop);
2211
- } else {
2212
- var
2213
- // height of the full size volume slider background
2214
- totalWidth = volumeTotal.width(),
2215
-
2216
- // the new left position based on the current volume
2217
- newLeft = totalWidth * volume;
2218
-
2219
- // handle
2220
- volumeHandle.css('left', Math.round(totalPosition.left + newLeft - (volumeHandle.width() / 2)));
2221
-
2222
- // rezize the current part of the volume bar
2223
- volumeCurrent.width(Math.round(newLeft));
2224
- }
2225
- },
2226
- handleVolumeMove = function (e) {
2227
-
2228
- var volume = null,
2229
- totalOffset = volumeTotal.offset();
2230
-
2231
- // calculate the new volume based on the moust position
2232
- if (mode === 'vertical') {
2233
-
2234
- var
2235
- railHeight = volumeTotal.height(),
2236
- newY = e.pageY - totalOffset.top;
2237
-
2238
- volume = (railHeight - newY) / railHeight;
2239
-
2240
- // the controls just hide themselves (usually when mouse moves too far up)
2241
- if (totalOffset.top === 0 || totalOffset.left === 0) {
2242
- return;
2243
- }
2244
-
2245
- } else {
2246
- var
2247
- railWidth = volumeTotal.width(),
2248
- newX = e.pageX - totalOffset.left;
2249
-
2250
- volume = newX / railWidth;
2251
- }
2252
-
2253
- // ensure the volume isn't outside 0-1
2254
- volume = Math.max(0, volume);
2255
- volume = Math.min(volume, 1);
2256
-
2257
- // position the slider and handle
2258
- positionVolumeHandle(volume);
2259
-
2260
- // set the media object (this will trigger the volumechanged event)
2261
- if (volume === 0) {
2262
- media.setMuted(true);
2263
- } else {
2264
- media.setMuted(false);
2265
- }
2266
- media.setVolume(volume);
2267
- },
2268
- mouseIsDown = false,
2269
- mouseIsOver = false;
2270
-
2271
- // SLIDER
2272
-
2273
- mute
2274
- .hover(function () {
2275
- volumeSlider.show();
2276
- mouseIsOver = true;
2277
- }, function () {
2278
- mouseIsOver = false;
2279
-
2280
- if (!mouseIsDown && mode == 'vertical') {
2281
- volumeSlider.hide();
2282
- }
2283
- });
2284
-
2285
- var updateVolumeSlider = function (e) {
2286
-
2287
- var volume = Math.floor(media.volume * 100);
2288
-
2289
- volumeSlider.attr({
2290
- 'aria-label': mejs.i18n.t('mejs.volume-slider'),
2291
- 'aria-valuemin': 0,
2292
- 'aria-valuemax': 100,
2293
- 'aria-valuenow': volume,
2294
- 'aria-valuetext': volume + '%',
2295
- 'role': 'slider',
2296
- 'tabindex': 0
2297
- });
2298
-
2299
- };
2300
-
2301
- volumeSlider
2302
- .bind('mouseover', function () {
2303
- mouseIsOver = true;
2304
- })
2305
- .bind('mousedown', function (e) {
2306
- handleVolumeMove(e);
2307
- t.globalBind('mousemove.vol', function (e) {
2308
- handleVolumeMove(e);
2309
- });
2310
- t.globalBind('mouseup.vol', function () {
2311
- mouseIsDown = false;
2312
- t.globalUnbind('.vol');
2313
-
2314
- if (!mouseIsOver && mode == 'vertical') {
2315
- volumeSlider.hide();
2316
- }
2317
- });
2318
- mouseIsDown = true;
2319
-
2320
- return false;
2321
- })
2322
- .bind('keydown', function (e) {
2323
- var keyCode = e.keyCode;
2324
- var volume = media.volume;
2325
- switch (keyCode) {
2326
- case 38: // Up
2327
- volume = Math.min(volume + 0.1, 1);
2328
- break;
2329
- case 40: // Down
2330
- volume = Math.max(0, volume - 0.1);
2331
- break;
2332
- default:
2333
- return true;
2334
- }
2335
-
2336
- mouseIsDown = false;
2337
- positionVolumeHandle(volume);
2338
- media.setVolume(volume);
2339
- return false;
2340
- });
2341
-
2342
- // MUTE button
2343
- mute.find('button').click(function () {
2344
- media.setMuted(!media.muted);
2345
- });
2346
-
2347
- //Keyboard input
2348
- mute.find('button').bind('focus', function () {
2349
- volumeSlider.show();
2350
- });
2351
-
2352
- // listen for volume change events from other sources
2353
- media.addEventListener('volumechange', function (e) {
2354
- if (!mouseIsDown) {
2355
- if (media.muted) {
2356
- positionVolumeHandle(0);
2357
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
2358
- } else {
2359
- positionVolumeHandle(media.volume);
2360
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
2361
- }
2362
- }
2363
- updateVolumeSlider(e);
2364
- }, false);
2365
-
2366
- // mutes the media and sets the volume icon muted if the initial volume is set to 0
2367
- if (player.options.startVolume === 0) {
2368
- media.setMuted(true);
2369
- }
2370
-
2371
- // shim gets the startvolume as a parameter, but we have to set it on the native <video> and <audio> elements
2372
- if (media.pluginType === 'native') {
2373
- media.setVolume(player.options.startVolume);
2374
- }
2375
-
2376
- t.container.on('controlsresize', function () {
2377
- if (media.muted) {
2378
- positionVolumeHandle(0);
2379
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
2380
- } else {
2381
- positionVolumeHandle(media.volume);
2382
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
2383
- }
2384
- });
2385
- }
2386
- });
2387
-
2388
- })(mejs.$);
2389
-
2390
- (function($) {
2391
-
2392
- $.extend(mejs.MepDefaults, {
2393
- usePluginFullScreen: true,
2394
- newWindowCallback: function() { return '';},
2395
- fullscreenText: ''
2396
- });
2397
-
2398
- $.extend(MediaElementPlayer.prototype, {
2399
-
2400
- isFullScreen: false,
2401
-
2402
- isNativeFullScreen: false,
2403
-
2404
- isInIframe: false,
2405
-
2406
- // Possible modes
2407
- // (1) 'native-native' HTML5 video + browser fullscreen (IE10+, etc.)
2408
- // (2) 'plugin-native' plugin video + browser fullscreen (fails in some versions of Firefox)
2409
- // (3) 'fullwindow' Full window (retains all UI)
2410
- // usePluginFullScreen = true
2411
- // (4) 'plugin-click' Flash 1 - click through with pointer events
2412
- // (5) 'plugin-hover' Flash 2 - hover popup in flash (IE6-8)
2413
- fullscreenMode: '',
2414
-
2415
- buildfullscreen: function(player, controls, layers, media) {
2416
-
2417
- if (!player.isVideo)
2418
- return;
2419
-
2420
- player.isInIframe = (window.location != window.parent.location);
2421
-
2422
- // detect on start
2423
- media.addEventListener('loadstart', function() { player.detectFullscreenMode(); });
2424
-
2425
- // build button
2426
- var t = this,
2427
- hideTimeout = null,
2428
- fullscreenTitle = t.options.fullscreenText ? t.options.fullscreenText : mejs.i18n.t('mejs.fullscreen'),
2429
- fullscreenBtn =
2430
- $('<div class="mejs-button mejs-fullscreen-button">' +
2431
- '<button type="button" aria-controls="' + t.id + '" title="' + fullscreenTitle + '" aria-label="' + fullscreenTitle + '"></button>' +
2432
- '</div>')
2433
- .appendTo(controls)
2434
- .on('click', function() {
2435
-
2436
- // toggle fullscreen
2437
- var isFullScreen = (mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || player.isFullScreen;
2438
-
2439
- if (isFullScreen) {
2440
- player.exitFullScreen();
2441
- } else {
2442
- player.enterFullScreen();
2443
- }
2444
- })
2445
- .on('mouseover', function() {
2446
-
2447
- // very old browsers with a plugin
2448
- if (t.fullscreenMode == 'plugin-hover') {
2449
- if (hideTimeout !== null) {
2450
- clearTimeout(hideTimeout);
2451
- delete hideTimeout;
2452
- }
2453
-
2454
- var buttonPos = fullscreenBtn.offset(),
2455
- containerPos = player.container.offset();
2456
-
2457
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true);
2458
- }
2459
-
2460
- })
2461
- .on('mouseout', function() {
2462
-
2463
- if (t.fullscreenMode == 'plugin-hover') {
2464
- if (hideTimeout !== null) {
2465
- clearTimeout(hideTimeout);
2466
- delete hideTimeout;
2467
- }
2468
-
2469
- hideTimeout = setTimeout(function() {
2470
- media.hideFullscreenButton();
2471
- }, 1500);
2472
- }
2473
-
2474
- });
2475
-
2476
-
2477
-
2478
- player.fullscreenBtn = fullscreenBtn;
2479
-
2480
- t.globalBind('keydown',function (e) {
2481
- if (e.keyCode == 27 && ((mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || t.isFullScreen)) {
2482
- player.exitFullScreen();
2483
- }
2484
- });
2485
-
2486
- t.normalHeight = 0;
2487
- t.normalWidth = 0;
2488
-
2489
- // setup native fullscreen event
2490
- if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
2491
-
2492
- // chrome doesn't alays fire this in an iframe
2493
- var fullscreenChanged = function(e) {
2494
- if (player.isFullScreen) {
2495
- if (mejs.MediaFeatures.isFullScreen()) {
2496
- player.isNativeFullScreen = true;
2497
- // reset the controls once we are fully in full screen
2498
- player.setControlsSize();
2499
- } else {
2500
- player.isNativeFullScreen = false;
2501
- // when a user presses ESC
2502
- // make sure to put the player back into place
2503
- player.exitFullScreen();
2504
- }
2505
- }
2506
- };
2507
-
2508
- player.globalBind(mejs.MediaFeatures.fullScreenEventName, fullscreenChanged);
2509
- }
2510
-
2511
- },
2512
-
2513
- detectFullscreenMode: function() {
2514
-
2515
- var t = this,
2516
- mode = '',
2517
- features = mejs.MediaFeatures;
2518
-
2519
- if (features.hasTrueNativeFullScreen && t.media.pluginType === 'native') {
2520
- mode = 'native-native';
2521
- } else if (features.hasTrueNativeFullScreen && t.media.pluginType !== 'native' && !features.hasFirefoxPluginMovingProblem) {
2522
- mode = 'plugin-native';
2523
- } else if (t.usePluginFullScreen) {
2524
- if (mejs.MediaFeatures.supportsPointerEvents) {
2525
- mode = 'plugin-click';
2526
- // this needs some special setup
2527
- t.createPluginClickThrough();
2528
- } else {
2529
- mode = 'plugin-hover';
2530
- }
2531
-
2532
- } else {
2533
- mode = 'fullwindow';
2534
- }
2535
-
2536
-
2537
- t.fullscreenMode = mode;
2538
- return mode;
2539
- },
2540
-
2541
- isPluginClickThroughCreated: false,
2542
-
2543
- createPluginClickThrough: function() {
2544
-
2545
- var t = this;
2546
-
2547
- // don't build twice
2548
- if (t.isPluginClickThroughCreated) {
2549
- return;
2550
- }
2551
-
2552
- // allows clicking through the fullscreen button and controls down directly to Flash
2553
-
2554
- /*
2555
- When a user puts his mouse over the fullscreen button, we disable the controls so that mouse events can go down to flash (pointer-events)
2556
- We then put a divs over the video and on either side of the fullscreen button
2557
- to capture mouse movement and restore the controls once the mouse moves outside of the fullscreen button
2558
- */
2559
-
2560
- var fullscreenIsDisabled = false,
2561
- restoreControls = function() {
2562
- if (fullscreenIsDisabled) {
2563
- // hide the hovers
2564
- for (var i in hoverDivs) {
2565
- hoverDivs[i].hide();
2566
- }
2567
-
2568
- // restore the control bar
2569
- t.fullscreenBtn.css('pointer-events', '');
2570
- t.controls.css('pointer-events', '');
2571
-
2572
- // prevent clicks from pausing video
2573
- t.media.removeEventListener('click', t.clickToPlayPauseCallback);
2574
-
2575
- // store for later
2576
- fullscreenIsDisabled = false;
2577
- }
2578
- },
2579
- hoverDivs = {},
2580
- hoverDivNames = ['top', 'left', 'right', 'bottom'],
2581
- i, len,
2582
- positionHoverDivs = function() {
2583
- var fullScreenBtnOffsetLeft = fullscreenBtn.offset().left - t.container.offset().left,
2584
- fullScreenBtnOffsetTop = fullscreenBtn.offset().top - t.container.offset().top,
2585
- fullScreenBtnWidth = fullscreenBtn.outerWidth(true),
2586
- fullScreenBtnHeight = fullscreenBtn.outerHeight(true),
2587
- containerWidth = t.container.width(),
2588
- containerHeight = t.container.height();
2589
-
2590
- for (i in hoverDivs) {
2591
- hoverDivs[i].css({position: 'absolute', top: 0, left: 0}); //, backgroundColor: '#f00'});
2592
- }
2593
-
2594
- // over video, but not controls
2595
- hoverDivs['top']
2596
- .width( containerWidth )
2597
- .height( fullScreenBtnOffsetTop );
2598
-
2599
- // over controls, but not the fullscreen button
2600
- hoverDivs['left']
2601
- .width( fullScreenBtnOffsetLeft )
2602
- .height( fullScreenBtnHeight )
2603
- .css({top: fullScreenBtnOffsetTop});
2604
-
2605
- // after the fullscreen button
2606
- hoverDivs['right']
2607
- .width( containerWidth - fullScreenBtnOffsetLeft - fullScreenBtnWidth )
2608
- .height( fullScreenBtnHeight )
2609
- .css({top: fullScreenBtnOffsetTop,
2610
- left: fullScreenBtnOffsetLeft + fullScreenBtnWidth});
2611
-
2612
- // under the fullscreen button
2613
- hoverDivs['bottom']
2614
- .width( containerWidth )
2615
- .height( containerHeight - fullScreenBtnHeight - fullScreenBtnOffsetTop )
2616
- .css({top: fullScreenBtnOffsetTop + fullScreenBtnHeight});
2617
- };
2618
-
2619
- t.globalBind('resize', function() {
2620
- positionHoverDivs();
2621
- });
2622
-
2623
- for (i = 0, len = hoverDivNames.length; i < len; i++) {
2624
- hoverDivs[hoverDivNames[i]] = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls).hide();
2625
- }
2626
-
2627
- // on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash
2628
- fullscreenBtn.on('mouseover',function() {
2629
-
2630
- if (!t.isFullScreen) {
2631
-
2632
- var buttonPos = fullscreenBtn.offset(),
2633
- containerPos = player.container.offset();
2634
-
2635
- // move the button in Flash into place
2636
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
2637
-
2638
- // allows click through
2639
- t.fullscreenBtn.css('pointer-events', 'none');
2640
- t.controls.css('pointer-events', 'none');
2641
-
2642
- // restore click-to-play
2643
- t.media.addEventListener('click', t.clickToPlayPauseCallback);
2644
-
2645
- // show the divs that will restore things
2646
- for (i in hoverDivs) {
2647
- hoverDivs[i].show();
2648
- }
2649
-
2650
- positionHoverDivs();
2651
-
2652
- fullscreenIsDisabled = true;
2653
- }
2654
-
2655
- });
2656
-
2657
- // restore controls anytime the user enters or leaves fullscreen
2658
- media.addEventListener('fullscreenchange', function(e) {
2659
- t.isFullScreen = !t.isFullScreen;
2660
- // don't allow plugin click to pause video - messes with
2661
- // plugin's controls
2662
- if (t.isFullScreen) {
2663
- t.media.removeEventListener('click', t.clickToPlayPauseCallback);
2664
- } else {
2665
- t.media.addEventListener('click', t.clickToPlayPauseCallback);
2666
- }
2667
- restoreControls();
2668
- });
2669
-
2670
-
2671
- // the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events
2672
- // so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button
2673
-
2674
- t.globalBind('mousemove', function(e) {
2675
-
2676
- // if the mouse is anywhere but the fullsceen button, then restore it all
2677
- if (fullscreenIsDisabled) {
2678
-
2679
- var fullscreenBtnPos = fullscreenBtn.offset();
2680
-
2681
-
2682
- if (e.pageY < fullscreenBtnPos.top || e.pageY > fullscreenBtnPos.top + fullscreenBtn.outerHeight(true) ||
2683
- e.pageX < fullscreenBtnPos.left || e.pageX > fullscreenBtnPos.left + fullscreenBtn.outerWidth(true)
2684
- ) {
2685
-
2686
- fullscreenBtn.css('pointer-events', '');
2687
- t.controls.css('pointer-events', '');
2688
-
2689
- fullscreenIsDisabled = false;
2690
- }
2691
- }
2692
- });
2693
-
2694
-
2695
- t.isPluginClickThroughCreated = true;
2696
- },
2697
-
2698
- cleanfullscreen: function(player) {
2699
- player.exitFullScreen();
2700
- },
2701
-
2702
- containerSizeTimeout: null,
2703
-
2704
- enterFullScreen: function() {
2705
-
2706
- var t = this;
2707
-
2708
- if (mejs.MediaFeatures.isiOS && mejs.MediaFeatures.hasiOSFullScreen && typeof t.media.webkitEnterFullscreen === 'function') {
2709
- t.media.webkitEnterFullscreen();
2710
- return;
2711
- }
2712
-
2713
- // set it to not show scroll bars so 100% will work
2714
- $(document.documentElement).addClass('mejs-fullscreen');
2715
-
2716
- // store sizing
2717
- t.normalHeight = t.container.height();
2718
- t.normalWidth = t.container.width();
2719
-
2720
-
2721
-
2722
- // attempt to do true fullscreen
2723
- if (t.fullscreenMode === 'native-native' || t.fullscreenMode === 'plugin-native') {
2724
-
2725
- mejs.MediaFeatures.requestFullScreen(t.container[0]);
2726
- //return;
2727
-
2728
- if (t.isInIframe) {
2729
- // sometimes exiting from fullscreen doesn't work
2730
- // notably in Chrome <iframe>. Fixed in version 17
2731
- setTimeout(function checkFullscreen() {
2732
-
2733
- if (t.isNativeFullScreen) {
2734
- var percentErrorMargin = 0.002, // 0.2%
2735
- windowWidth = $(window).width(),
2736
- screenWidth = screen.width,
2737
- absDiff = Math.abs(screenWidth - windowWidth),
2738
- marginError = screenWidth * percentErrorMargin;
2739
-
2740
- // check if the video is suddenly not really fullscreen
2741
- if (absDiff > marginError) {
2742
- // manually exit
2743
- t.exitFullScreen();
2744
- } else {
2745
- // test again
2746
- setTimeout(checkFullscreen, 500);
2747
- }
2748
- }
2749
-
2750
- }, 1000);
2751
- }
2752
-
2753
- } else if (t.fullscreeMode == 'fullwindow') {
2754
- // move into position
2755
-
2756
- }
2757
-
2758
- // make full size
2759
- t.container
2760
- .addClass('mejs-container-fullscreen')
2761
- .width('100%')
2762
- .height('100%');
2763
- //.css({position: 'fixed', left: 0, top: 0, right: 0, bottom: 0, overflow: 'hidden', width: '100%', height: '100%', 'z-index': 1000});
2764
-
2765
- // Only needed for safari 5.1 native full screen, can cause display issues elsewhere
2766
- // Actually, it seems to be needed for IE8, too
2767
- //if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
2768
- t.containerSizeTimeout = setTimeout(function() {
2769
- t.container.css({width: '100%', height: '100%'});
2770
- t.setControlsSize();
2771
- }, 500);
2772
- //}
2773
-
2774
- if (t.media.pluginType === 'native') {
2775
- t.$media
2776
- .width('100%')
2777
- .height('100%');
2778
- } else {
2779
- t.container.find('.mejs-shim')
2780
- .width('100%')
2781
- .height('100%');
2782
-
2783
- setTimeout(function() {
2784
- var win = $(window),
2785
- winW = win.width(),
2786
- winH = win.height();
2787
-
2788
- t.media.setVideoSize(winW,winH);
2789
- }, 500);
2790
- }
2791
-
2792
- t.layers.children('div')
2793
- .width('100%')
2794
- .height('100%');
2795
-
2796
- if (t.fullscreenBtn) {
2797
- t.fullscreenBtn
2798
- .removeClass('mejs-fullscreen')
2799
- .addClass('mejs-unfullscreen');
2800
- }
2801
-
2802
- t.setControlsSize();
2803
- t.isFullScreen = true;
2804
-
2805
- var zoomFactor = Math.min(screen.width / t.width, screen.height / t.height);
2806
- t.container.find('.mejs-captions-text').css('font-size', zoomFactor * 100 + '%');
2807
- t.container.find('.mejs-captions-text').css('line-height', 'normal');
2808
- t.container.find('.mejs-captions-position').css('bottom', '45px');
2809
-
2810
- t.container.trigger('enteredfullscreen');
2811
- },
2812
-
2813
- exitFullScreen: function() {
2814
-
2815
- var t = this;
2816
-
2817
- // Prevent container from attempting to stretch a second time
2818
- clearTimeout(t.containerSizeTimeout);
2819
-
2820
- // firefox can't adjust plugins
2821
- /*
2822
- if (t.media.pluginType !== 'native' && mejs.MediaFeatures.isFirefox) {
2823
- t.media.setFullscreen(false);
2824
- //player.isFullScreen = false;
2825
- return;
2826
- }
2827
- */
2828
-
2829
- // come out of native fullscreen
2830
- if (mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || t.isFullScreen)) {
2831
- mejs.MediaFeatures.cancelFullScreen();
2832
- }
2833
-
2834
- // restore scroll bars to document
2835
- $(document.documentElement).removeClass('mejs-fullscreen');
2836
-
2837
- t.container
2838
- .removeClass('mejs-container-fullscreen')
2839
- .width(t.normalWidth)
2840
- .height(t.normalHeight);
2841
-
2842
- if (t.media.pluginType === 'native') {
2843
- t.$media
2844
- .width(t.normalWidth)
2845
- .height(t.normalHeight);
2846
- } else {
2847
- t.container.find('.mejs-shim')
2848
- .width(t.normalWidth)
2849
- .height(t.normalHeight);
2850
-
2851
- t.media.setVideoSize(t.normalWidth, t.normalHeight);
2852
- }
2853
-
2854
- t.layers.children('div')
2855
- .width(t.normalWidth)
2856
- .height(t.normalHeight);
2857
-
2858
- t.fullscreenBtn
2859
- .removeClass('mejs-unfullscreen')
2860
- .addClass('mejs-fullscreen');
2861
-
2862
- t.setControlsSize();
2863
- t.isFullScreen = false;
2864
-
2865
- t.container.find('.mejs-captions-text').css('font-size','');
2866
- t.container.find('.mejs-captions-text').css('line-height', '');
2867
- t.container.find('.mejs-captions-position').css('bottom', '');
2868
-
2869
- t.container.trigger('exitedfullscreen');
2870
- }
2871
- });
2872
-
2873
- })(mejs.$);
2874
-
2875
- (function($) {
2876
-
2877
- // Speed
2878
- $.extend(mejs.MepDefaults, {
2879
-
2880
- // We also support to pass object like this:
2881
- // [{name: 'Slow', value: '0.75'}, {name: 'Normal', value: '1.00'}, ...]
2882
- speeds: ['2.00', '1.50', '1.25', '1.00', '0.75'],
2883
-
2884
- defaultSpeed: '1.00',
2885
-
2886
- speedChar: 'x'
2887
-
2888
- });
2889
-
2890
- $.extend(MediaElementPlayer.prototype, {
2891
-
2892
- buildspeed: function(player, controls, layers, media) {
2893
- var t = this;
2894
-
2895
- if (t.media.pluginType == 'native') {
2896
- var
2897
- speedButton = null,
2898
- speedSelector = null,
2899
- playbackSpeed = null,
2900
- inputId = null;
2901
-
2902
- var speeds = [];
2903
- var defaultInArray = false;
2904
- for (var i=0, len=t.options.speeds.length; i < len; i++) {
2905
- var s = t.options.speeds[i];
2906
- if (typeof(s) === 'string'){
2907
- speeds.push({
2908
- name: s + t.options.speedChar,
2909
- value: s
2910
- });
2911
- if(s === t.options.defaultSpeed) {
2912
- defaultInArray = true;
2913
- }
2914
- }
2915
- else {
2916
- speeds.push(s);
2917
- if(s.value === t.options.defaultSpeed) {
2918
- defaultInArray = true;
2919
- }
2920
- }
2921
- }
2922
-
2923
- if (!defaultInArray) {
2924
- speeds.push({
2925
- name: t.options.defaultSpeed + t.options.speedChar,
2926
- value: t.options.defaultSpeed
2927
- });
2928
- }
2929
-
2930
- speeds.sort(function(a, b) {
2931
- return parseFloat(b.value) - parseFloat(a.value);
2932
- });
2933
-
2934
- var getSpeedNameFromValue = function(value) {
2935
- for(i=0,len=speeds.length; i <len; i++) {
2936
- if (speeds[i].value === value) {
2937
- return speeds[i].name;
2938
- }
2939
- }
2940
- };
2941
-
2942
- var html = '<div class="mejs-button mejs-speed-button">' +
2943
- '<button type="button">' + getSpeedNameFromValue(t.options.defaultSpeed) + '</button>' +
2944
- '<div class="mejs-speed-selector">' +
2945
- '<ul>';
2946
-
2947
- for (i = 0, il = speeds.length; i<il; i++) {
2948
- inputId = t.id + '-speed-' + speeds[i].value;
2949
- html += '<li>' +
2950
- '<input type="radio" name="speed" ' +
2951
- 'value="' + speeds[i].value + '" ' +
2952
- 'id="' + inputId + '" ' +
2953
- (speeds[i].value === t.options.defaultSpeed ? ' checked' : '') +
2954
- ' />' +
2955
- '<label for="' + inputId + '" ' +
2956
- (speeds[i].value === t.options.defaultSpeed ? ' class="mejs-speed-selected"' : '') +
2957
- '>' + speeds[i].name + '</label>' +
2958
- '</li>';
2959
- }
2960
- html += '</ul></div></div>';
2961
-
2962
- speedButton = $(html).appendTo(controls);
2963
- speedSelector = speedButton.find('.mejs-speed-selector');
2964
-
2965
- playbackSpeed = t.options.defaultSpeed;
2966
-
2967
- media.addEventListener('loadedmetadata', function(e) {
2968
- if (playbackSpeed) {
2969
- media.playbackRate = parseFloat(playbackSpeed);
2970
- }
2971
- }, true);
2972
-
2973
- speedSelector
2974
- .on('click', 'input[type="radio"]', function() {
2975
- var newSpeed = $(this).attr('value');
2976
- playbackSpeed = newSpeed;
2977
- media.playbackRate = parseFloat(newSpeed);
2978
- speedButton.find('button').html(getSpeedNameFromValue(newSpeed));
2979
- speedButton.find('.mejs-speed-selected').removeClass('mejs-speed-selected');
2980
- speedButton.find('input[type="radio"]:checked').next().addClass('mejs-speed-selected');
2981
- });
2982
- speedButton
2983
- .one( 'mouseenter focusin', function() {
2984
- speedSelector
2985
- .height(
2986
- speedButton.find('.mejs-speed-selector ul').outerHeight(true) +
2987
- speedButton.find('.mejs-speed-translations').outerHeight(true))
2988
- .css('top', (-1 * speedSelector.height()) + 'px');
2989
- });
2990
- }
2991
- }
2992
- });
2993
-
2994
- })(mejs.$);
2995
-
2996
- (function($) {
2997
-
2998
- // add extra default options
2999
- $.extend(mejs.MepDefaults, {
3000
- // this will automatically turn on a <track>
3001
- startLanguage: '',
3002
-
3003
- tracksText: '',
3004
-
3005
- // By default, no WAI-ARIA live region - don't make a
3006
- // screen reader speak captions over an audio track.
3007
- tracksAriaLive: false,
3008
-
3009
- // option to remove the [cc] button when no <track kind="subtitles"> are present
3010
- hideCaptionsButtonWhenEmpty: true,
3011
-
3012
- // If true and we only have one track, change captions to popup
3013
- toggleCaptionsButtonWhenOnlyOne: false,
3014
-
3015
- // #id or .class
3016
- slidesSelector: ''
3017
- });
3018
-
3019
- $.extend(MediaElementPlayer.prototype, {
3020
-
3021
- hasChapters: false,
3022
-
3023
- cleartracks: function(player, controls, layers, media){
3024
- if(player) {
3025
- if(player.captions) player.captions.remove();
3026
- if(player.chapters) player.chapters.remove();
3027
- if(player.captionsText) player.captionsText.remove();
3028
- if(player.captionsButton) player.captionsButton.remove();
3029
- }
3030
- },
3031
- buildtracks: function(player, controls, layers, media) {
3032
- if (player.tracks.length === 0)
3033
- return;
3034
-
3035
- var t = this,
3036
- attr = t.options.tracksAriaLive ?
3037
- 'role="log" aria-live="assertive" aria-atomic="false"' : '',
3038
- tracksTitle = t.options.tracksText ? t.options.tracksText : mejs.i18n.t('mejs.captions-subtitles'),
3039
- i,
3040
- kind;
3041
-
3042
- if (t.domNode.textTracks) { // if browser will do native captions, prefer mejs captions, loop through tracks and hide
3043
- for (i = t.domNode.textTracks.length - 1; i >= 0; i--) {
3044
- t.domNode.textTracks[i].mode = "hidden";
3045
- }
3046
- }
3047
- t.cleartracks(player, controls, layers, media);
3048
- player.chapters =
3049
- $('<div class="mejs-chapters mejs-layer"></div>')
3050
- .prependTo(layers).hide();
3051
- player.captions =
3052
- $('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" ' +
3053
- attr + '><span class="mejs-captions-text"></span></div></div>')
3054
- .prependTo(layers).hide();
3055
- player.captionsText = player.captions.find('.mejs-captions-text');
3056
- player.captionsButton =
3057
- $('<div class="mejs-button mejs-captions-button">'+
3058
- '<button type="button" aria-controls="' + t.id + '" title="' + tracksTitle + '" aria-label="' + tracksTitle + '"></button>'+
3059
- '<div class="mejs-captions-selector">'+
3060
- '<ul>'+
3061
- '<li>'+
3062
- '<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' +
3063
- '<label for="' + player.id + '_captions_none">' + mejs.i18n.t('mejs.none') +'</label>'+
3064
- '</li>' +
3065
- '</ul>'+
3066
- '</div>'+
3067
- '</div>')
3068
- .appendTo(controls);
3069
-
3070
-
3071
- var subtitleCount = 0;
3072
- for (i=0; i<player.tracks.length; i++) {
3073
- kind = player.tracks[i].kind;
3074
- if (kind === 'subtitles' || kind === 'captions') {
3075
- subtitleCount++;
3076
- }
3077
- }
3078
-
3079
- // if only one language then just make the button a toggle
3080
- if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount == 1){
3081
- // click
3082
- player.captionsButton.on('click',function() {
3083
- if (player.selectedTrack === null) {
3084
- lang = player.tracks[0].srclang;
3085
- } else {
3086
- lang = 'none';
3087
- }
3088
- player.setTrack(lang);
3089
- });
3090
- } else {
3091
- // hover or keyboard focus
3092
- player.captionsButton.on( 'mouseenter focusin', function() {
3093
- $(this).find('.mejs-captions-selector').removeClass('mejs-offscreen');
3094
- })
3095
-
3096
- // handle clicks to the language radio buttons
3097
- .on('click','input[type=radio]',function() {
3098
- lang = this.value;
3099
- player.setTrack(lang);
3100
- });
3101
-
3102
- player.captionsButton.on( 'mouseleave focusout', function() {
3103
- $(this).find(".mejs-captions-selector").addClass("mejs-offscreen");
3104
- });
3105
-
3106
- }
3107
-
3108
- if (!player.options.alwaysShowControls) {
3109
- // move with controls
3110
- player.container
3111
- .bind('controlsshown', function () {
3112
- // push captions above controls
3113
- player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
3114
-
3115
- })
3116
- .bind('controlshidden', function () {
3117
- if (!media.paused) {
3118
- // move back to normal place
3119
- player.container.find('.mejs-captions-position').removeClass('mejs-captions-position-hover');
3120
- }
3121
- });
3122
- } else {
3123
- player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
3124
- }
3125
-
3126
- player.trackToLoad = -1;
3127
- player.selectedTrack = null;
3128
- player.isLoadingTrack = false;
3129
-
3130
- // add to list
3131
- for (i=0; i<player.tracks.length; i++) {
3132
- kind = player.tracks[i].kind;
3133
- if (kind === 'subtitles' || kind === 'captions') {
3134
- player.addTrackButton(player.tracks[i].srclang, player.tracks[i].label);
3135
- }
3136
- }
3137
-
3138
- // start loading tracks
3139
- player.loadNextTrack();
3140
-
3141
- media.addEventListener('timeupdate',function() {
3142
- player.displayCaptions();
3143
- }, false);
3144
-
3145
- if (player.options.slidesSelector !== '') {
3146
- player.slidesContainer = $(player.options.slidesSelector);
3147
-
3148
- media.addEventListener('timeupdate',function() {
3149
- player.displaySlides();
3150
- }, false);
3151
-
3152
- }
3153
-
3154
- media.addEventListener('loadedmetadata', function() {
3155
- player.displayChapters();
3156
- }, false);
3157
-
3158
- player.container.hover(
3159
- function () {
3160
- // chapters
3161
- if (player.hasChapters) {
3162
- player.chapters.removeClass('mejs-offscreen');
3163
- player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());
3164
- }
3165
- },
3166
- function () {
3167
- if (player.hasChapters && !media.paused) {
3168
- player.chapters.fadeOut(200, function() {
3169
- $(this).addClass('mejs-offscreen');
3170
- $(this).css('display','block');
3171
- });
3172
- }
3173
- });
3174
-
3175
- t.container.on('controlsresize', function() {
3176
- t.adjustLanguageBox();
3177
- });
3178
-
3179
- // check for autoplay
3180
- if (player.node.getAttribute('autoplay') !== null) {
3181
- player.chapters.addClass('mejs-offscreen');
3182
- }
3183
- },
3184
-
3185
- setTrack: function(lang){
3186
-
3187
- var t = this,
3188
- i;
3189
-
3190
- if (lang == 'none') {
3191
- t.selectedTrack = null;
3192
- t.captionsButton.removeClass('mejs-captions-enabled');
3193
- } else {
3194
- for (i=0; i<t.tracks.length; i++) {
3195
- if (t.tracks[i].srclang == lang) {
3196
- if (t.selectedTrack === null)
3197
- t.captionsButton.addClass('mejs-captions-enabled');
3198
- t.selectedTrack = t.tracks[i];
3199
- t.captions.attr('lang', t.selectedTrack.srclang);
3200
- t.displayCaptions();
3201
- break;
3202
- }
3203
- }
3204
- }
3205
- },
3206
-
3207
- loadNextTrack: function() {
3208
- var t = this;
3209
-
3210
- t.trackToLoad++;
3211
- if (t.trackToLoad < t.tracks.length) {
3212
- t.isLoadingTrack = true;
3213
- t.loadTrack(t.trackToLoad);
3214
- } else {
3215
- // add done?
3216
- t.isLoadingTrack = false;
3217
-
3218
- t.checkForTracks();
3219
- }
3220
- },
3221
-
3222
- loadTrack: function(index){
3223
- var
3224
- t = this,
3225
- track = t.tracks[index],
3226
- after = function() {
3227
-
3228
- track.isLoaded = true;
3229
-
3230
- t.enableTrackButton(track.srclang, track.label);
3231
-
3232
- t.loadNextTrack();
3233
-
3234
- };
3235
-
3236
-
3237
- if (track.src !== undefined || track.src !== "") {
3238
- $.ajax({
3239
- url: track.src,
3240
- dataType: "text",
3241
- success: function(d) {
3242
-
3243
- // parse the loaded file
3244
- if (typeof d == "string" && (/<tt\s+xml/ig).exec(d)) {
3245
- track.entries = mejs.TrackFormatParser.dfxp.parse(d);
3246
- } else {
3247
- track.entries = mejs.TrackFormatParser.webvtt.parse(d);
3248
- }
3249
-
3250
- after();
3251
-
3252
- if (track.kind == 'chapters') {
3253
- t.media.addEventListener('play', function() {
3254
- if (t.media.duration > 0) {
3255
- t.displayChapters(track);
3256
- }
3257
- }, false);
3258
- }
3259
-
3260
- if (track.kind == 'slides') {
3261
- t.setupSlides(track);
3262
- }
3263
- },
3264
- error: function() {
3265
- t.removeTrackButton(track.srclang);
3266
- t.loadNextTrack();
3267
- }
3268
- });
3269
- }
3270
- },
3271
-
3272
- enableTrackButton: function(lang, label) {
3273
- var t = this;
3274
-
3275
- if (label === '') {
3276
- label = mejs.language.codes[lang] || lang;
3277
- }
3278
-
3279
- t.captionsButton
3280
- .find('input[value=' + lang + ']')
3281
- .prop('disabled',false)
3282
- .siblings('label')
3283
- .html( label );
3284
-
3285
- // auto select
3286
- if (t.options.startLanguage == lang) {
3287
- $('#' + t.id + '_captions_' + lang).prop('checked', true).trigger('click');
3288
- }
3289
-
3290
- t.adjustLanguageBox();
3291
- },
3292
-
3293
- removeTrackButton: function(lang) {
3294
- var t = this;
3295
-
3296
- t.captionsButton.find('input[value=' + lang + ']').closest('li').remove();
3297
-
3298
- t.adjustLanguageBox();
3299
- },
3300
-
3301
- addTrackButton: function(lang, label) {
3302
- var t = this;
3303
- if (label === '') {
3304
- label = mejs.language.codes[lang] || lang;
3305
- }
3306
-
3307
- t.captionsButton.find('ul').append(
3308
- $('<li>'+
3309
- '<input type="radio" name="' + t.id + '_captions" id="' + t.id + '_captions_' + lang + '" value="' + lang + '" disabled="disabled" />' +
3310
- '<label for="' + t.id + '_captions_' + lang + '">' + label + ' (loading)' + '</label>'+
3311
- '</li>')
3312
- );
3313
-
3314
- t.adjustLanguageBox();
3315
-
3316
- // remove this from the dropdownlist (if it exists)
3317
- t.container.find('.mejs-captions-translations option[value=' + lang + ']').remove();
3318
- },
3319
-
3320
- adjustLanguageBox:function() {
3321
- var t = this;
3322
- // adjust the size of the outer box
3323
- t.captionsButton.find('.mejs-captions-selector').height(
3324
- t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true) +
3325
- t.captionsButton.find('.mejs-captions-translations').outerHeight(true)
3326
- );
3327
- },
3328
-
3329
- checkForTracks: function() {
3330
- var
3331
- t = this,
3332
- hasSubtitles = false;
3333
-
3334
- // check if any subtitles
3335
- if (t.options.hideCaptionsButtonWhenEmpty) {
3336
- for (var i=0; i<t.tracks.length; i++) {
3337
- var kind = t.tracks[i].kind;
3338
- if ((kind === 'subtitles' || kind === 'captions') && t.tracks[i].isLoaded) {
3339
- hasSubtitles = true;
3340
- break;
3341
- }
3342
- }
3343
-
3344
- if (!hasSubtitles) {
3345
- t.captionsButton.hide();
3346
- t.setControlsSize();
3347
- }
3348
- }
3349
- },
3350
-
3351
- displayCaptions: function() {
3352
-
3353
- if (typeof this.tracks == 'undefined')
3354
- return;
3355
-
3356
- var
3357
- t = this,
3358
- i,
3359
- track = t.selectedTrack;
3360
-
3361
- if (track !== null && track.isLoaded) {
3362
- for (i=0; i<track.entries.times.length; i++) {
3363
- if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop) {
3364
- // Set the line before the timecode as a class so the cue can be targeted if needed
3365
- t.captionsText.html(track.entries.text[i]).attr('class', 'mejs-captions-text ' + (track.entries.times[i].identifier || ''));
3366
- t.captions.show().height(0);
3367
- return; // exit out if one is visible;
3368
- }
3369
- }
3370
- t.captions.hide();
3371
- } else {
3372
- t.captions.hide();
3373
- }
3374
- },
3375
-
3376
- setupSlides: function(track) {
3377
- var t = this;
3378
-
3379
- t.slides = track;
3380
- t.slides.entries.imgs = [t.slides.entries.text.length];
3381
- t.showSlide(0);
3382
-
3383
- },
3384
-
3385
- showSlide: function(index) {
3386
- if (typeof this.tracks == 'undefined' || typeof this.slidesContainer == 'undefined') {
3387
- return;
3388
- }
3389
-
3390
- var t = this,
3391
- url = t.slides.entries.text[index],
3392
- img = t.slides.entries.imgs[index];
3393
-
3394
- if (typeof img == 'undefined' || typeof img.fadeIn == 'undefined') {
3395
-
3396
- t.slides.entries.imgs[index] = img = $('<img src="' + url + '">')
3397
- .on('load', function() {
3398
- img.appendTo(t.slidesContainer)
3399
- .hide()
3400
- .fadeIn()
3401
- .siblings(':visible')
3402
- .fadeOut();
3403
-
3404
- });
3405
-
3406
- } else {
3407
-
3408
- if (!img.is(':visible') && !img.is(':animated')) {
3409
-
3410
- //
3411
-
3412
- img.fadeIn()
3413
- .siblings(':visible')
3414
- .fadeOut();
3415
- }
3416
- }
3417
-
3418
- },
3419
-
3420
- displaySlides: function() {
3421
-
3422
- if (typeof this.slides == 'undefined')
3423
- return;
3424
-
3425
- var
3426
- t = this,
3427
- slides = t.slides,
3428
- i;
3429
-
3430
- for (i=0; i<slides.entries.times.length; i++) {
3431
- if (t.media.currentTime >= slides.entries.times[i].start && t.media.currentTime <= slides.entries.times[i].stop){
3432
-
3433
- t.showSlide(i);
3434
-
3435
- return; // exit out if one is visible;
3436
- }
3437
- }
3438
- },
3439
-
3440
- displayChapters: function() {
3441
- var
3442
- t = this,
3443
- i;
3444
-
3445
- for (i=0; i<t.tracks.length; i++) {
3446
- if (t.tracks[i].kind == 'chapters' && t.tracks[i].isLoaded) {
3447
- t.drawChapters(t.tracks[i]);
3448
- t.hasChapters = true;
3449
- break;
3450
- }
3451
- }
3452
- },
3453
-
3454
- drawChapters: function(chapters) {
3455
- var
3456
- t = this,
3457
- i,
3458
- dur,
3459
- //width,
3460
- //left,
3461
- percent = 0,
3462
- usedPercent = 0;
3463
-
3464
- t.chapters.empty();
3465
-
3466
- for (i=0; i<chapters.entries.times.length; i++) {
3467
- dur = chapters.entries.times[i].stop - chapters.entries.times[i].start;
3468
- percent = Math.floor(dur / t.media.duration * 100);
3469
- if (percent + usedPercent > 100 || // too large
3470
- i == chapters.entries.times.length-1 && percent + usedPercent < 100) // not going to fill it in
3471
- {
3472
- percent = 100 - usedPercent;
3473
- }
3474
- //width = Math.floor(t.width * dur / t.media.duration);
3475
- //left = Math.floor(t.width * chapters.entries.times[i].start / t.media.duration);
3476
- //if (left + width > t.width) {
3477
- // width = t.width - left;
3478
- //}
3479
-
3480
- t.chapters.append( $(
3481
- '<div class="mejs-chapter" rel="' + chapters.entries.times[i].start + '" style="left: ' + usedPercent.toString() + '%;width: ' + percent.toString() + '%;">' +
3482
- '<div class="mejs-chapter-block' + ((i==chapters.entries.times.length-1) ? ' mejs-chapter-block-last' : '') + '">' +
3483
- '<span class="ch-title">' + chapters.entries.text[i] + '</span>' +
3484
- '<span class="ch-time">' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start, t.options) + '&ndash;' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop, t.options) + '</span>' +
3485
- '</div>' +
3486
- '</div>'));
3487
- usedPercent += percent;
3488
- }
3489
-
3490
- t.chapters.find('div.mejs-chapter').click(function() {
3491
- t.media.setCurrentTime( parseFloat( $(this).attr('rel') ) );
3492
- if (t.media.paused) {
3493
- t.media.play();
3494
- }
3495
- });
3496
-
3497
- t.chapters.show();
3498
- }
3499
- });
3500
-
3501
-
3502
-
3503
- mejs.language = {
3504
- codes: {
3505
- af:'Afrikaans',
3506
- sq:'Albanian',
3507
- ar:'Arabic',
3508
- be:'Belarusian',
3509
- bg:'Bulgarian',
3510
- ca:'Catalan',
3511
- zh:'Chinese',
3512
- 'zh-cn':'Chinese Simplified',
3513
- 'zh-tw':'Chinese Traditional',
3514
- hr:'Croatian',
3515
- cs:'Czech',
3516
- da:'Danish',
3517
- nl:'Dutch',
3518
- en:'English',
3519
- et:'Estonian',
3520
- fl:'Filipino',
3521
- fi:'Finnish',
3522
- fr:'French',
3523
- gl:'Galician',
3524
- de:'German',
3525
- el:'Greek',
3526
- ht:'Haitian Creole',
3527
- iw:'Hebrew',
3528
- hi:'Hindi',
3529
- hu:'Hungarian',
3530
- is:'Icelandic',
3531
- id:'Indonesian',
3532
- ga:'Irish',
3533
- it:'Italian',
3534
- ja:'Japanese',
3535
- ko:'Korean',
3536
- lv:'Latvian',
3537
- lt:'Lithuanian',
3538
- mk:'Macedonian',
3539
- ms:'Malay',
3540
- mt:'Maltese',
3541
- no:'Norwegian',
3542
- fa:'Persian',
3543
- pl:'Polish',
3544
- pt:'Portuguese',
3545
- // 'pt-pt':'Portuguese (Portugal)',
3546
- ro:'Romanian',
3547
- ru:'Russian',
3548
- sr:'Serbian',
3549
- sk:'Slovak',
3550
- sl:'Slovenian',
3551
- es:'Spanish',
3552
- sw:'Swahili',
3553
- sv:'Swedish',
3554
- tl:'Tagalog',
3555
- th:'Thai',
3556
- tr:'Turkish',
3557
- uk:'Ukrainian',
3558
- vi:'Vietnamese',
3559
- cy:'Welsh',
3560
- yi:'Yiddish'
3561
- }
3562
- };
3563
-
3564
- /*
3565
- Parses WebVTT format which should be formatted as
3566
- ================================
3567
- WEBVTT
3568
-
3569
- 1
3570
- 00:00:01,1 --> 00:00:05,000
3571
- A line of text
3572
-
3573
- 2
3574
- 00:01:15,1 --> 00:02:05,000
3575
- A second line of text
3576
-
3577
- ===============================
3578
-
3579
- Adapted from: http://www.delphiki.com/html5/playr
3580
- */
3581
- mejs.TrackFormatParser = {
3582
- webvtt: {
3583
- pattern_timecode: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
3584
-
3585
- parse: function(trackText) {
3586
- var
3587
- i = 0,
3588
- lines = mejs.TrackFormatParser.split2(trackText, /\r?\n/),
3589
- entries = {text:[], times:[]},
3590
- timecode,
3591
- text,
3592
- identifier;
3593
- for(; i<lines.length; i++) {
3594
- timecode = this.pattern_timecode.exec(lines[i]);
3595
-
3596
- if (timecode && i<lines.length) {
3597
- if ((i - 1) >= 0 && lines[i - 1] !== '') {
3598
- identifier = lines[i - 1];
3599
- }
3600
- i++;
3601
- // grab all the (possibly multi-line) text that follows
3602
- text = lines[i];
3603
- i++;
3604
- while(lines[i] !== '' && i<lines.length){
3605
- text = text + '\n' + lines[i];
3606
- i++;
3607
- }
3608
- text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
3609
- // Text is in a different array so I can use .join
3610
- entries.text.push(text);
3611
- entries.times.push(
3612
- {
3613
- identifier: identifier,
3614
- start: (mejs.Utility.convertSMPTEtoSeconds(timecode[1]) === 0) ? 0.200 : mejs.Utility.convertSMPTEtoSeconds(timecode[1]),
3615
- stop: mejs.Utility.convertSMPTEtoSeconds(timecode[3]),
3616
- settings: timecode[5]
3617
- });
3618
- }
3619
- identifier = '';
3620
- }
3621
- return entries;
3622
- }
3623
- },
3624
- // Thanks to Justin Capella: https://github.com/johndyer/mediaelement/pull/420
3625
- dfxp: {
3626
- parse: function(trackText) {
3627
- trackText = $(trackText).filter("tt");
3628
- var
3629
- i = 0,
3630
- container = trackText.children("div").eq(0),
3631
- lines = container.find("p"),
3632
- styleNode = trackText.find("#" + container.attr("style")),
3633
- styles,
3634
- text,
3635
- entries = {text:[], times:[]};
3636
-
3637
-
3638
- if (styleNode.length) {
3639
- var attributes = styleNode.removeAttr("id").get(0).attributes;
3640
- if (attributes.length) {
3641
- styles = {};
3642
- for (i = 0; i < attributes.length; i++) {
3643
- styles[attributes[i].name.split(":")[1]] = attributes[i].value;
3644
- }
3645
- }
3646
- }
3647
-
3648
- for(i = 0; i<lines.length; i++) {
3649
- var style;
3650
- var _temp_times = {
3651
- start: null,
3652
- stop: null,
3653
- style: null
3654
- };
3655
- if (lines.eq(i).attr("begin")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("begin"));
3656
- if (!_temp_times.start && lines.eq(i-1).attr("end")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i-1).attr("end"));
3657
- if (lines.eq(i).attr("end")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("end"));
3658
- if (!_temp_times.stop && lines.eq(i+1).attr("begin")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i+1).attr("begin"));
3659
- if (styles) {
3660
- style = "";
3661
- for (var _style in styles) {
3662
- style += _style + ":" + styles[_style] + ";";
3663
- }
3664
- }
3665
- if (style) _temp_times.style = style;
3666
- if (_temp_times.start === 0) _temp_times.start = 0.200;
3667
- entries.times.push(_temp_times);
3668
- text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
3669
- entries.text.push(text);
3670
- }
3671
- return entries;
3672
- }
3673
- },
3674
- split2: function (text, regex) {
3675
- // normal version for compliant browsers
3676
- // see below for IE fix
3677
- return text.split(regex);
3678
- }
3679
- };
3680
-
3681
- // test for browsers with bad String.split method.
3682
- if ('x\n\ny'.split(/\n/gi).length != 3) {
3683
- // add super slow IE8 and below version
3684
- mejs.TrackFormatParser.split2 = function(text, regex) {
3685
- var
3686
- parts = [],
3687
- chunk = '',
3688
- i;
3689
-
3690
- for (i=0; i<text.length; i++) {
3691
- chunk += text.substring(i,i+1);
3692
- if (regex.test(chunk)) {
3693
- parts.push(chunk.replace(regex, ''));
3694
- chunk = '';
3695
- }
3696
- }
3697
- parts.push(chunk);
3698
- return parts;
3699
- };
3700
- }
3701
-
3702
- })(mejs.$);
3703
-
3704
- // Source Chooser Plugin
3705
- (function($) {
3706
-
3707
- $.extend(mejs.MepDefaults, {
3708
- sourcechooserText: ''
3709
- });
3710
-
3711
- $.extend(MediaElementPlayer.prototype, {
3712
- buildsourcechooser: function(player, controls, layers, media) {
3713
-
3714
- var
3715
- t = this,
3716
- sourceTitle = t.options.sourcechooserText ? t.options.sourcechooserText : mejs.i18n.t('mejs.source-chooser'),
3717
- hoverTimeout
3718
- ;
3719
-
3720
- player.sourcechooserButton =
3721
- $('<div class="mejs-button mejs-sourcechooser-button">'+
3722
- '<button type="button" role="button" aria-haspopup="true" aria-owns="' + t.id + '" title="' + sourceTitle + '" aria-label="' + sourceTitle + '"></button>'+
3723
- '<div class="mejs-sourcechooser-selector mejs-offscreen" role="menu" aria-expanded="false" aria-hidden="true">'+
3724
- '<ul>'+
3725
- '</ul>'+
3726
- '</div>'+
3727
- '</div>')
3728
- .appendTo(controls)
3729
-
3730
- // hover
3731
- .hover(function() {
3732
- clearTimeout(hoverTimeout);
3733
- player.showSourcechooserSelector();
3734
- }, function() {
3735
- var self = $(this);
3736
- hoverTimeout = setTimeout(function () {
3737
- player.hideSourcechooserSelector();
3738
- }, 500);
3739
- })
3740
-
3741
- // keyboard menu activation
3742
- .on('keydown', function (e) {
3743
- var keyCode = e.keyCode;
3744
-
3745
- switch (keyCode) {
3746
- case 32: // space
3747
- if (!mejs.MediaFeatures.isFirefox) { // space sends the click event in Firefox
3748
- player.showSourcechooserSelector();
3749
- }
3750
- $(this).find('.mejs-sourcechooser-selector')
3751
- .find('input[type=radio]:checked').first().focus();
3752
- break;
3753
- case 13: // enter
3754
- player.showSourcechooserSelector();
3755
- $(this).find('.mejs-sourcechooser-selector')
3756
- .find('input[type=radio]:checked').first().focus();
3757
- break;
3758
- case 27: // esc
3759
- player.hideSourcechooserSelector();
3760
- $(this).find('button').focus();
3761
- break;
3762
- default:
3763
- return true;
3764
- }
3765
- })
3766
-
3767
- // close menu when tabbing away
3768
- .on('focusout', mejs.Utility.debounce(function (e) { // Safari triggers focusout multiple times
3769
- // Firefox does NOT support e.relatedTarget to see which element
3770
- // just lost focus, so wait to find the next focused element
3771
- setTimeout(function () {
3772
- var parent = $(document.activeElement).closest('.mejs-sourcechooser-selector');
3773
- if (!parent.length) {
3774
- // focus is outside the control; close menu
3775
- player.hideSourcechooserSelector();
3776
- }
3777
- }, 0);
3778
- }, 100))
3779
-
3780
- // handle clicks to the source radio buttons
3781
- .delegate('input[type=radio]', 'click', function() {
3782
- // set aria states
3783
- $(this).attr('aria-selected', true).attr('checked', 'checked');
3784
- $(this).closest('.mejs-sourcechooser-selector').find('input[type=radio]').not(this).attr('aria-selected', 'false').removeAttr('checked');
3785
-
3786
- var src = this.value;
3787
-
3788
- if (media.currentSrc != src) {
3789
- var currentTime = media.currentTime;
3790
- var paused = media.paused;
3791
- media.pause();
3792
- media.setSrc(src);
3793
-
3794
- media.addEventListener('loadedmetadata', function(e) {
3795
- media.currentTime = currentTime;
3796
- }, true);
3797
-
3798
- var canPlayAfterSourceSwitchHandler = function(e) {
3799
- if (!paused) {
3800
- media.play();
3801
- }
3802
- media.removeEventListener("canplay", canPlayAfterSourceSwitchHandler, true);
3803
- };
3804
- media.addEventListener('canplay', canPlayAfterSourceSwitchHandler, true);
3805
- media.load();
3806
- }
3807
- })
3808
-
3809
- // Handle click so that screen readers can toggle the menu
3810
- .delegate('button', 'click', function (e) {
3811
- if ($(this).siblings('.mejs-sourcechooser-selector').hasClass('mejs-offscreen')) {
3812
- player.showSourcechooserSelector();
3813
- $(this).siblings('.mejs-sourcechooser-selector').find('input[type=radio]:checked').first().focus();
3814
- } else {
3815
- player.hideSourcechooserSelector();
3816
- }
3817
- });
3818
-
3819
- // add to list
3820
- for (var i in this.node.children) {
3821
- var src = this.node.children[i];
3822
- if (src.nodeName === 'SOURCE' && (media.canPlayType(src.type) == 'probably' || media.canPlayType(src.type) == 'maybe')) {
3823
- player.addSourceButton(src.src, src.title, src.type, media.src == src.src);
3824
- }
3825
- }
3826
- },
3827
-
3828
- addSourceButton: function(src, label, type, isCurrent) {
3829
- var t = this;
3830
- if (label === '' || label == undefined) {
3831
- label = src;
3832
- }
3833
- type = type.split('/')[1];
3834
-
3835
- t.sourcechooserButton.find('ul').append(
3836
- $('<li>'+
3837
- '<input type="radio" name="' + t.id + '_sourcechooser" id="' + t.id + '_sourcechooser_' + label + type + '" role="menuitemradio" value="' + src + '" ' + (isCurrent ? 'checked="checked"' : '') + 'aria-selected="' + isCurrent + '"' + ' />'+
3838
- '<label for="' + t.id + '_sourcechooser_' + label + type + '" aria-hidden="true">' + label + ' (' + type + ')</label>'+
3839
- '</li>')
3840
- );
3841
-
3842
- t.adjustSourcechooserBox();
3843
-
3844
- },
3845
-
3846
- adjustSourcechooserBox: function() {
3847
- var t = this;
3848
- // adjust the size of the outer box
3849
- t.sourcechooserButton.find('.mejs-sourcechooser-selector').height(
3850
- t.sourcechooserButton.find('.mejs-sourcechooser-selector ul').outerHeight(true)
3851
- );
3852
- },
3853
-
3854
- hideSourcechooserSelector: function () {
3855
- this.sourcechooserButton.find('.mejs-sourcechooser-selector')
3856
- .addClass('mejs-offscreen')
3857
- .attr('aria-expanded', 'false')
3858
- .attr('aria-hidden', 'true')
3859
- .find('input[type=radio]') // make radios not fucusable
3860
- .attr('tabindex', '-1');
3861
- },
3862
-
3863
- showSourcechooserSelector: function () {
3864
- this.sourcechooserButton.find('.mejs-sourcechooser-selector')
3865
- .removeClass('mejs-offscreen')
3866
- .attr('aria-expanded', 'true')
3867
- .attr('aria-hidden', 'false')
3868
- .find('input[type=radio]')
3869
- .attr('tabindex', '0');
3870
- }
3871
- });
3872
-
3873
- })(mejs.$);
3874
-
3875
- /*
3876
- * ContextMenu Plugin
3877
- *
3878
- *
3879
- */
3880
-
3881
- (function($) {
3882
-
3883
- $.extend(mejs.MepDefaults,
3884
- { 'contextMenuItems': [
3885
- // demo of a fullscreen option
3886
- {
3887
- render: function(player) {
3888
-
3889
- // check for fullscreen plugin
3890
- if (typeof player.enterFullScreen == 'undefined')
3891
- return null;
3892
-
3893
- if (player.isFullScreen) {
3894
- return mejs.i18n.t('mejs.fullscreen-off');
3895
- } else {
3896
- return mejs.i18n.t('mejs.fullscreen-on');
3897
- }
3898
- },
3899
- click: function(player) {
3900
- if (player.isFullScreen) {
3901
- player.exitFullScreen();
3902
- } else {
3903
- player.enterFullScreen();
3904
- }
3905
- }
3906
- }
3907
- ,
3908
- // demo of a mute/unmute button
3909
- {
3910
- render: function(player) {
3911
- if (player.media.muted) {
3912
- return mejs.i18n.t('mejs.unmute');
3913
- } else {
3914
- return mejs.i18n.t('mejs.mute');
3915
- }
3916
- },
3917
- click: function(player) {
3918
- if (player.media.muted) {
3919
- player.setMuted(false);
3920
- } else {
3921
- player.setMuted(true);
3922
- }
3923
- }
3924
- },
3925
- // separator
3926
- {
3927
- isSeparator: true
3928
- }
3929
- ,
3930
- // demo of simple download video
3931
- {
3932
- render: function(player) {
3933
- return mejs.i18n.t('mejs.download-video');
3934
- },
3935
- click: function(player) {
3936
- window.location.href = player.media.currentSrc;
3937
- }
3938
- }
3939
- ]}
3940
- );
3941
-
3942
-
3943
- $.extend(MediaElementPlayer.prototype, {
3944
- buildcontextmenu: function(player, controls, layers, media) {
3945
-
3946
- // create context menu
3947
- player.contextMenu = $('<div class="mejs-contextmenu"></div>')
3948
- .appendTo($('body'))
3949
- .hide();
3950
-
3951
- // create events for showing context menu
3952
- player.container.bind('contextmenu', function(e) {
3953
- if (player.isContextMenuEnabled) {
3954
- e.preventDefault();
3955
- player.renderContextMenu(e.clientX-1, e.clientY-1);
3956
- return false;
3957
- }
3958
- });
3959
- player.container.bind('click', function() {
3960
- player.contextMenu.hide();
3961
- });
3962
- player.contextMenu.bind('mouseleave', function() {
3963
-
3964
- //
3965
- player.startContextMenuTimer();
3966
-
3967
- });
3968
- },
3969
-
3970
- cleancontextmenu: function(player) {
3971
- player.contextMenu.remove();
3972
- },
3973
-
3974
- isContextMenuEnabled: true,
3975
- enableContextMenu: function() {
3976
- this.isContextMenuEnabled = true;
3977
- },
3978
- disableContextMenu: function() {
3979
- this.isContextMenuEnabled = false;
3980
- },
3981
-
3982
- contextMenuTimeout: null,
3983
- startContextMenuTimer: function() {
3984
- //
3985
-
3986
- var t = this;
3987
-
3988
- t.killContextMenuTimer();
3989
-
3990
- t.contextMenuTimer = setTimeout(function() {
3991
- t.hideContextMenu();
3992
- t.killContextMenuTimer();
3993
- }, 750);
3994
- },
3995
- killContextMenuTimer: function() {
3996
- var timer = this.contextMenuTimer;
3997
-
3998
- //
3999
-
4000
- if (timer != null) {
4001
- clearTimeout(timer);
4002
- delete timer;
4003
- timer = null;
4004
- }
4005
- },
4006
-
4007
- hideContextMenu: function() {
4008
- this.contextMenu.hide();
4009
- },
4010
-
4011
- renderContextMenu: function(x,y) {
4012
-
4013
- // alway re-render the items so that things like "turn fullscreen on" and "turn fullscreen off" are always written correctly
4014
- var t = this,
4015
- html = '',
4016
- items = t.options.contextMenuItems;
4017
-
4018
- for (var i=0, il=items.length; i<il; i++) {
4019
-
4020
- if (items[i].isSeparator) {
4021
- html += '<div class="mejs-contextmenu-separator"></div>';
4022
- } else {
4023
-
4024
- var rendered = items[i].render(t);
4025
-
4026
- // render can return null if the item doesn't need to be used at the moment
4027
- if (rendered != null) {
4028
- html += '<div class="mejs-contextmenu-item" data-itemindex="' + i + '" id="element-' + (Math.random()*1000000) + '">' + rendered + '</div>';
4029
- }
4030
- }
4031
- }
4032
-
4033
- // position and show the context menu
4034
- t.contextMenu
4035
- .empty()
4036
- .append($(html))
4037
- .css({top:y, left:x})
4038
- .show();
4039
-
4040
- // bind events
4041
- t.contextMenu.find('.mejs-contextmenu-item').each(function() {
4042
-
4043
- // which one is this?
4044
- var $dom = $(this),
4045
- itemIndex = parseInt( $dom.data('itemindex'), 10 ),
4046
- item = t.options.contextMenuItems[itemIndex];
4047
-
4048
- // bind extra functionality?
4049
- if (typeof item.show != 'undefined')
4050
- item.show( $dom , t);
4051
-
4052
- // bind click action
4053
- $dom.click(function() {
4054
- // perform click action
4055
- if (typeof item.click != 'undefined')
4056
- item.click(t);
4057
-
4058
- // close
4059
- t.contextMenu.hide();
4060
- });
4061
- });
4062
-
4063
- // stop the controls from hiding
4064
- setTimeout(function() {
4065
- t.killControlsTimer('rev3');
4066
- }, 100);
4067
-
4068
- }
4069
- });
4070
-
4071
- })(mejs.$);
4072
- (function($) {
4073
- // skip back button
4074
-
4075
- $.extend(mejs.MepDefaults, {
4076
- skipBackInterval: 30,
4077
- // %1 will be replaced with skipBackInterval in this string
4078
- skipBackText: ''
4079
- });
4080
-
4081
- $.extend(MediaElementPlayer.prototype, {
4082
- buildskipback: function(player, controls, layers, media) {
4083
- var
4084
- t = this,
4085
- defaultTitle = mejs.i18n.t('mejs.time-skip-back', t.options.skipBackInterval),
4086
- skipTitle = t.options.skipBackText ? t.options.skipBackText : defaultTitle,
4087
- // create the loop button
4088
- loop =
4089
- $('<div class="mejs-button mejs-skip-back-button">' +
4090
- '<button type="button" aria-controls="' + t.id + '" title="' + skipTitle + '" aria-label="' + skipTitle + '">' + t.options.skipBackInterval + '</button>' +
4091
- '</div>')
4092
- // append it to the toolbar
4093
- .appendTo(controls)
4094
- // add a click toggle event
4095
- .click(function() {
4096
- media.setCurrentTime(Math.max(media.currentTime - t.options.skipBackInterval, 0));
4097
- $(this).find('button').blur();
4098
- });
4099
- }
4100
- });
4101
-
4102
- })(mejs.$);
4103
-
4104
- /**
4105
- * Postroll plugin
4106
- */
4107
- (function($) {
4108
-
4109
- $.extend(mejs.MepDefaults, {
4110
- postrollCloseText: ''
4111
- });
4112
-
4113
- // Postroll
4114
- $.extend(MediaElementPlayer.prototype, {
4115
- buildpostroll: function(player, controls, layers, media) {
4116
- var
4117
- t = this,
4118
- postrollTitle = t.options.postrollCloseText ? t.options.postrollCloseText : mejs.i18n.t('mejs.close'),
4119
- postrollLink = t.container.find('link[rel="postroll"]').attr('href');
4120
-
4121
- if (typeof postrollLink !== 'undefined') {
4122
- player.postroll =
4123
- $('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">' + postrollTitle + '</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(layers).hide();
4124
-
4125
- t.media.addEventListener('ended', function (e) {
4126
- $.ajax({
4127
- dataType: 'html',
4128
- url: postrollLink,
4129
- success: function (data, textStatus) {
4130
- layers.find('.mejs-postroll-layer-content').html(data);
4131
- }
4132
- });
4133
- player.postroll.show();
4134
- }, false);
4135
- }
4136
- }
4137
- });
4138
-
4139
- })(mejs.$);
4140
- /*
4141
- MediaElement-Markers is a MediaElement.js plugin that lets you add Visual Cues in the progress time rail.
4142
- This plugin also lets you register a custom callback function that will be called everytime the play position reaches a marker.
4143
- Marker position and a reference to the MediaElement Player object is passed to the registered callback function for any post processing. Marker color is configurable.
4144
-
4145
- */
4146
-
4147
- (function ($) {
4148
- // markers
4149
-
4150
- $.extend(mejs.MepDefaults, {
4151
- markerColor: '#E9BC3D', //default marker color
4152
- markers: [],
4153
- markerCallback: function () {
4154
-
4155
- }
4156
- });
4157
-
4158
- $.extend(MediaElementPlayer.prototype, {
4159
- buildmarkers: function (player, controls, layers, media) {
4160
- var t = this,
4161
- i = 0,
4162
- currentPos = -1,
4163
- currentMarker = -1,
4164
- lastPlayPos = -1, //Track backward seek
4165
- lastMarkerCallBack = -1; //Prevents successive firing of callbacks
4166
-
4167
- for (i = 0; i < player.options.markers.length; ++i) {
4168
- controls.find('.mejs-time-total').append('<span class="mejs-time-marker"></span>');
4169
- }
4170
-
4171
- media.addEventListener('durationchange', function (e) {
4172
- player.setmarkers(controls);
4173
- });
4174
- media.addEventListener('timeupdate', function (e) {
4175
- currentPos = Math.floor(media.currentTime);
4176
- if (lastPlayPos > currentPos) {
4177
- if (lastMarkerCallBack > currentPos) {
4178
- lastMarkerCallBack = -1;
4179
- }
4180
- } else {
4181
- lastPlayPos = currentPos;
4182
- }
4183
-
4184
- for (i = 0; i < player.options.markers.length; ++i) {
4185
- currentMarker = Math.floor(player.options.markers[i]);
4186
- if (currentPos === currentMarker && currentMarker !== lastMarkerCallBack) {
4187
- player.options.markerCallback(media, media.currentTime); //Fires the callback function
4188
- lastMarkerCallBack = currentMarker;
4189
- }
4190
- }
4191
-
4192
- }, false);
4193
-
4194
- },
4195
- setmarkers: function (controls) {
4196
- var t = this,
4197
- i = 0,
4198
- left;
4199
-
4200
- for (i = 0; i < t.options.markers.length; ++i) {
4201
- if (Math.floor(t.options.markers[i]) <= t.media.duration && Math.floor(t.options.markers[i]) >= 0) {
4202
- left = 100 * Math.floor(t.options.markers[i]) / t.media.duration;
4203
- $(controls.find('.mejs-time-marker')[i]).css({
4204
- "width": "1px",
4205
- "left": left+"%",
4206
- "background": t.options.markerColor
4207
- });
4208
- }
4209
- }
4210
-
4211
- }
4212
- });
4213
- })(mejs.$);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mediaelementplayer.min.css DELETED
@@ -1 +0,0 @@
1
- .mejs-offscreen{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);clip-path:polygon(0px 0,0 0,0 0,0 0);position:absolute!important;height:1px;width:1px;overflow:hidden}.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial,serif;text-align:left;vertical-align:top;text-indent:0}.mejs-fill-container,.mejs-fill-container .mejs-container{width:100%;height:100%}.mejs-fill-container{overflow:hidden}.mejs-container:focus{outline:0}.me-plugin{position:absolute}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%}.mejs-clear{clear:both}.mejs-background{position:absolute;top:0;left:0}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat}:root .mejs-poster img{display:none}.mejs-poster img{border:0;padding:0}.mejs-overlay{position:absolute;top:0;left:0}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat}.no-svg .mejs-overlay-button{background-image:url(bigplay.png)}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,.9);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.9)),to(rgba(0,0,0,.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-moz-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-o-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-ms-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:linear-gradient(rgba(50,50,50,.9),rgba(0,0,0,.9))}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat}.mejs-container .mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.7)),to(rgba(0,0,0,.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-moz-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-o-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-ms-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:linear-gradient(rgba(50,50,50,.7),rgba(0,0,0,.7));height:30px;width:100%}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;font-family:Helvetica,Arial,serif;border:0}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png)}.mejs-controls .mejs-button button:focus{outline:dotted 1px #999}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:10px 3px 0;overflow:hidden;text-align:center;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.mejs-container .mejs-controls .mejs-time a{color:#fff;font-size:11px;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto}.mejs-controls .mejs-play button{background-position:0 0}.mejs-controls .mejs-pause button{background-position:0 -16px}.mejs-controls .mejs-stop button{background-position:-112px 0}.mejs-controls div.mejs-time-rail{direction:ltr;width:200px;padding-top:5px}.mejs-controls .mejs-time-rail span,.mejs-controls .mejs-time-rail a{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8))}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite}@-webkit-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-moz-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-ms-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-o-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(44,124,145,.8)),to(rgba(78,183,212,.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-moz-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-o-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-ms-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:linear-gradient(rgba(44,124,145,.8),rgba(78,183,212,.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-current{background:#fff;background:rgba(255,255,255,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.9)),to(rgba(200,200,200,.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-moz-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-o-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-ms-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:linear-gradient(rgba(255,255,255,.9),rgba(200,200,200,.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-controls .mejs-volume-button{}.mejs-controls .mejs-mute button{background-position:-16px -16px}.mejs-controls .mejs-unmute button{background-position:-16px 0}.mejs-controls .mejs-volume-button{position:relative}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,.5);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,.9);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0}.mejs-controls a.mejs-horizontal-volume-slider{height:26px;width:56px;position:relative;display:block;float:left;vertical-align:middle}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.9)),to(rgba(200,200,200,.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-moz-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-o-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-ms-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:linear-gradient(rgba(255,255,255,.9),rgba(200,200,200,.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none}.mejs-controls .mejs-captions-button{position:relative}.mejs-controls .mejs-captions-button button{background-position:-48px 0}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-51px;width:85px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:10px 10px 0;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-captions-button:hover .mejs-captions-selector{visibility:visible}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:55px;float:left;padding:4px 0 0;line-height:15px;font-family:Helvetica,Arial,serif;font-size:10px}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-chapters{position:absolute;top:0;left:0;border-right:solid 1px #fff;width:10000px;z-index:1}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.7)),to(rgba(0,0,0,.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-moz-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-o-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-ms-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:linear-gradient(rgba(50,50,50,.7),rgba(0,0,0,.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232, endColorstr=#000000);overflow:hidden;border:0}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:0}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(102,102,102,.7)),to(rgba(50,50,50,.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-moz-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-o-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-ms-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:linear-gradient(rgba(102,102,102,.7),rgba(50,50,50,.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666, endColorstr=#323232)}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:700;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px;line-height:12px}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px;display:block;white-space:nowrap;text-overflow:ellipsis}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:20px;font-size:16px;color:#fff}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text{padding:0;background:url(background.png);background:rgba(20,20,20,.5);white-space:pre-wrap;-webkit-box-shadow:5px 0 0 rgba(20,20,20,.5),-5px 0 0 rgba(20,20,20,.5);box-shadow:5px 0 0 rgba(20,20,20,.5),-5px 0 0 rgba(20,20,20,.5)}.me-cannotplay{}.me-cannotplay a{color:#fff;font-weight:700}.me-cannotplay span{padding:15px;display:block}.mejs-controls .mejs-loop-off button{background-position:-64px -16px}.mejs-controls .mejs-loop-on button{background-position:-64px 0}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px}.mejs-controls .mejs-backlight-on button{background-position:-80px 0}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial,serif;font-size:12px;padding:4px 6px;cursor:pointer;color:#333}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff}.mejs-controls .mejs-sourcechooser-button{position:relative}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0;line-height:15px;font-family:Helvetica,Arial,serif;font-size:10px}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,.7);z-index:1000;overflow:hidden}.mejs-postroll-layer-content{width:100%;height:100%}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,.7);color:#fff;padding:4px;z-index:100;cursor:pointer}div.mejs-speed-button{width:46px!important;position:relative}.mejs-controls .mejs-button.mejs-speed-button button{background:transparent;width:36px;font-size:11px;line-height:normal;color:#fff}.mejs-controls .mejs-speed-button .mejs-speed-selector{display:none;position:absolute;top:-100px;left:-10px;width:60px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:0;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-speed-button:hover>.mejs-speed-selector{display:block}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li label.mejs-speed-selected{color:rgba(33,248,248,1)}.mejs-controls .mejs-speed-button .mejs-speed-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li{margin:0 0 6px;padding:0 10px;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;display:none}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li label{width:60px;float:left;padding:4px 0 0;line-height:15px;font-family:Helvetica,Arial,serif;font-size:11px;color:#fff;margin-left:5px;cursor:pointer}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li:hover{background-color:#c8c8c8!important;background-color:rgba(255,255,255,.4)!important}.mejs-controls .mejs-button.mejs-jump-forward-button{background:transparent url(jumpforward.png) no-repeat 3px 3px}.mejs-controls .mejs-button.mejs-jump-forward-button button{background:transparent;font-size:9px;line-height:normal;color:#fff}.mejs-controls .mejs-button.mejs-skip-back-button{background:transparent url(skipback.png) no-repeat 3px 3px}.mejs-controls .mejs-button.mejs-skip-back-button button{background:transparent;font-size:9px;line-height:normal;color:#fff}
 
mediaelement/mediaelementplayer.min.js DELETED
@@ -1,14 +0,0 @@
1
- /*!
2
- *
3
- * MediaElementPlayer
4
- * http://mediaelementjs.com/
5
- *
6
- * Creates a controller bar for HTML5 <video> add <audio> tags
7
- * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
8
- *
9
- * Copyright 2010-2013, John Dyer (http://j.hn/)
10
- * License: MIT
11
- *
12
- */
13
- "undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(a){var b=$(this).width();return a&&(b+=parseInt($(this).css("margin-right"),10),b+=parseInt($(this).css("margin-left"),10)),b}):"undefined"!=typeof ender&&(mejs.$=ender),function(a){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return.05*a.duration},defaultSeekForwardInterval:function(a){return.05*a.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,controlsTimeoutDefault:1500,controlsTimeoutMouseEnter:2500,controlsTimeoutMouseLeave:1e3,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,stretching:"auto",enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(a,b,c,d){mejs.MediaFeatures.isFirefox||(b.paused||b.ended?b.play():b.pause())}},{keys:[38],action:function(a,b,c,d){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.min(b.volume+.1,1);b.setVolume(e)}},{keys:[40],action:function(a,b,c,d){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.max(b.volume-.1,0);b.setVolume(e)}},{keys:[37,227],action:function(a,b,c,d){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(e)}}},{keys:[39,228],action:function(a,b,c,d){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var e=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(e)}}},{keys:[70],action:function(a,b,c,d){"undefined"!=typeof a.enterFullScreen&&(a.isFullScreen?a.exitFullScreen():a.enterFullScreen())}},{keys:[77],action:function(a,b,c,d){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer()),a.media.muted?a.setMuted(!1):a.setMuted(!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(b,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(b,c);var d=this;return d.$media=d.$node=a(b),d.node=d.media=d.$media[0],d.node?"undefined"!=typeof d.node.player?d.node.player:("undefined"==typeof c&&(c=d.$node.data("mejsoptions")),d.options=a.extend({},mejs.MepDefaults,c),d.options.timeFormat||(d.options.timeFormat="mm:ss",d.options.alwaysShowHours&&(d.options.timeFormat="hh:mm:ss"),d.options.showTimecodeFrameCount&&(d.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,d.options,d.options.framesPerSecond||25),d.id="mep_"+mejs.mepIndex++,mejs.players[d.id]=d,d.init(),d):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var b=this,c=mejs.MediaFeatures,d=a.extend(!0,{},b.options,{success:function(a,c){b.meReady(a,c)},error:function(a){b.handleError(a)}}),e=b.media.tagName.toLowerCase();if(b.isDynamic="audio"!==e&&"video"!==e,b.isDynamic?b.isVideo=b.options.isVideo:b.isVideo="audio"!==e&&b.options.isVideo,c.isiPad&&b.options.iPadUseNativeControls||c.isiPhone&&b.options.iPhoneUseNativeControls)b.$media.attr("controls","controls"),c.isiPad&&null!==b.media.getAttribute("autoplay")&&b.play();else if(c.isAndroid&&b.options.AndroidUseNativeControls);else if(b.isVideo||!b.isVideo&&b.options.features.length){b.$media.removeAttr("controls");var f=b.isVideo?mejs.i18n.t("mejs.video-player"):mejs.i18n.t("mejs.audio-player");a('<span class="mejs-offscreen">'+f+"</span>").insertBefore(b.$media),b.container=a('<div id="'+b.id+'" class="mejs-container '+(mejs.MediaFeatures.svgAsImg?"svg":"no-svg")+'" tabindex="0" role="application" aria-label="'+f+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media).focus(function(a){if(!b.controlsAreVisible&&!b.hasFocus&&b.controlsEnabled&&(b.showControls(!0),!b.hasMsNativeFullScreen)){var c=".mejs-playpause-button > button";mejs.Utility.isNodeAfter(a.relatedTarget,b.container[0])&&(c=".mejs-controls .mejs-button:last-child > button");var d=b.container.find(c);d.focus()}}),b.options.features.length||b.container.css("background","transparent").find(".mejs-controls").hide(),b.isVideo&&"fill"===b.options.stretching&&!b.container.parent("mejs-fill-container").length&&(b.outerContainer=b.$media.parent(),b.container.wrap('<div class="mejs-fill-container"/>')),b.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(b.isVideo?"mejs-video ":"mejs-audio ")),b.container.find(".mejs-mediaelement").append(b.$media),b.node.player=b,b.controls=b.container.find(".mejs-controls"),b.layers=b.container.find(".mejs-layers");var g=b.isVideo?"video":"audio",h=g.substring(0,1).toUpperCase()+g.substring(1);b.options[g+"Width"]>0||b.options[g+"Width"].toString().indexOf("%")>-1?b.width=b.options[g+"Width"]:""!==b.media.style.width&&null!==b.media.style.width?b.width=b.media.style.width:null!==b.media.getAttribute("width")?b.width=b.$media.attr("width"):b.width=b.options["default"+h+"Width"],b.options[g+"Height"]>0||b.options[g+"Height"].toString().indexOf("%")>-1?b.height=b.options[g+"Height"]:""!==b.media.style.height&&null!==b.media.style.height?b.height=b.media.style.height:null!==b.$media[0].getAttribute("height")?b.height=b.$media.attr("height"):b.height=b.options["default"+h+"Height"],b.setPlayerSize(b.width,b.height),d.pluginWidth=b.width,d.pluginHeight=b.height}else b.isVideo||b.options.features.length||b.$media.hide();mejs.MediaElement(b.$media[0],d),"undefined"!=typeof b.container&&b.options.features.length&&b.controlsAreVisible&&b.container.trigger("controlsshown")},showControls:function(a){var b=this;a="undefined"==typeof a||a,b.controlsAreVisible||(a?(b.controls.removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0,b.container.trigger("controlsshown")}),b.container.find(".mejs-control").removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0})):(b.controls.removeClass("mejs-offscreen").css("display","block"),b.container.find(".mejs-control").removeClass("mejs-offscreen").css("display","block"),b.controlsAreVisible=!0,b.container.trigger("controlsshown")),b.setControlsSize())},hideControls:function(b){var c=this;b="undefined"==typeof b||b,!c.controlsAreVisible||c.options.alwaysShowControls||c.keyboardAction||c.media.paused||c.media.ended||(b?(c.controls.stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")}),c.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block")})):(c.controls.addClass("mejs-offscreen").css("display","block"),c.container.find(".mejs-control").addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(a){var b=this;a="undefined"!=typeof a?a:b.options.controlsTimeoutDefault,b.killControlsTimer("start"),b.controlsTimer=setTimeout(function(){b.hideControls(),b.killControlsTimer("hide")},a)},killControlsTimer:function(a){var b=this;null!==b.controlsTimer&&(clearTimeout(b.controlsTimer),delete b.controlsTimer,b.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var a=this;a.killControlsTimer(),a.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var a=this;a.showControls(!1),a.controlsEnabled=!0},meReady:function(b,c){var d,e,f=this,g=mejs.MediaFeatures,h=c.getAttribute("autoplay"),i=!("undefined"==typeof h||null===h||"false"===h);if(!f.created){if(f.created=!0,f.media=b,f.domNode=c,!(g.isAndroid&&f.options.AndroidUseNativeControls||g.isiPad&&f.options.iPadUseNativeControls||g.isiPhone&&f.options.iPhoneUseNativeControls)){if(!f.isVideo&&!f.options.features.length)return i&&"native"==b.pluginType&&f.play(),void(f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f)));f.buildposter(f,f.controls,f.layers,f.media),f.buildkeyboard(f,f.controls,f.layers,f.media),f.buildoverlays(f,f.controls,f.layers,f.media),f.findTracks();for(d in f.options.features)if(e=f.options.features[d],f["build"+e])try{f["build"+e](f,f.controls,f.layers,f.media)}catch(j){}f.container.trigger("controlsready"),f.setPlayerSize(f.width,f.height),f.setControlsSize(),f.isVideo&&(mejs.MediaFeatures.hasTouch&&!f.options.alwaysShowControls?f.$media.bind("touchstart",function(){f.controlsAreVisible?f.hideControls(!1):f.controlsEnabled&&f.showControls(!1)}):(f.clickToPlayPauseCallback=function(){if(f.options.clickToPlayPause){f.media.paused?f.play():f.pause();var a=f.$media.closest(".mejs-container").find(".mejs-overlay-button"),b=a.attr("aria-pressed");a.attr("aria-pressed",!b)}},f.media.addEventListener("click",f.clickToPlayPauseCallback,!1),f.container.bind("mouseenter",function(){f.controlsEnabled&&(f.options.alwaysShowControls||(f.killControlsTimer("enter"),f.showControls(),f.startControlsTimer(f.options.controlsTimeoutMouseEnter)))}).bind("mousemove",function(){f.controlsEnabled&&(f.controlsAreVisible||f.showControls(),f.options.alwaysShowControls||f.startControlsTimer(f.options.controlsTimeoutMouseEnter))}).bind("mouseleave",function(){f.controlsEnabled&&(f.media.paused||f.options.alwaysShowControls||f.startControlsTimer(f.options.controlsTimeoutMouseLeave))})),f.options.hideVideoControlsOnLoad&&f.hideControls(!1),i&&!f.options.alwaysShowControls&&f.hideControls(),f.options.enableAutosize&&f.media.addEventListener("loadedmetadata",function(a){f.options.videoHeight<=0&&null===f.domNode.getAttribute("height")&&!isNaN(a.target.videoHeight)&&(f.setPlayerSize(a.target.videoWidth,a.target.videoHeight),f.setControlsSize(),f.media.setVideoSize(a.target.videoWidth,a.target.videoHeight))},!1)),f.media.addEventListener("play",function(){var a;for(a in mejs.players){var b=mejs.players[a];b.id==f.id||!f.options.pauseOtherPlayers||b.paused||b.ended||b.pause(),b.hasFocus=!1}f.hasFocus=!0},!1),f.media.addEventListener("ended",function(b){if(f.options.autoRewind)try{f.media.setCurrentTime(0),window.setTimeout(function(){a(f.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(c){}"youtube"===f.media.pluginType?f.media.stop():f.media.pause(),f.setProgressRail&&f.setProgressRail(),f.setCurrentRail&&f.setCurrentRail(),f.options.loop?f.play():!f.options.alwaysShowControls&&f.controlsEnabled&&f.showControls()},!1),f.media.addEventListener("loadedmetadata",function(){mejs.Utility.calculateTimeFormat(f.duration,f.options,f.options.framesPerSecond||25),f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.isFullScreen||(f.setPlayerSize(f.width,f.height),f.setControlsSize())},!1);var k=null;f.media.addEventListener("timeupdate",function(){k!==this.duration&&(k=this.duration,mejs.Utility.calculateTimeFormat(k,f.options,f.options.framesPerSecond||25),f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.setControlsSize())},!1),f.container.focusout(function(b){if(b.relatedTarget){var c=a(b.relatedTarget);f.keyboardAction&&0===c.parents(".mejs-container").length&&(f.keyboardAction=!1,f.isVideo&&!f.options.alwaysShowControls&&f.hideControls(!0))}}),setTimeout(function(){f.setPlayerSize(f.width,f.height),f.setControlsSize()},50),f.globalBind("resize",function(){f.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||f.setPlayerSize(f.width,f.height),f.setControlsSize()}),"youtube"==f.media.pluginType&&(g.isiOS||g.isAndroid)&&(f.container.find(".mejs-overlay-play").hide(),f.container.find(".mejs-poster").hide())}i&&"native"==b.pluginType&&f.play(),f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f))}},handleError:function(a){var b=this;b.controls&&b.controls.hide(),b.options.error&&b.options.error(a)},setPlayerSize:function(a,b){var c=this;if(!c.options.setDimensions)return!1;switch("undefined"!=typeof a&&(c.width=a),"undefined"!=typeof b&&(c.height=b),c.options.stretching){case"fill":c.isVideo?this.setFillMode():this.setDimensions(c.width,c.height);break;case"responsive":this.setResponsiveMode();break;case"none":this.setDimensions(c.width,c.height);break;default:this.hasFluidMode()===!0?this.setResponsiveMode():this.setDimensions(c.width,c.height)}},hasFluidMode:function(){var a=this;return a.height.toString().indexOf("%")>0||"none"!==a.$node.css("max-width")&&"t.width"!==a.$node.css("max-width")||a.$node[0].currentStyle&&"100%"===a.$node[0].currentStyle.maxWidth},setResponsiveMode:function(){var b=this,c=function(){return b.isVideo?b.media.videoWidth&&b.media.videoWidth>0?b.media.videoWidth:null!==b.media.getAttribute("width")?b.media.getAttribute("width"):b.options.defaultVideoWidth:b.options.defaultAudioWidth}(),d=function(){return b.isVideo?b.media.videoHeight&&b.media.videoHeight>0?b.media.videoHeight:null!==b.media.getAttribute("height")?b.media.getAttribute("height"):b.options.defaultVideoHeight:b.options.defaultAudioHeight}(),e=b.container.parent().closest(":visible").width(),f=b.container.parent().closest(":visible").height(),g=b.isVideo||!b.options.autosizeProgress?parseInt(e*d/c,10):d;(isNaN(g)||0!==f&&g>f&&f>d)&&(g=f),b.container.parent().length>0&&"body"===b.container.parent()[0].tagName.toLowerCase()&&(e=a(window).width(),g=a(window).height()),g&&e&&(b.container.width(e).height(g),b.$media.add(b.container.find(".mejs-shim")).width("100%").height("100%"),b.isVideo&&b.media.setVideoSize&&b.media.setVideoSize(e,g),b.layers.children(".mejs-layer").width("100%").height("100%"))},setFillMode:function(){var a=this,b=a.outerContainer;b.width()||b.height(a.$media.width()),b.height()||b.height(a.$media.height());var c=b.width(),d=b.height();a.setDimensions("100%","100%"),a.container.find(".mejs-poster img").css("display","block"),targetElement=a.container.find("object, embed, iframe, video");var e=a.height,f=a.width,g=c,h=e*c/f,i=f*d/e,j=d,k=!(i>c),l=k?Math.floor(g):Math.floor(i),m=k?Math.floor(h):Math.floor(j);k?(targetElement.height(m).width(c),a.media.setVideoSize&&a.media.setVideoSize(c,m)):(targetElement.height(d).width(l),a.media.setVideoSize&&a.media.setVideoSize(l,d)),targetElement.css({"margin-left":Math.floor((c-l)/2),"margin-top":0})},setDimensions:function(a,b){var c=this;c.container.width(a).height(b),c.layers.children(".mejs-layer").width(a).height(b)},setControlsSize:function(){var b=this,c=0,d=0,e=b.controls.find(".mejs-time-rail"),f=b.controls.find(".mejs-time-total"),g=e.siblings(),h=g.last(),i=null,j=b.options&&!b.options.autosizeProgress;if(b.container.is(":visible")&&e.length&&e.is(":visible")){j&&(d=parseInt(e.css("width"),10)),0!==d&&d||(g.each(function(){var b=a(this);"absolute"!=b.css("position")&&b.is(":visible")&&(c+=a(this).outerWidth(!0))}),d=b.controls.width()-c-(e.outerWidth(!0)-e.width()));do j||e.width(d),f.width(d-(f.outerWidth(!0)-f.width())),"absolute"!=h.css("position")&&(i=h.length?h.position():null,d--);while(null!==i&&i.top.toFixed(2)>0&&d>0);b.container.trigger("controlsresize")}},buildposter:function(b,c,d,e){var f=this,g=a('<div class="mejs-poster mejs-layer"></div>').appendTo(d),h=b.$media.attr("poster");""!==b.options.poster&&(h=b.options.poster),h?f.setPoster(h):g.hide(),e.addEventListener("play",function(){g.hide()},!1),b.options.showPosterWhenEnded&&b.options.autoRewind&&e.addEventListener("ended",function(){g.show()},!1)},setPoster:function(b){var c=this,d=c.container.find(".mejs-poster"),e=d.find("img");0===e.length&&(e=a('<img width="100%" height="100%" alt="" />').appendTo(d)),e.attr("src",b),d.css({"background-image":"url("+b+")"})},buildoverlays:function(b,c,d,e){var f=this;if(b.isVideo){var g=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),h=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),i=a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button" role="button" aria-label="'+mejs.i18n.t("mejs.play")+'" aria-pressed="false"></div></div>').appendTo(d).bind("click",function(){if(f.options.clickToPlayPause){e.paused&&e.play();var b=a(this).find(".mejs-overlay-button"),c=b.attr("aria-pressed");b.attr("aria-pressed",!!c)}});e.addEventListener("play",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("playing",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("seeking",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("seeked",function(){g.hide(),c.find(".mejs-time-buffering").hide()},!1),e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||i.show()},!1),e.addEventListener("waiting",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("loadeddata",function(){g.show(),c.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(e.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var a=document.createEvent("HTMLEvents");return a.initEvent("canplay",!0,!0),e.dispatchEvent(a)}},300))},!1),e.addEventListener("canplay",function(){g.hide(),c.find(".mejs-time-buffering").hide(),clearTimeout(e.canplayTimeout)},!1),e.addEventListener("error",function(a){f.handleError(a),g.hide(),i.hide(),h.show(),h.find(".mejs-overlay-error").html("Error loading this resource")},!1),e.addEventListener("keydown",function(a){f.onkeydown(b,e,a)},!1)}},buildkeyboard:function(b,c,d,e){var f=this;f.container.keydown(function(){f.keyboardAction=!0}),f.globalBind("keydown",function(c){return b.hasFocus=0!==a(c.target).closest(".mejs-container").length&&a(c.target).closest(".mejs-container").attr("id")===b.$media.closest(".mejs-container").attr("id"),f.onkeydown(b,e,c)}),f.globalBind("click",function(c){b.hasFocus=0!==a(c.target).closest(".mejs-container").length})},onkeydown:function(a,b,c){if(a.hasFocus&&a.options.enableKeyboard)for(var d=0,e=a.options.keyActions.length;e>d;d++)for(var f=a.options.keyActions[d],g=0,h=f.keys.length;h>g;g++)if(c.keyCode==f.keys[g])return"function"==typeof c.preventDefault&&c.preventDefault(),f.action(a,b,c.keyCode,c),!1;return!0},findTracks:function(){var b=this,c=b.$media.find("track");b.tracks=[],c.each(function(c,d){d=a(d),b.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(a){this.container[0].className="mejs-container "+a,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){var b=this;if("youtube"===b.media.pluginType){var c;if("string"!=typeof a){var d,e;for(d=0;d<a.length;d++)if(e=a[d],this.canPlayType(e.type)){a=e.src;break}}if(-1!==a.lastIndexOf("youtu.be"))c=a.substr(a.lastIndexOf("/")+1),-1!==c.indexOf("?")&&(c=c.substr(0,c.indexOf("?")));else{var f=a.match(/[?&]v=([^&#]+)|&|#|$/);f&&(c=f[1])}null!==b.media.getAttribute("autoplay")?b.media.pluginApi.loadVideoById(c):b.media.pluginApi.cueVideoById(c)}else b.media.setSrc(a)},remove:function(){var a,b,c=this;c.container.prev(".mejs-offscreen").remove();for(a in c.options.features)if(b=c.options.features[a],c["clean"+b])try{c["clean"+b](c)}catch(d){}c.isDynamic?c.$node.insertBefore(c.container):(c.$media.prop("controls",!0),c.$node.clone().insertBefore(c.container).show(),c.$node.remove()),"native"!==c.media.pluginType&&c.media.remove(),delete mejs.players[c.id],"object"==typeof c.container&&c.container.remove(),c.globalUnbind(),delete c.node.player},rebuildtracks:function(){var a=this;a.findTracks(),a.buildtracks(a,a.controls,a.layers,a.media)},resetSize:function(){var a=this;setTimeout(function(){a.setPlayerSize(a.width,a.height),a.setControlsSize()},50)}},function(){function b(b,d){var e={d:[],w:[]};return a.each((b||"").split(" "),function(a,b){var f=b+"."+d;0===f.indexOf(".")?(e.d.push(f),e.w.push(f)):e[c.test(b)?"w":"d"].push(f)}),e.d=e.d.join(" "),e.w=e.w.join(" "),e}var c=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,d,e){var f=this,g=f.node?f.node.ownerDocument:document;c=b(c,f.id),c.d&&a(g).bind(c.d,d,e),c.w&&a(window).bind(c.w,d,e)},mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){var e=this,f=e.node?e.node.ownerDocument:document;c=b(c,e.id),c.d&&a(f).unbind(c.d,d),c.w&&a(window).unbind(c.w,d)}}(),"undefined"!=typeof a&&(a.fn.mediaelementplayer=function(b){return b===!1?this.each(function(){var b=a(this).data("mediaelementplayer");b&&b.remove(),a(this).removeData("mediaelementplayer")}):this.each(function(){a(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,b))}),this},a(document).ready(function(){a(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(a){a.extend(mejs.MepDefaults,{playText:"",pauseText:""}),a.extend(MediaElementPlayer.prototype,{buildplaypause:function(b,c,d,e){function f(a){"play"===a?(k.removeClass("mejs-play").addClass("mejs-pause"),l.attr({title:j,"aria-label":j})):(k.removeClass("mejs-pause").addClass("mejs-play"),l.attr({title:i,"aria-label":i}))}var g=this,h=g.options,i=h.playText?h.playText:mejs.i18n.t("mejs.play"),j=h.pauseText?h.pauseText:mejs.i18n.t("mejs.pause"),k=a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+g.id+'" title="'+i+'" aria-label="'+j+'"></button></div>').appendTo(c).click(function(a){return a.preventDefault(),e.paused?e.play():e.pause(),!1}),l=k.find("button");f("pse"),e.addEventListener("play",function(){f("play")},!1),e.addEventListener("playing",function(){f("play")},!1),e.addEventListener("pause",function(){f("pse")},!1),e.addEventListener("paused",function(){f("pse")},!1)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"}),a.extend(MediaElementPlayer.prototype,{buildstop:function(b,c,d,e){var f=this;a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+f.id+'" title="'+f.options.stopText+'" aria-label="'+f.options.stopText+'"></button></div>').appendTo(c).click(function(){e.paused||e.pause(),e.currentTime>0&&(e.setCurrentTime(0),e.pause(),c.find(".mejs-time-current").width("0px"),c.find(".mejs-time-handle").css("left","0px"),c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,b.options)),c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,b.options)),d.find(".mejs-poster").show())})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{enableProgressTooltip:!0,progressHelpText:""}),a.extend(MediaElementPlayer.prototype,{buildprogress:function(b,c,d,e){var f=this,g=!1,h=!1,i=0,j=!1,k=b.options.autoRewind,l=(f.options.progressHelpText?f.options.progressHelpText:mejs.i18n.t("mejs.time-help-text"),b.options.enableProgressTooltip?'<span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span>':"");a('<div class="mejs-time-rail"><span class="mejs-time-total mejs-time-slider"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span>'+l+"</span></div>").appendTo(c),c.find(".mejs-time-buffering").hide(),f.total=c.find(".mejs-time-total"),f.loaded=c.find(".mejs-time-loaded"),f.current=c.find(".mejs-time-current"),f.handle=c.find(".mejs-time-handle"),f.timefloat=c.find(".mejs-time-float"),f.timefloatcurrent=c.find(".mejs-time-float-current"),f.slider=c.find(".mejs-time-slider");var m=function(a){var c,d=f.total.offset(),h=f.total.width(),i=0,j=0,k=0;c=a.originalEvent&&a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.changedTouches?a.changedTouches[0].pageX:a.pageX,e.duration&&(c<d.left?c=d.left:c>h+d.left&&(c=h+d.left),k=c-d.left,i=k/h,j=.02>=i?0:i*e.duration,g&&j!==e.currentTime&&e.setCurrentTime(j),mejs.MediaFeatures.hasTouch||(f.timefloat.css("left",k),f.timefloatcurrent.html(mejs.Utility.secondsToTimeCode(j,b.options)),f.timefloat.show()))},n=function(a){var c=e.currentTime,d=mejs.i18n.t("mejs.time-slider"),g=mejs.Utility.secondsToTimeCode(c,b.options),h=e.duration;f.slider.attr({"aria-label":d,"aria-valuemin":0,"aria-valuemax":h,"aria-valuenow":c,"aria-valuetext":g,role:"slider",tabindex:0})},o=function(){var a=new Date;a-i>=1e3&&e.play()};f.slider.bind("focus",function(a){b.options.autoRewind=!1}),f.slider.bind("blur",function(a){b.options.autoRewind=k}),f.slider.bind("keydown",function(a){new Date-i>=1e3&&(j=e.paused);var c=a.keyCode,d=e.duration,f=e.currentTime,g=b.options.defaultSeekForwardInterval(e),h=b.options.defaultSeekBackwardInterval(e);switch(c){case 37:case 40:f-=h;break;case 39:case 38:f+=g;break;case 36:f=0;break;case 35:f=d;break;case 32:case 13:return void(e.paused?e.play():e.pause());default:return}return f=0>f?0:f>=d?d:Math.floor(f),i=new Date,j||e.pause(),f<e.duration&&!j&&setTimeout(o,1100),e.setCurrentTime(f),a.preventDefault(),a.stopPropagation(),!1}),f.total.bind("mousedown touchstart",function(a){(1===a.which||0===a.which)&&(g=!0,m(a),f.globalBind("mousemove.dur touchmove.dur",function(a){m(a)}),f.globalBind("mouseup.dur touchend.dur",function(a){g=!1,"undefined"!=typeof f.timefloat&&f.timefloat.hide(),f.globalUnbind(".dur")}))}).bind("mouseenter",function(a){h=!0,f.globalBind("mousemove.dur",function(a){m(a)}),"undefined"==typeof f.timefloat||mejs.MediaFeatures.hasTouch||f.timefloat.show()}).bind("mouseleave",function(a){h=!1,g||(f.globalUnbind(".dur"),"undefined"!=typeof f.timefloat&&f.timefloat.hide())}),e.addEventListener("progress",function(a){b.setProgressRail(a),b.setCurrentRail(a)},!1),e.addEventListener("timeupdate",function(a){b.setProgressRail(a),b.setCurrentRail(a),n(a)},!1),f.container.on("controlsresize",function(a){b.setProgressRail(a),b.setCurrentRail(a)})},setProgressRail:function(a){var b=this,c=void 0!==a?a.target:b.media,d=null;c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration?d=c.buffered.end(c.buffered.length-1)/c.duration:c&&void 0!==c.bytesTotal&&c.bytesTotal>0&&void 0!==c.bufferedBytes?d=c.bufferedBytes/c.bytesTotal:a&&a.lengthComputable&&0!==a.total&&(d=a.loaded/a.total),null!==d&&(d=Math.min(1,Math.max(0,d)),b.loaded&&b.total&&b.loaded.width(b.total.width()*d))},setCurrentRail:function(){var a=this;if(void 0!==a.media.currentTime&&a.media.duration&&a.total&&a.handle){var b=Math.round(a.total.width()*a.media.currentTime/a.media.duration),c=b-Math.round(a.handle.outerWidth(!0)/2);a.current.width(b),a.handle.css("left",c)}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"}),a.extend(MediaElementPlayer.prototype,{buildcurrent:function(b,c,d,e){var f=this;a('<div class="mejs-time" role="timer" aria-live="off"><span class="mejs-currenttime">'+mejs.Utility.secondsToTimeCode(0,b.options)+"</span></div>").appendTo(c),f.currenttime=f.controls.find(".mejs-currenttime"),e.addEventListener("timeupdate",function(){f.controlsAreVisible&&b.updateCurrent()},!1)},buildduration:function(b,c,d,e){var f=this;c.children().last().find(".mejs-currenttime").length>0?a(f.options.timeAndDurationSeparator+'<span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span>").appendTo(c.find(".mejs-time")):(c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span></div>").appendTo(c)),f.durationD=f.controls.find(".mejs-duration"),e.addEventListener("timeupdate",function(){f.controlsAreVisible&&b.updateDuration()},!1)},updateCurrent:function(){var a=this,b=a.media.currentTime;isNaN(b)&&(b=0),a.currenttime&&a.currenttime.html(mejs.Utility.secondsToTimeCode(b,a.options))},updateDuration:function(){var a=this,b=a.media.duration;a.options.duration>0&&(b=a.options.duration),isNaN(b)&&(b=0),a.container.toggleClass("mejs-long-video",b>3600),a.durationD&&b>0&&a.durationD.html(mejs.Utility.secondsToTimeCode(b,a.options))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("mejs.mute-toggle"),allyVolumeControlText:mejs.i18n.t("mejs.volume-help-text"),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),a.extend(MediaElementPlayer.prototype,{buildvolume:function(b,c,d,e){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var f=this,g=f.isVideo?f.options.videoVolume:f.options.audioVolume,h="horizontal"==g?a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button></div><a href="javascript:void(0);" class="mejs-horizontal-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></a>').appendTo(c):a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button><a href="javascript:void(0);" class="mejs-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></a></div>').appendTo(c),i=f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),j=f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),k=f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),l=f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(a,b){if(!i.is(":visible")&&"undefined"==typeof b)return i.show(),m(a,!0),void i.hide();a=Math.max(0,a),a=Math.min(a,1),0===a?(h.removeClass("mejs-mute").addClass("mejs-unmute"),h.children("button").attr("title",mejs.i18n.t("mejs.unmute")).attr("aria-label",mejs.i18n.t("mejs.unmute"))):(h.removeClass("mejs-unmute").addClass("mejs-mute"),h.children("button").attr("title",mejs.i18n.t("mejs.mute")).attr("aria-label",mejs.i18n.t("mejs.mute")));var c=j.position();if("vertical"==g){var d=j.height(),e=d-d*a;l.css("top",Math.round(c.top+e-l.height()/2)),k.height(d-e),k.css("top",c.top+e)}else{var f=j.width(),n=f*a;l.css("left",Math.round(c.left+n-l.width()/2)),k.width(Math.round(n))}},n=function(a){var b=null,c=j.offset();if("vertical"===g){var d=j.height(),f=a.pageY-c.top;if(b=(d-f)/d,0===c.top||0===c.left)return}else{var h=j.width(),i=a.pageX-c.left;b=i/h;
14
- }b=Math.max(0,b),b=Math.min(b,1),m(b),0===b?e.setMuted(!0):e.setMuted(!1),e.setVolume(b)},o=!1,p=!1;h.hover(function(){i.show(),p=!0},function(){p=!1,o||"vertical"!=g||i.hide()});var q=function(a){var b=Math.floor(100*e.volume);i.attr({"aria-label":mejs.i18n.t("mejs.volume-slider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":b,"aria-valuetext":b+"%",role:"slider",tabindex:0})};i.bind("mouseover",function(){p=!0}).bind("mousedown",function(a){return n(a),f.globalBind("mousemove.vol",function(a){n(a)}),f.globalBind("mouseup.vol",function(){o=!1,f.globalUnbind(".vol"),p||"vertical"!=g||i.hide()}),o=!0,!1}).bind("keydown",function(a){var b=a.keyCode,c=e.volume;switch(b){case 38:c=Math.min(c+.1,1);break;case 40:c=Math.max(0,c-.1);break;default:return!0}return o=!1,m(c),e.setVolume(c),!1}),h.find("button").click(function(){e.setMuted(!e.muted)}),h.find("button").bind("focus",function(){i.show()}),e.addEventListener("volumechange",function(a){o||(e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))),q(a)},!1),0===b.options.startVolume&&e.setMuted(!0),"native"===e.pluginType&&e.setVolume(b.options.startVolume),f.container.on("controlsresize",function(){e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:""}),a.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,fullscreenMode:"",buildfullscreen:function(b,c,d,e){if(b.isVideo){b.isInIframe=window.location!=window.parent.location,e.addEventListener("loadstart",function(){b.detectFullscreenMode()});var f=this,g=null,h=f.options.fullscreenText?f.options.fullscreenText:mejs.i18n.t("mejs.fullscreen"),i=a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+f.id+'" title="'+h+'" aria-label="'+h+'"></button></div>').appendTo(c).on("click",function(){var a=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen;a?b.exitFullScreen():b.enterFullScreen()}).on("mouseover",function(){if("plugin-hover"==f.fullscreenMode){null!==g&&(clearTimeout(g),delete g);var a=i.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!0)}}).on("mouseout",function(){"plugin-hover"==f.fullscreenMode&&(null!==g&&(clearTimeout(g),delete g),g=setTimeout(function(){e.hideFullscreenButton()},1500))});if(b.fullscreenBtn=i,f.globalBind("keydown",function(a){27==a.keyCode&&(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||f.isFullScreen)&&b.exitFullScreen()}),f.normalHeight=0,f.normalWidth=0,mejs.MediaFeatures.hasTrueNativeFullScreen){var j=function(a){b.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(b.isNativeFullScreen=!0,b.setControlsSize()):(b.isNativeFullScreen=!1,b.exitFullScreen()))};b.globalBind(mejs.MediaFeatures.fullScreenEventName,j)}}},detectFullscreenMode:function(){var a=this,b="",c=mejs.MediaFeatures;return c.hasTrueNativeFullScreen&&"native"===a.media.pluginType?b="native-native":c.hasTrueNativeFullScreen&&"native"!==a.media.pluginType&&!c.hasFirefoxPluginMovingProblem?b="plugin-native":a.usePluginFullScreen?mejs.MediaFeatures.supportsPointerEvents?(b="plugin-click",a.createPluginClickThrough()):b="plugin-hover":b="fullwindow",a.fullscreenMode=b,b},isPluginClickThroughCreated:!1,createPluginClickThrough:function(){var b=this;if(!b.isPluginClickThroughCreated){var c,d,e=!1,f=function(){if(e){for(var a in g)g[a].hide();b.fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),b.media.removeEventListener("click",b.clickToPlayPauseCallback),e=!1}},g={},h=["top","left","right","bottom"],i=function(){var a=fullscreenBtn.offset().left-b.container.offset().left,d=fullscreenBtn.offset().top-b.container.offset().top,e=fullscreenBtn.outerWidth(!0),f=fullscreenBtn.outerHeight(!0),h=b.container.width(),i=b.container.height();for(c in g)g[c].css({position:"absolute",top:0,left:0});g.top.width(h).height(d),g.left.width(a).height(f).css({top:d}),g.right.width(h-a-e).height(f).css({top:d,left:a+e}),g.bottom.width(h).height(i-f-d).css({top:d+f})};for(b.globalBind("resize",function(){i()}),c=0,d=h.length;d>c;c++)g[h[c]]=a('<div class="mejs-fullscreen-hover" />').appendTo(b.container).mouseover(f).hide();fullscreenBtn.on("mouseover",function(){if(!b.isFullScreen){var a=fullscreenBtn.offset(),d=player.container.offset();media.positionFullscreenButton(a.left-d.left,a.top-d.top,!1),b.fullscreenBtn.css("pointer-events","none"),b.controls.css("pointer-events","none"),b.media.addEventListener("click",b.clickToPlayPauseCallback);for(c in g)g[c].show();i(),e=!0}}),media.addEventListener("fullscreenchange",function(a){b.isFullScreen=!b.isFullScreen,b.isFullScreen?b.media.removeEventListener("click",b.clickToPlayPauseCallback):b.media.addEventListener("click",b.clickToPlayPauseCallback),f()}),b.globalBind("mousemove",function(a){if(e){var c=fullscreenBtn.offset();(a.pageY<c.top||a.pageY>c.top+fullscreenBtn.outerHeight(!0)||a.pageX<c.left||a.pageX>c.left+fullscreenBtn.outerWidth(!0))&&(fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),e=!1)}}),b.isPluginClickThroughCreated=!0}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var b=this;if(mejs.MediaFeatures.isiOS&&mejs.MediaFeatures.hasiOSFullScreen&&"function"==typeof b.media.webkitEnterFullscreen)return void b.media.webkitEnterFullscreen();a(document.documentElement).addClass("mejs-fullscreen"),b.normalHeight=b.container.height(),b.normalWidth=b.container.width(),"native-native"===b.fullscreenMode||"plugin-native"===b.fullscreenMode?(mejs.MediaFeatures.requestFullScreen(b.container[0]),b.isInIframe&&setTimeout(function d(){if(b.isNativeFullScreen){var c=.002,e=a(window).width(),f=screen.width,g=Math.abs(f-e),h=f*c;g>h?b.exitFullScreen():setTimeout(d,500)}},1e3)):"fullwindow"==b.fullscreeMode,b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),b.containerSizeTimeout=setTimeout(function(){b.container.css({width:"100%",height:"100%"}),b.setControlsSize()},500),"native"===b.media.pluginType?b.$media.width("100%").height("100%"):(b.container.find(".mejs-shim").width("100%").height("100%"),setTimeout(function(){var c=a(window),d=c.width(),e=c.height();b.media.setVideoSize(d,e)},500)),b.layers.children("div").width("100%").height("100%"),b.fullscreenBtn&&b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),b.setControlsSize(),b.isFullScreen=!0;var c=Math.min(screen.width/b.width,screen.height/b.height);b.container.find(".mejs-captions-text").css("font-size",100*c+"%"),b.container.find(".mejs-captions-text").css("line-height","normal"),b.container.find(".mejs-captions-position").css("bottom","45px"),b.container.trigger("enteredfullscreen")},exitFullScreen:function(){var b=this;clearTimeout(b.containerSizeTimeout),mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),a(document.documentElement).removeClass("mejs-fullscreen"),b.container.removeClass("mejs-container-fullscreen").width(b.normalWidth).height(b.normalHeight),"native"===b.media.pluginType?b.$media.width(b.normalWidth).height(b.normalHeight):(b.container.find(".mejs-shim").width(b.normalWidth).height(b.normalHeight),b.media.setVideoSize(b.normalWidth,b.normalHeight)),b.layers.children("div").width(b.normalWidth).height(b.normalHeight),b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),b.setControlsSize(),b.isFullScreen=!1,b.container.find(".mejs-captions-text").css("font-size",""),b.container.find(".mejs-captions-text").css("line-height",""),b.container.find(".mejs-captions-position").css("bottom",""),b.container.trigger("exitedfullscreen")}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),a.extend(MediaElementPlayer.prototype,{buildspeed:function(b,c,d,e){var f=this;if("native"==f.media.pluginType){for(var g=null,h=null,i=null,j=null,k=[],l=!1,m=0,n=f.options.speeds.length;n>m;m++){var o=f.options.speeds[m];"string"==typeof o?(k.push({name:o+f.options.speedChar,value:o}),o===f.options.defaultSpeed&&(l=!0)):(k.push(o),o.value===f.options.defaultSpeed&&(l=!0))}l||k.push({name:f.options.defaultSpeed+f.options.speedChar,value:f.options.defaultSpeed}),k.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});var p=function(a){for(m=0,n=k.length;n>m;m++)if(k[m].value===a)return k[m].name},q='<div class="mejs-button mejs-speed-button"><button type="button">'+p(f.options.defaultSpeed)+'</button><div class="mejs-speed-selector"><ul>';for(m=0,il=k.length;m<il;m++)j=f.id+"-speed-"+k[m].value,q+='<li><input type="radio" name="speed" value="'+k[m].value+'" id="'+j+'" '+(k[m].value===f.options.defaultSpeed?" checked":"")+' /><label for="'+j+'" '+(k[m].value===f.options.defaultSpeed?' class="mejs-speed-selected"':"")+">"+k[m].name+"</label></li>";q+="</ul></div></div>",g=a(q).appendTo(c),h=g.find(".mejs-speed-selector"),i=f.options.defaultSpeed,e.addEventListener("loadedmetadata",function(a){i&&(e.playbackRate=parseFloat(i))},!0),h.on("click",'input[type="radio"]',function(){var b=a(this).attr("value");i=b,e.playbackRate=parseFloat(b),g.find("button").html(p(b)),g.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),g.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),g.one("mouseenter focusin",function(){h.height(g.find(".mejs-speed-selector ul").outerHeight(!0)+g.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*h.height()+"px")})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"",tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),a.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(a,b,c,d){a&&(a.captions&&a.captions.remove(),a.chapters&&a.chapters.remove(),a.captionsText&&a.captionsText.remove(),a.captionsButton&&a.captionsButton.remove())},buildtracks:function(b,c,d,e){if(0!==b.tracks.length){var f,g,h=this,i=h.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"",j=h.options.tracksText?h.options.tracksText:mejs.i18n.t("mejs.captions-subtitles");if(h.domNode.textTracks)for(f=h.domNode.textTracks.length-1;f>=0;f--)h.domNode.textTracks[f].mode="hidden";h.cleartracks(b,c,d,e),b.chapters=a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(),b.captions=a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+i+'><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(),b.captionsText=b.captions.find(".mejs-captions-text"),b.captionsButton=a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+h.id+'" title="'+j+'" aria-label="'+j+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+b.id+'_captions" id="'+b.id+'_captions_none" value="none" checked="checked" /><label for="'+b.id+'_captions_none">'+mejs.i18n.t("mejs.none")+"</label></li></ul></div></div>").appendTo(c);var k=0;for(f=0;f<b.tracks.length;f++)g=b.tracks[f].kind,("subtitles"===g||"captions"===g)&&k++;for(h.options.toggleCaptionsButtonWhenOnlyOne&&1==k?b.captionsButton.on("click",function(){null===b.selectedTrack?lang=b.tracks[0].srclang:lang="none",b.setTrack(lang)}):(b.captionsButton.on("mouseenter focusin",function(){a(this).find(".mejs-captions-selector").removeClass("mejs-offscreen")}).on("click","input[type=radio]",function(){lang=this.value,b.setTrack(lang)}),b.captionsButton.on("mouseleave focusout",function(){a(this).find(".mejs-captions-selector").addClass("mejs-offscreen")})),b.options.alwaysShowControls?b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):b.container.bind("controlsshown",function(){b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")}),b.trackToLoad=-1,b.selectedTrack=null,b.isLoadingTrack=!1,f=0;f<b.tracks.length;f++)g=b.tracks[f].kind,("subtitles"===g||"captions"===g)&&b.addTrackButton(b.tracks[f].srclang,b.tracks[f].label);b.loadNextTrack(),e.addEventListener("timeupdate",function(){b.displayCaptions()},!1),""!==b.options.slidesSelector&&(b.slidesContainer=a(b.options.slidesSelector),e.addEventListener("timeupdate",function(){b.displaySlides()},!1)),e.addEventListener("loadedmetadata",function(){b.displayChapters()},!1),b.container.hover(function(){b.hasChapters&&(b.chapters.removeClass("mejs-offscreen"),b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))},function(){b.hasChapters&&!e.paused&&b.chapters.fadeOut(200,function(){a(this).addClass("mejs-offscreen"),a(this).css("display","block")})}),h.container.on("controlsresize",function(){h.adjustLanguageBox()}),null!==b.node.getAttribute("autoplay")&&b.chapters.addClass("mejs-offscreen")}},setTrack:function(a){var b,c=this;if("none"==a)c.selectedTrack=null,c.captionsButton.removeClass("mejs-captions-enabled");else for(b=0;b<c.tracks.length;b++)if(c.tracks[b].srclang==a){null===c.selectedTrack&&c.captionsButton.addClass("mejs-captions-enabled"),c.selectedTrack=c.tracks[b],c.captions.attr("lang",c.selectedTrack.srclang),c.displayCaptions();break}},loadNextTrack:function(){var a=this;a.trackToLoad++,a.trackToLoad<a.tracks.length?(a.isLoadingTrack=!0,a.loadTrack(a.trackToLoad)):(a.isLoadingTrack=!1,a.checkForTracks())},loadTrack:function(b){var c=this,d=c.tracks[b],e=function(){d.isLoaded=!0,c.enableTrackButton(d.srclang,d.label),c.loadNextTrack()};(void 0!==d.src||""!==d.src)&&a.ajax({url:d.src,dataType:"text",success:function(a){"string"==typeof a&&/<tt\s+xml/gi.exec(a)?d.entries=mejs.TrackFormatParser.dfxp.parse(a):d.entries=mejs.TrackFormatParser.webvtt.parse(a),e(),"chapters"==d.kind&&c.media.addEventListener("play",function(){c.media.duration>0&&c.displayChapters(d)},!1),"slides"==d.kind&&c.setupSlides(d)},error:function(){c.removeTrackButton(d.srclang),c.loadNextTrack()}})},enableTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("input[value="+b+"]").prop("disabled",!1).siblings("label").html(c),d.options.startLanguage==b&&a("#"+d.id+"_captions_"+b).prop("checked",!0).trigger("click"),d.adjustLanguageBox()},removeTrackButton:function(a){var b=this;b.captionsButton.find("input[value="+a+"]").closest("li").remove(),b.adjustLanguageBox()},addTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("ul").append(a('<li><input type="radio" name="'+d.id+'_captions" id="'+d.id+"_captions_"+b+'" value="'+b+'" disabled="disabled" /><label for="'+d.id+"_captions_"+b+'">'+c+" (loading)</label></li>")),d.adjustLanguageBox(),d.container.find(".mejs-captions-translations option[value="+b+"]").remove()},adjustLanguageBox:function(){var a=this;a.captionsButton.find(".mejs-captions-selector").height(a.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+a.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var a=this,b=!1;if(a.options.hideCaptionsButtonWhenEmpty){for(var c=0;c<a.tracks.length;c++){var d=a.tracks[c].kind;if(("subtitles"===d||"captions"===d)&&a.tracks[c].isLoaded){b=!0;break}}b||(a.captionsButton.hide(),a.setControlsSize())}},displayCaptions:function(){if("undefined"!=typeof this.tracks){var a,b=this,c=b.selectedTrack;if(null!==c&&c.isLoaded){for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return b.captionsText.html(c.entries.text[a]).attr("class","mejs-captions-text "+(c.entries.times[a].identifier||"")),void b.captions.show().height(0);b.captions.hide()}else b.captions.hide()}},setupSlides:function(a){var b=this;b.slides=a,b.slides.entries.imgs=[b.slides.entries.text.length],b.showSlide(0)},showSlide:function(b){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var c=this,d=c.slides.entries.text[b],e=c.slides.entries.imgs[b];"undefined"==typeof e||"undefined"==typeof e.fadeIn?c.slides.entries.imgs[b]=e=a('<img src="'+d+'">').on("load",function(){e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):e.is(":visible")||e.is(":animated")||e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var a,b=this,c=b.slides;for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return void b.showSlide(a)}},displayChapters:function(){var a,b=this;for(a=0;a<b.tracks.length;a++)if("chapters"==b.tracks[a].kind&&b.tracks[a].isLoaded){b.drawChapters(b.tracks[a]),b.hasChapters=!0;break}},drawChapters:function(b){var c,d,e=this,f=0,g=0;for(e.chapters.empty(),c=0;c<b.entries.times.length;c++)d=b.entries.times[c].stop-b.entries.times[c].start,f=Math.floor(d/e.media.duration*100),(f+g>100||c==b.entries.times.length-1&&100>f+g)&&(f=100-g),e.chapters.append(a('<div class="mejs-chapter" rel="'+b.entries.times[c].start+'" style="left: '+g.toString()+"%;width: "+f.toString()+'%;"><div class="mejs-chapter-block'+(c==b.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+b.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(b.entries.times[c].start,e.options)+"&ndash;"+mejs.Utility.secondsToTimeCode(b.entries.times[c].stop,e.options)+"</span></div></div>")),g+=f;e.chapters.find("div.mejs-chapter").click(function(){e.media.setCurrentTime(parseFloat(a(this).attr("rel"))),e.media.paused&&e.media.play()}),e.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(b){for(var c,d,e,f=0,g=mejs.TrackFormatParser.split2(b,/\r?\n/),h={text:[],times:[]};f<g.length;f++){if(c=this.pattern_timecode.exec(g[f]),c&&f<g.length){for(f-1>=0&&""!==g[f-1]&&(e=g[f-1]),f++,d=g[f],f++;""!==g[f]&&f<g.length;)d=d+"\n"+g[f],f++;d=a.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),h.text.push(d),h.times.push({identifier:e,start:0===mejs.Utility.convertSMPTEtoSeconds(c[1])?.2:mejs.Utility.convertSMPTEtoSeconds(c[1]),stop:mejs.Utility.convertSMPTEtoSeconds(c[3]),settings:c[5]})}e=""}return h}},dfxp:{parse:function(b){b=a(b).filter("tt");var c,d,e=0,f=b.children("div").eq(0),g=f.find("p"),h=b.find("#"+f.attr("style")),i={text:[],times:[]};if(h.length){var j=h.removeAttr("id").get(0).attributes;if(j.length)for(c={},e=0;e<j.length;e++)c[j[e].name.split(":")[1]]=j[e].value}for(e=0;e<g.length;e++){var k,l={start:null,stop:null,style:null};if(g.eq(e).attr("begin")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("begin"))),!l.start&&g.eq(e-1).attr("end")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e-1).attr("end"))),g.eq(e).attr("end")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("end"))),!l.stop&&g.eq(e+1).attr("begin")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e+1).attr("begin"))),c){k="";for(var m in c)k+=m+":"+c[m]+";"}k&&(l.style=k),0===l.start&&(l.start=.2),i.times.push(l),d=a.trim(g.eq(e).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.text.push(d)}return i}},split2:function(a,b){return a.split(b)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(a,b){var c,d=[],e="";for(c=0;c<a.length;c++)e+=a.substring(c,c+1),b.test(e)&&(d.push(e.replace(b,"")),e="");return d.push(e),d})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{sourcechooserText:""}),a.extend(MediaElementPlayer.prototype,{buildsourcechooser:function(b,c,d,e){var f,g=this,h=g.options.sourcechooserText?g.options.sourcechooserText:mejs.i18n.t("mejs.source-chooser");b.sourcechooserButton=a('<div class="mejs-button mejs-sourcechooser-button"><button type="button" role="button" aria-haspopup="true" aria-owns="'+g.id+'" title="'+h+'" aria-label="'+h+'"></button><div class="mejs-sourcechooser-selector mejs-offscreen" role="menu" aria-expanded="false" aria-hidden="true"><ul></ul></div></div>').appendTo(c).hover(function(){clearTimeout(f),b.showSourcechooserSelector()},function(){a(this);f=setTimeout(function(){b.hideSourcechooserSelector()},500)}).on("keydown",function(c){var d=c.keyCode;switch(d){case 32:mejs.MediaFeatures.isFirefox||b.showSourcechooserSelector(),a(this).find(".mejs-sourcechooser-selector").find("input[type=radio]:checked").first().focus();break;case 13:b.showSourcechooserSelector(),a(this).find(".mejs-sourcechooser-selector").find("input[type=radio]:checked").first().focus();break;case 27:b.hideSourcechooserSelector(),a(this).find("button").focus();break;default:return!0}}).on("focusout",mejs.Utility.debounce(function(c){setTimeout(function(){var c=a(document.activeElement).closest(".mejs-sourcechooser-selector");c.length||b.hideSourcechooserSelector()},0)},100)).delegate("input[type=radio]","click",function(){a(this).attr("aria-selected",!0).attr("checked","checked"),a(this).closest(".mejs-sourcechooser-selector").find("input[type=radio]").not(this).attr("aria-selected","false").removeAttr("checked");var b=this.value;if(e.currentSrc!=b){var c=e.currentTime,d=e.paused;e.pause(),e.setSrc(b),e.addEventListener("loadedmetadata",function(a){e.currentTime=c},!0);var f=function(a){d||e.play(),e.removeEventListener("canplay",f,!0)};e.addEventListener("canplay",f,!0),e.load()}}).delegate("button","click",function(c){a(this).siblings(".mejs-sourcechooser-selector").hasClass("mejs-offscreen")?(b.showSourcechooserSelector(),a(this).siblings(".mejs-sourcechooser-selector").find("input[type=radio]:checked").first().focus()):b.hideSourcechooserSelector()});for(var i in this.node.children){var j=this.node.children[i];"SOURCE"!==j.nodeName||"probably"!=e.canPlayType(j.type)&&"maybe"!=e.canPlayType(j.type)||b.addSourceButton(j.src,j.title,j.type,e.src==j.src)}},addSourceButton:function(b,c,d,e){var f=this;(""===c||void 0==c)&&(c=b),d=d.split("/")[1],f.sourcechooserButton.find("ul").append(a('<li><input type="radio" name="'+f.id+'_sourcechooser" id="'+f.id+"_sourcechooser_"+c+d+'" role="menuitemradio" value="'+b+'" '+(e?'checked="checked"':"")+'aria-selected="'+e+'" /><label for="'+f.id+"_sourcechooser_"+c+d+'" aria-hidden="true">'+c+" ("+d+")</label></li>")),f.adjustSourcechooserBox()},adjustSourcechooserBox:function(){var a=this;a.sourcechooserButton.find(".mejs-sourcechooser-selector").height(a.sourcechooserButton.find(".mejs-sourcechooser-selector ul").outerHeight(!0))},hideSourcechooserSelector:function(){this.sourcechooserButton.find(".mejs-sourcechooser-selector").addClass("mejs-offscreen").attr("aria-expanded","false").attr("aria-hidden","true").find("input[type=radio]").attr("tabindex","-1")},showSourcechooserSelector:function(){this.sourcechooserButton.find(".mejs-sourcechooser-selector").removeClass("mejs-offscreen").attr("aria-expanded","true").attr("aria-hidden","false").find("input[type=radio]").attr("tabindex","0")}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){return"undefined"==typeof a.enterFullScreen?null:a.isFullScreen?mejs.i18n.t("mejs.fullscreen-off"):mejs.i18n.t("mejs.fullscreen-on")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("mejs.unmute"):mejs.i18n.t("mejs.mute")},click:function(a){a.media.muted?a.setMuted(!1):a.setMuted(!0)}},{isSeparator:!0},{render:function(a){return mejs.i18n.t("mejs.download-video")},click:function(a){window.location.href=a.media.currentSrc}}]}),a.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(b,c,d,e){b.contextMenu=a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(),b.container.bind("contextmenu",function(a){return b.isContextMenuEnabled?(a.preventDefault(),b.renderContextMenu(a.clientX-1,a.clientY-1),!1):void 0}),b.container.bind("click",function(){b.contextMenu.hide()}),b.contextMenu.bind("mouseleave",function(){b.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer(),a.contextMenuTimer=setTimeout(function(){a.hideContextMenu(),a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;null!=a&&(clearTimeout(a),delete a,a=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,c){for(var d=this,e="",f=d.options.contextMenuItems,g=0,h=f.length;h>g;g++)if(f[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var i=f[g].render(d);null!=i&&(e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+1e6*Math.random()+'">'+i+"</div>")}d.contextMenu.empty().append(a(e)).css({top:c,left:b}).show(),d.contextMenu.find(".mejs-contextmenu-item").each(function(){var b=a(this),c=parseInt(b.data("itemindex"),10),e=d.options.contextMenuItems[c];"undefined"!=typeof e.show&&e.show(b,d),b.click(function(){"undefined"!=typeof e.click&&e.click(d),d.contextMenu.hide()})}),setTimeout(function(){d.killControlsTimer("rev3")},100)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:""}),a.extend(MediaElementPlayer.prototype,{buildskipback:function(b,c,d,e){var f=this,g=mejs.i18n.t("mejs.time-skip-back",f.options.skipBackInterval),h=f.options.skipBackText?f.options.skipBackText:g;a('<div class="mejs-button mejs-skip-back-button"><button type="button" aria-controls="'+f.id+'" title="'+h+'" aria-label="'+h+'">'+f.options.skipBackInterval+"</button></div>").appendTo(c).click(function(){e.setCurrentTime(Math.max(e.currentTime-f.options.skipBackInterval,0)),a(this).find("button").blur()})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{postrollCloseText:""}),a.extend(MediaElementPlayer.prototype,{buildpostroll:function(b,c,d,e){var f=this,g=f.options.postrollCloseText?f.options.postrollCloseText:mejs.i18n.t("mejs.close"),h=f.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof h&&(b.postroll=a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+g+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(),f.media.addEventListener("ended",function(c){a.ajax({dataType:"html",url:h,success:function(a,b){d.find(".mejs-postroll-layer-content").html(a)}}),b.postroll.show()},!1))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{markerColor:"#E9BC3D",markers:[],markerCallback:function(){}}),a.extend(MediaElementPlayer.prototype,{buildmarkers:function(a,b,c,d){var e=0,f=-1,g=-1,h=-1,i=-1;for(e=0;e<a.options.markers.length;++e)b.find(".mejs-time-total").append('<span class="mejs-time-marker"></span>');d.addEventListener("durationchange",function(c){a.setmarkers(b)}),d.addEventListener("timeupdate",function(b){for(f=Math.floor(d.currentTime),h>f?i>f&&(i=-1):h=f,e=0;e<a.options.markers.length;++e)g=Math.floor(a.options.markers[e]),f===g&&g!==i&&(a.options.markerCallback(d,d.currentTime),i=g)},!1)},setmarkers:function(b){var c,d=this,e=0;for(e=0;e<d.options.markers.length;++e)Math.floor(d.options.markers[e])<=d.media.duration&&Math.floor(d.options.markers[e])>=0&&(c=100*Math.floor(d.options.markers[e])/d.media.duration,a(b.find(".mejs-time-marker")[e]).css({width:"1px",left:c+"%",background:d.options.markerColor}))}})}(mejs.$);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/mejs-skins.css DELETED
@@ -1,289 +0,0 @@
1
- /* TED player */
2
- .mejs-container.mejs-ted {
3
-
4
- }
5
- .mejs-ted .mejs-controls {
6
- background: #eee;
7
- height: 65px;
8
- }
9
-
10
- .mejs-ted .mejs-button,
11
- .mejs-ted .mejs-time {
12
- position: absolute;
13
- background: #ddd;
14
- }
15
- .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-total {
16
- background-color: none;
17
- background: url(controls-ted.png) repeat-x 0 -52px;
18
- height: 6px;
19
- }
20
- .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-buffering {
21
- height: 6px;
22
- }
23
- .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-loaded {
24
- background-color: none;
25
- background: url(controls-ted.png) repeat-x 0 -52px;
26
- width: 0;
27
- height: 6px;
28
- }
29
- .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-current {
30
- width: 0;
31
- height: 6px;
32
- background-color: none;
33
- background: url(controls-ted.png) repeat-x 0 -59px;
34
- }
35
- .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-handle {
36
- display: block;
37
- margin: 0;
38
- width: 14px;
39
- height: 21px;
40
- top: -7px;
41
- border: 0;
42
- background: url(controls-ted.png) no-repeat 0 0;
43
- }
44
- .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-float {
45
- display: none;
46
- }
47
- .mejs-ted .mejs-controls .mejs-playpause-button {
48
- top: 29px;
49
- left: 9px;
50
- width: 49px;
51
- height: 28px;
52
- }
53
- .mejs-ted .mejs-controls .mejs-playpause-button button {
54
- width: 49px;
55
- height: 28px;
56
- background: url(controls-ted.png) no-repeat -50px -23px;
57
- margin: 0;
58
- padding: 0;
59
- }
60
- .mejs-ted .mejs-controls .mejs-pause button {
61
- background-position: 0 -23px;
62
- }
63
-
64
- .mejs-ted .mejs-controls .mejs-fullscreen-button {
65
- top: 34px;
66
- right: 9px;
67
- width: 17px;
68
- height: 15px;
69
- background : none;
70
- }
71
- .mejs-ted .mejs-controls .mejs-fullscreen-button button {
72
- width: 19px;
73
- height: 17px;
74
- background: transparent url(controls-ted.png) no-repeat 0 -66px;
75
- margin: 0;
76
- padding: 0;
77
- }
78
- .mejs-ted .mejs-controls .mejs-unfullscreen button {
79
- background: transparent url(controls-ted.png) no-repeat -21px -66px;
80
- margin: 0;
81
- padding: 0;
82
- }
83
- .mejs-ted .mejs-controls .mejs-volume-button {
84
- top: 30px;
85
- right: 35px;
86
- width: 24px;
87
- height: 22px;
88
- }
89
- .mejs-ted .mejs-controls .mejs-mute button {
90
- background: url(controls-ted.png) no-repeat -15px 0;
91
- width: 24px;
92
- height: 22px;
93
- margin: 0;
94
- padding: 0;
95
- }
96
- .mejs-ted .mejs-controls .mejs-unmute button {
97
- background: url(controls-ted.png) no-repeat -40px 0;
98
- width: 24px;
99
- height: 22px;
100
- margin: 0;
101
- padding: 0;
102
- }
103
- .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-slider {
104
- background: #fff;
105
- border: solid 1px #aaa;
106
- border-width: 1px 1px 0 1px;
107
- width: 22px;
108
- height: 65px;
109
- top: -65px;
110
- }
111
- .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-total {
112
- background: url(controls-ted.png) repeat-y -41px -66px;
113
- left: 8px;
114
- width: 6px;
115
- height: 50px;
116
- }
117
- .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-current {
118
- left: 8px;
119
- width: 6px;
120
- background: url(controls-ted.png) repeat-y -48px -66px;
121
- height: 50px;
122
- }
123
-
124
- .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-handle {
125
- display: none;
126
- }
127
-
128
- .mejs-ted .mejs-controls .mejs-time span {
129
- color: #333;
130
- }
131
- .mejs-ted .mejs-controls .mejs-currenttime-container {
132
- position: absolute;
133
- top: 32px;
134
- right: 100px;
135
- border: solid 1px #999;
136
- background: #fff;
137
- color: #333;
138
- padding-top: 2px;
139
- border-radius: 3px;
140
- color: #333;
141
- }
142
- .mejs-ted .mejs-controls .mejs-duration-container {
143
-
144
- position: absolute;
145
- top: 32px;
146
- right: 65px;
147
- border: solid 1px #999;
148
- background: #fff;
149
- color: #333;
150
- padding-top: 2px;
151
- border-radius: 3px;
152
- color: #333;
153
- }
154
-
155
- .mejs-ted .mejs-controls .mejs-time button{
156
- color: #333;
157
- }
158
- .mejs-ted .mejs-controls .mejs-captions-button {
159
- display: none;
160
- }
161
- /* END: TED player */
162
-
163
-
164
- /* WMP player */
165
- .mejs-container.mejs-wmp {
166
-
167
- }
168
- .mejs-wmp .mejs-controls {
169
- background: transparent url(controls-wmp-bg.png) center 16px no-repeat;
170
- height: 65px;
171
- }
172
-
173
- .mejs-wmp .mejs-button,
174
- .mejs-wmp .mejs-time {
175
- position: absolute;
176
- background: transparent;
177
- }
178
- .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-total {
179
- background-color: transparent;
180
- border: solid 1px #ccc;
181
- height: 3px;
182
- }
183
- .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-buffering {
184
- height: 3px;
185
- }
186
- .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-loaded {
187
- background-color: rgba(255,255,255,0.3);
188
- width: 0;
189
- height: 3px;
190
- }
191
- .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-current {
192
- width: 0;
193
- height: 1px;
194
- background-color: #014CB6;
195
- border: solid 1px #7FC9FA;
196
- border-width: 1px 0;
197
- border-color: #7FC9FA #fff #619FF2 #fff;
198
- }
199
- .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-handle {
200
- display: block;
201
- margin: 0;
202
- width: 16px;
203
- height: 9px;
204
- top: -3px;
205
- border: 0;
206
- background: url(controls-wmp.png) no-repeat 0 -80px;
207
- }
208
- .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-float {
209
- display: none;
210
- }
211
- .mejs-wmp .mejs-controls .mejs-playpause-button {
212
- top: 10px;
213
- left: 50%;
214
- margin: 10px 0 0 -20px;
215
- width: 40px;
216
- height: 40px;
217
-
218
- }
219
- .mejs-wmp .mejs-controls .mejs-playpause-button button {
220
- width: 40px;
221
- height: 40px;
222
- background: url(controls-wmp.png) no-repeat 0 0;
223
- margin: 0;
224
- padding: 0;
225
- }
226
- .mejs-wmp .mejs-controls .mejs-pause button {
227
- background-position: 0 -40px;
228
- }
229
-
230
- .mejs-wmp .mejs-controls .mejs-currenttime-container {
231
- position: absolute;
232
- top: 25px;
233
- left: 50%;
234
- margin-left: -93px;
235
- }
236
- .mejs-wmp .mejs-controls .mejs-duration-container {
237
- position: absolute;
238
- top: 25px;
239
- left: 50%;
240
- margin-left: -58px;
241
- }
242
-
243
-
244
- .mejs-wmp .mejs-controls .mejs-volume-button {
245
- top: 32px;
246
- right: 50%;
247
- margin-right: -55px;
248
- width: 20px;
249
- height: 15px;
250
- }
251
- .mejs-wmp .mejs-controls .mejs-volume-button button {
252
- margin: 0;
253
- padding: 0;
254
- background: url(controls-wmp.png) no-repeat -42px -17px;
255
- width: 20px;
256
- height: 15px;
257
- }
258
- .mejs-wmp .mejs-controls .mejs-unmute button {
259
- margin: 0;
260
- padding: 0;
261
- background: url(controls-wmp.png) no-repeat -42px 0;
262
- width: 20px;
263
- height: 15px;
264
- }
265
- .mejs-wmp .mejs-controls .mejs-volume-button .mejs-volume-slider {
266
- background: rgba(102,102,102,0.6);
267
- }
268
-
269
- .mejs-wmp .mejs-controls .mejs-fullscreen-button {
270
- top: 32px;
271
- right: 50%;
272
- margin-right: -82px;
273
- width: 15px;
274
- height: 14px;
275
- }
276
- .mejs-wmp .mejs-controls .mejs-fullscreen-button button {
277
- margin: 0;
278
- padding: 0;
279
- background: url(controls-wmp.png) no-repeat -63px 0;
280
- width: 15px;
281
- height: 14px;
282
- }
283
- .mejs-wmp .mejs-controls .mejs-captions-button {
284
- display: none;
285
- }
286
- /* END: WMP player */
287
-
288
-
289
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mediaelement/silverlightmediaelement.xap DELETED
Binary file
mediaelement/v4/lang/ca.js ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Catalan
5
+ *
6
+ * @author
7
+ * Tongro
8
+ *
9
+ * @see core/i18n.js
10
+ */
11
+ (function (exports) {
12
+ if (exports.ca === undefined) {
13
+ exports.ca = {
14
+ 'mejs.plural-form': 1,
15
+ 'mejs.download-file': 'Descarregar arxiu',
16
+ 'mejs.install-flash': 'Esteu utilitzant un navegador que no tingui Flash Player activat o instal·lat. Activeu el vostre complement Flash Player o descarregueu la versió més recent de https://get.adobe.com/flashplayer/',
17
+ 'mejs.fullscreen': 'Pantalla completa',
18
+ 'mejs.play': 'Reproducció',
19
+ 'mejs.pause': 'Pausa',
20
+ 'mejs.time-slider': 'Control lliscant de temps',
21
+ 'mejs.time-help-text': 'Utilitzeu les tecles de fletxa esquerra / dreta per avançar un segon, fletxes amunt / avall per avançar deu segons.',
22
+ 'mejs.live-broadcast' : 'Transmissió en directe',
23
+ 'mejs.volume-help-text': 'Utilitzeu les tecles de fletxa amunt / avall per augmentar o disminuir el volum.',
24
+ 'mejs.unmute': 'Reactivar silenci',
25
+ 'mejs.mute': 'Silenci',
26
+ 'mejs.volume-slider': 'Control deslizador de volum',
27
+ 'mejs.video-player': 'Reproductor de vídeo',
28
+ 'mejs.audio-player': 'Reproductor d\'àudio',
29
+ 'mejs.captions-subtitles': 'Llegendes/Subtítols',
30
+ 'mejs.captions-chapters': 'Capítols',
31
+ 'mejs.none': 'Ningú',
32
+ 'mejs.afrikaans': 'Afrikaans',
33
+ 'mejs.albanian': 'Albanès',
34
+ 'mejs.arabic': 'Àrab',
35
+ 'mejs.belarusian': 'Bielorús',
36
+ 'mejs.bulgarian': 'Búlgar',
37
+ 'mejs.catalan': 'Català',
38
+ 'mejs.chinese': 'Xinès',
39
+ 'mejs.chinese-simplified': 'Xinès (Simplificat)',
40
+ 'mejs.chinese-traditional': 'Xinès (Tradicional)',
41
+ 'mejs.croatian': 'Croat',
42
+ 'mejs.czech': 'Txec',
43
+ 'mejs.danish': 'Danès',
44
+ 'mejs.dutch': 'Holandès',
45
+ 'mejs.english': 'Anglès',
46
+ 'mejs.estonian': 'Estonià',
47
+ 'mejs.filipino': 'Filipí',
48
+ 'mejs.finnish': 'Finlandès',
49
+ 'mejs.french': 'Francès',
50
+ 'mejs.galician': 'Gallec',
51
+ 'mejs.german': 'Alemany',
52
+ 'mejs.greek': 'Grec',
53
+ 'mejs.haitian-creole': 'Crioll haitià',
54
+ 'mejs.hebrew': 'Hebreu',
55
+ 'mejs.hindi': 'Hindi',
56
+ 'mejs.hungarian': 'Hongarès',
57
+ 'mejs.icelandic': 'Islandès',
58
+ 'mejs.indonesian': 'Indonesi',
59
+ 'mejs.irish': 'Irlandès',
60
+ 'mejs.italian': 'Italià',
61
+ 'mejs.japanese': 'Japonès',
62
+ 'mejs.korean': 'Coreà',
63
+ 'mejs.latvian': 'Letó',
64
+ 'mejs.lithuanian': 'Lituà',
65
+ 'mejs.macedonian': 'Macedoni',
66
+ 'mejs.malay': 'Malai',
67
+ 'mejs.maltese': 'Maltès',
68
+ 'mejs.norwegian': 'Noruec',
69
+ 'mejs.persian': 'Persa',
70
+ 'mejs.polish': 'Polonès',
71
+ 'mejs.portuguese': 'Portuguès',
72
+ 'mejs.romanian': 'Romanès',
73
+ 'mejs.russian': 'Rus',
74
+ 'mejs.serbian': 'Serbi',
75
+ 'mejs.slovak': 'Eslovac',
76
+ 'mejs.slovenian': 'Eslovè',
77
+ 'mejs.spanish': 'Espanyol',
78
+ 'mejs.swahili': 'Suahili',
79
+ 'mejs.swedish': 'Suec',
80
+ 'mejs.tagalog': 'Tagalog',
81
+ 'mejs.thai': 'Thai',
82
+ 'mejs.turkish': 'Turc',
83
+ 'mejs.ukrainian': 'Ucraïnès',
84
+ 'mejs.vietnamese': 'Vietnamita',
85
+ 'mejs.welsh': 'Gal·lès',
86
+ 'mejs.yiddish': 'Yiddish'
87
+ };
88
+ }
89
+ })(mejs.i18n);
mediaelement/v4/lang/cs.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Czech
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.cs === undefined) {
14
+ exports.cs = {
15
+ 'mejs.plural-form': 8,
16
+ 'mejs.download-file': 'Stáhnout soubor',
17
+ 'mejs.install-flash': 'Používáte prohlížeč, který nemá Flash Player povolen nebo nainstalován. Zapněte plugin Flash Player nebo stáhněte nejnovější verzi z adresy https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Celá obrazovka',
19
+ 'mejs.play': 'Přehrát',
20
+ 'mejs.pause': 'Pozastavit',
21
+ 'mejs.time-slider': 'Posuvný běžec nastavení času',
22
+ 'mejs.time-help-text': 'Použijte tlačítka se šipkami doleva / doprava pro posun o jednu vteřinu, tlačítka se šipkami nahoru / dolů pro posun o deset vteřin.',
23
+ 'mejs.live-broadcast' : 'Živé vysílání',
24
+ 'mejs.volume-help-text': 'Použijte tlačítka se šipkami nahoru / dolů pro zesílení nebo zeslabení hlasitosti.',
25
+ 'mejs.unmute': 'Zapnout zvuk',
26
+ 'mejs.mute': 'Vypnout zvuk',
27
+ 'mejs.volume-slider': 'Posuvný běžec nastavení hlasitosti',
28
+ 'mejs.video-player': 'Přehrávač videa',
29
+ 'mejs.audio-player': 'Přehrávač hudby',
30
+ 'mejs.captions-subtitles': 'Titulky',
31
+ 'mejs.captions-chapters': 'Kapitoly',
32
+ 'mejs.none': 'Žádný',
33
+ 'mejs.afrikaans': 'Afrikánština',
34
+ 'mejs.albanian': 'Albánský',
35
+ 'mejs.arabic': 'Arabština',
36
+ 'mejs.belarusian': 'Běloruské',
37
+ 'mejs.bulgarian': 'Bulharský',
38
+ 'mejs.catalan': 'Katalánština',
39
+ 'mejs.chinese': 'čínština',
40
+ 'mejs.chinese-simplified': 'Zjednodušená čínština)',
41
+ 'mejs.chinese-traditional': 'Čínština (tradiční)',
42
+ 'mejs.croatian': 'Chorvatský',
43
+ 'mejs.czech': 'čeština',
44
+ 'mejs.danish': 'Dánština',
45
+ 'mejs.dutch': 'Holandský',
46
+ 'mejs.english': 'Angličtina',
47
+ 'mejs.estonian': 'Estonština',
48
+ 'mejs.filipino': 'Filipino',
49
+ 'mejs.finnish': 'Finština',
50
+ 'mejs.french': 'Francouzština',
51
+ 'mejs.galician': 'Galicijština',
52
+ 'mejs.german': 'Němec',
53
+ 'mejs.greek': 'řecký',
54
+ 'mejs.haitian-creole': 'Haitian kreolský',
55
+ 'mejs.hebrew': 'Hebrejština',
56
+ 'mejs.hindi': 'Hindština',
57
+ 'mejs.hungarian': 'Maďarský',
58
+ 'mejs.icelandic': 'Islandský',
59
+ 'mejs.indonesian': 'Indonéština',
60
+ 'mejs.irish': 'Irština',
61
+ 'mejs.italian': 'Italština',
62
+ 'mejs.japanese': 'Japonský',
63
+ 'mejs.korean': 'Korejština',
64
+ 'mejs.latvian': 'Lotyšský',
65
+ 'mejs.lithuanian': 'Lithuanian',
66
+ 'mejs.macedonian': 'Makedonština',
67
+ 'mejs.malay': 'Malay',
68
+ 'mejs.maltese': 'Maltština',
69
+ 'mejs.norwegian': 'Norština',
70
+ 'mejs.persian': 'Peršan',
71
+ 'mejs.polish': 'Polština',
72
+ 'mejs.portuguese': 'Portugalština',
73
+ 'mejs.romanian': 'Rumunština',
74
+ 'mejs.russian': 'Ruština',
75
+ 'mejs.serbian': 'Srbština',
76
+ 'mejs.slovak': 'Slovák',
77
+ 'mejs.slovenian': 'Slovinský',
78
+ 'mejs.spanish': 'španělština',
79
+ 'mejs.swahili': 'Svahilský',
80
+ 'mejs.swedish': 'švédský',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Thajština',
83
+ 'mejs.turkish': 'Turečtina',
84
+ 'mejs.ukrainian': 'Ukrajinština',
85
+ 'mejs.vietnamese': 'Vietnamština',
86
+ 'mejs.welsh': 'Velština',
87
+ 'mejs.yiddish': 'Jidiš'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/de.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * German
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.de === undefined) {
14
+ exports.de = {
15
+ 'mejs.plural-form': 1,
16
+ 'mejs.download-file': 'Datei herunterladen',
17
+ 'mejs.install-flash': 'Ihr Browser unterstützt kein Flash. Bitte aktivieren Sie Flash bzw. laden Sie die aktuellste Flash-Version herunter unter https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Vollbild',
19
+ 'mejs.play': 'Abspielen',
20
+ 'mejs.pause': 'Pause',
21
+ 'mejs.time-slider': 'Zeitschieberegler',
22
+ 'mejs.time-help-text': 'Verwende die Pfeiltaste nach links/rechts, um eine Sekunde zu spulen, hoch/runter um zehn Sekunden zu spulen.',
23
+ 'mejs.live-broadcast' : 'Live-Übertragung',
24
+ 'mejs.volume-help-text': 'Verwende die Pfeiltaste nach oben/nach unten um die Lautstärke zu erhöhen oder zu verringern.',
25
+ 'mejs.unmute': 'Stummschaltung aufheben',
26
+ 'mejs.mute': 'Stummschalten',
27
+ 'mejs.volume-slider': 'Lautstärkeregler',
28
+ 'mejs.video-player': 'Video-Player',
29
+ 'mejs.audio-player': 'Audio-Player',
30
+ 'mejs.captions-subtitles': 'Überschriften/Untertitel',
31
+ 'mejs.captions-chapters': 'Kapitel',
32
+ 'mejs.none': 'Keine',
33
+ 'mejs.afrikaans': 'Afrikanisch',
34
+ 'mejs.albanian': 'Albanisch',
35
+ 'mejs.arabic': 'Arabisch',
36
+ 'mejs.belarusian': 'Weißrussisch',
37
+ 'mejs.bulgarian': 'Bulgarisch',
38
+ 'mejs.catalan': 'Katalanisch',
39
+ 'mejs.chinese': 'Chinesisch',
40
+ 'mejs.chinese-simplified': 'Chinesisch (Vereinfacht)',
41
+ 'mejs.chinese-traditional': 'Chinesisch (Traditionell)',
42
+ 'mejs.croatian': 'Kroatisch',
43
+ 'mejs.czech': 'Tschechisch',
44
+ 'mejs.danish': 'Dänisch',
45
+ 'mejs.dutch': 'Niederländisch',
46
+ 'mejs.english': 'Englisch',
47
+ 'mejs.estonian': 'Estnisch',
48
+ 'mejs.filipino': 'Filipino',
49
+ 'mejs.finnish': 'Finnisch',
50
+ 'mejs.french': 'Französisch',
51
+ 'mejs.galician': 'Galicisch',
52
+ 'mejs.german': 'Deutsch',
53
+ 'mejs.greek': 'Griechisch',
54
+ 'mejs.haitian-creole': 'Haitianisch',
55
+ 'mejs.hebrew': 'Hebräisch',
56
+ 'mejs.hindi': 'Hindi',
57
+ 'mejs.hungarian': 'Ungarisch',
58
+ 'mejs.icelandic': 'Isländisch',
59
+ 'mejs.indonesian': 'Indonesisch',
60
+ 'mejs.irish': 'Irisch',
61
+ 'mejs.italian': 'Italienisch',
62
+ 'mejs.japanese': 'Japanisch',
63
+ 'mejs.korean': 'Koreanisch',
64
+ 'mejs.latvian': 'Lettisch',
65
+ 'mejs.lithuanian': 'Litauisch',
66
+ 'mejs.macedonian': 'Mazedonisch',
67
+ 'mejs.malay': 'Malaysisch',
68
+ 'mejs.maltese': 'Maltesisch',
69
+ 'mejs.norwegian': 'Norwegisch',
70
+ 'mejs.persian': 'Persisch',
71
+ 'mejs.polish': 'Polnisch',
72
+ 'mejs.portuguese': 'Portugiesisch',
73
+ 'mejs.romanian': 'Rumänisch',
74
+ 'mejs.russian': 'Russisch',
75
+ 'mejs.serbian': 'Serbisch',
76
+ 'mejs.slovak': 'Slovakisch',
77
+ 'mejs.slovenian': 'Slovenisch',
78
+ 'mejs.spanish': 'Spanisch',
79
+ 'mejs.swahili': 'Swahili',
80
+ 'mejs.swedish': 'Schwedisch',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Thailändisch',
83
+ 'mejs.turkish': 'Türkisch',
84
+ 'mejs.ukrainian': 'Ukrainisch',
85
+ 'mejs.vietnamese': 'Vietnamnesisch',
86
+ 'mejs.welsh': 'Walisisch',
87
+ 'mejs.yiddish': 'Jiddisch'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/es.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Spanish
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ * Rafael Miranda (GitHub: @rafa8626)
10
+ *
11
+ * @see core/i18n.js
12
+ */(function (exports) {
13
+ if (exports.es === undefined) {
14
+ exports.es = {
15
+ 'mejs.plural-form': 1,
16
+ 'mejs.download-file': 'Descargar archivo',
17
+ 'mejs.install-flash': 'Esta usando un navegador que no tiene activado o instalado el reproductor de Flash. Por favor active el plugin del reproductor de Flash o descargue la versión más reciente en https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Pantalla completa',
19
+ 'mejs.play': 'Reproducción',
20
+ 'mejs.pause': 'Pausa',
21
+ 'mejs.time-slider': 'Control deslizante de tiempo',
22
+ 'mejs.time-help-text': 'Use las flechas Izquierda/Derecha para avanzar un segundo y las flechas Arriba/Abajo para avanzar diez segundos.',
23
+ 'mejs.live-broadcast': 'Transmisión en Vivo',
24
+ 'mejs.volume-help-text': 'Use las flechas Arriba/Abajo para subir o bajar el volumen.',
25
+ 'mejs.unmute': 'Reactivar silencio',
26
+ 'mejs.mute': 'Silencio',
27
+ 'mejs.volume-slider': 'Control deslizante de volumen',
28
+ 'mejs.video-player': 'Reproductor de video',
29
+ 'mejs.audio-player': 'Reproductor de audio',
30
+ 'mejs.captions-subtitles': 'Leyendas/Subtítulos',
31
+ 'mejs.captions-chapters': 'Capítulos',
32
+ 'mejs.none': 'Ninguno',
33
+ 'mejs.afrikaans': 'Afrikaans',
34
+ 'mejs.albanian': 'Albano',
35
+ 'mejs.arabic': 'Árabe',
36
+ 'mejs.belarusian': 'Bielorruso',
37
+ 'mejs.bulgarian': 'Búlgaro',
38
+ 'mejs.catalan': 'Catalán',
39
+ 'mejs.chinese': 'Chino',
40
+ 'mejs.chinese-simplified': 'Chino (Simplificado)',
41
+ 'mejs.chinese-traditional': 'Chino (Tradicional)',
42
+ 'mejs.croatian': 'Croata',
43
+ 'mejs.czech': 'Checo',
44
+ 'mejs.danish': 'Danés',
45
+ 'mejs.dutch': 'Holandés',
46
+ 'mejs.english': 'Inglés',
47
+ 'mejs.estonian': 'Estoniano',
48
+ 'mejs.filipino': 'Filipino',
49
+ 'mejs.finnish': 'Finlandés',
50
+ 'mejs.french': 'Francés',
51
+ 'mejs.galician': 'Gallego',
52
+ 'mejs.german': 'Alemán',
53
+ 'mejs.greek': 'Griego',
54
+ 'mejs.haitian-creole': 'Haitiano Criollo',
55
+ 'mejs.hebrew': 'Hebreo',
56
+ 'mejs.hindi': 'Hindi',
57
+ 'mejs.hungarian': 'Húngaro',
58
+ 'mejs.icelandic': 'Islandés',
59
+ 'mejs.indonesian': 'Indonesio',
60
+ 'mejs.irish': 'Irlandés',
61
+ 'mejs.italian': 'Italiano',
62
+ 'mejs.japanese': 'Japonés',
63
+ 'mejs.korean': 'Coreano',
64
+ 'mejs.latvian': 'Letón',
65
+ 'mejs.lithuanian': 'Lituano',
66
+ 'mejs.macedonian': 'Macedonio',
67
+ 'mejs.malay': 'Malayo',
68
+ 'mejs.maltese': 'Maltés',
69
+ 'mejs.norwegian': 'Noruego',
70
+ 'mejs.persian': 'Persa',
71
+ 'mejs.polish': 'Polaco',
72
+ 'mejs.portuguese': 'Portugués',
73
+ 'mejs.romanian': 'Rumano',
74
+ 'mejs.russian': 'Ruso',
75
+ 'mejs.serbian': 'Serbio',
76
+ 'mejs.slovak': 'Eslovaco',
77
+ 'mejs.slovenian': 'Eslovenio',
78
+ 'mejs.spanish': 'Español',
79
+ 'mejs.swahili': 'Swahili',
80
+ 'mejs.swedish': 'Suizo',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Tailandés',
83
+ 'mejs.turkish': 'Turco',
84
+ 'mejs.ukrainian': 'Ucraniano',
85
+ 'mejs.vietnamese': 'Vietnamita',
86
+ 'mejs.welsh': 'Galés',
87
+ 'mejs.yiddish': 'Yiddish'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/fa.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Persian
5
+ *
6
+ * @author
7
+ * wmateam (GitHub: @wmateam)
8
+ *
9
+ * @see core/i18n.js
10
+ */(function (exports) {
11
+ 'use strict';
12
+
13
+ if (exports.fa === undefined) {
14
+ exports.fa = {
15
+ 'mejs.plural-form': 0,
16
+ 'mejs.download-file': 'دریافت فایل',
17
+ 'mejs.install-flash': 'افزونه فلش پلیر روی مرورگر شما نصب نیست یا غیر فعال است.افزونه را فعال کنید و یا از https://get.adobe.com/flashplayer/ دریافت و نصب کنید.',
18
+ 'mejs.fullscreen': 'تمام صفحه',
19
+ 'mejs.play': 'پخش',
20
+ 'mejs.pause': 'توقف',
21
+ 'mejs.time-slider': 'تغییر زمان',
22
+ 'mejs.time-help-text': 'از کلید های چپ و راست کیبورد برای جا به جایی به میزان یک ثانیه استفاده کنید.همچنین کلید های بالا و پایین 10 ثانیه زمان را جا به جا می کند.',
23
+ 'mejs.live-broadcast': 'پخش زنده',
24
+ 'mejs.volume-help-text': 'از دکمه های بالا و پایین برای کم و زیاد کردن حجم صدا استفاده کنید.',
25
+ 'mejs.unmute': 'صدا دار',
26
+ 'mejs.mute': 'بی صدا',
27
+ 'mejs.volume-slider': 'تغییر حجم صدا',
28
+ 'mejs.video-player': 'پخش کننده ویدیو',
29
+ 'mejs.audio-player': 'پخش کننده صدا',
30
+ 'mejs.captions-subtitles': 'زیرنویس',
31
+ 'mejs.captions-chapters': 'قسمت',
32
+ 'mejs.none': 'هیچ',
33
+ 'mejs.afrikaans': 'آفریقایی',
34
+ 'mejs.albanian': 'آلبانیایی',
35
+ 'mejs.arabic': 'عربی',
36
+ 'mejs.belarusian': 'بلاروس',
37
+ 'mejs.bulgarian': 'بلغاری',
38
+ 'mejs.catalan': 'کاتالان',
39
+ 'mejs.chinese': 'چینی',
40
+ 'mejs.chinese-simplified': 'چینی (ساده شده)',
41
+ 'mejs.chinese-traditional': 'چینی (سنتی)',
42
+ 'mejs.croatian': 'کروات',
43
+ 'mejs.czech': 'چک',
44
+ 'mejs.danish': 'دانمارکی',
45
+ 'mejs.dutch': 'هلندی',
46
+ 'mejs.english': 'انگلیسی',
47
+ 'mejs.estonian': 'استونی',
48
+ 'mejs.filipino': 'فیلیپینی',
49
+ 'mejs.finnish': 'فنلاندری',
50
+ 'mejs.french': 'فرانسوی',
51
+ 'mejs.galician': 'گالیسی',
52
+ 'mejs.german': 'آلمانی',
53
+ 'mejs.greek': 'یونانی',
54
+ 'mejs.haitian-creole': 'کریول هائیتی',
55
+ 'mejs.hebrew': 'عبری',
56
+ 'mejs.hindi': 'هندی',
57
+ 'mejs.hungarian': 'مجارستانی',
58
+ 'mejs.icelandic': 'ایسلندی',
59
+ 'mejs.indonesian': 'اندونزی',
60
+ 'mejs.irish': 'ایرلندی',
61
+ 'mejs.italian': 'ایتالیایی',
62
+ 'mejs.japanese': 'ژاپنی',
63
+ 'mejs.korean': 'کره ای',
64
+ 'mejs.latvian': 'لتونی',
65
+ 'mejs.lithuanian': 'لیتوانی',
66
+ 'mejs.macedonian': 'مقدونی',
67
+ 'mejs.malay': 'مالایی',
68
+ 'mejs.maltese': 'مالتی',
69
+ 'mejs.norwegian': 'نروژی',
70
+ 'mejs.persian': 'فارسی',
71
+ 'mejs.polish': 'لهستانی',
72
+ 'mejs.portuguese': 'پرتغالی',
73
+ 'mejs.romanian': 'روانی',
74
+ 'mejs.russian': 'روسی',
75
+ 'mejs.serbian': 'صرب',
76
+ 'mejs.slovak': 'اسلواکی',
77
+ 'mejs.slovenian': 'اسلوونیایی',
78
+ 'mejs.spanish': 'اسپانیایی',
79
+ 'mejs.swahili': 'سواحیلی',
80
+ 'mejs.swedish': 'سوئد',
81
+ 'mejs.tagalog': 'تاگالوگ',
82
+ 'mejs.thai': 'تایلندی',
83
+ 'mejs.turkish': 'ترکی',
84
+ 'mejs.ukrainian': 'اوکراین',
85
+ 'mejs.vietnamese': 'ویتنامی',
86
+ 'mejs.welsh': 'ولزی',
87
+ 'mejs.yiddish': 'ییدیش'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/fr.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * French
5
+ *
6
+ * @author
7
+ * Luc Poupard (Twitter: @klohFR)
8
+ * Jalios (Twitter: @Jalios)
9
+ * Sascha Greuel (Twitter: @SoftCreatR)
10
+ *
11
+ * @see core/i18n.js
12
+ */
13
+ (function (exports) {
14
+ if (exports.fr === undefined) {
15
+ exports.fr = {
16
+ 'mejs.plural-form': 2,
17
+ 'mejs.download-file': 'Télécharger le fichier',
18
+ 'mejs.install-flash': 'Vous utilisez un navigateur sur lequel Flash ne semble pas installé ou activé. Veuillez activer le plugin Flash ou télécharger la dernière version sur https://get.adobe.com/flashplayer/',
19
+ 'mejs.fullscreen': 'Plein écran',
20
+ 'mejs.play': 'Lecture',
21
+ 'mejs.pause': 'Pause',
22
+ 'mejs.time-slider': 'Curseur temporel',
23
+ 'mejs.time-help-text': 'Utilisez les flèches Gauche/Droite du clavier pour avancer d\'une seconde, les flèches Haut/Bas pour avancer de 10 secondes.',
24
+ 'mejs.live-broadcast' : 'Diffusion en direct',
25
+ 'mejs.volume-help-text': 'Utilisez les flèches Haut/Bas du clavier pour augmenter ou diminuer le volume.',
26
+ 'mejs.unmute': 'Activer le son',
27
+ 'mejs.mute': 'Désactiver le son',
28
+ 'mejs.volume-slider': 'Volume',
29
+ 'mejs.video-player': 'Lecteur Vidéo',
30
+ 'mejs.audio-player': 'Lecteur Audio',
31
+ 'mejs.captions-subtitles': 'Sous-titres',
32
+ 'mejs.captions-chapters': 'Chapitres',
33
+ 'mejs.none': 'Aucun',
34
+ 'mejs.afrikaans': 'Afrikaans',
35
+ 'mejs.albanian': 'Albanais',
36
+ 'mejs.arabic': 'Arabe',
37
+ 'mejs.belarusian': 'Biélorusse',
38
+ 'mejs.bulgarian': 'Bulgare',
39
+ 'mejs.catalan': 'Catalan',
40
+ 'mejs.chinese': 'Chinois',
41
+ 'mejs.chinese-simplified': 'Chinois (simplifié)',
42
+ 'mejs.chinese-traditional': 'Chinois (traditionnel)',
43
+ 'mejs.croatian': 'Croate',
44
+ 'mejs.czech': 'Tchèque',
45
+ 'mejs.danish': 'Danois',
46
+ 'mejs.dutch': 'Néerlandais',
47
+ 'mejs.english': 'Anglais',
48
+ 'mejs.estonian': 'Estonien',
49
+ 'mejs.filipino': 'Filipino',
50
+ 'mejs.finnish': 'Finnois',
51
+ 'mejs.french': 'Français',
52
+ 'mejs.galician': 'Galicien',
53
+ 'mejs.german': 'Allemand',
54
+ 'mejs.greek': 'Grec',
55
+ 'mejs.haitian-creole': 'Créole haïtien',
56
+ 'mejs.hebrew': 'Hébreu',
57
+ 'mejs.hindi': 'Hindi',
58
+ 'mejs.hungarian': 'Hongrois',
59
+ 'mejs.icelandic': 'Islandais',
60
+ 'mejs.indonesian': 'Indonésien',
61
+ 'mejs.irish': 'Irlandais',
62
+ 'mejs.italian': 'Italien',
63
+ 'mejs.japanese': 'Japonais',
64
+ 'mejs.korean': 'Coréen',
65
+ 'mejs.latvian': 'Letton',
66
+ 'mejs.lithuanian': 'Lituanien',
67
+ 'mejs.macedonian': 'Macédonien',
68
+ 'mejs.malay': 'Malais',
69
+ 'mejs.maltese': 'Maltais',
70
+ 'mejs.norwegian': 'Norvégien',
71
+ 'mejs.persian': 'Perse',
72
+ 'mejs.polish': 'Polonais',
73
+ 'mejs.portuguese': 'Portugais',
74
+ 'mejs.romanian': 'Roumain',
75
+ 'mejs.russian': 'Russe',
76
+ 'mejs.serbian': 'Serbe',
77
+ 'mejs.slovak': 'Slovaque',
78
+ 'mejs.slovenian': 'Slovène',
79
+ 'mejs.spanish': 'Espagnol',
80
+ 'mejs.swahili': 'Swahili',
81
+ 'mejs.swedish': 'Suédois',
82
+ 'mejs.tagalog': 'Tagalog',
83
+ 'mejs.thai': 'Thaï',
84
+ 'mejs.turkish': 'Turque',
85
+ 'mejs.ukrainian': 'Ukrainien',
86
+ 'mejs.vietnamese': 'Vietnamien',
87
+ 'mejs.welsh': 'Gallois',
88
+ 'mejs.yiddish': 'Yiddish'
89
+ };
90
+ }
91
+ })(mejs.i18n);
mediaelement/v4/lang/hr.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Croatian
5
+ *
6
+ * @author
7
+ * Hrvoj3e (hrvoj3e@gmail.com) * @see core/i18n.js
8
+ */
9
+ (function (exports) {
10
+ if (exports.hr === undefined) {
11
+ exports.hr = {
12
+ 'mejs.plural-form': 7,
13
+ 'mejs.download-file': 'Preuzmi datoteku',
14
+ 'mejs.install-flash': 'Koristite preglednik koji nema omogućen ili instaliran Flash preglednik. Molimo Vas uključite Flash dodatak ili preuzmite najnoviju verziju s https://get.adobe.com/flashplayer/',
15
+ 'mejs.fullscreen': 'Puni zaslon',
16
+ 'mejs.play': 'Pokreni',
17
+ 'mejs.pause': 'Zaustavi',
18
+ 'mejs.time-slider': 'Vremenska traka',
19
+ 'mejs.time-help-text': 'Koristi strelice lijevo/desno za pomak naprijed za 1 sekundu te gore/dolje za pomak od 10 sekundi.',
20
+ 'mejs.live-broadcast' : 'Prijenos uživo',
21
+ 'mejs.volume-help-text': 'Koristi strelice gore/dolje za pojačavanje ili stišavanje.',
22
+ 'mejs.unmute': 'Uključi zvuk',
23
+ 'mejs.mute': 'Isključi zvuk',
24
+ 'mejs.volume-slider': 'Pokazivač razine zvuka',
25
+ 'mejs.video-player': 'Video preglednik',
26
+ 'mejs.audio-player': 'Audio preglednik',
27
+ 'mejs.captions-subtitles': 'Opisi/Prijevodi',
28
+ 'mejs.captions-chapters': 'Poglavlja',
29
+ 'mejs.none': 'Ništa',
30
+ 'mejs.afrikaans': 'Afrički',
31
+ 'mejs.albanian': 'Albanski',
32
+ 'mejs.arabic': 'Arapski',
33
+ 'mejs.belarusian': 'Bjeloruski',
34
+ 'mejs.bulgarian': 'Bugarski',
35
+ 'mejs.catalan': 'Katalonski',
36
+ 'mejs.chinese': 'Kineski',
37
+ 'mejs.chinese-simplified': 'Kineski (jednostavni)',
38
+ 'mejs.chinese-traditional': 'Kineski (tradicionalni)',
39
+ 'mejs.croatian': 'Hrvatski',
40
+ 'mejs.czech': 'Češki',
41
+ 'mejs.danish': 'Danski',
42
+ 'mejs.dutch': 'Nizozemski',
43
+ 'mejs.english': 'Engleski',
44
+ 'mejs.estonian': 'Estonski',
45
+ 'mejs.filipino': 'Filipinski',
46
+ 'mejs.finnish': 'Finski',
47
+ 'mejs.french': 'Francuski',
48
+ 'mejs.galician': 'Galicijski',
49
+ 'mejs.german': 'Njemački',
50
+ 'mejs.greek': 'Grčki',
51
+ 'mejs.haitian-creole': 'Haićanski kreolski',
52
+ 'mejs.hebrew': 'Hebrejski',
53
+ 'mejs.hindi': 'Hindski',
54
+ 'mejs.hungarian': 'Mađarski',
55
+ 'mejs.icelandic': 'Islandski',
56
+ 'mejs.indonesian': 'Indonezijski',
57
+ 'mejs.irish': 'Irski',
58
+ 'mejs.italian': 'Talijanski',
59
+ 'mejs.japanese': 'Japanski',
60
+ 'mejs.korean': 'Korejski',
61
+ 'mejs.latvian': 'Latvijski',
62
+ 'mejs.lithuanian': 'Litvanski',
63
+ 'mejs.macedonian': 'Makedonski',
64
+ 'mejs.malay': 'Malajski',
65
+ 'mejs.maltese': 'Malteški',
66
+ 'mejs.norwegian': 'Norveški',
67
+ 'mejs.persian': 'Perzijski',
68
+ 'mejs.polish': 'Poljski',
69
+ 'mejs.portuguese': 'Portugalski',
70
+ 'mejs.romanian': 'Rumunjski',
71
+ 'mejs.russian': 'Ruski',
72
+ 'mejs.serbian': 'Srpski',
73
+ 'mejs.slovak': 'Slovački',
74
+ 'mejs.slovenian': 'Slovenski',
75
+ 'mejs.spanish': 'Španjolski',
76
+ 'mejs.swahili': 'Svahili',
77
+ 'mejs.swedish': 'Švedski',
78
+ 'mejs.tagalog': 'Tagaloški',
79
+ 'mejs.thai': 'Tajski',
80
+ 'mejs.turkish': 'Turski',
81
+ 'mejs.ukrainian': 'Ukrajinski',
82
+ 'mejs.vietnamese': 'Vijetnamski',
83
+ 'mejs.welsh': 'Velški',
84
+ 'mejs.yiddish': 'Jidiški'
85
+ };
86
+ }
87
+ })(mejs.i18n);
mediaelement/v4/lang/hu.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Hungarian
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.hu === undefined) {
14
+ exports.hu = {
15
+ 'mejs.plural-form': 1,
16
+ 'mejs.download-file': 'Fájl letöltése',
17
+ 'mejs.install-flash': 'Olyan böngészőt használ, amelyhez nincs engedélyezve vagy telepítve a Flash player. Kérjük, kapcsolja be a Flash-lejátszó bővítményét, vagy töltse le a legfrissebb verziót a https://get.adobe.com/flashplayer/ címen',
18
+ 'mejs.fullscreen': 'Teljes képernyő',
19
+ 'mejs.play': 'Lejátszás',
20
+ 'mejs.pause': 'Szünet',
21
+ 'mejs.time-slider': 'Idő csúszka',
22
+ 'mejs.time-help-text': 'Használja a Bal/Jobb nyíl gombokat az egy másodperces léptetéshez, a Fel/Le nyíl gombokat a tíz másodperces léptetéshez.',
23
+ 'mejs.live-broadcast' : 'Élő közvetítés',
24
+ 'mejs.volume-help-text': 'Használja a Fel/Le nyíl gombokat a hangerő növeléséhez vagy csökkentéséhez.',
25
+ 'mejs.unmute': 'Némítás feloldása',
26
+ 'mejs.mute': 'Némítás',
27
+ 'mejs.volume-slider': 'Hangerőcsúszka',
28
+ 'mejs.video-player': 'Videolejátszó',
29
+ 'mejs.audio-player': 'Audiolejátszó',
30
+ 'mejs.captions-subtitles': 'Képaláírás/Feliratok',
31
+ 'mejs.captions-chapters': 'Fejezetek',
32
+ 'mejs.none': 'Nincs',
33
+ 'mejs.afrikaans': 'Afrikaans',
34
+ 'mejs.albanian': 'Albán',
35
+ 'mejs.arabic': 'Arab',
36
+ 'mejs.belarusian': 'Belorusz',
37
+ 'mejs.bulgarian': 'Bolgár',
38
+ 'mejs.catalan': 'Katalán',
39
+ 'mejs.chinese': 'Kínai',
40
+ 'mejs.chinese-simplified': 'Kínai (Egyszerűsített)',
41
+ 'mejs.chinese-traditional': 'Kínai (Hagyományos)',
42
+ 'mejs.croatian': 'Horvát',
43
+ 'mejs.czech': 'Cseh',
44
+ 'mejs.danish': 'Dán',
45
+ 'mejs.dutch': 'Holland',
46
+ 'mejs.english': 'Angol',
47
+ 'mejs.estonian': 'Észt',
48
+ 'mejs.filipino': 'Filippínó',
49
+ 'mejs.finnish': 'Finn',
50
+ 'mejs.french': 'Francia',
51
+ 'mejs.galician': 'Galíciai',
52
+ 'mejs.german': 'Német',
53
+ 'mejs.greek': 'Görög',
54
+ 'mejs.haitian-creole': 'Haiti Kreol',
55
+ 'mejs.hebrew': 'Héber',
56
+ 'mejs.hindi': 'Hindi',
57
+ 'mejs.hungarian': 'Magyar',
58
+ 'mejs.icelandic': 'Izlandi',
59
+ 'mejs.indonesian': 'Indonéz',
60
+ 'mejs.irish': 'Ír',
61
+ 'mejs.italian': 'Olasz',
62
+ 'mejs.japanese': 'Japán',
63
+ 'mejs.korean': 'Koreai',
64
+ 'mejs.latvian': 'Lett',
65
+ 'mejs.lithuanian': 'Litván',
66
+ 'mejs.macedonian': 'Macedóniai',
67
+ 'mejs.malay': 'Maláj',
68
+ 'mejs.maltese': 'Máltai',
69
+ 'mejs.norwegian': 'Norvég',
70
+ 'mejs.persian': 'Perzsa',
71
+ 'mejs.polish': 'Lengyel',
72
+ 'mejs.portuguese': 'Portugál',
73
+ 'mejs.romanian': 'Román',
74
+ 'mejs.russian': 'Orosz',
75
+ 'mejs.serbian': 'Szerb',
76
+ 'mejs.slovak': 'Szlovák',
77
+ 'mejs.slovenian': 'Szlovén',
78
+ 'mejs.spanish': 'Spanyol',
79
+ 'mejs.swahili': 'Szuahéli',
80
+ 'mejs.swedish': 'Svéd',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Thai',
83
+ 'mejs.turkish': 'Török',
84
+ 'mejs.ukrainian': 'Ukrán',
85
+ 'mejs.vietnamese': 'Vietnami',
86
+ 'mejs.welsh': 'Walesi',
87
+ 'mejs.yiddish': 'Jiddis'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/it.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Italian
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha 'SoftCreatR' Greuel
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.it === undefined) {
14
+ exports.it = {
15
+ 'mejs.plural-form': 1,
16
+ 'mejs.download-file': 'Scaricare il file',
17
+ 'mejs.install-flash': 'Stai utilizzando un browser che non dispone di Flash Player abilitato o installato. Accenda il tuo plug-in Flash Player o scarica la versione più recente da https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Schermo intero',
19
+ 'mejs.play': 'Eseguire',
20
+ 'mejs.pause': 'Pausa',
21
+ 'mejs.time-slider': 'Barra di scorrimento',
22
+ 'mejs.time-help-text': 'Utilizzare i tasti Freccia sinistra/Freccia destra per avanzare di un secondo, Freccia Su/Giù per avanzare dieci secondi.',
23
+ 'mejs.live-broadcast' : 'Trasmissione in diretta',
24
+ 'mejs.volume-help-text': 'Utilizzare i tasti Freccia Su/Giù per aumentare o diminuire il volume.',
25
+ 'mejs.unmute': 'Disattivare muto',
26
+ 'mejs.mute': 'Muto',
27
+ 'mejs.volume-slider': 'Barra del volume',
28
+ 'mejs.video-player': 'Lettore Video',
29
+ 'mejs.audio-player': 'Lettore Audio',
30
+ 'mejs.captions-subtitles': 'Acquisizioni/sottotitoli',
31
+ 'mejs.captions-chapters': 'Capitoli',
32
+ 'mejs.none': 'Nessuno',
33
+ 'mejs.afrikaans': 'Afrikaans',
34
+ 'mejs.albanian': 'Albanese',
35
+ 'mejs.arabic': 'Arabo',
36
+ 'mejs.belarusian': 'Bielorusso',
37
+ 'mejs.bulgarian': 'Bulgaro',
38
+ 'mejs.catalan': 'Catalano',
39
+ 'mejs.chinese': 'Cinese',
40
+ 'mejs.chinese-semplificato': 'Cinese (Semplificato)',
41
+ 'mejs.chinese-traditional': 'Cinese (Tradizionale)',
42
+ 'mejs.croatian': 'Croato',
43
+ 'mejs.czech': 'Ceco',
44
+ 'mejs.danish': 'Danese',
45
+ 'mejs.dutch': 'Olandese',
46
+ 'mejs.english': 'Inglese',
47
+ 'mejs.estonian': 'Estone',
48
+ 'mejs.filipino': 'Filippino',
49
+ 'mejs.finnish': 'Finlandese',
50
+ 'mejs.french': 'Francese',
51
+ 'mejs.galician': 'Galiziano',
52
+ 'mejs.german': 'Tedesco',
53
+ 'mejs.greek': 'Greco',
54
+ 'mejs.haitian-creole': 'Creolo Haitiano',
55
+ 'mejs.hebrew': 'Ebraico',
56
+ 'mejs.hindi': 'Hindi',
57
+ 'mejs.hungarian': 'Ungherese',
58
+ 'mejs.icelandic': 'Islandese',
59
+ 'mejs.indonesian': 'Indonesiano',
60
+ 'mejs.irish': 'Irlandese',
61
+ 'mejs.italian': 'Italiano',
62
+ 'mejs.japanese': 'Giapponese',
63
+ 'mejs.korean': 'Coreano',
64
+ 'mejs.latvian': 'Lettone',
65
+ 'mejs.lithuanian': 'Lituano',
66
+ 'mejs.macedonian': 'Macedone',
67
+ 'mejs.malay': 'Malay',
68
+ 'mejs.maltese': 'Maltese',
69
+ 'mejs.norwegian': 'Norvegese',
70
+ 'mejs.persian': 'Persiano',
71
+ 'mejs.polish': 'Polacco',
72
+ 'mejs.portuguese': 'Portoghese',
73
+ 'mejs.romanian': 'Rumeno',
74
+ 'mejs.russian': 'Russo',
75
+ 'mejs.serbian': 'Serbo',
76
+ 'mejs.slovak': 'Slovacco',
77
+ 'mejs.slovenian': 'Sloveno',
78
+ 'mejs.spanish': 'Spagnolo',
79
+ 'mejs.swahili': 'Swahili',
80
+ 'mejs.swedish': 'Svedese',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Thai',
83
+ 'mejs.turkish': 'Turco',
84
+ 'mejs.ukrainian': 'Ucraino',
85
+ 'mejs.vietnamese': 'Vietnamita',
86
+ 'mejs.welsh': 'Gallese',
87
+ 'mejs.yiddish': 'Yiddish'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/ja.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Japanese
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha 'SoftCreatR' Greuel
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.ja === undefined) {
14
+ exports.ja = {
15
+ 'mejs.plural-form': 0,
16
+ 'mejs.download-file': 'ファイルをダウンロードする',
17
+ 'mejs.install-flash': 'Flash Playerが有効またはインストールされていないブラウザを使用しています。Flash Playerプラグインをオンにするか,https://get.adobe.com/flashplayer/から最新バージョンをダウンロードしてください。',
18
+ 'mejs.fullscreen': '全画面',
19
+ 'mejs.play': '再生',
20
+ 'mejs.pause': '一時停止',
21
+ 'mejs.time-slider': 'タイムスライダー',
22
+ 'mejs.time-help-text': '1秒進めるには左/右矢印をキーを,10秒進めるには上/下矢印を使います。',
23
+ 'mejs.live-broadcast': 'ライブブロードキャスト',
24
+ 'mejs.volume-help-text': '音量を上げたり下げたりするには,上/下矢印を使います。',
25
+ 'mejs.unmute': 'ミュートを解除',
26
+ 'mejs.mute': 'ミュート',
27
+ 'mejs.volume-slider': '音量スライダー',
28
+ 'mejs.video-player': 'ビデオプレーヤー',
29
+ 'mejs.audio-player': 'オーディオプレーヤー',
30
+ 'mejs.captions-subtitles': 'キャプション/字幕',
31
+ 'mejs.captions-chapters': '章',
32
+ 'mejs.none': 'なし',
33
+ 'mejs.afrikaans': 'アフリカーンス語',
34
+ 'mejs.albanian': 'アルバニア語',
35
+ 'mejs.arabic': 'アラビア語',
36
+ 'mejs.belarusian': 'ベラルーシ語',
37
+ 'mejs.bulgarian': 'ブルガリア語',
38
+ 'mejs.catalan': 'カタロニア語',
39
+ 'mejs.chinese': '中国語',
40
+ 'mejs.chinese-simplified': '中国語(簡体字)',
41
+ 'mejs.chinese-traditional': '中国語(繁体字)',
42
+ 'mejs.croatian': 'クロアチア語',
43
+ 'mejs.czech': 'チェコ語',
44
+ 'mejs.danish': 'デンマーク語',
45
+ 'mejs.dutch': 'オランダの',
46
+ 'mejs.english': '英語',
47
+ 'mejs.estonian': 'エストニア語',
48
+ 'mejs.filipino': 'フィリピン人',
49
+ 'mejs.finnish': 'フィンランド語',
50
+ 'mejs.french': 'フランス語',
51
+ 'mejs.galician': 'ガリシア人',
52
+ 'mejs.german': 'ドイツ語',
53
+ 'mejs.greek': 'ギリシャ語',
54
+ 'mejs.haitian-creole': 'ハイチクレオール',
55
+ 'mejs.hebrew': 'ヘブライ語',
56
+ 'mejs.hindi': 'ヒンディー語',
57
+ 'mejs.hungarian': 'ハンガリー語',
58
+ 'mejs.icelandic': 'アイスランド語',
59
+ 'mejs.indonesian': 'インドネシア語',
60
+ 'mejs.irish': 'アイルランド',
61
+ 'mejs.italian': 'イタリア語',
62
+ 'mejs.japanese': '日本語',
63
+ 'mejs.korean': '韓国語',
64
+ 'mejs.latvian': 'ラトビア語',
65
+ 'mejs.lithuanian': 'リトアニア語',
66
+ 'mejs.macedonian': 'マケドニアの',
67
+ 'mejs.malay': 'マレー語',
68
+ 'mejs.maltese': 'マルタ',
69
+ 'mejs.norwegian': 'ノルウェー語',
70
+ 'mejs.persian': 'ペルシア語',
71
+ 'mejs.polish': 'ポーランド語',
72
+ 'mejs.portuguese': 'ポルトガル語',
73
+ 'mejs.romanian': 'ルーマニア語',
74
+ 'mejs.russian': 'ロシア語',
75
+ 'mejs.serbian': 'セルビア語',
76
+ 'mejs.slovak': 'スロバキア語',
77
+ 'mejs.slovenian': 'スロベニア語',
78
+ 'mejs.spanish': 'スペイン語',
79
+ 'mejs.swahili': 'スワヒリ語',
80
+ 'mejs.swedish': 'スウェーデン語',
81
+ 'mejs.tagalog': 'タガログ',
82
+ 'mejs.thai': 'タイ',
83
+ 'mejs.turkish': 'トルコ語',
84
+ 'mejs.ukrainian': 'ウクライナ語',
85
+ 'mejs.vietnamese': 'ベトナム語',
86
+ 'mejs.welsh': 'ウェールズ',
87
+ 'mejs.yiddish': 'イディッシュ'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/ko.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Korean
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha 'SoftCreatR' Greuel
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.ko === undefined) {
14
+ exports.ko = {
15
+ 'mejs.plural-form': 0,
16
+ 'mejs.download-file': '파일 다운로드',
17
+ 'mejs.install-flash': 'Flash Player가 활성화되거나 설치되지 않은 브라우저를 사용 중입니다. 플래시 플레이어 플러그인을 켜거나 https://get.adobe.com/flashplayer/에서 최신 버전을 다운로드하십시오.',
18
+ 'mejs.fullscreen': '전체화면',
19
+ 'mejs.play': '작동',
20
+ 'mejs.pause': '정지',
21
+ 'mejs.time-slider': '시간 슬라이더',
22
+ 'mejs.time-help-text': '1초 전진하려면 좌/우측 화살표를 사용하시고 10초 전진하려면 위/아래 화살표를 사용하세요.',
23
+ 'mejs.live-broadcast' : '생방송',
24
+ 'mejs.volume-help-text': '볼륨을 높이거나 낮추려면 위/아래 화살표를 이용하세요.',
25
+ 'mejs.unmute': '음소거 해제',
26
+ 'mejs.mute': '말 없는',
27
+ 'mejs.volume-slider': '볼륨 슬라이더',
28
+ 'mejs.video-player': '비디오 플레이어',
29
+ 'mejs.audio-player': '오디오 플레이어',
30
+ 'mejs.captions-subtitles': '캡션/자막',
31
+ 'mejs.captions-chapters': '챕터',
32
+ 'mejs.none': '없음',
33
+ 'mejs.afrikaans': '아프리칸스어',
34
+ 'mejs.albanian': '알바니아',
35
+ 'mejs.arabic': '아랍어',
36
+ 'mejs.belarusian': '벨로루시 어',
37
+ 'mejs.bulgarian': '불가리아',
38
+ 'mejs.catalan': '카탈로니아 어',
39
+ 'mejs.chinese': '중국어',
40
+ 'mejs.chinese-simplified': '중국어 (간체)',
41
+ 'mejs.chinese-traditional': '중국어 (번체)',
42
+ 'mejs.croatian': '크로아티아어',
43
+ 'mejs.czech': '체코 어',
44
+ 'mejs.danish': '덴마크어',
45
+ 'mejs.dutch': '네덜란드어',
46
+ 'mejs.english': '영어',
47
+ 'mejs.estonian': '에스토니아',
48
+ 'mejs.filipino': '필리핀',
49
+ 'mejs.finnish': '핀란드어',
50
+ 'mejs.french': '프랑스어',
51
+ 'mejs.galician': '갈리시아인',
52
+ 'mejs.german': '독일어',
53
+ 'mejs.greek': '그리스어',
54
+ 'mejs.haitian-creole': '아이티 크리올',
55
+ 'mejs.hebrew': '히브리어',
56
+ 'mejs.hindi': '힌디어',
57
+ 'mejs.hungarian': '헝가리어',
58
+ 'mejs.icelandic': '아이슬란드 어',
59
+ 'mejs.indonesian': '인도네시아어',
60
+ 'mejs.irish': '아일랜드어',
61
+ 'mejs.italian': '이탈리아어',
62
+ 'mejs.japanese': '일본어',
63
+ 'mejs.korean': '한국어',
64
+ 'mejs.latvian': '라트비아어',
65
+ 'mejs.lithuanian': '리투아니아어',
66
+ 'mejs.macedonian': '마케도니아인',
67
+ 'mejs.malay': '말레이',
68
+ 'mejs.maltese': '몰타어',
69
+ 'mejs.norwegian': '노르웨이어',
70
+ 'mejs.persian': '페르시아어',
71
+ 'mejs.polish': '폴란드어',
72
+ 'mejs.portuguese': '포르투갈어',
73
+ 'mejs.romanian': '루마니아어',
74
+ 'mejs.russian': '러시아어',
75
+ 'mejs.serbian': '세르비아어',
76
+ 'mejs.slovak': '슬로바키아어',
77
+ 'mejs.slovenian': '슬로베니아어',
78
+ 'mejs.spanish': '스페인어',
79
+ 'mejs.swahili': '스와힐리어',
80
+ 'mejs.swedish': '스웨덴어',
81
+ 'mejs.tagalog': '타갈로그어',
82
+ 'mejs.thai': '태국어',
83
+ 'mejs.turkish': '터키어',
84
+ 'mejs.ukrainian': '우크라이나어',
85
+ 'mejs.vietnamese': '베트남인',
86
+ 'mejs.welsh': '웨일스 어',
87
+ 'mejs.yiddish': '이디시어'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/nl.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Dutch
5
+ *
6
+ * @author
7
+ * Leonard de Ruijter, Twitter: @LeonarddR
8
+ * Jalios (Twitter: @Jalios)
9
+ * Sascha 'SoftCreatR' Greuel
10
+ *
11
+ * @see core/i18n.js
12
+ */
13
+ (function (exports) {
14
+ if (exports.nl === undefined) {
15
+ exports.nl = {
16
+ 'mejs.plural-form': 1,
17
+ 'mejs.download-file': 'Bestand downloaden',
18
+ 'mejs.install-flash': 'U gebruikt een browser die geen Flash Player heeft ingeschakeld of geïnstalleerd. Zet de Flash Player plug-in of download de nieuwste versie van https://get.adobe.com/flashplayer/',
19
+ 'mejs.fullscreen': 'Volledig scherm',
20
+ 'mejs.play': 'Afspelen',
21
+ 'mejs.pause': 'Pauzeren',
22
+ 'mejs.time-slider': 'Tijd schuifbalk',
23
+ 'mejs.time-help-text': 'Gebruik pijl naar links/rechts om per seconde te springen, pijl omhoog/omlaag om per tien seconden te springen.',
24
+ 'mejs.live-broadcast' : 'Live uitzending',
25
+ 'mejs.volume-help-text': 'Gebruik pijl omhoog/omlaag om het volume te verhogen/verlagen.',
26
+ 'mejs.unmute': 'Dempen opheffen',
27
+ 'mejs.mute': 'Dempen',
28
+ 'mejs.volume-slider': 'Volume schuifbalk',
29
+ 'mejs.video-player': 'Videospeler',
30
+ 'mejs.audio-player': 'Audiospeler',
31
+ 'mejs.captions-subtitles': 'Bijschriften/ondertiteling',
32
+ 'mejs.captions-chapters': 'Hoofdstukken',
33
+ 'mejs.none': 'Geen',
34
+ 'mejs.afrikaans': 'Afrikaans',
35
+ 'mejs.albanian': 'Albanees',
36
+ 'mejs.arabic': 'Arabisch',
37
+ 'mejs.belarusian': 'Wit-Russisch',
38
+ 'mejs.bulgarian': 'Bulgaars',
39
+ 'mejs.catalan': 'Catalaans',
40
+ 'mejs.chinese': 'Chinees',
41
+ 'mejs.chinese-simplified': 'Chinees (Vereenvoudigd)',
42
+ 'mejs.chinese-traditional': 'Chinees (Traditioneel)',
43
+ 'mejs.croatian': 'Kroatisch',
44
+ 'mejs.czech': 'Tsjechisch',
45
+ 'mejs.danish': 'Deens',
46
+ 'mejs.dutch': 'Nederlands',
47
+ 'mejs.english': 'Engels',
48
+ 'mejs.estonian': 'Estlands',
49
+ 'mejs.filipino': 'Filipijns',
50
+ 'mejs.finnish': 'Finse',
51
+ 'mejs.french': 'Frans',
52
+ 'mejs.galician': 'Galicisch',
53
+ 'mejs.german': 'Duits',
54
+ 'mejs.greek': 'Grieks',
55
+ 'mejs.haitian-creole': 'Haïtiaanse Creoolse',
56
+ 'mejs.hebrew': 'Hebreeuws',
57
+ 'mejs.hindi': 'Hindi',
58
+ 'mejs.hungarian': 'Hongaars',
59
+ 'mejs.icelandic': 'Icelandic',
60
+ 'mejs.indonesian': 'Indonesisch',
61
+ 'mejs.irish': 'Iers',
62
+ 'mejs.italian': 'Italiaans',
63
+ 'mejs.japanese': 'Japans',
64
+ 'mejs.korean': 'Koreaans',
65
+ 'mejs.latvian': 'Letlands',
66
+ 'mejs.lithuanian': 'Litouws',
67
+ 'mejs.macedonian': 'Macedonisch',
68
+ 'mejs.malay': 'Maleis',
69
+ 'mejs.maltese': 'Maltese',
70
+ 'mejs.norwegian': 'Noors',
71
+ 'mejs.persian': 'Perzisch',
72
+ 'mejs.polish': 'Pools',
73
+ 'mejs.portuguese': 'Portugees',
74
+ 'mejs.romanian': 'Roemeens',
75
+ 'mejs.russian': 'Russisch',
76
+ 'mejs.serbian': 'Servisch',
77
+ 'mejs.slovak': 'Slowaaks',
78
+ 'mejs.slovenian': 'Sloveens',
79
+ 'mejs.spanish': 'Spaans',
80
+ 'mejs.swahili': 'Swahili',
81
+ 'mejs.swedish': 'Zweeds',
82
+ 'mejs.tagalog': 'Tagalog',
83
+ 'mejs.thai': 'Thai',
84
+ 'mejs.turkish': 'Turks',
85
+ 'mejs.ukrainian': 'Oekraïens',
86
+ 'mejs.vietnamese': 'Vietnamese',
87
+ 'mejs.welsh': 'Welsh',
88
+ 'mejs.yiddish': 'Jiddisch'
89
+ };
90
+ }
91
+ })(mejs.i18n);
mediaelement/v4/lang/pl.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Polish
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.pl === undefined) {
14
+ exports.pl = {
15
+ 'mejs.plural-form': 9,
16
+ 'mejs.download-file': 'Pobierz plik',
17
+ 'mejs.install-flash': 'Twoja przeglądarka nie ma włączonej lub zainstalowanej wtyczki Flash Player. Prosimy ją włączyć lub pobrać najnowszą wersję ze strony https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Pełny ekran',
19
+ 'mejs.play': 'Odtwarzaj',
20
+ 'mejs.pause': 'Wstrzymaj',
21
+ 'mejs.time-slider': 'Suwak czasu',
22
+ 'mejs.time-help-text': 'Strzałki w lewo/w prawo powodują przewijanie o sekundę, strzałki w górę/w dół o dziesięć sekund.',
23
+ 'mejs.live-broadcast': 'Transmisja na żywo',
24
+ 'mejs.volume-help-text': 'Aby zwiększyć lub zmniejszyć głośność, użyj strzałek w górę/w dół.',
25
+ 'mejs.unmute': 'Wyłącz wyciszenie',
26
+ 'mejs.mute': 'Wycisz',
27
+ 'mejs.volume-slider': 'Suwak głośności',
28
+ 'mejs.video-player': 'Odtwarzacz wideo',
29
+ 'mejs.audio-player': 'Odtwarzacz audio',
30
+ 'mejs.captions-subtitles': 'Podpisy/napisy',
31
+ 'mejs.captions-chapters': 'Rozdziały',
32
+ 'mejs.none': 'Brak',
33
+ 'mejs.afrikaans': 'Afrykański',
34
+ 'mejs.albanian': 'Albański',
35
+ 'mejs.arabic': 'Arabski',
36
+ 'mejs.belarusian': 'Białoruski',
37
+ 'mejs.bulgarian': 'Bułgarski',
38
+ 'mejs.catalan': 'Kataloński',
39
+ 'mejs.chinese': 'Chiński',
40
+ 'mejs.chinese-simplified': 'Chiński (uproszczony)',
41
+ 'mejs.chinese-traditional': 'Chiński (tradycyjny)',
42
+ 'mejs.croatian': 'Chorwacki',
43
+ 'mejs.czech': 'Czeski',
44
+ 'mejs.danish': 'Duński',
45
+ 'mejs.dutch': 'Holenderski',
46
+ 'mejs.english': 'Angielski',
47
+ 'mejs.estonian': 'Estoński',
48
+ 'mejs.filipino': 'Filipiński',
49
+ 'mejs.finnish': 'Fiński',
50
+ 'mejs.french': 'Francuski',
51
+ 'mejs.galician': 'Galicyjski',
52
+ 'mejs.german': 'Niemiecki',
53
+ 'mejs.greek': 'Grecki',
54
+ 'mejs.haitian-creole': 'Haitański',
55
+ 'mejs.hebrew': 'Hebrajski',
56
+ 'mejs.hindi': 'Hinduski',
57
+ 'mejs.hungarian': 'Węgierski',
58
+ 'mejs.icelandic': 'Islandzki',
59
+ 'mejs.indonesian': 'Indonezyjski',
60
+ 'mejs.irish': 'Irlandzki',
61
+ 'mejs.italian': 'Włoski',
62
+ 'mejs.japanese': 'Japoński',
63
+ 'mejs.korean': 'Koreański',
64
+ 'mejs.latvian': 'Łotewski',
65
+ 'mejs.lithuanian': 'Litewski',
66
+ 'mejs.macedonian': 'Macedoński',
67
+ 'mejs.malay': 'Malajski',
68
+ 'mejs.maltese': 'Maltański',
69
+ 'mejs.norwegian': 'Norweski',
70
+ 'mejs.persian': 'Perski',
71
+ 'mejs.polish': 'Polski',
72
+ 'mejs.portuguese': 'Portugalski',
73
+ 'mejs.romanian': 'Rumuński',
74
+ 'mejs.russian': 'Rosyjski',
75
+ 'mejs.serbian': 'Serbski',
76
+ 'mejs.slovak': 'Słowacki',
77
+ 'mejs.slovenian': 'Słoweński',
78
+ 'mejs.spanish': 'Hiszpański',
79
+ 'mejs.swahili': 'Suahili',
80
+ 'mejs.swedish': 'Szwedzki',
81
+ 'mejs.tagalog': 'Tagalski',
82
+ 'mejs.thai': 'Tajski',
83
+ 'mejs.turkish': 'Turecki',
84
+ 'mejs.ukrainian': 'Ukraiński',
85
+ 'mejs.vietnamese': 'Wietnamski',
86
+ 'mejs.welsh': 'Walijski',
87
+ 'mejs.yiddish': 'Jidysz'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/pt.js ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Portuguese
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.pt === undefined) {
14
+ exports.pt = {
15
+ 'mejs.plural-form': 1,
16
+ 'mejs.download-file': 'Descarregar o ficheiro',
17
+ 'mejs.install-flash': 'Você está usando um navegador que não possui o player Flash ativado ou instalado. Por favor, ligue o plugin do Flash Player ou baixe a versão mais recente de https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Ecrã completo',
19
+ 'mejs.play': 'Reprodução',
20
+ 'mejs.pause': 'Pausa',
21
+ 'mejs.time-slider': 'Deslizador do tempo',
22
+ 'mejs.time-help-text': 'Use as teclas das setas para a esquerda/direita para avançar um segundo, e as setas para cima/baixo para avançar dez segundos.',
23
+ 'mejs.live-broadcast' : 'Transmissão ao vivo',
24
+
25
+
26
+ 'mejs.volume-help-text': 'Use as teclas das setas para cima/baixo para aumentar ou diminuir o volume.',
27
+ 'mejs.unmute': 'Voltar ao som',
28
+ 'mejs.mute': 'Silêncio',
29
+ 'mejs.volume-slider': 'Deslizador do volume',
30
+ 'mejs.video-player': 'Leitor de vídeo',
31
+ 'mejs.audio-player': 'Leitor de áudio',
32
+ 'mejs.captions-subtitles': 'Legendas',
33
+ 'mejs.captions-chapters': 'Capítulos',
34
+ 'mejs.none': 'Nenhum',
35
+ 'mejs.afrikaans': 'Afrikaans',
36
+ 'mejs.albanian': 'Albanês',
37
+ 'mejs.arabic': 'Árabe',
38
+ 'mejs.belarusian': 'Bielorrusso',
39
+ 'mejs.bulgarian': 'Búlgaro',
40
+ 'mejs.catalan': 'Catalão',
41
+ 'mejs.chinese': 'Chinês',
42
+ 'mejs.chinese-simplified': 'Chinese (Simplified)',
43
+ 'mejs.chinese-traditional': 'Chinese (Traditional)',
44
+ 'mejs.croatian': 'Croata',
45
+ 'mejs.czech': 'Checo',
46
+ 'mejs.danish': 'Danish',
47
+ 'mejs.dutch': 'Dutch',
48
+ 'mejs.english': 'Inglês',
49
+ 'mejs.estonian': 'Estoniano',
50
+ 'mejs.filipino': 'Filipino',
51
+ 'mejs.finnish': 'Finlandês',
52
+ 'mejs.french': 'French',
53
+ 'mejs.galician': 'Galego',
54
+ 'mejs.german': 'Alemão',
55
+ 'mejs.greek': 'Grego',
56
+ 'mejs.haitian-creole': 'Crioulo Haitiano',
57
+ 'mejs.hebrew': 'Hebraico',
58
+ 'mejs.hindi': 'Hindi',
59
+ 'mejs.hungarian': 'Húngaro',
60
+ 'mejs.icelandic': 'Islandês',
61
+ 'mejs.indonesian': 'Indonésio',
62
+ 'mejs.irish': 'Irish',
63
+ 'mejs.italian': 'Italiano',
64
+ 'mejs.japanese': 'Japonês',
65
+ 'mejs.korean': 'Coreano',
66
+ 'mejs.latvian': 'Letão',
67
+ 'mejs.lithuanian': 'Lithuanian',
68
+ 'mejs.macedonian': 'Macedônio',
69
+ 'mejs.malay': 'Malaio',
70
+ 'mejs.maltese': 'Maltês',
71
+ 'mejs.norwegian': 'Norwegian',
72
+ 'mejs.persian': 'Persa',
73
+ 'mejs.polish': 'Polish',
74
+ 'mejs.portuguese': 'Português',
75
+ 'mejs.romanian': 'Romanian',
76
+ 'mejs.russian': 'Russian',
77
+ 'mejs.serbian': 'Sérvio',
78
+ 'mejs.slovak': 'Slovak',
79
+ 'mejs.slovenian': 'Slovenian',
80
+ 'mejs.spanish': 'Espanhol',
81
+ 'mejs.swahili': 'Swahili',
82
+ 'mejs.swedish': 'sueco',
83
+ 'mejs.tagalog': 'Tagalog',
84
+ 'mejs.thai': 'Thai',
85
+ 'mejs.turkish': 'Turco',
86
+ 'mejs.ukrainian': 'Ucraniano',
87
+ 'mejs.vietnamese': 'Vietnamita',
88
+ 'mejs.welsh': 'Welsh',
89
+ 'mejs.yiddish': 'Iídiche'
90
+ };
91
+ }
92
+ })(mejs.i18n);
mediaelement/v4/lang/ro.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Romanian
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.ro === undefined) {
14
+ exports.ro = {
15
+ 'mejs.plural-form': 5,
16
+ 'mejs.download-file': 'Descarcă fişierul',
17
+ 'mejs.install-flash': 'Utilizați un browser care nu are activat sau instalat playerul Flash. Porniți pluginul Flash player sau descărcați cea mai recentă versiune de la https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Ecran complet',
19
+ 'mejs.play': 'Redare',
20
+ 'mejs.pause': 'Pauză',
21
+ 'mejs.time-slider': 'Cursor timp',
22
+ 'mejs.time-help-text': 'Utilizează tastele săgeată Stânga/Dreapta pentru a avansa o secundă şi săgeţile Sus/Jos pentru a avansa zece secunde.',
23
+ 'mejs.live-broadcast' : 'Difuzare în direct',
24
+ 'mejs.volume-help-text': 'Utilizează tastele de săgeată Sus/Jos pentru a creşte/micşora volumul',
25
+ 'mejs.unmute': 'Cu sunet',
26
+ 'mejs.mute': 'Fără sunet',
27
+ 'mejs.volume-slider': 'Cursor volum',
28
+ 'mejs.video-player': 'Player video',
29
+ 'mejs.audio-player': 'Player audio',
30
+ 'mejs.captions-subtitles': 'Legende/Subtitrări',
31
+ 'mejs.captions-chapters': 'Capitolele',
32
+ 'mejs.none': 'Niciunul',
33
+ 'mejs.afrikaans': 'Afrikaans',
34
+ 'mejs.albanian': 'Albanez',
35
+ 'mejs.arabic': 'Arabă',
36
+ 'mejs.belarusian': 'Belarusian',
37
+ 'mejs.bulgarian': 'Bulgară',
38
+ 'mejs.catalan': 'Catalană',
39
+ 'mejs.chinese': 'Chinezesc',
40
+ 'mejs.chinese-simplified': 'Chineză (Simplificată)',
41
+ 'mejs.chinese-traditional': 'Chineză (Tradițională)',
42
+ 'mejs.croatian': 'Croată',
43
+ 'mejs.czech': 'Cehă',
44
+ 'mejs.danish': 'Daneză',
45
+ 'mejs.dutch': 'Olandeză',
46
+ 'mejs.english': 'Engleză',
47
+ 'mejs.estonian': 'Estonă',
48
+ 'mejs.filipino': 'Filipinez',
49
+ 'mejs.finnish': 'Finlandeză',
50
+ 'mejs.french': 'Franceză',
51
+ 'mejs.galician': 'Galiciană',
52
+ 'mejs.german': 'Germană',
53
+ 'mejs.greek': 'Greacă',
54
+ 'mejs.haitian-creole': 'Creolele Haitiene',
55
+ 'mejs.hebrew': 'Ebraică',
56
+ 'mejs.hindi': 'Hindi',
57
+ 'mejs.hungarian': 'Maghiar',
58
+ 'mejs.icelandic': 'Islandeză',
59
+ 'mejs.indonesian': 'Indonezian',
60
+ 'mejs.irish': 'Irlandeză',
61
+ 'mejs.italian': 'Italiană',
62
+ 'mejs.japanese': 'Japoneză',
63
+ 'mejs.korean': 'Coreeană',
64
+ 'mejs.latvian': 'Letonă',
65
+ 'mejs.lithuanian': 'Lituanian',
66
+ 'mejs.macedonian': 'Macedonean',
67
+ 'mejs.malay': 'Malay',
68
+ 'mejs.maltese': 'Malteză',
69
+ 'mejs.norwegian': 'Norvegiană',
70
+ 'mejs.persian': 'Persană',
71
+ 'mejs.polish': 'Polonez',
72
+ 'mejs.portuguese': 'Portugheză',
73
+ 'mejs.romanian': 'Română',
74
+ 'mejs.russian': 'Rusă',
75
+ 'mejs.serbian': 'Sârbă',
76
+ 'mejs.slovak': 'Slovacă',
77
+ 'mejs.slovenian': 'Slovenă',
78
+ 'mejs.spanish': 'Spaniolă',
79
+ 'mejs.swahili': 'Swahili',
80
+ 'mejs.swedish': 'Suedeză',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Thai',
83
+ 'mejs.turkish': 'Turcă',
84
+ 'mejs.ukrainian': 'Ucrainean',
85
+ 'mejs.vietnamese': 'Vietnamez',
86
+ 'mejs.welsh': 'Welsh',
87
+ 'mejs.yiddish': 'Idiș'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/ru.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Russian
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.ru === undefined) {
14
+ exports.ru = {
15
+ 'mejs.plural-form': 7,
16
+ 'mejs.download-file': 'Скачать файл',
17
+ 'mejs.install-flash': 'Flash player в вашем браузере не установлен или отключен. Пожалуйста включите ваш Flash player или скачайте последнюю версию с https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Полноэкранный режим',
19
+ 'mejs.play': 'Воспроизвести',
20
+ 'mejs.pause': 'Пауза',
21
+ 'mejs.time-slider': 'Слайдер времени',
22
+ 'mejs.time-help-text': 'Используйте Левую/Правую клавиши со стрелками, чтобы продвинуться на одну секунду, клавиши со стрелками Вверх/Вниз, чтобы продвинуться на десять секунд.',
23
+ 'mejs.live-broadcast' : 'Прямая трансляция',
24
+ 'mejs.volume-help-text': 'Используйте клавиши со стрелками Вверх/Вниз, чтобы увеличить или уменьшить громкость.',
25
+ 'mejs.unmute': 'Включить звук',
26
+ 'mejs.mute': 'Отключить звук',
27
+ 'mejs.volume-slider': 'Слайдер громкости',
28
+ 'mejs.video-player': 'Видеоплеер',
29
+ 'mejs.audio-player': 'Аудиоплеер',
30
+ 'mejs.captions-subtitles': 'Титры/Субтитры',
31
+ 'mejs.captions-chapters': 'Главы',
32
+ 'mejs.none': 'Нет',
33
+ 'mejs.afrikaans': 'Африканский',
34
+ 'mejs.albanian': 'Албанский',
35
+ 'mejs.arabic': 'Арабский',
36
+ 'mejs.belarusian': 'Белорусский',
37
+ 'mejs.bulgarian': 'Болгарский',
38
+ 'mejs.catalan': 'Каталонский',
39
+ 'mejs.chinese': 'Китайский',
40
+ 'mejs.chinese-simplified': 'Китайский (упрощенный)',
41
+ 'mejs.chinese-traditional': 'Chinese (традиционный)',
42
+ 'mejs.croatian': 'Хорватский',
43
+ 'mejs.czech': 'Чешский',
44
+ 'mejs.danish': 'Датский',
45
+ 'mejs.dutch': 'Голландский',
46
+ 'mejs.english': 'Английский',
47
+ 'mejs.estonian': 'Эстонский',
48
+ 'mejs.filipino': 'Филиппинский',
49
+ 'mejs.finnish': 'Финский',
50
+ 'mejs.french': 'Французский',
51
+ 'mejs.galician': 'Галисийский',
52
+ 'mejs.german': 'Немецкий',
53
+ 'mejs.greek': 'Греческий',
54
+ 'mejs.haitian-creole': 'Гаитянский креольский',
55
+ 'mejs.hebrew': 'Иврит',
56
+ 'mejs.hindi': 'Хинди',
57
+ 'mejs.hungarian': 'Венгерский',
58
+ 'mejs.icelandic': 'Исландский',
59
+ 'mejs.indonesian': 'Индонезийский',
60
+ 'mejs.irish': 'Ирландский',
61
+ 'mejs.italian': 'Итальянский',
62
+ 'mejs.japanese': 'Японский',
63
+ 'mejs.korean': 'Корейский',
64
+ 'mejs.latvian': 'Латышский',
65
+ 'mejs.lithuanian': 'Литовский',
66
+ 'mejs.macedonian': 'Македонский',
67
+ 'mejs.malay': 'Малайский',
68
+ 'mejs.maltese': 'Мальтийский',
69
+ 'mejs.norwegian': 'Норвежский',
70
+ 'mejs.persian': 'Персидский',
71
+ 'mejs.polish': 'Польский',
72
+ 'mejs.portuguese': 'Португальский',
73
+ 'mejs.romanian': 'Румынский',
74
+ 'mejs.russian': 'Русский',
75
+ 'mejs.serbian': 'Сербский',
76
+ 'mejs.slovak': 'Словацкий',
77
+ 'mejs.slovenian': 'Словенский',
78
+ 'mejs.spanish': 'Испанский',
79
+ 'mejs.swahili': 'Суахили',
80
+ 'mejs.swedish': 'Шведский',
81
+ 'mejs.tagalog': 'Тагальский',
82
+ 'mejs.thai': 'Тайский',
83
+ 'mejs.turkish': 'Турецкий',
84
+ 'mejs.ukrainian': 'Украинский',
85
+ 'mejs.vietnamese': 'Вьетнамский',
86
+ 'mejs.welsh': 'Валлийский',
87
+ 'mejs.yiddish': 'Идиш'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/sk.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Slovak
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports.sk === undefined) {
14
+ exports.sk = {
15
+ 'mejs.plural-form': 8,
16
+ 'mejs.download-file': 'Prevziať súbor',
17
+ 'mejs.install-flash': 'Používate prehliadač, ktorý nemá povolený alebo nainštalovaný prehrávač Flash. Zapnite doplnok prehrávača Flash alebo si prevezmite najnovšiu verziu zo stránky https://get.adobe.com/flashplayer/',
18
+ 'mejs.fullscreen': 'Celá obrazovka',
19
+ 'mejs.play': 'Prehrať',
20
+ 'mejs.pause': 'Pozastaviť',
21
+ 'mejs.time-slider': 'Posúvač času',
22
+ 'mejs.time-help-text': 'Klávesmi so šípkou doľava/doprava posuniete o jednu sekundu, šípkami nahor/ nadol posuniete o desať sekúnd.',
23
+ 'mejs.live-broadcast' : 'Živé vysielanie',
24
+ 'mejs.volume-help-text': 'Klávesmi so šípkou nahor/nadol zvýšite alebo znížite hlasitosť.',
25
+ 'mejs.unmute': 'Zrušiť stlmenie',
26
+ 'mejs.mute': 'Stlmiť',
27
+ 'mejs.volume-slider': 'Posúvač hlasitosti',
28
+ 'mejs.video-player': 'Prehrávač videa',
29
+ 'mejs.audio-player': 'Prehrávač zvuku',
30
+ 'mejs.captions-subtitles': 'Skryté titulky/Titulky',
31
+ 'mejs.captions-chapters': 'Kapitoly',
32
+ 'mejs.none': 'Žiadne',
33
+ 'mejs.afrikaans': 'Afrikaans',
34
+ 'mejs.albanian': 'Albánsky',
35
+ 'mejs.arabic': 'Arabčina',
36
+ 'mejs.belarusian': 'Bieloruský',
37
+ 'mejs.bulgarian': 'Bulharčina',
38
+ 'mejs.catalan': 'Katalánsky',
39
+ 'mejs.chinese': 'čínština',
40
+ 'mejs.chinese-simplified': 'Čínsky (Zjednodušený)',
41
+ 'mejs.chinese-traditional': 'čínsky (Tradičný)',
42
+ 'mejs.croatian': 'Chorvátčina',
43
+ 'mejs.czech': 'čeština',
44
+ 'mejs.danish': 'Dánsky',
45
+ 'mejs.dutch': 'Holandský',
46
+ 'mejs.english': 'Angličtina',
47
+ 'mejs.estonian': 'Estónčina',
48
+ 'mejs.filipino': 'Filipínsky',
49
+ 'mejs.finnish': 'Fínčina',
50
+ 'mejs.french': 'Francúzština',
51
+ 'mejs.galician': 'Galicijčan',
52
+ 'mejs.german': 'Nemčina',
53
+ 'mejs.greek': 'Gréčtina',
54
+ 'mejs.haitian-creole': 'Haitian Kreolský',
55
+ 'mejs.hebrew': 'Hebrejčina',
56
+ 'mejs.hindi': 'Hindčina',
57
+ 'mejs.hungarian': 'Maďarčina',
58
+ 'mejs.icelandic': 'Islandský',
59
+ 'mejs.indonesian': 'Indonézsky',
60
+ 'mejs.irish': 'Írsky',
61
+ 'mejs.italian': 'Taliančina',
62
+ 'mejs.japanese': 'Japonský',
63
+ 'mejs.korean': 'Kórejský',
64
+ 'mejs.latvian': 'Lotyština',
65
+ 'mejs.lithuanian': 'Litovský',
66
+ 'mejs.macedonian': 'Macedónsky',
67
+ 'mejs.malay': 'Malajský',
68
+ 'mejs.maltese': 'Maltčina',
69
+ 'mejs.norwegian': 'Nórsky',
70
+ 'mejs.persian': 'Perzský',
71
+ 'mejs.polish': 'poľština',
72
+ 'mejs.portuguese': 'Portugalčina',
73
+ 'mejs.romanian': 'Rumunčina',
74
+ 'mejs.russian': 'Ruský',
75
+ 'mejs.serbian': 'Srbský',
76
+ 'mejs.slovak': 'Slovenský',
77
+ 'mejs.slovenian': 'Slovinský',
78
+ 'mejs.spanish': 'španielčina',
79
+ 'mejs.swahili': 'Swahili',
80
+ 'mejs.swedish': 'švédčina',
81
+ 'mejs.tagalog': 'Tagalog',
82
+ 'mejs.thai': 'Thai',
83
+ 'mejs.turkish': 'Turecký',
84
+ 'mejs.ukrainian': 'Ukrajinský',
85
+ 'mejs.vietnamese': 'Vietnamčina',
86
+ 'mejs.welsh': 'Welsh',
87
+ 'mejs.yiddish': 'Jidiš'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/sv.js ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Swedish
5
+ *
6
+ * @author
7
+ * Petter (Twitter: @petter_j)
8
+ *
9
+ * @see core/i18n.js
10
+ */
11
+ (function (exports) {
12
+ if (exports.sv === undefined) {
13
+ exports.sv = {
14
+ 'mejs.plural-form': 1,
15
+ 'mejs.download-file': 'Ladda ner fil',
16
+ 'mejs.install-flash': 'Du använder en webbläsare som inte har Flash Player aktiverat eller installerad. Aktivera Flash Player eller hämta den senaste versionen från https://get.adobe.com/flashplayer/',
17
+ 'mejs.fullscreen': 'Fullskärm',
18
+ 'mejs.play': 'Spela',
19
+ 'mejs.pause': 'Pausa',
20
+ 'mejs.time-slider': 'Tidslinje',
21
+ 'mejs.time-help-text': 'Använd Vänster/Höger piltangent för att spola en sekund, Upp/Ner piltangent spola tio sekunder.',
22
+ 'mejs.live-broadcast': 'Livesändning',
23
+ 'mejs.volume-help-text': 'Använd Upp/Ner piltangent för att öka eller minska volymen.',
24
+ 'mejs.unmute': 'Ljud på',
25
+ 'mejs.mute': 'Ljud av',
26
+ 'mejs.volume-slider': 'Volymkontroll',
27
+ 'mejs.video-player': 'Videospelare',
28
+ 'mejs.audio-player': 'Ljudspelare',
29
+ 'mejs.captions-subtitles': 'Textning/Undertexter',
30
+ 'mejs.captions-chapters': 'Kapitel',
31
+ 'mejs.none': 'Ingen',
32
+ 'mejs.afrikaans': 'Afrikaans',
33
+ 'mejs.albanian': 'Albanska',
34
+ 'mejs.arabic': 'Arabiska',
35
+ 'mejs.belarusian': 'Nederländska',
36
+ 'mejs.bulgarian': 'Bulgariska',
37
+ 'mejs.catalan': 'Katalanska',
38
+ 'mejs.chinese': 'Kinesiska',
39
+ 'mejs.chinese-simplified': 'Kinesiska (Förenklad)',
40
+ 'mejs.chinese-traditional': 'Kinesiska (Traditionell)',
41
+ 'mejs.croatian': 'Kroatiska',
42
+ 'mejs.czech': 'Tjeckiska',
43
+ 'mejs.danish': 'Danska',
44
+ 'mejs.dutch': 'Holländska',
45
+ 'mejs.english': 'Engelska',
46
+ 'mejs.estonian': 'Estniska',
47
+ 'mejs.filipino': 'Filipinska',
48
+ 'mejs.finnish': 'Finska',
49
+ 'mejs.french': 'Franska',
50
+ 'mejs.galician': 'Galiciska',
51
+ 'mejs.german': 'Tyska',
52
+ 'mejs.greek': 'Grekiska',
53
+ 'mejs.haitian-creole': 'Haitisk kreolsk',
54
+ 'mejs.hebrew': 'Hebreiska',
55
+ 'mejs.hindi': 'Hindi',
56
+ 'mejs.hungarian': 'Ungerska',
57
+ 'mejs.icelandic': 'Isländska',
58
+ 'mejs.indonesian': 'Indonesiska',
59
+ 'mejs.irish': 'Irländska',
60
+ 'mejs.italian': 'Italienska',
61
+ 'mejs.japanese': 'Japanska',
62
+ 'mejs.korean': 'Koreanska',
63
+ 'mejs.latvian': 'Lettiska',
64
+ 'mejs.lithuanian': 'Litauiska',
65
+ 'mejs.macedonian': 'Makedonska',
66
+ 'mejs.malay': 'Malaysiska',
67
+ 'mejs.maltese': 'Maltesiska',
68
+ 'mejs.norwegian': 'Norska',
69
+ 'mejs.persian': 'Persiska',
70
+ 'mejs.polish': 'Polska',
71
+ 'mejs.portuguese': 'Portugisiska',
72
+ 'mejs.romanian': 'Romänska',
73
+ 'mejs.russian': 'Ryska',
74
+ 'mejs.serbian': 'Serbiska',
75
+ 'mejs.slovak': 'Slovakiska',
76
+ 'mejs.slovenian': 'Slovenska',
77
+ 'mejs.spanish': 'Spanska',
78
+ 'mejs.swahili': 'Swahiliska',
79
+ 'mejs.swedish': 'Svenska',
80
+ 'mejs.tagalog': 'Tagalogiska',
81
+ 'mejs.thai': 'Thailänska',
82
+ 'mejs.turkish': 'Turkiska',
83
+ 'mejs.ukrainian': 'Ukrainska',
84
+ 'mejs.vietnamese': 'Vietnamesiska',
85
+ 'mejs.welsh': 'Skotska',
86
+ 'mejs.yiddish': 'Jiddisch'
87
+ };
88
+ }
89
+ })(mejs.i18n);
mediaelement/v4/lang/uk.js ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Ukrainian
5
+ *
6
+ * @author
7
+ * Dmitry Krekota (dmitry.krekota@gmail.com)
8
+ *
9
+ * @see core/i18n.js
10
+ */
11
+ (function (exports) {
12
+ if (exports.uk === undefined) {
13
+ exports.uk = {
14
+ 'mejs.plural-form': 7,
15
+ 'mejs.download-file': 'Завантажити файл',
16
+ 'mejs.install-flash': 'Flash Player у вашому браузері не встановлений або відключений. Будь ласка включіть Flash Player або скачайте останню версію із https://get.adobe.com/flashplayer/',
17
+ 'mejs.fullscreen': 'Повноекранний режим',
18
+ 'mejs.play': 'Пуск',
19
+ 'mejs.pause': 'Пауза',
20
+ 'mejs.time-slider': 'Повзунок часу',
21
+ 'mejs.time-help-text': 'Використовуйте ліву/праву клавіші зі стрілками, щоб переміститися на одну секунду, або клавіші вверх/вниз, щоб переміститися на десять секунд.',
22
+ 'mejs.live-broadcast' : 'Пряма трансляція',
23
+ 'mejs.volume-help-text': 'Використовуйте клавіші зі стрілками вверх/вниз, щоб збільшити або зменшити звук.',
24
+ 'mejs.unmute': 'Включити звук',
25
+ 'mejs.mute': 'Відключити звук',
26
+ 'mejs.volume-slider': 'Повзунок звуку',
27
+ 'mejs.video-player': 'Відеоплеєр',
28
+ 'mejs.audio-player': 'Аудіоплеєр',
29
+ 'mejs.captions-subtitles': 'Титри/Субтитри',
30
+ 'mejs.captions-chapters': 'Глави',
31
+ 'mejs.none': 'Немає',
32
+ 'mejs.afrikaans': 'Африкаанс',
33
+ 'mejs.albanian': 'Албанська',
34
+ 'mejs.arabic': 'Арабська',
35
+ 'mejs.belarusian': 'Білоруська',
36
+ 'mejs.bulgarian': 'Болгарська',
37
+ 'mejs.catalan': 'Каталонська',
38
+ 'mejs.chinese': 'Китайська',
39
+ 'mejs.chinese-simplified': 'Китайська (спрощена)',
40
+ 'mejs.chinese-traditional': 'Китайська (традиційна)',
41
+ 'mejs.croatian': 'Хорватска',
42
+ 'mejs.czech': 'Чеська',
43
+ 'mejs.danish': 'Дацька',
44
+ 'mejs.dutch': 'Голландська',
45
+ 'mejs.english': 'Английська',
46
+ 'mejs.estonian': 'Естонська',
47
+ 'mejs.filipino': 'Філіппінська',
48
+ 'mejs.finnish': 'Фінська',
49
+ 'mejs.french': 'Французька',
50
+ 'mejs.galician': 'Галісійська',
51
+ 'mejs.german': 'Німецька',
52
+ 'mejs.greek': 'Грецька',
53
+ 'mejs.haitian-creole': 'Гаїтянська креольська',
54
+ 'mejs.hebrew': 'Іврит',
55
+ 'mejs.hindi': 'Хінді',
56
+ 'mejs.hungarian': 'Угорська',
57
+ 'mejs.icelandic': 'Ісландська',
58
+ 'mejs.indonesian': 'Індонезійська',
59
+ 'mejs.irish': 'Ірландська',
60
+ 'mejs.italian': 'Італійська',
61
+ 'mejs.japanese': 'Японська',
62
+ 'mejs.korean': 'Корейська',
63
+ 'mejs.latvian': 'Латвійська',
64
+ 'mejs.lithuanian': 'Литовська',
65
+ 'mejs.macedonian': 'Македонська',
66
+ 'mejs.malay': 'Малайська',
67
+ 'mejs.maltese': 'Мальтійська',
68
+ 'mejs.norwegian': 'Норвезька',
69
+ 'mejs.persian': 'Перська',
70
+ 'mejs.polish': 'Польська',
71
+ 'mejs.portuguese': 'Португальська',
72
+ 'mejs.romanian': 'Румунська',
73
+ 'mejs.russian': 'Російська',
74
+ 'mejs.serbian': 'Сербська',
75
+ 'mejs.slovak': 'Словацька',
76
+ 'mejs.slovenian': 'Словенська',
77
+ 'mejs.spanish': 'Іспанська',
78
+ 'mejs.swahili': 'Суахілі',
79
+ 'mejs.swedish': 'Шведська',
80
+ 'mejs.tagalog': 'Тагальська',
81
+ 'mejs.thai': 'Тайська',
82
+ 'mejs.turkish': 'Турецька',
83
+ 'mejs.ukrainian': 'Українська',
84
+ 'mejs.vietnamese': 'В\'єтнамська',
85
+ 'mejs.welsh': 'Валлійська',
86
+ 'mejs.yiddish': 'Ідиш'
87
+ };
88
+ }
89
+ })(mejs.i18n);
mediaelement/v4/lang/zh-cn.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Chinese (Simplified)
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ *
10
+ * @see core/i18n.js
11
+ */
12
+ (function (exports) {
13
+ if (exports['zh-CN'] === undefined) {
14
+ exports['zh-CN'] = {
15
+ 'mejs.plural-form': 0,
16
+ 'mejs.download-file': '下载文件',
17
+ 'mejs.install-flash': '您正在使用未启用或安装Flash播放器的浏览器。请打开您的Flash Player插件,或从https://get.adobe.com/flashplayer/下载最新版本',
18
+ 'mejs.fullscreen': '全屏',
19
+ 'mejs.play': '播放',
20
+ 'mejs.pause': '暂停',
21
+ 'mejs.time-slider': '时间滑动棒',
22
+ 'mejs.time-help-text': '使用作/右箭头快进1秒,使用上/下箭头快进10秒。',
23
+ 'mejs.live-broadcast' : '现场直播',
24
+ 'mejs.volume-help-text': '使用上/下箭头提高或降低音量。',
25
+ 'mejs.unmute': '取消静音',
26
+ 'mejs.mute': '静音',
27
+ 'mejs.volume-slider': '音量选择键',
28
+ 'mejs.video-player': '视频播放器',
29
+ 'mejs.audio-player': '音频播放器',
30
+ 'mejs.captions-subtitles': '字幕/标题',
31
+ 'mejs.captions-chapters': '章',
32
+ 'mejs.none': '无',
33
+ 'mejs.afrikaans': '南非荷兰语',
34
+ 'mejs.albanian': '阿尔巴尼亚人',
35
+ 'mejs.arabic': '阿拉伯语',
36
+ 'mejs.belarusian': '白俄罗斯',
37
+ 'mejs.bulgarian': '保加利亚语',
38
+ 'mejs.catalan': '加泰罗尼亚语',
39
+ 'mejs.chinese': '中国',
40
+ 'mejs.chinese-simplified': '中文(简体)',
41
+ 'mejs.chinese-traditional': '中国(传统)',
42
+ 'mejs.croatian': '克罗地亚语',
43
+ 'mejs.czech': '捷克',
44
+ 'mejs.danish': '丹麦语',
45
+ 'mejs.dutch': '荷兰人',
46
+ 'mejs.english': '英语',
47
+ 'mejs.estonian': '爱沙尼亚语',
48
+ 'mejs.filipino': '菲律宾',
49
+ 'mejs.finnish': '芬兰语',
50
+ 'mejs.french': '法语',
51
+ 'mejs.galician': '加利西亚',
52
+ 'mejs.german': '德语',
53
+ 'mejs.greek': '希腊语',
54
+ 'mejs.haitian-creole': '海地克里奥尔人',
55
+ 'mejs.hebrew': '希伯来语',
56
+ 'mejs.hindi': '印地语',
57
+ 'mejs.hungarian': '匈牙利',
58
+ 'mejs.icelandic': '冰岛',
59
+ 'mejs.indonesian': '印尼语',
60
+ 'mejs.irish': '爱尔兰',
61
+ 'mejs.italian': '意大利语',
62
+ 'mejs.japanese': '日本',
63
+ 'mejs.korean': '韩国人',
64
+ 'mejs.latvian': '拉脱维亚人',
65
+ 'mejs.lithuanian': '立陶宛语',
66
+ 'mejs.macedonian': '马其顿',
67
+ 'mejs.malay': '马来语',
68
+ 'mejs.maltese': '马耳他',
69
+ 'mejs.norwegian': '挪威语',
70
+ 'mejs.persian': '波斯人',
71
+ 'mejs.polish': '波兰语',
72
+ 'mejs.portuguese': '葡萄牙语',
73
+ 'mejs.romanian': '罗马尼亚语',
74
+ 'mejs.russian': '俄罗斯',
75
+ 'mejs.serbian': '塞尔维亚人',
76
+ 'mejs.slovak': '斯洛伐克语',
77
+ 'mejs.slovenian': '斯洛文尼亚语',
78
+ 'mejs.spanish': '西班牙语',
79
+ 'mejs.swahili': '斯瓦希里语',
80
+ 'mejs.swedish': '瑞典语',
81
+ 'mejs.tagalog': '他加禄语',
82
+ 'mejs.thai': '泰国',
83
+ 'mejs.turkish': '土耳其语',
84
+ 'mejs.ukrainian': '乌克兰',
85
+ 'mejs.vietnamese': '越南人',
86
+ 'mejs.welsh': '威尔士',
87
+ 'mejs.yiddish': '意第绪语'
88
+ };
89
+ }
90
+ })(mejs.i18n);
mediaelement/v4/lang/zh.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';/*!
2
+ * This is a `i18n` language object.
3
+ *
4
+ * Chinese (Traditional)
5
+ *
6
+ * @author
7
+ * Jalios (Twitter: @Jalios)
8
+ * Sascha Greuel (Twitter: @SoftCreatR)
9
+ * Peter Dave Hello (Twitter: @PeterDaveHello)
10
+ *
11
+ * @see core/i18n.js
12
+ */
13
+ (function (exports) {
14
+ if (exports.zh === undefined) {
15
+ exports.zh = {
16
+ 'mejs.plural-form': 0,
17
+ 'mejs.download-file': '下載檔案',
18
+ 'mejs.install-flash': '您正在使用未啟用或安裝Flash播放器的瀏覽器。請打開您的Flash Player插件,或從https://get.adobe.com/flashplayer/下載最新版本',
19
+ 'mejs.fullscreen': '全螢幕',
20
+ 'mejs.play': '播放',
21
+ 'mejs.pause': '暫停',
22
+ 'mejs.time-slider': '時間軸',
23
+ 'mejs.time-help-text': '使用左/右箭頭快轉1秒,上/下箭頭快轉10秒。',
24
+ 'mejs.live-broadcast' : '現場直播',
25
+ 'mejs.volume-help-text': '使用上/下箭頭提高或降低音量。',
26
+ 'mejs.unmute': '取消靜音',
27
+ 'mejs.mute': '靜音',
28
+ 'mejs.volume-slider': '音量控制鍵',
29
+ 'mejs.video-player': '影片播放器',
30
+ 'mejs.audio-player': '音樂播放器',
31
+ 'mejs.captions-subtitles': '字幕/標題',
32
+ 'mejs.captions-chapters': '章節',
33
+ 'mejs.none': '無',
34
+ 'mejs.afrikaans': '南非荷蘭語',
35
+ 'mejs.albanian': '阿爾巴尼亞人',
36
+ 'mejs.arabic': '阿拉伯語',
37
+ 'mejs.belarusian': '白俄羅斯',
38
+ 'mejs.bulgarian': '保加利亞語',
39
+ 'mejs.catalan': '加泰羅尼亞語',
40
+ 'mejs.chinese': '中文',
41
+ 'mejs.chinese-simplified': '简体中文',
42
+ 'mejs.chinese-traditional': '正體中文',
43
+ 'mejs.croatian': '克羅地亞語',
44
+ 'mejs.czech': '捷克',
45
+ 'mejs.danish': '丹麥語',
46
+ 'mejs.dutch': '荷蘭人',
47
+ 'mejs.english': '英語',
48
+ 'mejs.estonian': '愛沙尼亞語',
49
+ 'mejs.filipino': '菲律賓',
50
+ 'mejs.finnish': '芬蘭語',
51
+ 'mejs.french': '法語',
52
+ 'mejs.galician': '加利西亞',
53
+ 'mejs.german': '德語',
54
+ 'mejs.greek': '希臘語',
55
+ 'mejs.haitian-creole': '海地克里奧爾人',
56
+ 'mejs.hebrew': '希伯來語',
57
+ 'mejs.hindi': '印地語',
58
+ 'mejs.hungarian': '匈牙利',
59
+ 'mejs.icelandic': '冰島',
60
+ 'mejs.indonesian': '印尼語',
61
+ 'mejs.irish': '愛爾蘭',
62
+ 'mejs.italian': '意大利語',
63
+ 'mejs.japanese': '日本',
64
+ 'mejs.korean': '韓國人',
65
+ 'mejs.latvian': '拉脫維亞人',
66
+ 'mejs.lithuanian': '立陶宛語',
67
+ 'mejs.macedonian': '馬其頓',
68
+ 'mejs.malay': '馬來語',
69
+ 'mejs.maltese': '馬耳他',
70
+ 'mejs.norwegian': '挪威語',
71
+ 'mejs.persian': '波斯人',
72
+ 'mejs.polish': '波蘭語',
73
+ 'mejs.portuguese': '葡萄牙語',
74
+ 'mejs.romanian': '羅馬尼亞語',
75
+ 'mejs.russian': '俄羅斯',
76
+ 'mejs.serbian': '塞爾維亞人',
77
+ 'mejs.slovak': '斯洛伐克語',
78
+ 'mejs.slovenian': '斯洛文尼亞語',
79
+ 'mejs.spanish': '西班牙語',
80
+ 'mejs.swahili': '斯瓦希里語',
81
+ 'mejs.swedish': '瑞典語',
82
+ 'mejs.tagalog': '他加祿語',
83
+ 'mejs.thai': '泰國',
84
+ 'mejs.turkish': '土耳其語',
85
+ 'mejs.ukrainian': '烏克蘭',
86
+ 'mejs.vietnamese': '越南人',
87
+ 'mejs.welsh': '威爾士',
88
+ 'mejs.yiddish': '意第緒語'
89
+ };
90
+ }
91
+ })(mejs.i18n);
mediaelement/v4/mediaelement-and-player.js ADDED
@@ -0,0 +1,8508 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * MediaElement.js
3
+ * http://www.mediaelementjs.com/
4
+ *
5
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
6
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
7
+ *
8
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
9
+ * License: MIT
10
+ *
11
+ */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
12
+
13
+ },{}],2:[function(_dereq_,module,exports){
14
+ (function (global){
15
+ var topLevel = typeof global !== 'undefined' ? global :
16
+ typeof window !== 'undefined' ? window : {}
17
+ var minDoc = _dereq_(1);
18
+
19
+ var doccy;
20
+
21
+ if (typeof document !== 'undefined') {
22
+ doccy = document;
23
+ } else {
24
+ doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
25
+
26
+ if (!doccy) {
27
+ doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
28
+ }
29
+ }
30
+
31
+ module.exports = doccy;
32
+
33
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
34
+ },{"1":1}],3:[function(_dereq_,module,exports){
35
+ (function (global){
36
+ var win;
37
+
38
+ if (typeof window !== "undefined") {
39
+ win = window;
40
+ } else if (typeof global !== "undefined") {
41
+ win = global;
42
+ } else if (typeof self !== "undefined"){
43
+ win = self;
44
+ } else {
45
+ win = {};
46
+ }
47
+
48
+ module.exports = win;
49
+
50
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
51
+ },{}],4:[function(_dereq_,module,exports){
52
+ (function (root) {
53
+
54
+ // Store setTimeout reference so promise-polyfill will be unaffected by
55
+ // other code modifying setTimeout (like sinon.useFakeTimers())
56
+ var setTimeoutFunc = setTimeout;
57
+
58
+ function noop() {}
59
+
60
+ // Polyfill for Function.prototype.bind
61
+ function bind(fn, thisArg) {
62
+ return function () {
63
+ fn.apply(thisArg, arguments);
64
+ };
65
+ }
66
+
67
+ function Promise(fn) {
68
+ if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
69
+ if (typeof fn !== 'function') throw new TypeError('not a function');
70
+ this._state = 0;
71
+ this._handled = false;
72
+ this._value = undefined;
73
+ this._deferreds = [];
74
+
75
+ doResolve(fn, this);
76
+ }
77
+
78
+ function handle(self, deferred) {
79
+ while (self._state === 3) {
80
+ self = self._value;
81
+ }
82
+ if (self._state === 0) {
83
+ self._deferreds.push(deferred);
84
+ return;
85
+ }
86
+ self._handled = true;
87
+ Promise._immediateFn(function () {
88
+ var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
89
+ if (cb === null) {
90
+ (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
91
+ return;
92
+ }
93
+ var ret;
94
+ try {
95
+ ret = cb(self._value);
96
+ } catch (e) {
97
+ reject(deferred.promise, e);
98
+ return;
99
+ }
100
+ resolve(deferred.promise, ret);
101
+ });
102
+ }
103
+
104
+ function resolve(self, newValue) {
105
+ try {
106
+ // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
107
+ if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
108
+ if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
109
+ var then = newValue.then;
110
+ if (newValue instanceof Promise) {
111
+ self._state = 3;
112
+ self._value = newValue;
113
+ finale(self);
114
+ return;
115
+ } else if (typeof then === 'function') {
116
+ doResolve(bind(then, newValue), self);
117
+ return;
118
+ }
119
+ }
120
+ self._state = 1;
121
+ self._value = newValue;
122
+ finale(self);
123
+ } catch (e) {
124
+ reject(self, e);
125
+ }
126
+ }
127
+
128
+ function reject(self, newValue) {
129
+ self._state = 2;
130
+ self._value = newValue;
131
+ finale(self);
132
+ }
133
+
134
+ function finale(self) {
135
+ if (self._state === 2 && self._deferreds.length === 0) {
136
+ Promise._immediateFn(function() {
137
+ if (!self._handled) {
138
+ Promise._unhandledRejectionFn(self._value);
139
+ }
140
+ });
141
+ }
142
+
143
+ for (var i = 0, len = self._deferreds.length; i < len; i++) {
144
+ handle(self, self._deferreds[i]);
145
+ }
146
+ self._deferreds = null;
147
+ }
148
+
149
+ function Handler(onFulfilled, onRejected, promise) {
150
+ this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
151
+ this.onRejected = typeof onRejected === 'function' ? onRejected : null;
152
+ this.promise = promise;
153
+ }
154
+
155
+ /**
156
+ * Take a potentially misbehaving resolver function and make sure
157
+ * onFulfilled and onRejected are only called once.
158
+ *
159
+ * Makes no guarantees about asynchrony.
160
+ */
161
+ function doResolve(fn, self) {
162
+ var done = false;
163
+ try {
164
+ fn(function (value) {
165
+ if (done) return;
166
+ done = true;
167
+ resolve(self, value);
168
+ }, function (reason) {
169
+ if (done) return;
170
+ done = true;
171
+ reject(self, reason);
172
+ });
173
+ } catch (ex) {
174
+ if (done) return;
175
+ done = true;
176
+ reject(self, ex);
177
+ }
178
+ }
179
+
180
+ Promise.prototype['catch'] = function (onRejected) {
181
+ return this.then(null, onRejected);
182
+ };
183
+
184
+ Promise.prototype.then = function (onFulfilled, onRejected) {
185
+ var prom = new (this.constructor)(noop);
186
+
187
+ handle(this, new Handler(onFulfilled, onRejected, prom));
188
+ return prom;
189
+ };
190
+
191
+ Promise.all = function (arr) {
192
+ var args = Array.prototype.slice.call(arr);
193
+
194
+ return new Promise(function (resolve, reject) {
195
+ if (args.length === 0) return resolve([]);
196
+ var remaining = args.length;
197
+
198
+ function res(i, val) {
199
+ try {
200
+ if (val && (typeof val === 'object' || typeof val === 'function')) {
201
+ var then = val.then;
202
+ if (typeof then === 'function') {
203
+ then.call(val, function (val) {
204
+ res(i, val);
205
+ }, reject);
206
+ return;
207
+ }
208
+ }
209
+ args[i] = val;
210
+ if (--remaining === 0) {
211
+ resolve(args);
212
+ }
213
+ } catch (ex) {
214
+ reject(ex);
215
+ }
216
+ }
217
+
218
+ for (var i = 0; i < args.length; i++) {
219
+ res(i, args[i]);
220
+ }
221
+ });
222
+ };
223
+
224
+ Promise.resolve = function (value) {
225
+ if (value && typeof value === 'object' && value.constructor === Promise) {
226
+ return value;
227
+ }
228
+
229
+ return new Promise(function (resolve) {
230
+ resolve(value);
231
+ });
232
+ };
233
+
234
+ Promise.reject = function (value) {
235
+ return new Promise(function (resolve, reject) {
236
+ reject(value);
237
+ });
238
+ };
239
+
240
+ Promise.race = function (values) {
241
+ return new Promise(function (resolve, reject) {
242
+ for (var i = 0, len = values.length; i < len; i++) {
243
+ values[i].then(resolve, reject);
244
+ }
245
+ });
246
+ };
247
+
248
+ // Use polyfill for setImmediate for performance gains
249
+ Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||
250
+ function (fn) {
251
+ setTimeoutFunc(fn, 0);
252
+ };
253
+
254
+ Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
255
+ if (typeof console !== 'undefined' && console) {
256
+ console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
257
+ }
258
+ };
259
+
260
+ /**
261
+ * Set the immediate function to execute callbacks
262
+ * @param fn {function} Function to execute
263
+ * @deprecated
264
+ */
265
+ Promise._setImmediateFn = function _setImmediateFn(fn) {
266
+ Promise._immediateFn = fn;
267
+ };
268
+
269
+ /**
270
+ * Change the function to execute on unhandled rejection
271
+ * @param {function} fn Function to execute on unhandled rejection
272
+ * @deprecated
273
+ */
274
+ Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
275
+ Promise._unhandledRejectionFn = fn;
276
+ };
277
+
278
+ if (typeof module !== 'undefined' && module.exports) {
279
+ module.exports = Promise;
280
+ } else if (!root.Promise) {
281
+ root.Promise = Promise;
282
+ }
283
+
284
+ })(this);
285
+
286
+ },{}],5:[function(_dereq_,module,exports){
287
+ 'use strict';
288
+
289
+ Object.defineProperty(exports, "__esModule", {
290
+ value: true
291
+ });
292
+
293
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
294
+
295
+ var _mejs = _dereq_(7);
296
+
297
+ var _mejs2 = _interopRequireDefault(_mejs);
298
+
299
+ var _en = _dereq_(15);
300
+
301
+ var _general = _dereq_(27);
302
+
303
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
304
+
305
+ var i18n = { lang: 'en', en: _en.EN };
306
+
307
+ i18n.language = function () {
308
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
309
+ args[_key] = arguments[_key];
310
+ }
311
+
312
+ if (args !== null && args !== undefined && args.length) {
313
+
314
+ if (typeof args[0] !== 'string') {
315
+ throw new TypeError('Language code must be a string value');
316
+ }
317
+
318
+ if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) {
319
+ throw new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters');
320
+ }
321
+
322
+ i18n.lang = args[0];
323
+
324
+ if (i18n[args[0]] === undefined) {
325
+ args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {};
326
+ i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN;
327
+ } else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object') {
328
+ i18n[args[0]] = args[1];
329
+ }
330
+ }
331
+
332
+ return i18n.lang;
333
+ };
334
+
335
+ i18n.t = function (message) {
336
+ var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
337
+
338
+
339
+ if (typeof message === 'string' && message.length) {
340
+
341
+ var str = void 0,
342
+ pluralForm = void 0;
343
+
344
+ var language = i18n.language();
345
+
346
+ var _plural = function _plural(input, number, form) {
347
+
348
+ if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
349
+ return input;
350
+ }
351
+
352
+ var _pluralForms = function () {
353
+ return [function () {
354
+ return arguments.length <= 1 ? undefined : arguments[1];
355
+ }, function () {
356
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
357
+ }, function () {
358
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
359
+ }, function () {
360
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
361
+ return arguments.length <= 1 ? undefined : arguments[1];
362
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {
363
+ return arguments.length <= 2 ? undefined : arguments[2];
364
+ } else {
365
+ return arguments.length <= 3 ? undefined : arguments[3];
366
+ }
367
+ }, function () {
368
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {
369
+ return arguments.length <= 1 ? undefined : arguments[1];
370
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {
371
+ return arguments.length <= 2 ? undefined : arguments[2];
372
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {
373
+ return arguments.length <= 3 ? undefined : arguments[3];
374
+ } else {
375
+ return arguments.length <= 4 ? undefined : arguments[4];
376
+ }
377
+ }, function () {
378
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
379
+ return arguments.length <= 1 ? undefined : arguments[1];
380
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
381
+ return arguments.length <= 2 ? undefined : arguments[2];
382
+ } else {
383
+ return arguments.length <= 3 ? undefined : arguments[3];
384
+ }
385
+ }, function () {
386
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
387
+ return arguments.length <= 1 ? undefined : arguments[1];
388
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
389
+ return arguments.length <= 2 ? undefined : arguments[2];
390
+ } else {
391
+ return [3];
392
+ }
393
+ }, function () {
394
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
395
+ return arguments.length <= 1 ? undefined : arguments[1];
396
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
397
+ return arguments.length <= 2 ? undefined : arguments[2];
398
+ } else {
399
+ return arguments.length <= 3 ? undefined : arguments[3];
400
+ }
401
+ }, function () {
402
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
403
+ return arguments.length <= 1 ? undefined : arguments[1];
404
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {
405
+ return arguments.length <= 2 ? undefined : arguments[2];
406
+ } else {
407
+ return arguments.length <= 3 ? undefined : arguments[3];
408
+ }
409
+ }, function () {
410
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
411
+ return arguments.length <= 1 ? undefined : arguments[1];
412
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
413
+ return arguments.length <= 2 ? undefined : arguments[2];
414
+ } else {
415
+ return arguments.length <= 3 ? undefined : arguments[3];
416
+ }
417
+ }, function () {
418
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {
419
+ return arguments.length <= 2 ? undefined : arguments[2];
420
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {
421
+ return arguments.length <= 3 ? undefined : arguments[3];
422
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {
423
+ return arguments.length <= 4 ? undefined : arguments[4];
424
+ } else {
425
+ return arguments.length <= 1 ? undefined : arguments[1];
426
+ }
427
+ }, function () {
428
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
429
+ return arguments.length <= 1 ? undefined : arguments[1];
430
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
431
+ return arguments.length <= 2 ? undefined : arguments[2];
432
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {
433
+ return arguments.length <= 3 ? undefined : arguments[3];
434
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {
435
+ return arguments.length <= 4 ? undefined : arguments[4];
436
+ } else {
437
+ return arguments.length <= 5 ? undefined : arguments[5];
438
+ }
439
+ }, function () {
440
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
441
+ return arguments.length <= 1 ? undefined : arguments[1];
442
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
443
+ return arguments.length <= 2 ? undefined : arguments[2];
444
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
445
+ return arguments.length <= 3 ? undefined : arguments[3];
446
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {
447
+ return arguments.length <= 4 ? undefined : arguments[4];
448
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {
449
+ return arguments.length <= 5 ? undefined : arguments[5];
450
+ } else {
451
+ return arguments.length <= 6 ? undefined : arguments[6];
452
+ }
453
+ }, function () {
454
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
455
+ return arguments.length <= 1 ? undefined : arguments[1];
456
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {
457
+ return arguments.length <= 2 ? undefined : arguments[2];
458
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
459
+ return arguments.length <= 3 ? undefined : arguments[3];
460
+ } else {
461
+ return arguments.length <= 4 ? undefined : arguments[4];
462
+ }
463
+ }, function () {
464
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {
465
+ return arguments.length <= 1 ? undefined : arguments[1];
466
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {
467
+ return arguments.length <= 2 ? undefined : arguments[2];
468
+ } else {
469
+ return arguments.length <= 3 ? undefined : arguments[3];
470
+ }
471
+ }, function () {
472
+ return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
473
+ }, function () {
474
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
475
+ return arguments.length <= 1 ? undefined : arguments[1];
476
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
477
+ return arguments.length <= 2 ? undefined : arguments[2];
478
+ } else {
479
+ return arguments.length <= 3 ? undefined : arguments[3];
480
+ }
481
+ }, function () {
482
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
483
+ return arguments.length <= 1 ? undefined : arguments[1];
484
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
485
+ return arguments.length <= 2 ? undefined : arguments[2];
486
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {
487
+ return arguments.length <= 3 ? undefined : arguments[3];
488
+ } else {
489
+ return arguments.length <= 4 ? undefined : arguments[4];
490
+ }
491
+ }, function () {
492
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
493
+ }, function () {
494
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
495
+ return arguments.length <= 1 ? undefined : arguments[1];
496
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
497
+ return arguments.length <= 2 ? undefined : arguments[2];
498
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {
499
+ return arguments.length <= 3 ? undefined : arguments[3];
500
+ } else {
501
+ return arguments.length <= 4 ? undefined : arguments[4];
502
+ }
503
+ }, function () {
504
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
505
+ return arguments.length <= 1 ? undefined : arguments[1];
506
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
507
+ return arguments.length <= 2 ? undefined : arguments[2];
508
+ } else {
509
+ return arguments.length <= 3 ? undefined : arguments[3];
510
+ }
511
+ }];
512
+ }();
513
+
514
+ return _pluralForms[form].apply(null, [number].concat(input));
515
+ };
516
+
517
+ if (i18n[language] !== undefined) {
518
+ str = i18n[language][message];
519
+ if (pluralParam !== null && typeof pluralParam === 'number') {
520
+ pluralForm = i18n[language]['mejs.plural-form'];
521
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
522
+ }
523
+ }
524
+
525
+ if (!str && i18n.en) {
526
+ str = i18n.en[message];
527
+ if (pluralParam !== null && typeof pluralParam === 'number') {
528
+ pluralForm = i18n.en['mejs.plural-form'];
529
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
530
+ }
531
+ }
532
+
533
+ str = str || message;
534
+
535
+ if (pluralParam !== null && typeof pluralParam === 'number') {
536
+ str = str.replace('%1', pluralParam);
537
+ }
538
+
539
+ return (0, _general.escapeHTML)(str);
540
+ }
541
+
542
+ return message;
543
+ };
544
+
545
+ _mejs2.default.i18n = i18n;
546
+
547
+ if (typeof mejsL10n !== 'undefined') {
548
+ _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);
549
+ }
550
+
551
+ exports.default = i18n;
552
+
553
+ },{"15":15,"27":27,"7":7}],6:[function(_dereq_,module,exports){
554
+ 'use strict';
555
+
556
+ Object.defineProperty(exports, "__esModule", {
557
+ value: true
558
+ });
559
+
560
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
561
+
562
+ var _window = _dereq_(3);
563
+
564
+ var _window2 = _interopRequireDefault(_window);
565
+
566
+ var _document = _dereq_(2);
567
+
568
+ var _document2 = _interopRequireDefault(_document);
569
+
570
+ var _mejs = _dereq_(7);
571
+
572
+ var _mejs2 = _interopRequireDefault(_mejs);
573
+
574
+ var _general = _dereq_(27);
575
+
576
+ var _media2 = _dereq_(28);
577
+
578
+ var _renderer = _dereq_(8);
579
+
580
+ var _constants = _dereq_(25);
581
+
582
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
583
+
584
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
585
+
586
+ var MediaElement = function MediaElement(idOrNode, options, sources) {
587
+ var _this = this;
588
+
589
+ _classCallCheck(this, MediaElement);
590
+
591
+ var t = this;
592
+
593
+ sources = Array.isArray(sources) ? sources : null;
594
+
595
+ t.defaults = {
596
+ renderers: [],
597
+
598
+ fakeNodeName: 'mediaelementwrapper',
599
+
600
+ pluginPath: 'build/',
601
+
602
+ shimScriptAccess: 'sameDomain'
603
+ };
604
+
605
+ options = Object.assign(t.defaults, options);
606
+
607
+ t.mediaElement = _document2.default.createElement(options.fakeNodeName);
608
+
609
+ var id = idOrNode,
610
+ error = false;
611
+
612
+ if (typeof idOrNode === 'string') {
613
+ t.mediaElement.originalNode = _document2.default.getElementById(idOrNode);
614
+ } else {
615
+ t.mediaElement.originalNode = idOrNode;
616
+ id = idOrNode.id;
617
+ }
618
+
619
+ if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {
620
+ return null;
621
+ }
622
+
623
+ t.mediaElement.options = options;
624
+ id = id || 'mejs_' + Math.random().toString().slice(2);
625
+
626
+ t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');
627
+
628
+ var tagName = t.mediaElement.originalNode.tagName.toLowerCase();
629
+ if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {
630
+ t.mediaElement.originalNode.setAttribute('preload', 'none');
631
+ }
632
+
633
+ t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);
634
+
635
+ t.mediaElement.appendChild(t.mediaElement.originalNode);
636
+
637
+ var processURL = function processURL(url, type) {
638
+ if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {
639
+ var xhr = new XMLHttpRequest();
640
+ xhr.onreadystatechange = function () {
641
+ if (this.readyState === 4 && this.status === 200) {
642
+ var _url = _window2.default.URL || _window2.default.webkitURL,
643
+ blobUrl = _url.createObjectURL(this.response);
644
+ t.mediaElement.originalNode.setAttribute('src', blobUrl);
645
+ return blobUrl;
646
+ }
647
+ return url;
648
+ };
649
+ xhr.open('GET', url);
650
+ xhr.responseType = 'blob';
651
+ xhr.send();
652
+ }
653
+
654
+ return url;
655
+ };
656
+
657
+ var mediaFiles = void 0;
658
+
659
+ if (sources !== null) {
660
+ mediaFiles = sources;
661
+ } else if (t.mediaElement.originalNode !== null) {
662
+
663
+ mediaFiles = [];
664
+
665
+ switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {
666
+ case 'iframe':
667
+ mediaFiles.push({
668
+ type: '',
669
+ src: t.mediaElement.originalNode.getAttribute('src')
670
+ });
671
+ break;
672
+ case 'audio':
673
+ case 'video':
674
+ var _sources = t.mediaElement.originalNode.children.length,
675
+ nodeSource = t.mediaElement.originalNode.getAttribute('src');
676
+
677
+ if (nodeSource) {
678
+ var node = t.mediaElement.originalNode,
679
+ type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));
680
+ mediaFiles.push({
681
+ type: type,
682
+ src: processURL(nodeSource, type)
683
+ });
684
+ }
685
+
686
+ for (var i = 0; i < _sources; i++) {
687
+ var n = t.mediaElement.originalNode.children[i];
688
+ if (n.tagName.toLowerCase() === 'source') {
689
+ var src = n.getAttribute('src'),
690
+ _type = (0, _media2.formatType)(src, n.getAttribute('type'));
691
+ mediaFiles.push({ type: _type, src: processURL(src, _type) });
692
+ }
693
+ }
694
+ break;
695
+ }
696
+ }
697
+
698
+ t.mediaElement.id = id;
699
+ t.mediaElement.renderers = {};
700
+ t.mediaElement.events = {};
701
+ t.mediaElement.promises = [];
702
+ t.mediaElement.renderer = null;
703
+ t.mediaElement.rendererName = null;
704
+
705
+ t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {
706
+
707
+ var t = _this,
708
+ media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;
709
+
710
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {
711
+ t.mediaElement.renderer.pause();
712
+ if (t.mediaElement.renderer.stop) {
713
+ t.mediaElement.renderer.stop();
714
+ }
715
+ t.mediaElement.renderer.show();
716
+ t.mediaElement.renderer.setSrc(media);
717
+ return true;
718
+ }
719
+
720
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
721
+ t.mediaElement.renderer.pause();
722
+ if (t.mediaElement.renderer.stop) {
723
+ t.mediaElement.renderer.stop();
724
+ }
725
+ t.mediaElement.renderer.hide();
726
+ }
727
+
728
+ var newRenderer = t.mediaElement.renderers[rendererName],
729
+ newRendererType = null;
730
+
731
+ if (newRenderer !== undefined && newRenderer !== null) {
732
+ newRenderer.show();
733
+ newRenderer.setSrc(media);
734
+ t.mediaElement.renderer = newRenderer;
735
+ t.mediaElement.rendererName = rendererName;
736
+ return true;
737
+ }
738
+
739
+ var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;
740
+
741
+ for (var _i = 0, total = rendererArray.length; _i < total; _i++) {
742
+ var index = rendererArray[_i];
743
+
744
+ if (index === rendererName) {
745
+ var rendererList = _renderer.renderer.renderers;
746
+ newRendererType = rendererList[index];
747
+
748
+ var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);
749
+ newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);
750
+ newRenderer.name = rendererName;
751
+
752
+ t.mediaElement.renderers[newRendererType.name] = newRenderer;
753
+ t.mediaElement.renderer = newRenderer;
754
+ t.mediaElement.rendererName = rendererName;
755
+ newRenderer.show();
756
+ return true;
757
+ }
758
+ }
759
+
760
+ return false;
761
+ };
762
+
763
+ t.mediaElement.setSize = function (width, height) {
764
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
765
+ t.mediaElement.renderer.setSize(width, height);
766
+ }
767
+ };
768
+
769
+ t.mediaElement.generateError = function (message, urlList) {
770
+ message = message || '';
771
+ urlList = Array.isArray(urlList) ? urlList : [];
772
+ var event = (0, _general.createEvent)('error', t.mediaElement);
773
+ event.message = message;
774
+ event.urls = urlList;
775
+ t.mediaElement.dispatchEvent(event);
776
+ error = true;
777
+ };
778
+
779
+ var props = _mejs2.default.html5media.properties,
780
+ methods = _mejs2.default.html5media.methods,
781
+ addProperty = function addProperty(obj, name, onGet, onSet) {
782
+ var oldValue = obj[name];
783
+ var getFn = function getFn() {
784
+ return onGet.apply(obj, [oldValue]);
785
+ },
786
+ setFn = function setFn(newValue) {
787
+ oldValue = onSet.apply(obj, [newValue]);
788
+ return oldValue;
789
+ };
790
+
791
+ Object.defineProperty(obj, name, {
792
+ get: getFn,
793
+ set: setFn
794
+ });
795
+ },
796
+ assignGettersSetters = function assignGettersSetters(propName) {
797
+ if (propName !== 'src') {
798
+
799
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),
800
+ getFn = function getFn() {
801
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;
802
+ },
803
+ setFn = function setFn(value) {
804
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {
805
+ t.mediaElement.renderer['set' + capName](value);
806
+ }
807
+ };
808
+
809
+ addProperty(t.mediaElement, propName, getFn, setFn);
810
+ t.mediaElement['get' + capName] = getFn;
811
+ t.mediaElement['set' + capName] = setFn;
812
+ }
813
+ },
814
+ getSrc = function getSrc() {
815
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;
816
+ },
817
+ setSrc = function setSrc(value) {
818
+ var mediaFiles = [];
819
+
820
+ if (typeof value === 'string') {
821
+ mediaFiles.push({
822
+ src: value,
823
+ type: value ? (0, _media2.getTypeFromFile)(value) : ''
824
+ });
825
+ } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {
826
+ var _src = (0, _media2.absolutizeUrl)(value.src),
827
+ _type2 = value.type,
828
+ media = Object.assign(value, {
829
+ src: _src,
830
+ type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2
831
+ });
832
+ mediaFiles.push(media);
833
+ } else if (Array.isArray(value)) {
834
+ for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {
835
+
836
+ var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),
837
+ _type3 = value[_i2].type,
838
+ _media = Object.assign(value[_i2], {
839
+ src: _src2,
840
+ type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3
841
+ });
842
+
843
+ mediaFiles.push(_media);
844
+ }
845
+ }
846
+
847
+ var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),
848
+ event = void 0;
849
+
850
+ if (!t.mediaElement.paused) {
851
+ t.mediaElement.pause();
852
+ event = (0, _general.createEvent)('pause', t.mediaElement);
853
+ t.mediaElement.dispatchEvent(event);
854
+ }
855
+ t.mediaElement.originalNode.src = mediaFiles[0].src || '';
856
+
857
+ if (renderInfo === null && mediaFiles[0].src) {
858
+ t.mediaElement.generateError('No renderer found', mediaFiles);
859
+ return;
860
+ }
861
+
862
+ return mediaFiles[0].src ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;
863
+ },
864
+ triggerAction = function triggerAction(methodName, args) {
865
+ try {
866
+ if (methodName === 'play' && t.mediaElement.rendererName === 'native_dash') {
867
+ var response = t.mediaElement.renderer[methodName](args);
868
+ if (response && typeof response.then === 'function') {
869
+ response.catch(function () {
870
+ if (t.mediaElement.paused) {
871
+ setTimeout(function () {
872
+ var tmpResponse = t.mediaElement.renderer.play();
873
+ if (tmpResponse !== undefined) {
874
+ tmpResponse.catch(function () {
875
+ if (!t.mediaElement.renderer.paused) {
876
+ t.mediaElement.renderer.pause();
877
+ }
878
+ });
879
+ }
880
+ }, 150);
881
+ }
882
+ });
883
+ }
884
+ } else {
885
+ t.mediaElement.renderer[methodName](args);
886
+ }
887
+ } catch (e) {
888
+ t.mediaElement.generateError(e, mediaFiles);
889
+ }
890
+ },
891
+ assignMethods = function assignMethods(methodName) {
892
+ t.mediaElement[methodName] = function () {
893
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
894
+ args[_key] = arguments[_key];
895
+ }
896
+
897
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {
898
+ if (t.mediaElement.promises.length) {
899
+ Promise.all(t.mediaElement.promises).then(function () {
900
+ triggerAction(methodName, args);
901
+ }).catch(function (e) {
902
+ t.mediaElement.generateError(e, mediaFiles);
903
+ });
904
+ } else {
905
+ triggerAction(methodName, args);
906
+ }
907
+ }
908
+ return null;
909
+ };
910
+ };
911
+
912
+ addProperty(t.mediaElement, 'src', getSrc, setSrc);
913
+ t.mediaElement.getSrc = getSrc;
914
+ t.mediaElement.setSrc = setSrc;
915
+
916
+ for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {
917
+ assignGettersSetters(props[_i3]);
918
+ }
919
+
920
+ for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {
921
+ assignMethods(methods[_i4]);
922
+ }
923
+
924
+ t.mediaElement.addEventListener = function (eventName, callback) {
925
+ t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];
926
+
927
+ t.mediaElement.events[eventName].push(callback);
928
+ };
929
+ t.mediaElement.removeEventListener = function (eventName, callback) {
930
+ if (!eventName) {
931
+ t.mediaElement.events = {};
932
+ return true;
933
+ }
934
+
935
+ var callbacks = t.mediaElement.events[eventName];
936
+
937
+ if (!callbacks) {
938
+ return true;
939
+ }
940
+
941
+ if (!callback) {
942
+ t.mediaElement.events[eventName] = [];
943
+ return true;
944
+ }
945
+
946
+ for (var _i5 = 0; _i5 < callbacks.length; _i5++) {
947
+ if (callbacks[_i5] === callback) {
948
+ t.mediaElement.events[eventName].splice(_i5, 1);
949
+ return true;
950
+ }
951
+ }
952
+ return false;
953
+ };
954
+
955
+ t.mediaElement.dispatchEvent = function (event) {
956
+ var callbacks = t.mediaElement.events[event.type];
957
+ if (callbacks) {
958
+ for (var _i6 = 0; _i6 < callbacks.length; _i6++) {
959
+ callbacks[_i6].apply(null, [event]);
960
+ }
961
+ }
962
+ };
963
+
964
+ t.mediaElement.destroy = function () {
965
+ var mediaElement = t.mediaElement.originalNode.cloneNode(true);
966
+ var wrapper = t.mediaElement.parentElement;
967
+ mediaElement.removeAttribute('id');
968
+ mediaElement.remove();
969
+ t.mediaElement.remove();
970
+ wrapper.append(mediaElement);
971
+ };
972
+
973
+ if (mediaFiles.length) {
974
+ t.mediaElement.src = mediaFiles;
975
+ }
976
+
977
+ if (t.mediaElement.promises.length) {
978
+ Promise.all(t.mediaElement.promises).then(function () {
979
+ if (t.mediaElement.options.success) {
980
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
981
+ }
982
+ }).catch(function () {
983
+ if (error && t.mediaElement.options.error) {
984
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
985
+ }
986
+ });
987
+ } else {
988
+ if (t.mediaElement.options.success) {
989
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
990
+ }
991
+
992
+ if (error && t.mediaElement.options.error) {
993
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
994
+ }
995
+ }
996
+
997
+ return t.mediaElement;
998
+ };
999
+
1000
+ _window2.default.MediaElement = MediaElement;
1001
+ _mejs2.default.MediaElement = MediaElement;
1002
+
1003
+ exports.default = MediaElement;
1004
+
1005
+ },{"2":2,"25":25,"27":27,"28":28,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
1006
+ 'use strict';
1007
+
1008
+ Object.defineProperty(exports, "__esModule", {
1009
+ value: true
1010
+ });
1011
+
1012
+ var _window = _dereq_(3);
1013
+
1014
+ var _window2 = _interopRequireDefault(_window);
1015
+
1016
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1017
+
1018
+ var mejs = {};
1019
+
1020
+ mejs.version = '4.2.8';
1021
+
1022
+ mejs.html5media = {
1023
+ properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
1024
+ readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],
1025
+
1026
+ methods: ['load', 'play', 'pause', 'canPlayType'],
1027
+
1028
+ events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],
1029
+
1030
+ mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']
1031
+ };
1032
+
1033
+ _window2.default.mejs = mejs;
1034
+
1035
+ exports.default = mejs;
1036
+
1037
+ },{"3":3}],8:[function(_dereq_,module,exports){
1038
+ 'use strict';
1039
+
1040
+ Object.defineProperty(exports, "__esModule", {
1041
+ value: true
1042
+ });
1043
+ exports.renderer = undefined;
1044
+
1045
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1046
+
1047
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1048
+
1049
+ var _mejs = _dereq_(7);
1050
+
1051
+ var _mejs2 = _interopRequireDefault(_mejs);
1052
+
1053
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1054
+
1055
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1056
+
1057
+ var Renderer = function () {
1058
+ function Renderer() {
1059
+ _classCallCheck(this, Renderer);
1060
+
1061
+ this.renderers = {};
1062
+ this.order = [];
1063
+ }
1064
+
1065
+ _createClass(Renderer, [{
1066
+ key: 'add',
1067
+ value: function add(renderer) {
1068
+ if (renderer.name === undefined) {
1069
+ throw new TypeError('renderer must contain at least `name` property');
1070
+ }
1071
+
1072
+ this.renderers[renderer.name] = renderer;
1073
+ this.order.push(renderer.name);
1074
+ }
1075
+ }, {
1076
+ key: 'select',
1077
+ value: function select(mediaFiles) {
1078
+ var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
1079
+
1080
+ var renderersLength = renderers.length;
1081
+
1082
+ renderers = renderers.length ? renderers : this.order;
1083
+
1084
+ if (!renderersLength) {
1085
+ var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],
1086
+ rendererRanking = function rendererRanking(renderer) {
1087
+ for (var i = 0, total = rendererIndicator.length; i < total; i++) {
1088
+ if (rendererIndicator[i].test(renderer)) {
1089
+ return i;
1090
+ }
1091
+ }
1092
+ return rendererIndicator.length;
1093
+ };
1094
+
1095
+ renderers.sort(function (a, b) {
1096
+ return rendererRanking(a) - rendererRanking(b);
1097
+ });
1098
+ }
1099
+
1100
+ for (var i = 0, total = renderers.length; i < total; i++) {
1101
+ var key = renderers[i],
1102
+ _renderer = this.renderers[key];
1103
+
1104
+ if (_renderer !== null && _renderer !== undefined) {
1105
+ for (var j = 0, jl = mediaFiles.length; j < jl; j++) {
1106
+ if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {
1107
+ return {
1108
+ rendererName: _renderer.name,
1109
+ src: mediaFiles[j].src
1110
+ };
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+
1116
+ return null;
1117
+ }
1118
+ }, {
1119
+ key: 'order',
1120
+ set: function set(order) {
1121
+ if (!Array.isArray(order)) {
1122
+ throw new TypeError('order must be an array of strings.');
1123
+ }
1124
+
1125
+ this._order = order;
1126
+ },
1127
+ get: function get() {
1128
+ return this._order;
1129
+ }
1130
+ }, {
1131
+ key: 'renderers',
1132
+ set: function set(renderers) {
1133
+ if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {
1134
+ throw new TypeError('renderers must be an array of objects.');
1135
+ }
1136
+
1137
+ this._renderers = renderers;
1138
+ },
1139
+ get: function get() {
1140
+ return this._renderers;
1141
+ }
1142
+ }]);
1143
+
1144
+ return Renderer;
1145
+ }();
1146
+
1147
+ var renderer = exports.renderer = new Renderer();
1148
+
1149
+ _mejs2.default.Renderers = renderer;
1150
+
1151
+ },{"7":7}],9:[function(_dereq_,module,exports){
1152
+ 'use strict';
1153
+
1154
+ var _window = _dereq_(3);
1155
+
1156
+ var _window2 = _interopRequireDefault(_window);
1157
+
1158
+ var _document = _dereq_(2);
1159
+
1160
+ var _document2 = _interopRequireDefault(_document);
1161
+
1162
+ var _i18n = _dereq_(5);
1163
+
1164
+ var _i18n2 = _interopRequireDefault(_i18n);
1165
+
1166
+ var _player = _dereq_(16);
1167
+
1168
+ var _player2 = _interopRequireDefault(_player);
1169
+
1170
+ var _constants = _dereq_(25);
1171
+
1172
+ var Features = _interopRequireWildcard(_constants);
1173
+
1174
+ var _general = _dereq_(27);
1175
+
1176
+ var _dom = _dereq_(26);
1177
+
1178
+ var _media = _dereq_(28);
1179
+
1180
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
1181
+
1182
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1183
+
1184
+ Object.assign(_player.config, {
1185
+ usePluginFullScreen: true,
1186
+
1187
+ fullscreenText: null,
1188
+
1189
+ useFakeFullscreen: false
1190
+ });
1191
+
1192
+ Object.assign(_player2.default.prototype, {
1193
+ isFullScreen: false,
1194
+
1195
+ isNativeFullScreen: false,
1196
+
1197
+ isInIframe: false,
1198
+
1199
+ isPluginClickThroughCreated: false,
1200
+
1201
+ fullscreenMode: '',
1202
+
1203
+ containerSizeTimeout: null,
1204
+
1205
+ buildfullscreen: function buildfullscreen(player) {
1206
+ if (!player.isVideo) {
1207
+ return;
1208
+ }
1209
+
1210
+ player.isInIframe = _window2.default.location !== _window2.default.parent.location;
1211
+
1212
+ player.detectFullscreenMode();
1213
+
1214
+ var t = this,
1215
+ fullscreenTitle = (0, _general.isString)(t.options.fullscreenText) ? t.options.fullscreenText : _i18n2.default.t('mejs.fullscreen'),
1216
+ fullscreenBtn = _document2.default.createElement('div');
1217
+
1218
+ fullscreenBtn.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'fullscreen-button';
1219
+ fullscreenBtn.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + fullscreenTitle + '" aria-label="' + fullscreenTitle + '" tabindex="0"></button>';
1220
+ t.addControlElement(fullscreenBtn, 'fullscreen');
1221
+
1222
+ fullscreenBtn.addEventListener('click', function () {
1223
+ var isFullScreen = Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || player.isFullScreen;
1224
+
1225
+ if (isFullScreen) {
1226
+ player.exitFullScreen();
1227
+ } else {
1228
+ player.enterFullScreen();
1229
+ }
1230
+ });
1231
+
1232
+ player.fullscreenBtn = fullscreenBtn;
1233
+
1234
+ t.options.keyActions.push({
1235
+ keys: [70],
1236
+ action: function action(player, media, key, event) {
1237
+ if (!event.ctrlKey) {
1238
+ if (typeof player.enterFullScreen !== 'undefined') {
1239
+ if (player.isFullScreen) {
1240
+ player.exitFullScreen();
1241
+ } else {
1242
+ player.enterFullScreen();
1243
+ }
1244
+ }
1245
+ }
1246
+ }
1247
+ });
1248
+
1249
+ t.exitFullscreenCallback = function (e) {
1250
+ var key = e.which || e.keyCode || 0;
1251
+ if (key === 27 && (Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || t.isFullScreen)) {
1252
+ player.exitFullScreen();
1253
+ }
1254
+ };
1255
+
1256
+ t.globalBind('keydown', t.exitFullscreenCallback);
1257
+
1258
+ t.normalHeight = 0;
1259
+ t.normalWidth = 0;
1260
+
1261
+ if (Features.HAS_TRUE_NATIVE_FULLSCREEN) {
1262
+ var fullscreenChanged = function fullscreenChanged() {
1263
+ if (player.isFullScreen) {
1264
+ if (Features.isFullScreen()) {
1265
+ player.isNativeFullScreen = true;
1266
+
1267
+ player.setControlsSize();
1268
+ } else {
1269
+ player.isNativeFullScreen = false;
1270
+
1271
+ player.exitFullScreen();
1272
+ }
1273
+ }
1274
+ };
1275
+
1276
+ player.globalBind(Features.FULLSCREEN_EVENT_NAME, fullscreenChanged);
1277
+ }
1278
+ },
1279
+ cleanfullscreen: function cleanfullscreen(player) {
1280
+ player.exitFullScreen();
1281
+ player.globalUnbind('keydown', player.exitFullscreenCallback);
1282
+ },
1283
+ detectFullscreenMode: function detectFullscreenMode() {
1284
+ var t = this,
1285
+ isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);
1286
+
1287
+ var mode = '';
1288
+
1289
+ if (Features.HAS_TRUE_NATIVE_FULLSCREEN && isNative) {
1290
+ mode = 'native-native';
1291
+ } else if (Features.HAS_TRUE_NATIVE_FULLSCREEN && !isNative) {
1292
+ mode = 'plugin-native';
1293
+ } else if (t.usePluginFullScreen && Features.SUPPORT_POINTER_EVENTS) {
1294
+ mode = 'plugin-click';
1295
+ }
1296
+
1297
+ t.fullscreenMode = mode;
1298
+ return mode;
1299
+ },
1300
+ enterFullScreen: function enterFullScreen() {
1301
+ var t = this,
1302
+ isNative = t.media.rendererName !== null && /(html5|native)/i.test(t.media.rendererName),
1303
+ containerStyles = getComputedStyle(t.getElement(t.container));
1304
+
1305
+ if (t.options.useFakeFullscreen === false && Features.IS_IOS && Features.HAS_IOS_FULLSCREEN && typeof t.media.originalNode.webkitEnterFullscreen === 'function' && t.media.originalNode.canPlayType((0, _media.getTypeFromFile)(t.media.getSrc()))) {
1306
+ t.media.originalNode.webkitEnterFullscreen();
1307
+ return;
1308
+ }
1309
+
1310
+ (0, _dom.addClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');
1311
+ (0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');
1312
+
1313
+ t.normalHeight = parseFloat(containerStyles.height);
1314
+ t.normalWidth = parseFloat(containerStyles.width);
1315
+
1316
+ if (t.fullscreenMode === 'native-native' || t.fullscreenMode === 'plugin-native') {
1317
+ Features.requestFullScreen(t.getElement(t.container));
1318
+
1319
+ if (t.isInIframe) {
1320
+ setTimeout(function checkFullscreen() {
1321
+
1322
+ if (t.isNativeFullScreen) {
1323
+ var percentErrorMargin = 0.002,
1324
+ windowWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth,
1325
+ screenWidth = screen.width,
1326
+ absDiff = Math.abs(screenWidth - windowWidth),
1327
+ marginError = screenWidth * percentErrorMargin;
1328
+
1329
+ if (absDiff > marginError) {
1330
+ t.exitFullScreen();
1331
+ } else {
1332
+ setTimeout(checkFullscreen, 500);
1333
+ }
1334
+ }
1335
+ }, 1000);
1336
+ }
1337
+ }
1338
+
1339
+ t.getElement(t.container).style.width = '100%';
1340
+ t.getElement(t.container).style.height = '100%';
1341
+
1342
+ t.containerSizeTimeout = setTimeout(function () {
1343
+ t.getElement(t.container).style.width = '100%';
1344
+ t.getElement(t.container).style.height = '100%';
1345
+ t.setControlsSize();
1346
+ }, 500);
1347
+
1348
+ if (isNative) {
1349
+ t.node.style.width = '100%';
1350
+ t.node.style.height = '100%';
1351
+ } else {
1352
+ var elements = t.getElement(t.container).querySelectorAll('embed, object, video'),
1353
+ _total = elements.length;
1354
+ for (var i = 0; i < _total; i++) {
1355
+ elements[i].style.width = '100%';
1356
+ elements[i].style.height = '100%';
1357
+ }
1358
+ }
1359
+
1360
+ if (t.options.setDimensions && typeof t.media.setSize === 'function') {
1361
+ t.media.setSize(screen.width, screen.height);
1362
+ }
1363
+
1364
+ var layers = t.getElement(t.layers).children,
1365
+ total = layers.length;
1366
+ for (var _i = 0; _i < total; _i++) {
1367
+ layers[_i].style.width = '100%';
1368
+ layers[_i].style.height = '100%';
1369
+ }
1370
+
1371
+ if (t.fullscreenBtn) {
1372
+ (0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');
1373
+ (0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');
1374
+ }
1375
+
1376
+ t.setControlsSize();
1377
+ t.isFullScreen = true;
1378
+
1379
+ var zoomFactor = Math.min(screen.width / t.width, screen.height / t.height),
1380
+ captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');
1381
+ if (captionText) {
1382
+ captionText.style.fontSize = zoomFactor * 100 + '%';
1383
+ captionText.style.lineHeight = 'normal';
1384
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = (screen.height - t.normalHeight) / 2 - t.getElement(t.controls).offsetHeight / 2 + zoomFactor + 15 + 'px';
1385
+ }
1386
+ var event = (0, _general.createEvent)('enteredfullscreen', t.getElement(t.container));
1387
+ t.getElement(t.container).dispatchEvent(event);
1388
+ },
1389
+ exitFullScreen: function exitFullScreen() {
1390
+ var t = this,
1391
+ isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);
1392
+
1393
+ clearTimeout(t.containerSizeTimeout);
1394
+
1395
+ if (Features.HAS_TRUE_NATIVE_FULLSCREEN && (Features.IS_FULLSCREEN || t.isFullScreen)) {
1396
+ Features.cancelFullScreen();
1397
+ }
1398
+
1399
+ (0, _dom.removeClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');
1400
+ (0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');
1401
+
1402
+ if (t.options.setDimensions) {
1403
+ t.getElement(t.container).style.width = t.normalWidth + 'px';
1404
+ t.getElement(t.container).style.height = t.normalHeight + 'px';
1405
+
1406
+ if (isNative) {
1407
+ t.node.style.width = t.normalWidth + 'px';
1408
+ t.node.style.height = t.normalHeight + 'px';
1409
+ } else {
1410
+ var elements = t.getElement(t.container).querySelectorAll('embed, object, video'),
1411
+ _total2 = elements.length;
1412
+ for (var i = 0; i < _total2; i++) {
1413
+ elements[i].style.width = t.normalWidth + 'px';
1414
+ elements[i].style.height = t.normalHeight + 'px';
1415
+ }
1416
+ }
1417
+
1418
+ if (typeof t.media.setSize === 'function') {
1419
+ t.media.setSize(t.normalWidth, t.normalHeight);
1420
+ }
1421
+
1422
+ var layers = t.getElement(t.layers).children,
1423
+ total = layers.length;
1424
+ for (var _i2 = 0; _i2 < total; _i2++) {
1425
+ layers[_i2].style.width = t.normalWidth + 'px';
1426
+ layers[_i2].style.height = t.normalHeight + 'px';
1427
+ }
1428
+ }
1429
+
1430
+ if (t.fullscreenBtn) {
1431
+ (0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');
1432
+ (0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');
1433
+ }
1434
+
1435
+ t.setControlsSize();
1436
+ t.isFullScreen = false;
1437
+
1438
+ var captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');
1439
+ if (captionText) {
1440
+ captionText.style.fontSize = '';
1441
+ captionText.style.lineHeight = '';
1442
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = '';
1443
+ }
1444
+ var event = (0, _general.createEvent)('exitedfullscreen', t.getElement(t.container));
1445
+ t.getElement(t.container).dispatchEvent(event);
1446
+ }
1447
+ });
1448
+
1449
+ },{"16":16,"2":2,"25":25,"26":26,"27":27,"28":28,"3":3,"5":5}],10:[function(_dereq_,module,exports){
1450
+ 'use strict';
1451
+
1452
+ var _document = _dereq_(2);
1453
+
1454
+ var _document2 = _interopRequireDefault(_document);
1455
+
1456
+ var _player = _dereq_(16);
1457
+
1458
+ var _player2 = _interopRequireDefault(_player);
1459
+
1460
+ var _i18n = _dereq_(5);
1461
+
1462
+ var _i18n2 = _interopRequireDefault(_i18n);
1463
+
1464
+ var _general = _dereq_(27);
1465
+
1466
+ var _dom = _dereq_(26);
1467
+
1468
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1469
+
1470
+ Object.assign(_player.config, {
1471
+ playText: null,
1472
+
1473
+ pauseText: null
1474
+ });
1475
+
1476
+ Object.assign(_player2.default.prototype, {
1477
+ buildplaypause: function buildplaypause(player, controls, layers, media) {
1478
+ var t = this,
1479
+ op = t.options,
1480
+ playTitle = (0, _general.isString)(op.playText) ? op.playText : _i18n2.default.t('mejs.play'),
1481
+ pauseTitle = (0, _general.isString)(op.pauseText) ? op.pauseText : _i18n2.default.t('mejs.pause'),
1482
+ play = _document2.default.createElement('div');
1483
+
1484
+ play.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'playpause-button ' + t.options.classPrefix + 'play';
1485
+ play.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + playTitle + '" aria-label="' + pauseTitle + '" tabindex="0"></button>';
1486
+ play.addEventListener('click', function () {
1487
+ if (t.paused) {
1488
+ t.play();
1489
+ } else {
1490
+ t.pause();
1491
+ }
1492
+ });
1493
+
1494
+ var playBtn = play.querySelector('button');
1495
+ t.addControlElement(play, 'playpause');
1496
+
1497
+ function togglePlayPause(which) {
1498
+ if ('play' === which) {
1499
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'play');
1500
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'replay');
1501
+ (0, _dom.addClass)(play, t.options.classPrefix + 'pause');
1502
+ playBtn.setAttribute('title', pauseTitle);
1503
+ playBtn.setAttribute('aria-label', pauseTitle);
1504
+ } else {
1505
+
1506
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'pause');
1507
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'replay');
1508
+ (0, _dom.addClass)(play, t.options.classPrefix + 'play');
1509
+ playBtn.setAttribute('title', playTitle);
1510
+ playBtn.setAttribute('aria-label', playTitle);
1511
+ }
1512
+ }
1513
+
1514
+ togglePlayPause('pse');
1515
+
1516
+ media.addEventListener('loadedmetadata', function () {
1517
+ if (media.rendererName.indexOf('flash') === -1) {
1518
+ togglePlayPause('pse');
1519
+ }
1520
+ });
1521
+ media.addEventListener('play', function () {
1522
+ togglePlayPause('play');
1523
+ });
1524
+ media.addEventListener('playing', function () {
1525
+ togglePlayPause('play');
1526
+ });
1527
+ media.addEventListener('pause', function () {
1528
+ togglePlayPause('pse');
1529
+ });
1530
+ media.addEventListener('ended', function () {
1531
+ if (!player.options.loop) {
1532
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'pause');
1533
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'play');
1534
+ (0, _dom.addClass)(play, t.options.classPrefix + 'replay');
1535
+ playBtn.setAttribute('title', playTitle);
1536
+ playBtn.setAttribute('aria-label', playTitle);
1537
+ }
1538
+ });
1539
+ }
1540
+ });
1541
+
1542
+ },{"16":16,"2":2,"26":26,"27":27,"5":5}],11:[function(_dereq_,module,exports){
1543
+ 'use strict';
1544
+
1545
+ var _document = _dereq_(2);
1546
+
1547
+ var _document2 = _interopRequireDefault(_document);
1548
+
1549
+ var _player = _dereq_(16);
1550
+
1551
+ var _player2 = _interopRequireDefault(_player);
1552
+
1553
+ var _i18n = _dereq_(5);
1554
+
1555
+ var _i18n2 = _interopRequireDefault(_i18n);
1556
+
1557
+ var _constants = _dereq_(25);
1558
+
1559
+ var _time = _dereq_(30);
1560
+
1561
+ var _dom = _dereq_(26);
1562
+
1563
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1564
+
1565
+ Object.assign(_player.config, {
1566
+ enableProgressTooltip: true,
1567
+
1568
+ useSmoothHover: true,
1569
+
1570
+ forceLive: false
1571
+ });
1572
+
1573
+ Object.assign(_player2.default.prototype, {
1574
+ buildprogress: function buildprogress(player, controls, layers, media) {
1575
+
1576
+ var lastKeyPressTime = 0,
1577
+ mouseIsDown = false,
1578
+ startedPaused = false;
1579
+
1580
+ var t = this,
1581
+ autoRewindInitial = player.options.autoRewind,
1582
+ tooltip = player.options.enableProgressTooltip ? '<span class="' + t.options.classPrefix + 'time-float">' + ('<span class="' + t.options.classPrefix + 'time-float-current">00:00</span>') + ('<span class="' + t.options.classPrefix + 'time-float-corner"></span>') + '</span>' : '',
1583
+ rail = _document2.default.createElement('div');
1584
+
1585
+ rail.className = t.options.classPrefix + 'time-rail';
1586
+ rail.innerHTML = '<span class="' + t.options.classPrefix + 'time-total ' + t.options.classPrefix + 'time-slider">' + ('<span class="' + t.options.classPrefix + 'time-buffering"></span>') + ('<span class="' + t.options.classPrefix + 'time-loaded"></span>') + ('<span class="' + t.options.classPrefix + 'time-current"></span>') + ('<span class="' + t.options.classPrefix + 'time-hovered no-hover"></span>') + ('<span class="' + t.options.classPrefix + 'time-handle"><span class="' + t.options.classPrefix + 'time-handle-content"></span></span>') + ('' + tooltip) + '</span>';
1587
+
1588
+ t.addControlElement(rail, 'progress');
1589
+
1590
+ t.options.keyActions.push({
1591
+ keys: [37, 227],
1592
+ action: function action(player) {
1593
+ if (!isNaN(player.duration) && player.duration > 0) {
1594
+ if (player.isVideo) {
1595
+ player.showControls();
1596
+ player.startControlsTimer();
1597
+ }
1598
+
1599
+ player.getElement(player.container).querySelector('.' + _player.config.classPrefix + 'time-total').focus();
1600
+
1601
+ var newTime = Math.max(player.currentTime - player.options.defaultSeekBackwardInterval(player), 0);
1602
+ player.setCurrentTime(newTime);
1603
+ }
1604
+ }
1605
+ }, {
1606
+ keys: [39, 228],
1607
+ action: function action(player) {
1608
+
1609
+ if (!isNaN(player.duration) && player.duration > 0) {
1610
+ if (player.isVideo) {
1611
+ player.showControls();
1612
+ player.startControlsTimer();
1613
+ }
1614
+
1615
+ player.getElement(player.container).querySelector('.' + _player.config.classPrefix + 'time-total').focus();
1616
+
1617
+ var newTime = Math.min(player.currentTime + player.options.defaultSeekForwardInterval(player), player.duration);
1618
+ player.setCurrentTime(newTime);
1619
+ }
1620
+ }
1621
+ });
1622
+
1623
+ t.rail = controls.querySelector('.' + t.options.classPrefix + 'time-rail');
1624
+ t.total = controls.querySelector('.' + t.options.classPrefix + 'time-total');
1625
+ t.loaded = controls.querySelector('.' + t.options.classPrefix + 'time-loaded');
1626
+ t.current = controls.querySelector('.' + t.options.classPrefix + 'time-current');
1627
+ t.handle = controls.querySelector('.' + t.options.classPrefix + 'time-handle');
1628
+ t.timefloat = controls.querySelector('.' + t.options.classPrefix + 'time-float');
1629
+ t.timefloatcurrent = controls.querySelector('.' + t.options.classPrefix + 'time-float-current');
1630
+ t.slider = controls.querySelector('.' + t.options.classPrefix + 'time-slider');
1631
+ t.hovered = controls.querySelector('.' + t.options.classPrefix + 'time-hovered');
1632
+ t.buffer = controls.querySelector('.' + t.options.classPrefix + 'time-buffering');
1633
+ t.newTime = 0;
1634
+ t.forcedHandlePause = false;
1635
+ t.setTransformStyle = function (element, value) {
1636
+ element.style.transform = value;
1637
+ element.style.webkitTransform = value;
1638
+ element.style.MozTransform = value;
1639
+ element.style.msTransform = value;
1640
+ element.style.OTransform = value;
1641
+ };
1642
+
1643
+ t.buffer.style.display = 'none';
1644
+
1645
+ var handleMouseMove = function handleMouseMove(e) {
1646
+ var totalStyles = getComputedStyle(t.total),
1647
+ offsetStyles = (0, _dom.offset)(t.total),
1648
+ width = t.total.offsetWidth,
1649
+ transform = function () {
1650
+ if (totalStyles.webkitTransform !== undefined) {
1651
+ return 'webkitTransform';
1652
+ } else if (totalStyles.mozTransform !== undefined) {
1653
+ return 'mozTransform ';
1654
+ } else if (totalStyles.oTransform !== undefined) {
1655
+ return 'oTransform';
1656
+ } else if (totalStyles.msTransform !== undefined) {
1657
+ return 'msTransform';
1658
+ } else {
1659
+ return 'transform';
1660
+ }
1661
+ }(),
1662
+ cssMatrix = function () {
1663
+ if ('WebKitCSSMatrix' in window) {
1664
+ return 'WebKitCSSMatrix';
1665
+ } else if ('MSCSSMatrix' in window) {
1666
+ return 'MSCSSMatrix';
1667
+ } else if ('CSSMatrix' in window) {
1668
+ return 'CSSMatrix';
1669
+ }
1670
+ }();
1671
+
1672
+ var percentage = 0,
1673
+ leftPos = 0,
1674
+ pos = 0,
1675
+ x = void 0;
1676
+
1677
+ if (e.originalEvent && e.originalEvent.changedTouches) {
1678
+ x = e.originalEvent.changedTouches[0].pageX;
1679
+ } else if (e.changedTouches) {
1680
+ x = e.changedTouches[0].pageX;
1681
+ } else {
1682
+ x = e.pageX;
1683
+ }
1684
+
1685
+ if (t.getDuration()) {
1686
+ if (x < offsetStyles.left) {
1687
+ x = offsetStyles.left;
1688
+ } else if (x > width + offsetStyles.left) {
1689
+ x = width + offsetStyles.left;
1690
+ }
1691
+
1692
+ pos = x - offsetStyles.left;
1693
+ percentage = pos / width;
1694
+ t.newTime = percentage <= 0.02 ? 0 : percentage * t.getDuration();
1695
+
1696
+ if (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {
1697
+ t.setCurrentRailHandle(t.newTime);
1698
+ t.updateCurrent(t.newTime);
1699
+ }
1700
+
1701
+ if (!_constants.IS_IOS && !_constants.IS_ANDROID) {
1702
+ if (pos < 0) {
1703
+ pos = 0;
1704
+ }
1705
+ if (t.options.useSmoothHover && cssMatrix !== null && typeof window[cssMatrix] !== 'undefined') {
1706
+ var matrix = new window[cssMatrix](getComputedStyle(t.handle)[transform]),
1707
+ handleLocation = matrix.m41,
1708
+ hoverScaleX = pos / parseFloat(getComputedStyle(t.total).width) - handleLocation / parseFloat(getComputedStyle(t.total).width);
1709
+
1710
+ t.hovered.style.left = handleLocation + 'px';
1711
+ t.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');
1712
+ t.hovered.setAttribute('pos', pos);
1713
+
1714
+ if (hoverScaleX >= 0) {
1715
+ (0, _dom.removeClass)(t.hovered, 'negative');
1716
+ } else {
1717
+ (0, _dom.addClass)(t.hovered, 'negative');
1718
+ }
1719
+ }
1720
+
1721
+ if (t.timefloat) {
1722
+ var half = t.timefloat.offsetWidth / 2,
1723
+ offsetContainer = mejs.Utils.offset(t.getElement(t.container)),
1724
+ tooltipStyles = getComputedStyle(t.timefloat);
1725
+
1726
+ if (x - offsetContainer.left < t.timefloat.offsetWidth) {
1727
+ leftPos = half;
1728
+ } else if (x - offsetContainer.left >= t.getElement(t.container).offsetWidth - half) {
1729
+ leftPos = t.total.offsetWidth - half;
1730
+ } else {
1731
+ leftPos = pos;
1732
+ }
1733
+
1734
+ if ((0, _dom.hasClass)(t.getElement(t.container), t.options.classPrefix + 'long-video')) {
1735
+ leftPos += parseFloat(tooltipStyles.marginLeft) / 2 + t.timefloat.offsetWidth / 2;
1736
+ }
1737
+
1738
+ t.timefloat.style.left = leftPos + 'px';
1739
+ t.timefloatcurrent.innerHTML = (0, _time.secondsToTimeCode)(t.newTime, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat);
1740
+ t.timefloat.style.display = 'block';
1741
+ }
1742
+ }
1743
+ } else if (!_constants.IS_IOS && !_constants.IS_ANDROID && t.timefloat) {
1744
+ leftPos = t.timefloat.offsetWidth + width >= t.getElement(t.container).offsetWidth ? t.timefloat.offsetWidth / 2 : 0;
1745
+ t.timefloat.style.left = leftPos + 'px';
1746
+ t.timefloat.style.left = leftPos + 'px';
1747
+ t.timefloat.style.display = 'block';
1748
+ }
1749
+ },
1750
+ updateSlider = function updateSlider() {
1751
+ var seconds = t.getCurrentTime(),
1752
+ timeSliderText = _i18n2.default.t('mejs.time-slider'),
1753
+ time = (0, _time.secondsToTimeCode)(seconds, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat),
1754
+ duration = t.getDuration();
1755
+
1756
+ t.slider.setAttribute('role', 'slider');
1757
+ t.slider.tabIndex = 0;
1758
+
1759
+ if (media.paused) {
1760
+ t.slider.setAttribute('aria-label', timeSliderText);
1761
+ t.slider.setAttribute('aria-valuemin', 0);
1762
+ t.slider.setAttribute('aria-valuemax', duration);
1763
+ t.slider.setAttribute('aria-valuenow', seconds);
1764
+ t.slider.setAttribute('aria-valuetext', time);
1765
+ } else {
1766
+ t.slider.removeAttribute('aria-label');
1767
+ t.slider.removeAttribute('aria-valuemin');
1768
+ t.slider.removeAttribute('aria-valuemax');
1769
+ t.slider.removeAttribute('aria-valuenow');
1770
+ t.slider.removeAttribute('aria-valuetext');
1771
+ }
1772
+ },
1773
+ restartPlayer = function restartPlayer() {
1774
+ if (new Date() - lastKeyPressTime >= 1000) {
1775
+ t.play();
1776
+ }
1777
+ },
1778
+ handleMouseup = function handleMouseup() {
1779
+ if (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {
1780
+ t.setCurrentTime(t.newTime);
1781
+ t.setCurrentRail();
1782
+ t.updateCurrent(t.newTime);
1783
+ }
1784
+ if (t.forcedHandlePause) {
1785
+ t.slider.focus();
1786
+ t.play();
1787
+ }
1788
+ t.forcedHandlePause = false;
1789
+ };
1790
+
1791
+ t.slider.addEventListener('focus', function () {
1792
+ player.options.autoRewind = false;
1793
+ });
1794
+ t.slider.addEventListener('blur', function () {
1795
+ player.options.autoRewind = autoRewindInitial;
1796
+ });
1797
+ t.slider.addEventListener('keydown', function (e) {
1798
+ if (new Date() - lastKeyPressTime >= 1000) {
1799
+ startedPaused = t.paused;
1800
+ }
1801
+
1802
+ if (t.options.keyActions.length) {
1803
+
1804
+ var keyCode = e.which || e.keyCode || 0,
1805
+ duration = t.getDuration(),
1806
+ seekForward = player.options.defaultSeekForwardInterval(media),
1807
+ seekBackward = player.options.defaultSeekBackwardInterval(media);
1808
+
1809
+ var seekTime = t.getCurrentTime();
1810
+ var volume = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
1811
+
1812
+ if (keyCode === 38 || keyCode === 40) {
1813
+ if (volume) {
1814
+ volume.style.display = 'block';
1815
+ }
1816
+ if (t.isVideo) {
1817
+ t.showControls();
1818
+ t.startControlsTimer();
1819
+ }
1820
+
1821
+ var newVolume = keyCode === 38 ? Math.min(t.volume + 0.1, 1) : Math.max(t.volume - 0.1, 0),
1822
+ mutePlayer = newVolume <= 0;
1823
+ t.setVolume(newVolume);
1824
+ t.setMuted(mutePlayer);
1825
+ return;
1826
+ } else {
1827
+ if (volume) {
1828
+ volume.style.display = 'none';
1829
+ }
1830
+ }
1831
+
1832
+ switch (keyCode) {
1833
+ case 37:
1834
+ if (t.getDuration() !== Infinity) {
1835
+ seekTime -= seekBackward;
1836
+ }
1837
+ break;
1838
+ case 39:
1839
+ if (t.getDuration() !== Infinity) {
1840
+ seekTime += seekForward;
1841
+ }
1842
+ break;
1843
+ case 36:
1844
+ seekTime = 0;
1845
+ break;
1846
+ case 35:
1847
+ seekTime = duration;
1848
+ break;
1849
+ case 13:
1850
+ case 32:
1851
+ if (_constants.IS_FIREFOX) {
1852
+ if (t.paused) {
1853
+ t.play();
1854
+ } else {
1855
+ t.pause();
1856
+ }
1857
+ }
1858
+ return;
1859
+ default:
1860
+ return;
1861
+ }
1862
+
1863
+ seekTime = seekTime < 0 ? 0 : seekTime >= duration ? duration : Math.floor(seekTime);
1864
+ lastKeyPressTime = new Date();
1865
+ if (!startedPaused) {
1866
+ player.pause();
1867
+ }
1868
+
1869
+ if (seekTime < t.getDuration() && !startedPaused) {
1870
+ setTimeout(restartPlayer, 1100);
1871
+ }
1872
+
1873
+ t.setCurrentTime(seekTime);
1874
+ player.showControls();
1875
+
1876
+ e.preventDefault();
1877
+ e.stopPropagation();
1878
+ }
1879
+ });
1880
+
1881
+ var events = ['mousedown', 'touchstart'];
1882
+
1883
+ t.slider.addEventListener('dragstart', function () {
1884
+ return false;
1885
+ });
1886
+
1887
+ for (var i = 0, total = events.length; i < total; i++) {
1888
+ t.slider.addEventListener(events[i], function (e) {
1889
+ t.forcedHandlePause = false;
1890
+ if (t.getDuration() !== Infinity) {
1891
+ if (e.which === 1 || e.which === 0) {
1892
+ if (!t.paused) {
1893
+ t.pause();
1894
+ t.forcedHandlePause = true;
1895
+ }
1896
+
1897
+ mouseIsDown = true;
1898
+ handleMouseMove(e);
1899
+ var endEvents = ['mouseup', 'touchend'];
1900
+
1901
+ for (var j = 0, totalEvents = endEvents.length; j < totalEvents; j++) {
1902
+ t.getElement(t.container).addEventListener(endEvents[j], function (event) {
1903
+ var target = event.target;
1904
+ if (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {
1905
+ handleMouseMove(event);
1906
+ }
1907
+ });
1908
+ }
1909
+ t.globalBind('mouseup.dur touchend.dur', function () {
1910
+ handleMouseup();
1911
+ mouseIsDown = false;
1912
+ if (t.timefloat) {
1913
+ t.timefloat.style.display = 'none';
1914
+ }
1915
+ });
1916
+ }
1917
+ }
1918
+ }, _constants.SUPPORT_PASSIVE_EVENT && events[i] === 'touchstart' ? { passive: true } : false);
1919
+ }
1920
+ t.slider.addEventListener('mouseenter', function (e) {
1921
+ if (e.target === t.slider && t.getDuration() !== Infinity) {
1922
+ t.getElement(t.container).addEventListener('mousemove', function (event) {
1923
+ var target = event.target;
1924
+ if (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {
1925
+ handleMouseMove(event);
1926
+ }
1927
+ });
1928
+ if (t.timefloat && !_constants.IS_IOS && !_constants.IS_ANDROID) {
1929
+ t.timefloat.style.display = 'block';
1930
+ }
1931
+ if (t.hovered && !_constants.IS_IOS && !_constants.IS_ANDROID && t.options.useSmoothHover) {
1932
+ (0, _dom.removeClass)(t.hovered, 'no-hover');
1933
+ }
1934
+ }
1935
+ });
1936
+ t.slider.addEventListener('mouseleave', function () {
1937
+ if (t.getDuration() !== Infinity) {
1938
+ if (!mouseIsDown) {
1939
+ if (t.timefloat) {
1940
+ t.timefloat.style.display = 'none';
1941
+ }
1942
+ if (t.hovered && t.options.useSmoothHover) {
1943
+ (0, _dom.addClass)(t.hovered, 'no-hover');
1944
+ }
1945
+ }
1946
+ }
1947
+ });
1948
+
1949
+ t.broadcastCallback = function (e) {
1950
+ var broadcast = controls.querySelector('.' + t.options.classPrefix + 'broadcast');
1951
+ if (!t.options.forceLive && t.getDuration() !== Infinity) {
1952
+ if (broadcast) {
1953
+ t.slider.style.display = '';
1954
+ broadcast.remove();
1955
+ }
1956
+
1957
+ player.setProgressRail(e);
1958
+ if (!t.forcedHandlePause) {
1959
+ player.setCurrentRail(e);
1960
+ }
1961
+ updateSlider();
1962
+ } else if (!broadcast || t.options.forceLive) {
1963
+ var label = _document2.default.createElement('span');
1964
+ label.className = t.options.classPrefix + 'broadcast';
1965
+ label.innerText = _i18n2.default.t('mejs.live-broadcast');
1966
+ t.slider.style.display = 'none';
1967
+ t.rail.appendChild(label);
1968
+ }
1969
+ };
1970
+
1971
+ media.addEventListener('progress', t.broadcastCallback);
1972
+ media.addEventListener('timeupdate', t.broadcastCallback);
1973
+ media.addEventListener('play', function () {
1974
+ t.buffer.style.display = 'none';
1975
+ });
1976
+ media.addEventListener('playing', function () {
1977
+ t.buffer.style.display = 'none';
1978
+ });
1979
+ media.addEventListener('seeking', function () {
1980
+ t.buffer.style.display = '';
1981
+ });
1982
+ media.addEventListener('seeked', function () {
1983
+ t.buffer.style.display = 'none';
1984
+ });
1985
+ media.addEventListener('pause', function () {
1986
+ t.buffer.style.display = 'none';
1987
+ });
1988
+ media.addEventListener('waiting', function () {
1989
+ t.buffer.style.display = '';
1990
+ });
1991
+ media.addEventListener('loadeddata', function () {
1992
+ t.buffer.style.display = '';
1993
+ });
1994
+ media.addEventListener('canplay', function () {
1995
+ t.buffer.style.display = 'none';
1996
+ });
1997
+ media.addEventListener('error', function () {
1998
+ t.buffer.style.display = 'none';
1999
+ });
2000
+
2001
+ t.getElement(t.container).addEventListener('controlsresize', function (e) {
2002
+ if (t.getDuration() !== Infinity) {
2003
+ player.setProgressRail(e);
2004
+ if (!t.forcedHandlePause) {
2005
+ player.setCurrentRail(e);
2006
+ }
2007
+ }
2008
+ });
2009
+ },
2010
+ cleanprogress: function cleanprogress(player, controls, layers, media) {
2011
+ media.removeEventListener('progress', player.broadcastCallback);
2012
+ media.removeEventListener('timeupdate', player.broadcastCallback);
2013
+ if (player.rail) {
2014
+ player.rail.remove();
2015
+ }
2016
+ },
2017
+ setProgressRail: function setProgressRail(e) {
2018
+ var t = this,
2019
+ target = e !== undefined ? e.detail.target || e.target : t.media;
2020
+
2021
+ var percent = null;
2022
+
2023
+ if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && t.getDuration()) {
2024
+ percent = target.buffered.end(target.buffered.length - 1) / t.getDuration();
2025
+ } else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) {
2026
+ percent = target.bufferedBytes / target.bytesTotal;
2027
+ } else if (e && e.lengthComputable && e.total !== 0) {
2028
+ percent = e.loaded / e.total;
2029
+ }
2030
+
2031
+ if (percent !== null) {
2032
+ percent = Math.min(1, Math.max(0, percent));
2033
+
2034
+ if (t.loaded) {
2035
+ t.setTransformStyle(t.loaded, 'scaleX(' + percent + ')');
2036
+ }
2037
+ }
2038
+ },
2039
+ setCurrentRailHandle: function setCurrentRailHandle(fakeTime) {
2040
+ var t = this;
2041
+ t.setCurrentRailMain(t, fakeTime);
2042
+ },
2043
+ setCurrentRail: function setCurrentRail() {
2044
+ var t = this;
2045
+ t.setCurrentRailMain(t);
2046
+ },
2047
+ setCurrentRailMain: function setCurrentRailMain(t, fakeTime) {
2048
+ if (t.getCurrentTime() !== undefined && t.getDuration()) {
2049
+ var nTime = typeof fakeTime === 'undefined' ? t.getCurrentTime() : fakeTime;
2050
+
2051
+ if (t.total && t.handle) {
2052
+ var tW = parseFloat(getComputedStyle(t.total).width);
2053
+
2054
+ var newWidth = Math.round(tW * nTime / t.getDuration()),
2055
+ handlePos = newWidth - Math.round(t.handle.offsetWidth / 2);
2056
+
2057
+ handlePos = handlePos < 0 ? 0 : handlePos;
2058
+ t.setTransformStyle(t.current, 'scaleX(' + newWidth / tW + ')');
2059
+ t.setTransformStyle(t.handle, 'translateX(' + handlePos + 'px)');
2060
+
2061
+ if (t.options.useSmoothHover && !(0, _dom.hasClass)(t.hovered, 'no-hover')) {
2062
+ var pos = parseInt(t.hovered.getAttribute('pos'), 10);
2063
+ pos = isNaN(pos) ? 0 : pos;
2064
+
2065
+ var hoverScaleX = pos / tW - handlePos / tW;
2066
+
2067
+ t.hovered.style.left = handlePos + 'px';
2068
+ t.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');
2069
+
2070
+ if (hoverScaleX >= 0) {
2071
+ (0, _dom.removeClass)(t.hovered, 'negative');
2072
+ } else {
2073
+ (0, _dom.addClass)(t.hovered, 'negative');
2074
+ }
2075
+ }
2076
+ }
2077
+ }
2078
+ }
2079
+ });
2080
+
2081
+ },{"16":16,"2":2,"25":25,"26":26,"30":30,"5":5}],12:[function(_dereq_,module,exports){
2082
+ 'use strict';
2083
+
2084
+ var _document = _dereq_(2);
2085
+
2086
+ var _document2 = _interopRequireDefault(_document);
2087
+
2088
+ var _player = _dereq_(16);
2089
+
2090
+ var _player2 = _interopRequireDefault(_player);
2091
+
2092
+ var _time = _dereq_(30);
2093
+
2094
+ var _dom = _dereq_(26);
2095
+
2096
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2097
+
2098
+ Object.assign(_player.config, {
2099
+ duration: 0,
2100
+
2101
+ timeAndDurationSeparator: '<span> | </span>'
2102
+ });
2103
+
2104
+ Object.assign(_player2.default.prototype, {
2105
+ buildcurrent: function buildcurrent(player, controls, layers, media) {
2106
+ var t = this,
2107
+ time = _document2.default.createElement('div');
2108
+
2109
+ time.className = t.options.classPrefix + 'time';
2110
+ time.setAttribute('role', 'timer');
2111
+ time.setAttribute('aria-live', 'off');
2112
+ time.innerHTML = '<span class="' + t.options.classPrefix + 'currenttime">' + (0, _time.secondsToTimeCode)(0, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat) + '</span>';
2113
+
2114
+ t.addControlElement(time, 'current');
2115
+ player.updateCurrent();
2116
+ t.updateTimeCallback = function () {
2117
+ if (t.controlsAreVisible) {
2118
+ player.updateCurrent();
2119
+ }
2120
+ };
2121
+ media.addEventListener('timeupdate', t.updateTimeCallback);
2122
+ },
2123
+ cleancurrent: function cleancurrent(player, controls, layers, media) {
2124
+ media.removeEventListener('timeupdate', player.updateTimeCallback);
2125
+ },
2126
+ buildduration: function buildduration(player, controls, layers, media) {
2127
+ var t = this,
2128
+ currTime = controls.lastChild.querySelector('.' + t.options.classPrefix + 'currenttime');
2129
+
2130
+ if (currTime) {
2131
+ controls.querySelector('.' + t.options.classPrefix + 'time').innerHTML += t.options.timeAndDurationSeparator + '<span class="' + t.options.classPrefix + 'duration">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');
2132
+ } else {
2133
+ if (controls.querySelector('.' + t.options.classPrefix + 'currenttime')) {
2134
+ (0, _dom.addClass)(controls.querySelector('.' + t.options.classPrefix + 'currenttime').parentNode, t.options.classPrefix + 'currenttime-container');
2135
+ }
2136
+
2137
+ var duration = _document2.default.createElement('div');
2138
+ duration.className = t.options.classPrefix + 'time ' + t.options.classPrefix + 'duration-container';
2139
+ duration.innerHTML = '<span class="' + t.options.classPrefix + 'duration">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');
2140
+
2141
+ t.addControlElement(duration, 'duration');
2142
+ }
2143
+
2144
+ t.updateDurationCallback = function () {
2145
+ if (t.controlsAreVisible) {
2146
+ player.updateDuration();
2147
+ }
2148
+ };
2149
+
2150
+ media.addEventListener('timeupdate', t.updateDurationCallback);
2151
+ },
2152
+ cleanduration: function cleanduration(player, controls, layers, media) {
2153
+ media.removeEventListener('timeupdate', player.updateDurationCallback);
2154
+ },
2155
+ updateCurrent: function updateCurrent() {
2156
+ var t = this;
2157
+
2158
+ var currentTime = t.getCurrentTime();
2159
+
2160
+ if (isNaN(currentTime)) {
2161
+ currentTime = 0;
2162
+ }
2163
+
2164
+ var timecode = (0, _time.secondsToTimeCode)(currentTime, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);
2165
+
2166
+ if (timecode.length > 5) {
2167
+ (0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
2168
+ } else {
2169
+ (0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
2170
+ }
2171
+
2172
+ if (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime')) {
2173
+ t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime').innerText = timecode;
2174
+ }
2175
+ },
2176
+ updateDuration: function updateDuration() {
2177
+ var t = this;
2178
+
2179
+ var duration = t.getDuration();
2180
+
2181
+ if (isNaN(duration) || duration === Infinity || duration < 0) {
2182
+ t.media.duration = t.options.duration = duration = 0;
2183
+ }
2184
+
2185
+ if (t.options.duration > 0) {
2186
+ duration = t.options.duration;
2187
+ }
2188
+
2189
+ var timecode = (0, _time.secondsToTimeCode)(duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);
2190
+
2191
+ if (timecode.length > 5) {
2192
+ (0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
2193
+ } else {
2194
+ (0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
2195
+ }
2196
+
2197
+ if (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration') && duration > 0) {
2198
+ t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration').innerHTML = timecode;
2199
+ }
2200
+ }
2201
+ });
2202
+
2203
+ },{"16":16,"2":2,"26":26,"30":30}],13:[function(_dereq_,module,exports){
2204
+ 'use strict';
2205
+
2206
+ var _document = _dereq_(2);
2207
+
2208
+ var _document2 = _interopRequireDefault(_document);
2209
+
2210
+ var _mejs = _dereq_(7);
2211
+
2212
+ var _mejs2 = _interopRequireDefault(_mejs);
2213
+
2214
+ var _i18n = _dereq_(5);
2215
+
2216
+ var _i18n2 = _interopRequireDefault(_i18n);
2217
+
2218
+ var _player = _dereq_(16);
2219
+
2220
+ var _player2 = _interopRequireDefault(_player);
2221
+
2222
+ var _time = _dereq_(30);
2223
+
2224
+ var _general = _dereq_(27);
2225
+
2226
+ var _dom = _dereq_(26);
2227
+
2228
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2229
+
2230
+ Object.assign(_player.config, {
2231
+ startLanguage: '',
2232
+
2233
+ tracksText: null,
2234
+
2235
+ chaptersText: null,
2236
+
2237
+ tracksAriaLive: false,
2238
+
2239
+ hideCaptionsButtonWhenEmpty: true,
2240
+
2241
+ toggleCaptionsButtonWhenOnlyOne: false,
2242
+
2243
+ slidesSelector: ''
2244
+ });
2245
+
2246
+ Object.assign(_player2.default.prototype, {
2247
+ hasChapters: false,
2248
+
2249
+ buildtracks: function buildtracks(player, controls, layers, media) {
2250
+
2251
+ this.findTracks();
2252
+
2253
+ if (!player.tracks.length && (!player.trackFiles || !player.trackFiles.length === 0)) {
2254
+ return;
2255
+ }
2256
+
2257
+ var t = this,
2258
+ attr = t.options.tracksAriaLive ? ' role="log" aria-live="assertive" aria-atomic="false"' : '',
2259
+ tracksTitle = (0, _general.isString)(t.options.tracksText) ? t.options.tracksText : _i18n2.default.t('mejs.captions-subtitles'),
2260
+ chaptersTitle = (0, _general.isString)(t.options.chaptersText) ? t.options.chaptersText : _i18n2.default.t('mejs.captions-chapters'),
2261
+ total = player.trackFiles === null ? player.tracks.length : player.trackFiles.length;
2262
+
2263
+ if (t.domNode.textTracks) {
2264
+ for (var i = t.domNode.textTracks.length - 1; i >= 0; i--) {
2265
+ t.domNode.textTracks[i].mode = 'hidden';
2266
+ }
2267
+ }
2268
+
2269
+ t.cleartracks(player);
2270
+
2271
+ player.captions = _document2.default.createElement('div');
2272
+ player.captions.className = t.options.classPrefix + 'captions-layer ' + t.options.classPrefix + 'layer';
2273
+ player.captions.innerHTML = '<div class="' + t.options.classPrefix + 'captions-position ' + t.options.classPrefix + 'captions-position-hover"' + attr + '>' + ('<span class="' + t.options.classPrefix + 'captions-text"></span>') + '</div>';
2274
+ player.captions.style.display = 'none';
2275
+ layers.insertBefore(player.captions, layers.firstChild);
2276
+
2277
+ player.captionsText = player.captions.querySelector('.' + t.options.classPrefix + 'captions-text');
2278
+
2279
+ player.captionsButton = _document2.default.createElement('div');
2280
+ player.captionsButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'captions-button';
2281
+ player.captionsButton.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + tracksTitle + '" aria-label="' + tracksTitle + '" tabindex="0"></button>' + ('<div class="' + t.options.classPrefix + 'captions-selector ' + t.options.classPrefix + 'offscreen">') + ('<ul class="' + t.options.classPrefix + 'captions-selector-list">') + ('<li class="' + t.options.classPrefix + 'captions-selector-list-item">') + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + player.id + '_captions" id="' + player.id + '_captions_none" ') + 'value="none" checked disabled>' + ('<label class="' + t.options.classPrefix + 'captions-selector-label ') + (t.options.classPrefix + 'captions-selected" ') + ('for="' + player.id + '_captions_none">' + _i18n2.default.t('mejs.none') + '</label>') + '</li>' + '</ul>' + '</div>';
2282
+
2283
+ t.addControlElement(player.captionsButton, 'tracks');
2284
+
2285
+ player.captionsButton.querySelector('.' + t.options.classPrefix + 'captions-selector-input').disabled = false;
2286
+
2287
+ player.chaptersButton = _document2.default.createElement('div');
2288
+ player.chaptersButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'chapters-button';
2289
+ player.chaptersButton.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + chaptersTitle + '" aria-label="' + chaptersTitle + '" tabindex="0"></button>' + ('<div class="' + t.options.classPrefix + 'chapters-selector ' + t.options.classPrefix + 'offscreen">') + ('<ul class="' + t.options.classPrefix + 'chapters-selector-list"></ul>') + '</div>';
2290
+
2291
+ var subtitleCount = 0;
2292
+
2293
+ for (var _i = 0; _i < total; _i++) {
2294
+ var kind = player.tracks[_i].kind,
2295
+ src = player.tracks[_i].src;
2296
+ if (src.trim()) {
2297
+ if (kind === 'subtitles' || kind === 'captions') {
2298
+ subtitleCount++;
2299
+ } else if (kind === 'chapters' && !controls.querySelector('.' + t.options.classPrefix + 'chapter-selector')) {
2300
+ player.captionsButton.parentNode.insertBefore(player.chaptersButton, player.captionsButton);
2301
+ }
2302
+ }
2303
+ }
2304
+
2305
+ player.trackToLoad = -1;
2306
+ player.selectedTrack = null;
2307
+ player.isLoadingTrack = false;
2308
+
2309
+ for (var _i2 = 0; _i2 < total; _i2++) {
2310
+ var _kind = player.tracks[_i2].kind;
2311
+ if (player.tracks[_i2].src.trim() && (_kind === 'subtitles' || _kind === 'captions')) {
2312
+ player.addTrackButton(player.tracks[_i2].trackId, player.tracks[_i2].srclang, player.tracks[_i2].label);
2313
+ }
2314
+ }
2315
+
2316
+ player.loadNextTrack();
2317
+
2318
+ var inEvents = ['mouseenter', 'focusin'],
2319
+ outEvents = ['mouseleave', 'focusout'];
2320
+
2321
+ if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount === 1) {
2322
+ player.captionsButton.addEventListener('click', function (e) {
2323
+ var trackId = 'none';
2324
+ if (player.selectedTrack === null) {
2325
+ trackId = player.tracks[0].trackId;
2326
+ }
2327
+ var keyboard = e.keyCode || e.which;
2328
+ player.setTrack(trackId, typeof keyboard !== 'undefined');
2329
+ });
2330
+ } else {
2331
+ var labels = player.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selector-label'),
2332
+ captions = player.captionsButton.querySelectorAll('input[type=radio]');
2333
+
2334
+ for (var _i3 = 0, _total = inEvents.length; _i3 < _total; _i3++) {
2335
+ player.captionsButton.addEventListener(inEvents[_i3], function () {
2336
+ (0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
2337
+ });
2338
+ }
2339
+
2340
+ for (var _i4 = 0, _total2 = outEvents.length; _i4 < _total2; _i4++) {
2341
+ player.captionsButton.addEventListener(outEvents[_i4], function () {
2342
+ (0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
2343
+ });
2344
+ }
2345
+
2346
+ for (var _i5 = 0, _total3 = captions.length; _i5 < _total3; _i5++) {
2347
+ captions[_i5].addEventListener('click', function (e) {
2348
+ var keyboard = e.keyCode || e.which;
2349
+ player.setTrack(this.value, typeof keyboard !== 'undefined');
2350
+ });
2351
+ }
2352
+
2353
+ for (var _i6 = 0, _total4 = labels.length; _i6 < _total4; _i6++) {
2354
+ labels[_i6].addEventListener('click', function (e) {
2355
+ var radio = (0, _dom.siblings)(this, function (el) {
2356
+ return el.tagName === 'INPUT';
2357
+ })[0],
2358
+ event = (0, _general.createEvent)('click', radio);
2359
+ radio.dispatchEvent(event);
2360
+ e.preventDefault();
2361
+ });
2362
+ }
2363
+
2364
+ player.captionsButton.addEventListener('keydown', function (e) {
2365
+ e.stopPropagation();
2366
+ });
2367
+ }
2368
+
2369
+ for (var _i7 = 0, _total5 = inEvents.length; _i7 < _total5; _i7++) {
2370
+ player.chaptersButton.addEventListener(inEvents[_i7], function () {
2371
+ if (this.querySelector('.' + t.options.classPrefix + 'chapters-selector-list').children.length) {
2372
+ (0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
2373
+ }
2374
+ });
2375
+ }
2376
+
2377
+ for (var _i8 = 0, _total6 = outEvents.length; _i8 < _total6; _i8++) {
2378
+ player.chaptersButton.addEventListener(outEvents[_i8], function () {
2379
+ (0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
2380
+ });
2381
+ }
2382
+
2383
+ player.chaptersButton.addEventListener('keydown', function (e) {
2384
+ e.stopPropagation();
2385
+ });
2386
+
2387
+ if (!player.options.alwaysShowControls) {
2388
+ player.getElement(player.container).addEventListener('controlsshown', function () {
2389
+ (0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
2390
+ });
2391
+
2392
+ player.getElement(player.container).addEventListener('controlshidden', function () {
2393
+ if (!media.paused) {
2394
+ (0, _dom.removeClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
2395
+ }
2396
+ });
2397
+ } else {
2398
+ (0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
2399
+ }
2400
+
2401
+ media.addEventListener('timeupdate', function () {
2402
+ player.displayCaptions();
2403
+ });
2404
+
2405
+ if (player.options.slidesSelector !== '') {
2406
+ player.slidesContainer = _document2.default.querySelectorAll(player.options.slidesSelector);
2407
+
2408
+ media.addEventListener('timeupdate', function () {
2409
+ player.displaySlides();
2410
+ });
2411
+ }
2412
+ },
2413
+ cleartracks: function cleartracks(player) {
2414
+ if (player) {
2415
+ if (player.captions) {
2416
+ player.captions.remove();
2417
+ }
2418
+ if (player.chapters) {
2419
+ player.chapters.remove();
2420
+ }
2421
+ if (player.captionsText) {
2422
+ player.captionsText.remove();
2423
+ }
2424
+ if (player.captionsButton) {
2425
+ player.captionsButton.remove();
2426
+ }
2427
+ if (player.chaptersButton) {
2428
+ player.chaptersButton.remove();
2429
+ }
2430
+ }
2431
+ },
2432
+ rebuildtracks: function rebuildtracks() {
2433
+ var t = this;
2434
+ t.findTracks();
2435
+ t.buildtracks(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
2436
+ },
2437
+ findTracks: function findTracks() {
2438
+ var t = this,
2439
+ tracktags = t.trackFiles === null ? t.node.querySelectorAll('track') : t.trackFiles,
2440
+ total = tracktags.length;
2441
+
2442
+ t.tracks = [];
2443
+ for (var i = 0; i < total; i++) {
2444
+ var track = tracktags[i],
2445
+ srclang = track.getAttribute('srclang').toLowerCase() || '',
2446
+ trackId = t.id + '_track_' + i + '_' + track.getAttribute('kind') + '_' + srclang;
2447
+ t.tracks.push({
2448
+ trackId: trackId,
2449
+ srclang: srclang,
2450
+ src: track.getAttribute('src'),
2451
+ kind: track.getAttribute('kind'),
2452
+ label: track.getAttribute('label') || '',
2453
+ entries: [],
2454
+ isLoaded: false
2455
+ });
2456
+ }
2457
+ },
2458
+ setTrack: function setTrack(trackId, setByKeyboard) {
2459
+
2460
+ var t = this,
2461
+ radios = t.captionsButton.querySelectorAll('input[type="radio"]'),
2462
+ captions = t.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selected'),
2463
+ track = t.captionsButton.querySelector('input[value="' + trackId + '"]');
2464
+
2465
+ for (var i = 0, total = radios.length; i < total; i++) {
2466
+ radios[i].checked = false;
2467
+ }
2468
+
2469
+ for (var _i9 = 0, _total7 = captions.length; _i9 < _total7; _i9++) {
2470
+ (0, _dom.removeClass)(captions[_i9], t.options.classPrefix + 'captions-selected');
2471
+ }
2472
+
2473
+ track.checked = true;
2474
+ var labels = (0, _dom.siblings)(track, function (el) {
2475
+ return (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');
2476
+ });
2477
+ for (var _i10 = 0, _total8 = labels.length; _i10 < _total8; _i10++) {
2478
+ (0, _dom.addClass)(labels[_i10], t.options.classPrefix + 'captions-selected');
2479
+ }
2480
+
2481
+ if (trackId === 'none') {
2482
+ t.selectedTrack = null;
2483
+ (0, _dom.removeClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');
2484
+ } else {
2485
+ for (var _i11 = 0, _total9 = t.tracks.length; _i11 < _total9; _i11++) {
2486
+ var _track = t.tracks[_i11];
2487
+ if (_track.trackId === trackId) {
2488
+ if (t.selectedTrack === null) {
2489
+ (0, _dom.addClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');
2490
+ }
2491
+ t.selectedTrack = _track;
2492
+ t.captions.setAttribute('lang', t.selectedTrack.srclang);
2493
+ t.displayCaptions();
2494
+ break;
2495
+ }
2496
+ }
2497
+ }
2498
+
2499
+ var event = (0, _general.createEvent)('captionschange', t.media);
2500
+ event.detail.caption = t.selectedTrack;
2501
+ t.media.dispatchEvent(event);
2502
+
2503
+ if (!setByKeyboard) {
2504
+ setTimeout(function () {
2505
+ t.getElement(t.container).focus();
2506
+ }, 500);
2507
+ }
2508
+ },
2509
+ loadNextTrack: function loadNextTrack() {
2510
+ var t = this;
2511
+
2512
+ t.trackToLoad++;
2513
+ if (t.trackToLoad < t.tracks.length) {
2514
+ t.isLoadingTrack = true;
2515
+ t.loadTrack(t.trackToLoad);
2516
+ } else {
2517
+ t.isLoadingTrack = false;
2518
+ t.checkForTracks();
2519
+ }
2520
+ },
2521
+ loadTrack: function loadTrack(index) {
2522
+ var t = this,
2523
+ track = t.tracks[index];
2524
+
2525
+ if (track !== undefined && (track.src !== undefined || track.src !== "")) {
2526
+ (0, _dom.ajax)(track.src, 'text', function (d) {
2527
+ track.entries = typeof d === 'string' && /<tt\s+xml/ig.exec(d) ? _mejs2.default.TrackFormatParser.dfxp.parse(d) : _mejs2.default.TrackFormatParser.webvtt.parse(d);
2528
+
2529
+ track.isLoaded = true;
2530
+ t.enableTrackButton(track);
2531
+ t.loadNextTrack();
2532
+
2533
+ if (track.kind === 'slides') {
2534
+ t.setupSlides(track);
2535
+ } else if (track.kind === 'chapters' && !t.hasChapters) {
2536
+ t.drawChapters(track);
2537
+ t.hasChapters = true;
2538
+ }
2539
+ }, function () {
2540
+ t.removeTrackButton(track.trackId);
2541
+ t.loadNextTrack();
2542
+ });
2543
+ }
2544
+ },
2545
+ enableTrackButton: function enableTrackButton(track) {
2546
+ var t = this,
2547
+ lang = track.srclang,
2548
+ target = _document2.default.getElementById('' + track.trackId);
2549
+
2550
+ if (!target) {
2551
+ return;
2552
+ }
2553
+
2554
+ var label = track.label;
2555
+
2556
+ if (label === '') {
2557
+ label = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;
2558
+ }
2559
+ target.disabled = false;
2560
+ var targetSiblings = (0, _dom.siblings)(target, function (el) {
2561
+ return (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');
2562
+ });
2563
+ for (var i = 0, total = targetSiblings.length; i < total; i++) {
2564
+ targetSiblings[i].innerHTML = label;
2565
+ }
2566
+
2567
+ if (t.options.startLanguage === lang) {
2568
+ target.checked = true;
2569
+ var event = (0, _general.createEvent)('click', target);
2570
+ target.dispatchEvent(event);
2571
+ }
2572
+ },
2573
+ removeTrackButton: function removeTrackButton(trackId) {
2574
+ var element = _document2.default.getElementById('' + trackId);
2575
+ if (element) {
2576
+ var button = element.closest('li');
2577
+ if (button) {
2578
+ button.remove();
2579
+ }
2580
+ }
2581
+ },
2582
+ addTrackButton: function addTrackButton(trackId, lang, label) {
2583
+ var t = this;
2584
+ if (label === '') {
2585
+ label = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;
2586
+ }
2587
+
2588
+ t.captionsButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'captions-selector-list-item">' + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + t.id + '_captions" id="' + trackId + '" value="' + trackId + '" disabled>') + ('<label class="' + t.options.classPrefix + 'captions-selector-label"') + ('for="' + trackId + '">' + label + ' (loading)</label>') + '</li>';
2589
+ },
2590
+ checkForTracks: function checkForTracks() {
2591
+ var t = this;
2592
+
2593
+ var hasSubtitles = false;
2594
+
2595
+ if (t.options.hideCaptionsButtonWhenEmpty) {
2596
+ for (var i = 0, total = t.tracks.length; i < total; i++) {
2597
+ var kind = t.tracks[i].kind;
2598
+ if ((kind === 'subtitles' || kind === 'captions') && t.tracks[i].isLoaded) {
2599
+ hasSubtitles = true;
2600
+ break;
2601
+ }
2602
+ }
2603
+
2604
+ t.captionsButton.style.display = hasSubtitles ? '' : 'none';
2605
+ t.setControlsSize();
2606
+ }
2607
+ },
2608
+ displayCaptions: function displayCaptions() {
2609
+ if (this.tracks === undefined) {
2610
+ return;
2611
+ }
2612
+
2613
+ var t = this,
2614
+ track = t.selectedTrack,
2615
+ sanitize = function sanitize(html) {
2616
+ var div = _document2.default.createElement('div');
2617
+ div.innerHTML = html;
2618
+
2619
+ var scripts = div.getElementsByTagName('script');
2620
+ var i = scripts.length;
2621
+ while (i--) {
2622
+ scripts[i].remove();
2623
+ }
2624
+
2625
+ var allElements = div.getElementsByTagName('*');
2626
+ for (var _i12 = 0, n = allElements.length; _i12 < n; _i12++) {
2627
+ var attributesObj = allElements[_i12].attributes,
2628
+ attributes = Array.prototype.slice.call(attributesObj);
2629
+
2630
+ for (var j = 0, total = attributes.length; j < total; j++) {
2631
+ if (attributes[j].name.startsWith('on') || attributes[j].value.startsWith('javascript')) {
2632
+ allElements[_i12].remove();
2633
+ } else if (attributes[j].name === 'style') {
2634
+ allElements[_i12].removeAttribute(attributes[j].name);
2635
+ }
2636
+ }
2637
+ }
2638
+ return div.innerHTML;
2639
+ };
2640
+
2641
+ if (track !== null && track.isLoaded) {
2642
+ var i = t.searchTrackPosition(track.entries, t.media.currentTime);
2643
+ if (i > -1) {
2644
+ t.captionsText.innerHTML = sanitize(track.entries[i].text);
2645
+ t.captionsText.className = t.options.classPrefix + 'captions-text ' + (track.entries[i].identifier || '');
2646
+ t.captions.style.display = '';
2647
+ t.captions.style.height = '0px';
2648
+ return;
2649
+ }
2650
+ t.captions.style.display = 'none';
2651
+ } else {
2652
+ t.captions.style.display = 'none';
2653
+ }
2654
+ },
2655
+ setupSlides: function setupSlides(track) {
2656
+ var t = this;
2657
+ t.slides = track;
2658
+ t.slides.entries.imgs = [t.slides.entries.length];
2659
+ t.showSlide(0);
2660
+ },
2661
+ showSlide: function showSlide(index) {
2662
+ var _this = this;
2663
+
2664
+ var t = this;
2665
+
2666
+ if (t.tracks === undefined || t.slidesContainer === undefined) {
2667
+ return;
2668
+ }
2669
+
2670
+ var url = t.slides.entries[index].text;
2671
+
2672
+ var img = t.slides.entries[index].imgs;
2673
+
2674
+ if (img === undefined || img.fadeIn === undefined) {
2675
+ var image = _document2.default.createElement('img');
2676
+ image.src = url;
2677
+ image.addEventListener('load', function () {
2678
+ var self = _this,
2679
+ visible = (0, _dom.siblings)(self, function (el) {
2680
+ return visible(el);
2681
+ });
2682
+ self.style.display = 'none';
2683
+ t.slidesContainer.innerHTML += self.innerHTML;
2684
+ (0, _dom.fadeIn)(t.slidesContainer.querySelector(image));
2685
+ for (var i = 0, total = visible.length; i < total; i++) {
2686
+ (0, _dom.fadeOut)(visible[i], 400);
2687
+ }
2688
+ });
2689
+ t.slides.entries[index].imgs = img = image;
2690
+ } else if (!(0, _dom.visible)(img)) {
2691
+ var _visible = (0, _dom.siblings)(self, function (el) {
2692
+ return _visible(el);
2693
+ });
2694
+ (0, _dom.fadeIn)(t.slidesContainer.querySelector(img));
2695
+ for (var i = 0, total = _visible.length; i < total; i++) {
2696
+ (0, _dom.fadeOut)(_visible[i]);
2697
+ }
2698
+ }
2699
+ },
2700
+ displaySlides: function displaySlides() {
2701
+ var t = this;
2702
+
2703
+ if (this.slides === undefined) {
2704
+ return;
2705
+ }
2706
+
2707
+ var slides = t.slides,
2708
+ i = t.searchTrackPosition(slides.entries, t.media.currentTime);
2709
+
2710
+ if (i > -1) {
2711
+ t.showSlide(i);
2712
+ }
2713
+ },
2714
+ drawChapters: function drawChapters(chapters) {
2715
+ var t = this,
2716
+ total = chapters.entries.length;
2717
+
2718
+ if (!total) {
2719
+ return;
2720
+ }
2721
+
2722
+ t.chaptersButton.querySelector('ul').innerHTML = '';
2723
+
2724
+ for (var i = 0; i < total; i++) {
2725
+ t.chaptersButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'chapters-selector-list-item" ' + 'role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false">' + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + t.id + '_chapters" id="' + t.id + '_chapters_' + i + '" value="' + chapters.entries[i].start + '" disabled>') + ('<label class="' + t.options.classPrefix + 'chapters-selector-label"') + ('for="' + t.id + '_chapters_' + i + '">' + chapters.entries[i].text + '</label>') + '</li>';
2726
+ }
2727
+
2728
+ var radios = t.chaptersButton.querySelectorAll('input[type="radio"]'),
2729
+ labels = t.chaptersButton.querySelectorAll('.' + t.options.classPrefix + 'chapters-selector-label');
2730
+
2731
+ for (var _i13 = 0, _total10 = radios.length; _i13 < _total10; _i13++) {
2732
+ radios[_i13].disabled = false;
2733
+ radios[_i13].checked = false;
2734
+ radios[_i13].addEventListener('click', function (e) {
2735
+ var self = this,
2736
+ listItems = t.chaptersButton.querySelectorAll('li'),
2737
+ label = (0, _dom.siblings)(self, function (el) {
2738
+ return (0, _dom.hasClass)(el, t.options.classPrefix + 'chapters-selector-label');
2739
+ })[0];
2740
+
2741
+ self.checked = true;
2742
+ self.parentNode.setAttribute('aria-checked', true);
2743
+ (0, _dom.addClass)(label, t.options.classPrefix + 'chapters-selected');
2744
+ (0, _dom.removeClass)(t.chaptersButton.querySelector('.' + t.options.classPrefix + 'chapters-selected'), t.options.classPrefix + 'chapters-selected');
2745
+
2746
+ for (var _i14 = 0, _total11 = listItems.length; _i14 < _total11; _i14++) {
2747
+ listItems[_i14].setAttribute('aria-checked', false);
2748
+ }
2749
+
2750
+ var keyboard = e.keyCode || e.which;
2751
+ if (typeof keyboard === 'undefined') {
2752
+ setTimeout(function () {
2753
+ t.getElement(t.container).focus();
2754
+ }, 500);
2755
+ }
2756
+
2757
+ t.media.setCurrentTime(parseFloat(self.value));
2758
+ if (t.media.paused) {
2759
+ t.media.play();
2760
+ }
2761
+ });
2762
+ }
2763
+
2764
+ for (var _i15 = 0, _total12 = labels.length; _i15 < _total12; _i15++) {
2765
+ labels[_i15].addEventListener('click', function (e) {
2766
+ var radio = (0, _dom.siblings)(this, function (el) {
2767
+ return el.tagName === 'INPUT';
2768
+ })[0],
2769
+ event = (0, _general.createEvent)('click', radio);
2770
+ radio.dispatchEvent(event);
2771
+ e.preventDefault();
2772
+ });
2773
+ }
2774
+ },
2775
+ searchTrackPosition: function searchTrackPosition(tracks, currentTime) {
2776
+ var lo = 0,
2777
+ hi = tracks.length - 1,
2778
+ mid = void 0,
2779
+ start = void 0,
2780
+ stop = void 0;
2781
+
2782
+ while (lo <= hi) {
2783
+ mid = lo + hi >> 1;
2784
+ start = tracks[mid].start;
2785
+ stop = tracks[mid].stop;
2786
+
2787
+ if (currentTime >= start && currentTime < stop) {
2788
+ return mid;
2789
+ } else if (start < currentTime) {
2790
+ lo = mid + 1;
2791
+ } else if (start > currentTime) {
2792
+ hi = mid - 1;
2793
+ }
2794
+ }
2795
+
2796
+ return -1;
2797
+ }
2798
+ });
2799
+
2800
+ _mejs2.default.language = {
2801
+ codes: {
2802
+ af: 'mejs.afrikaans',
2803
+ sq: 'mejs.albanian',
2804
+ ar: 'mejs.arabic',
2805
+ be: 'mejs.belarusian',
2806
+ bg: 'mejs.bulgarian',
2807
+ ca: 'mejs.catalan',
2808
+ zh: 'mejs.chinese',
2809
+ 'zh-cn': 'mejs.chinese-simplified',
2810
+ 'zh-tw': 'mejs.chines-traditional',
2811
+ hr: 'mejs.croatian',
2812
+ cs: 'mejs.czech',
2813
+ da: 'mejs.danish',
2814
+ nl: 'mejs.dutch',
2815
+ en: 'mejs.english',
2816
+ et: 'mejs.estonian',
2817
+ fl: 'mejs.filipino',
2818
+ fi: 'mejs.finnish',
2819
+ fr: 'mejs.french',
2820
+ gl: 'mejs.galician',
2821
+ de: 'mejs.german',
2822
+ el: 'mejs.greek',
2823
+ ht: 'mejs.haitian-creole',
2824
+ iw: 'mejs.hebrew',
2825
+ hi: 'mejs.hindi',
2826
+ hu: 'mejs.hungarian',
2827
+ is: 'mejs.icelandic',
2828
+ id: 'mejs.indonesian',
2829
+ ga: 'mejs.irish',
2830
+ it: 'mejs.italian',
2831
+ ja: 'mejs.japanese',
2832
+ ko: 'mejs.korean',
2833
+ lv: 'mejs.latvian',
2834
+ lt: 'mejs.lithuanian',
2835
+ mk: 'mejs.macedonian',
2836
+ ms: 'mejs.malay',
2837
+ mt: 'mejs.maltese',
2838
+ no: 'mejs.norwegian',
2839
+ fa: 'mejs.persian',
2840
+ pl: 'mejs.polish',
2841
+ pt: 'mejs.portuguese',
2842
+ ro: 'mejs.romanian',
2843
+ ru: 'mejs.russian',
2844
+ sr: 'mejs.serbian',
2845
+ sk: 'mejs.slovak',
2846
+ sl: 'mejs.slovenian',
2847
+ es: 'mejs.spanish',
2848
+ sw: 'mejs.swahili',
2849
+ sv: 'mejs.swedish',
2850
+ tl: 'mejs.tagalog',
2851
+ th: 'mejs.thai',
2852
+ tr: 'mejs.turkish',
2853
+ uk: 'mejs.ukrainian',
2854
+ vi: 'mejs.vietnamese',
2855
+ cy: 'mejs.welsh',
2856
+ yi: 'mejs.yiddish'
2857
+ }
2858
+ };
2859
+
2860
+ _mejs2.default.TrackFormatParser = {
2861
+ webvtt: {
2862
+ pattern: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
2863
+
2864
+ parse: function parse(trackText) {
2865
+ var lines = trackText.split(/\r?\n/),
2866
+ entries = [];
2867
+
2868
+ var timecode = void 0,
2869
+ text = void 0,
2870
+ identifier = void 0;
2871
+
2872
+ for (var i = 0, total = lines.length; i < total; i++) {
2873
+ timecode = this.pattern.exec(lines[i]);
2874
+
2875
+ if (timecode && i < lines.length) {
2876
+ if (i - 1 >= 0 && lines[i - 1] !== '') {
2877
+ identifier = lines[i - 1];
2878
+ }
2879
+ i++;
2880
+
2881
+ text = lines[i];
2882
+ i++;
2883
+ while (lines[i] !== '' && i < lines.length) {
2884
+ text = text + '\n' + lines[i];
2885
+ i++;
2886
+ }
2887
+ text = text.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
2888
+ entries.push({
2889
+ identifier: identifier,
2890
+ start: (0, _time.convertSMPTEtoSeconds)(timecode[1]) === 0 ? 0.200 : (0, _time.convertSMPTEtoSeconds)(timecode[1]),
2891
+ stop: (0, _time.convertSMPTEtoSeconds)(timecode[3]),
2892
+ text: text,
2893
+ settings: timecode[5]
2894
+ });
2895
+ }
2896
+ identifier = '';
2897
+ }
2898
+ return entries;
2899
+ }
2900
+ },
2901
+
2902
+ dfxp: {
2903
+ parse: function parse(trackText) {
2904
+ trackText = $(trackText).filter('tt');
2905
+ var container = trackText.firstChild,
2906
+ lines = container.querySelectorAll('p'),
2907
+ styleNode = trackText.getElementById('' + container.attr('style')),
2908
+ entries = [];
2909
+
2910
+ var styles = void 0;
2911
+
2912
+ if (styleNode.length) {
2913
+ styleNode.removeAttribute('id');
2914
+ var attributes = styleNode.attributes;
2915
+ if (attributes.length) {
2916
+ styles = {};
2917
+ for (var i = 0, total = attributes.length; i < total; i++) {
2918
+ styles[attributes[i].name.split(":")[1]] = attributes[i].value;
2919
+ }
2920
+ }
2921
+ }
2922
+
2923
+ for (var _i16 = 0, _total13 = lines.length; _i16 < _total13; _i16++) {
2924
+ var style = void 0,
2925
+ _temp = {
2926
+ start: null,
2927
+ stop: null,
2928
+ style: null,
2929
+ text: null
2930
+ };
2931
+
2932
+ if (lines.eq(_i16).attr('begin')) {
2933
+ _temp.start = (0, _time.convertSMPTEtoSeconds)(lines.eq(_i16).attr('begin'));
2934
+ }
2935
+ if (!_temp.start && lines.eq(_i16 - 1).attr('end')) {
2936
+ _temp.start = (0, _time.convertSMPTEtoSeconds)(lines.eq(_i16 - 1).attr('end'));
2937
+ }
2938
+ if (lines.eq(_i16).attr('end')) {
2939
+ _temp.stop = (0, _time.convertSMPTEtoSeconds)(lines.eq(_i16).attr('end'));
2940
+ }
2941
+ if (!_temp.stop && lines.eq(_i16 + 1).attr('begin')) {
2942
+ _temp.stop = (0, _time.convertSMPTEtoSeconds)(lines.eq(_i16 + 1).attr('begin'));
2943
+ }
2944
+
2945
+ if (styles) {
2946
+ style = '';
2947
+ for (var _style in styles) {
2948
+ style += _style + ':' + styles[_style] + ';';
2949
+ }
2950
+ }
2951
+ if (style) {
2952
+ _temp.style = style;
2953
+ }
2954
+ if (_temp.start === 0) {
2955
+ _temp.start = 0.200;
2956
+ }
2957
+ _temp.text = lines.eq(_i16).innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
2958
+ entries.push(_temp);
2959
+ }
2960
+ return entries;
2961
+ }
2962
+ }
2963
+ };
2964
+
2965
+ },{"16":16,"2":2,"26":26,"27":27,"30":30,"5":5,"7":7}],14:[function(_dereq_,module,exports){
2966
+ 'use strict';
2967
+
2968
+ var _document = _dereq_(2);
2969
+
2970
+ var _document2 = _interopRequireDefault(_document);
2971
+
2972
+ var _player = _dereq_(16);
2973
+
2974
+ var _player2 = _interopRequireDefault(_player);
2975
+
2976
+ var _i18n = _dereq_(5);
2977
+
2978
+ var _i18n2 = _interopRequireDefault(_i18n);
2979
+
2980
+ var _constants = _dereq_(25);
2981
+
2982
+ var _general = _dereq_(27);
2983
+
2984
+ var _dom = _dereq_(26);
2985
+
2986
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2987
+
2988
+ Object.assign(_player.config, {
2989
+ muteText: null,
2990
+
2991
+ unmuteText: null,
2992
+
2993
+ allyVolumeControlText: null,
2994
+
2995
+ hideVolumeOnTouchDevices: true,
2996
+
2997
+ audioVolume: 'horizontal',
2998
+
2999
+ videoVolume: 'vertical',
3000
+
3001
+ startVolume: 0.8
3002
+ });
3003
+
3004
+ Object.assign(_player2.default.prototype, {
3005
+ buildvolume: function buildvolume(player, controls, layers, media) {
3006
+ if ((_constants.IS_ANDROID || _constants.IS_IOS) && this.options.hideVolumeOnTouchDevices) {
3007
+ return;
3008
+ }
3009
+
3010
+ var t = this,
3011
+ mode = t.isVideo ? t.options.videoVolume : t.options.audioVolume,
3012
+ muteText = (0, _general.isString)(t.options.muteText) ? t.options.muteText : _i18n2.default.t('mejs.mute'),
3013
+ unmuteText = (0, _general.isString)(t.options.unmuteText) ? t.options.unmuteText : _i18n2.default.t('mejs.unmute'),
3014
+ volumeControlText = (0, _general.isString)(t.options.allyVolumeControlText) ? t.options.allyVolumeControlText : _i18n2.default.t('mejs.volume-help-text'),
3015
+ mute = _document2.default.createElement('div');
3016
+
3017
+ mute.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'volume-button ' + t.options.classPrefix + 'mute';
3018
+ mute.innerHTML = mode === 'horizontal' ? '<button type="button" aria-controls="' + t.id + '" title="' + muteText + '" aria-label="' + muteText + '" tabindex="0"></button>' : '<button type="button" aria-controls="' + t.id + '" title="' + muteText + '" aria-label="' + muteText + '" tabindex="0"></button>' + ('<a href="javascript:void(0);" class="' + t.options.classPrefix + 'volume-slider" ') + ('aria-label="' + _i18n2.default.t('mejs.volume-slider') + '" aria-valuemin="0" aria-valuemax="100" role="slider" ') + 'aria-orientation="vertical">' + ('<span class="' + t.options.classPrefix + 'offscreen">' + volumeControlText + '</span>') + ('<div class="' + t.options.classPrefix + 'volume-total">') + ('<div class="' + t.options.classPrefix + 'volume-current"></div>') + ('<div class="' + t.options.classPrefix + 'volume-handle"></div>') + '</div>' + '</a>';
3019
+
3020
+ t.addControlElement(mute, 'volume');
3021
+
3022
+ t.options.keyActions.push({
3023
+ keys: [38],
3024
+ action: function action(player) {
3025
+ var volumeSlider = player.getElement(player.container).querySelector('.' + _player.config.classPrefix + 'volume-slider');
3026
+ if (volumeSlider || player.getElement(player.container).querySelector('.' + _player.config.classPrefix + 'volume-slider').matches(':focus')) {
3027
+ volumeSlider.style.display = 'block';
3028
+ }
3029
+ if (player.isVideo) {
3030
+ player.showControls();
3031
+ player.startControlsTimer();
3032
+ }
3033
+
3034
+ var newVolume = Math.min(player.volume + 0.1, 1);
3035
+ player.setVolume(newVolume);
3036
+ if (newVolume > 0) {
3037
+ player.setMuted(false);
3038
+ }
3039
+ }
3040
+ }, {
3041
+ keys: [40],
3042
+ action: function action(player) {
3043
+ var volumeSlider = player.getElement(player.container).querySelector('.' + _player.config.classPrefix + 'volume-slider');
3044
+ if (volumeSlider) {
3045
+ volumeSlider.style.display = 'block';
3046
+ }
3047
+
3048
+ if (player.isVideo) {
3049
+ player.showControls();
3050
+ player.startControlsTimer();
3051
+ }
3052
+
3053
+ var newVolume = Math.max(player.volume - 0.1, 0);
3054
+ player.setVolume(newVolume);
3055
+
3056
+ if (newVolume <= 0.1) {
3057
+ player.setMuted(true);
3058
+ }
3059
+ }
3060
+ }, {
3061
+ keys: [77],
3062
+ action: function action(player) {
3063
+ player.getElement(player.container).querySelector('.' + _player.config.classPrefix + 'volume-slider').style.display = 'block';
3064
+ if (player.isVideo) {
3065
+ player.showControls();
3066
+ player.startControlsTimer();
3067
+ }
3068
+ if (player.media.muted) {
3069
+ player.setMuted(false);
3070
+ } else {
3071
+ player.setMuted(true);
3072
+ }
3073
+ }
3074
+ });
3075
+
3076
+ if (mode === 'horizontal') {
3077
+ var anchor = _document2.default.createElement('a');
3078
+ anchor.className = t.options.classPrefix + 'horizontal-volume-slider';
3079
+ anchor.href = 'javascript:void(0);';
3080
+ anchor.setAttribute('aria-label', _i18n2.default.t('mejs.volume-slider'));
3081
+ anchor.setAttribute('aria-valuemin', 0);
3082
+ anchor.setAttribute('aria-valuemax', 100);
3083
+ anchor.setAttribute('role', 'slider');
3084
+ anchor.innerHTML += '<span class="' + t.options.classPrefix + 'offscreen">' + volumeControlText + '</span>' + ('<div class="' + t.options.classPrefix + 'horizontal-volume-total">') + ('<div class="' + t.options.classPrefix + 'horizontal-volume-current"></div>') + ('<div class="' + t.options.classPrefix + 'horizontal-volume-handle"></div>') + '</div>';
3085
+ mute.parentNode.insertBefore(anchor, mute.nextSibling);
3086
+ }
3087
+
3088
+ var mouseIsDown = false,
3089
+ mouseIsOver = false,
3090
+ modified = false,
3091
+ updateVolumeSlider = function updateVolumeSlider() {
3092
+ var volume = Math.floor(media.volume * 100);
3093
+ volumeSlider.setAttribute('aria-valuenow', volume);
3094
+ volumeSlider.setAttribute('aria-valuetext', volume + '%');
3095
+ };
3096
+
3097
+ var volumeSlider = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-slider'),
3098
+ volumeTotal = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-total') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-total'),
3099
+ volumeCurrent = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-current') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-current'),
3100
+ volumeHandle = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-handle') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-handle'),
3101
+ positionVolumeHandle = function positionVolumeHandle(volume) {
3102
+
3103
+ if (volume === null || isNaN(volume) || volume === undefined) {
3104
+ return;
3105
+ }
3106
+
3107
+ volume = Math.max(0, volume);
3108
+ volume = Math.min(volume, 1);
3109
+
3110
+ if (volume === 0) {
3111
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');
3112
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');
3113
+ var button = mute.firstElementChild;
3114
+ button.setAttribute('title', unmuteText);
3115
+ button.setAttribute('aria-label', unmuteText);
3116
+ } else {
3117
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');
3118
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'mute');
3119
+ var _button = mute.firstElementChild;
3120
+ _button.setAttribute('title', muteText);
3121
+ _button.setAttribute('aria-label', muteText);
3122
+ }
3123
+
3124
+ var volumePercentage = volume * 100 + '%',
3125
+ volumeStyles = getComputedStyle(volumeHandle);
3126
+
3127
+ if (mode === 'vertical') {
3128
+ volumeCurrent.style.bottom = 0;
3129
+ volumeCurrent.style.height = volumePercentage;
3130
+ volumeHandle.style.bottom = volumePercentage;
3131
+ volumeHandle.style.marginBottom = -parseFloat(volumeStyles.height) / 2 + 'px';
3132
+ } else {
3133
+ volumeCurrent.style.left = 0;
3134
+ volumeCurrent.style.width = volumePercentage;
3135
+ volumeHandle.style.left = volumePercentage;
3136
+ volumeHandle.style.marginLeft = -parseFloat(volumeStyles.width) / 2 + 'px';
3137
+ }
3138
+ },
3139
+ handleVolumeMove = function handleVolumeMove(e) {
3140
+ var totalOffset = (0, _dom.offset)(volumeTotal),
3141
+ volumeStyles = getComputedStyle(volumeTotal);
3142
+
3143
+ modified = true;
3144
+
3145
+ var volume = null;
3146
+
3147
+ if (mode === 'vertical') {
3148
+ var railHeight = parseFloat(volumeStyles.height),
3149
+ newY = e.pageY - totalOffset.top;
3150
+
3151
+ volume = (railHeight - newY) / railHeight;
3152
+
3153
+ if (totalOffset.top === 0 || totalOffset.left === 0) {
3154
+ return;
3155
+ }
3156
+ } else {
3157
+ var railWidth = parseFloat(volumeStyles.width),
3158
+ newX = e.pageX - totalOffset.left;
3159
+
3160
+ volume = newX / railWidth;
3161
+ }
3162
+
3163
+ volume = Math.max(0, volume);
3164
+ volume = Math.min(volume, 1);
3165
+
3166
+ positionVolumeHandle(volume);
3167
+
3168
+ t.setMuted(volume === 0);
3169
+ t.setVolume(volume);
3170
+
3171
+ e.preventDefault();
3172
+ e.stopPropagation();
3173
+ },
3174
+ toggleMute = function toggleMute() {
3175
+ if (t.muted) {
3176
+ positionVolumeHandle(0);
3177
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');
3178
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');
3179
+ } else {
3180
+ positionVolumeHandle(media.volume);
3181
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');
3182
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'mute');
3183
+ }
3184
+ };
3185
+
3186
+ player.getElement(player.container).addEventListener('keydown', function (e) {
3187
+ var hasFocus = !!e.target.closest('.' + t.options.classPrefix + 'container');
3188
+ if (!hasFocus && mode === 'vertical') {
3189
+ volumeSlider.style.display = 'none';
3190
+ }
3191
+ });
3192
+
3193
+ mute.addEventListener('mouseenter', function (e) {
3194
+ if (e.target === mute) {
3195
+ volumeSlider.style.display = 'block';
3196
+ mouseIsOver = true;
3197
+ e.preventDefault();
3198
+ e.stopPropagation();
3199
+ }
3200
+ });
3201
+ mute.addEventListener('focusin', function () {
3202
+ volumeSlider.style.display = 'block';
3203
+ mouseIsOver = true;
3204
+ });
3205
+
3206
+ mute.addEventListener('focusout', function (e) {
3207
+ if ((!e.relatedTarget || e.relatedTarget && !e.relatedTarget.matches('.' + t.options.classPrefix + 'volume-slider')) && mode === 'vertical') {
3208
+ volumeSlider.style.display = 'none';
3209
+ }
3210
+ });
3211
+ mute.addEventListener('mouseleave', function () {
3212
+ mouseIsOver = false;
3213
+ if (!mouseIsDown && mode === 'vertical') {
3214
+ volumeSlider.style.display = 'none';
3215
+ }
3216
+ });
3217
+ mute.addEventListener('focusout', function () {
3218
+ mouseIsOver = false;
3219
+ });
3220
+ mute.addEventListener('keydown', function (e) {
3221
+ if (t.options.keyActions.length) {
3222
+ var keyCode = e.which || e.keyCode || 0,
3223
+ volume = media.volume;
3224
+
3225
+ switch (keyCode) {
3226
+ case 38:
3227
+ volume = Math.min(volume + 0.1, 1);
3228
+ break;
3229
+ case 40:
3230
+ volume = Math.max(0, volume - 0.1);
3231
+ break;
3232
+ default:
3233
+ return true;
3234
+ }
3235
+
3236
+ mouseIsDown = false;
3237
+ positionVolumeHandle(volume);
3238
+ media.setVolume(volume);
3239
+
3240
+ e.preventDefault();
3241
+ e.stopPropagation();
3242
+ }
3243
+ });
3244
+ mute.querySelector('button').addEventListener('click', function () {
3245
+ media.setMuted(!media.muted);
3246
+ var event = (0, _general.createEvent)('volumechange', media);
3247
+ media.dispatchEvent(event);
3248
+ });
3249
+
3250
+ volumeSlider.addEventListener('dragstart', function () {
3251
+ return false;
3252
+ });
3253
+
3254
+ volumeSlider.addEventListener('mouseover', function () {
3255
+ mouseIsOver = true;
3256
+ });
3257
+ volumeSlider.addEventListener('focusin', function () {
3258
+ volumeSlider.style.display = 'block';
3259
+ mouseIsOver = true;
3260
+ });
3261
+ volumeSlider.addEventListener('focusout', function () {
3262
+ mouseIsOver = false;
3263
+ if (!mouseIsDown && mode === 'vertical') {
3264
+ volumeSlider.style.display = 'none';
3265
+ }
3266
+ });
3267
+ volumeSlider.addEventListener('mousedown', function (e) {
3268
+ handleVolumeMove(e);
3269
+ t.globalBind('mousemove.vol', function (event) {
3270
+ var target = event.target;
3271
+ if (mouseIsDown && (target === volumeSlider || target.closest(mode === 'vertical' ? '.' + t.options.classPrefix + 'volume-slider' : '.' + t.options.classPrefix + 'horizontal-volume-slider'))) {
3272
+ handleVolumeMove(event);
3273
+ }
3274
+ });
3275
+ t.globalBind('mouseup.vol', function () {
3276
+ mouseIsDown = false;
3277
+ if (!mouseIsOver && mode === 'vertical') {
3278
+ volumeSlider.style.display = 'none';
3279
+ }
3280
+ });
3281
+ mouseIsDown = true;
3282
+ e.preventDefault();
3283
+ e.stopPropagation();
3284
+ });
3285
+
3286
+ media.addEventListener('volumechange', function (e) {
3287
+ if (!mouseIsDown) {
3288
+ toggleMute();
3289
+ }
3290
+ updateVolumeSlider(e);
3291
+ });
3292
+
3293
+ var rendered = false;
3294
+ media.addEventListener('rendererready', function () {
3295
+ if (!modified) {
3296
+ setTimeout(function () {
3297
+ rendered = true;
3298
+ if (player.options.startVolume === 0 || media.originalNode.muted) {
3299
+ media.setMuted(true);
3300
+ player.options.startVolume = 0;
3301
+ }
3302
+ media.setVolume(player.options.startVolume);
3303
+ t.setControlsSize();
3304
+ }, 250);
3305
+ }
3306
+ });
3307
+
3308
+ media.addEventListener('loadedmetadata', function () {
3309
+ setTimeout(function () {
3310
+ if (!modified && !rendered) {
3311
+ if (player.options.startVolume === 0 || media.originalNode.muted) {
3312
+ media.setMuted(true);
3313
+ }
3314
+ media.setVolume(player.options.startVolume);
3315
+ t.setControlsSize();
3316
+ }
3317
+ rendered = false;
3318
+ }, 250);
3319
+ });
3320
+
3321
+ if (player.options.startVolume === 0 || media.originalNode.muted) {
3322
+ media.setMuted(true);
3323
+ player.options.startVolume = 0;
3324
+ toggleMute();
3325
+ }
3326
+
3327
+ t.getElement(t.container).addEventListener('controlsresize', function () {
3328
+ toggleMute();
3329
+ });
3330
+ }
3331
+ });
3332
+
3333
+ },{"16":16,"2":2,"25":25,"26":26,"27":27,"5":5}],15:[function(_dereq_,module,exports){
3334
+ 'use strict';
3335
+
3336
+ Object.defineProperty(exports, "__esModule", {
3337
+ value: true
3338
+ });
3339
+ var EN = exports.EN = {
3340
+ 'mejs.plural-form': 1,
3341
+
3342
+ 'mejs.download-file': 'Download File',
3343
+
3344
+ 'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',
3345
+
3346
+ 'mejs.fullscreen': 'Fullscreen',
3347
+
3348
+ 'mejs.play': 'Play',
3349
+ 'mejs.pause': 'Pause',
3350
+
3351
+ 'mejs.time-slider': 'Time Slider',
3352
+ 'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
3353
+ 'mejs.live-broadcast': 'Live Broadcast',
3354
+
3355
+ 'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',
3356
+ 'mejs.unmute': 'Unmute',
3357
+ 'mejs.mute': 'Mute',
3358
+ 'mejs.volume-slider': 'Volume Slider',
3359
+
3360
+ 'mejs.video-player': 'Video Player',
3361
+ 'mejs.audio-player': 'Audio Player',
3362
+
3363
+ 'mejs.captions-subtitles': 'Captions/Subtitles',
3364
+ 'mejs.captions-chapters': 'Chapters',
3365
+ 'mejs.none': 'None',
3366
+ 'mejs.afrikaans': 'Afrikaans',
3367
+ 'mejs.albanian': 'Albanian',
3368
+ 'mejs.arabic': 'Arabic',
3369
+ 'mejs.belarusian': 'Belarusian',
3370
+ 'mejs.bulgarian': 'Bulgarian',
3371
+ 'mejs.catalan': 'Catalan',
3372
+ 'mejs.chinese': 'Chinese',
3373
+ 'mejs.chinese-simplified': 'Chinese (Simplified)',
3374
+ 'mejs.chinese-traditional': 'Chinese (Traditional)',
3375
+ 'mejs.croatian': 'Croatian',
3376
+ 'mejs.czech': 'Czech',
3377
+ 'mejs.danish': 'Danish',
3378
+ 'mejs.dutch': 'Dutch',
3379
+ 'mejs.english': 'English',
3380
+ 'mejs.estonian': 'Estonian',
3381
+ 'mejs.filipino': 'Filipino',
3382
+ 'mejs.finnish': 'Finnish',
3383
+ 'mejs.french': 'French',
3384
+ 'mejs.galician': 'Galician',
3385
+ 'mejs.german': 'German',
3386
+ 'mejs.greek': 'Greek',
3387
+ 'mejs.haitian-creole': 'Haitian Creole',
3388
+ 'mejs.hebrew': 'Hebrew',
3389
+ 'mejs.hindi': 'Hindi',
3390
+ 'mejs.hungarian': 'Hungarian',
3391
+ 'mejs.icelandic': 'Icelandic',
3392
+ 'mejs.indonesian': 'Indonesian',
3393
+ 'mejs.irish': 'Irish',
3394
+ 'mejs.italian': 'Italian',
3395
+ 'mejs.japanese': 'Japanese',
3396
+ 'mejs.korean': 'Korean',
3397
+ 'mejs.latvian': 'Latvian',
3398
+ 'mejs.lithuanian': 'Lithuanian',
3399
+ 'mejs.macedonian': 'Macedonian',
3400
+ 'mejs.malay': 'Malay',
3401
+ 'mejs.maltese': 'Maltese',
3402
+ 'mejs.norwegian': 'Norwegian',
3403
+ 'mejs.persian': 'Persian',
3404
+ 'mejs.polish': 'Polish',
3405
+ 'mejs.portuguese': 'Portuguese',
3406
+ 'mejs.romanian': 'Romanian',
3407
+ 'mejs.russian': 'Russian',
3408
+ 'mejs.serbian': 'Serbian',
3409
+ 'mejs.slovak': 'Slovak',
3410
+ 'mejs.slovenian': 'Slovenian',
3411
+ 'mejs.spanish': 'Spanish',
3412
+ 'mejs.swahili': 'Swahili',
3413
+ 'mejs.swedish': 'Swedish',
3414
+ 'mejs.tagalog': 'Tagalog',
3415
+ 'mejs.thai': 'Thai',
3416
+ 'mejs.turkish': 'Turkish',
3417
+ 'mejs.ukrainian': 'Ukrainian',
3418
+ 'mejs.vietnamese': 'Vietnamese',
3419
+ 'mejs.welsh': 'Welsh',
3420
+ 'mejs.yiddish': 'Yiddish'
3421
+ };
3422
+
3423
+ },{}],16:[function(_dereq_,module,exports){
3424
+ 'use strict';
3425
+
3426
+ Object.defineProperty(exports, "__esModule", {
3427
+ value: true
3428
+ });
3429
+ exports.config = undefined;
3430
+
3431
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3432
+
3433
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3434
+
3435
+ var _window = _dereq_(3);
3436
+
3437
+ var _window2 = _interopRequireDefault(_window);
3438
+
3439
+ var _document = _dereq_(2);
3440
+
3441
+ var _document2 = _interopRequireDefault(_document);
3442
+
3443
+ var _mejs = _dereq_(7);
3444
+
3445
+ var _mejs2 = _interopRequireDefault(_mejs);
3446
+
3447
+ var _mediaelement = _dereq_(6);
3448
+
3449
+ var _mediaelement2 = _interopRequireDefault(_mediaelement);
3450
+
3451
+ var _default = _dereq_(17);
3452
+
3453
+ var _default2 = _interopRequireDefault(_default);
3454
+
3455
+ var _i18n = _dereq_(5);
3456
+
3457
+ var _i18n2 = _interopRequireDefault(_i18n);
3458
+
3459
+ var _constants = _dereq_(25);
3460
+
3461
+ var _general = _dereq_(27);
3462
+
3463
+ var _time = _dereq_(30);
3464
+
3465
+ var _media = _dereq_(28);
3466
+
3467
+ var _dom = _dereq_(26);
3468
+
3469
+ var dom = _interopRequireWildcard(_dom);
3470
+
3471
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
3472
+
3473
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3474
+
3475
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3476
+
3477
+ _mejs2.default.mepIndex = 0;
3478
+
3479
+ _mejs2.default.players = {};
3480
+
3481
+ var config = exports.config = {
3482
+ poster: '',
3483
+
3484
+ showPosterWhenEnded: false,
3485
+
3486
+ showPosterWhenPaused: false,
3487
+
3488
+ defaultVideoWidth: 480,
3489
+
3490
+ defaultVideoHeight: 270,
3491
+
3492
+ videoWidth: -1,
3493
+
3494
+ videoHeight: -1,
3495
+
3496
+ defaultAudioWidth: 400,
3497
+
3498
+ defaultAudioHeight: 40,
3499
+
3500
+ defaultSeekBackwardInterval: function defaultSeekBackwardInterval(media) {
3501
+ return media.getDuration() * 0.05;
3502
+ },
3503
+
3504
+ defaultSeekForwardInterval: function defaultSeekForwardInterval(media) {
3505
+ return media.getDuration() * 0.05;
3506
+ },
3507
+
3508
+ setDimensions: true,
3509
+
3510
+ audioWidth: -1,
3511
+
3512
+ audioHeight: -1,
3513
+
3514
+ loop: false,
3515
+
3516
+ autoRewind: true,
3517
+
3518
+ enableAutosize: true,
3519
+
3520
+ timeFormat: '',
3521
+
3522
+ alwaysShowHours: false,
3523
+
3524
+ showTimecodeFrameCount: false,
3525
+
3526
+ framesPerSecond: 25,
3527
+
3528
+ alwaysShowControls: false,
3529
+
3530
+ hideVideoControlsOnLoad: false,
3531
+
3532
+ hideVideoControlsOnPause: false,
3533
+
3534
+ clickToPlayPause: true,
3535
+
3536
+ controlsTimeoutDefault: 1500,
3537
+
3538
+ controlsTimeoutMouseEnter: 2500,
3539
+
3540
+ controlsTimeoutMouseLeave: 1000,
3541
+
3542
+ iPadUseNativeControls: false,
3543
+
3544
+ iPhoneUseNativeControls: false,
3545
+
3546
+ AndroidUseNativeControls: false,
3547
+
3548
+ features: ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'],
3549
+
3550
+ useDefaultControls: false,
3551
+
3552
+ isVideo: true,
3553
+
3554
+ stretching: 'auto',
3555
+
3556
+ classPrefix: 'mejs__',
3557
+
3558
+ enableKeyboard: true,
3559
+
3560
+ pauseOtherPlayers: true,
3561
+
3562
+ secondsDecimalLength: 0,
3563
+
3564
+ customError: null,
3565
+
3566
+ keyActions: [{
3567
+ keys: [32, 179],
3568
+ action: function action(player) {
3569
+
3570
+ if (!_constants.IS_FIREFOX) {
3571
+ if (player.paused || player.ended) {
3572
+ player.play();
3573
+ } else {
3574
+ player.pause();
3575
+ }
3576
+ }
3577
+ }
3578
+ }]
3579
+ };
3580
+
3581
+ _mejs2.default.MepDefaults = config;
3582
+
3583
+ var MediaElementPlayer = function () {
3584
+ function MediaElementPlayer(node, o) {
3585
+ _classCallCheck(this, MediaElementPlayer);
3586
+
3587
+ var t = this,
3588
+ element = typeof node === 'string' ? _document2.default.getElementById(node) : node;
3589
+
3590
+ if (!(t instanceof MediaElementPlayer)) {
3591
+ return new MediaElementPlayer(element, o);
3592
+ }
3593
+
3594
+ t.node = t.media = element;
3595
+
3596
+ if (!t.node) {
3597
+ return;
3598
+ }
3599
+
3600
+ if (t.media.player) {
3601
+ return t.media.player;
3602
+ }
3603
+
3604
+ t.hasFocus = false;
3605
+
3606
+ t.controlsAreVisible = true;
3607
+
3608
+ t.controlsEnabled = true;
3609
+
3610
+ t.controlsTimer = null;
3611
+
3612
+ t.currentMediaTime = 0;
3613
+
3614
+ t.proxy = null;
3615
+
3616
+ if (o === undefined) {
3617
+ var options = t.node.getAttribute('data-mejsoptions');
3618
+ o = options ? JSON.parse(options) : {};
3619
+ }
3620
+
3621
+ t.options = Object.assign({}, config, o);
3622
+
3623
+ if (t.options.loop && !t.media.getAttribute('loop')) {
3624
+ t.media.loop = true;
3625
+ t.node.loop = true;
3626
+ } else if (t.media.loop) {
3627
+ t.options.loop = true;
3628
+ }
3629
+
3630
+ if (!t.options.timeFormat) {
3631
+ t.options.timeFormat = 'mm:ss';
3632
+ if (t.options.alwaysShowHours) {
3633
+ t.options.timeFormat = 'hh:mm:ss';
3634
+ }
3635
+ if (t.options.showTimecodeFrameCount) {
3636
+ t.options.timeFormat += ':ff';
3637
+ }
3638
+ }
3639
+
3640
+ (0, _time.calculateTimeFormat)(0, t.options, t.options.framesPerSecond || 25);
3641
+
3642
+ t.id = 'mep_' + _mejs2.default.mepIndex++;
3643
+
3644
+ _mejs2.default.players[t.id] = t;
3645
+
3646
+ t.init();
3647
+
3648
+ return t;
3649
+ }
3650
+
3651
+ _createClass(MediaElementPlayer, [{
3652
+ key: 'getElement',
3653
+ value: function getElement(element) {
3654
+ return element;
3655
+ }
3656
+ }, {
3657
+ key: 'init',
3658
+ value: function init() {
3659
+ var t = this,
3660
+ playerOptions = Object.assign({}, t.options, {
3661
+ success: function success(media, domNode) {
3662
+ t._meReady(media, domNode);
3663
+ },
3664
+ error: function error(e) {
3665
+ t._handleError(e);
3666
+ }
3667
+ }),
3668
+ tagName = t.node.tagName.toLowerCase();
3669
+
3670
+ t.isDynamic = tagName !== 'audio' && tagName !== 'video' && tagName !== 'iframe';
3671
+ t.isVideo = t.isDynamic ? t.options.isVideo : tagName !== 'audio' && t.options.isVideo;
3672
+ t.mediaFiles = null;
3673
+ t.trackFiles = null;
3674
+
3675
+ if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls) {
3676
+ t.node.setAttribute('controls', true);
3677
+
3678
+ if (_constants.IS_IPAD && t.node.getAttribute('autoplay')) {
3679
+ t.play();
3680
+ }
3681
+ } else if ((t.isVideo || !t.isVideo && (t.options.features.length || t.options.useDefaultControls)) && !(_constants.IS_ANDROID && t.options.AndroidUseNativeControls)) {
3682
+ t.node.removeAttribute('controls');
3683
+ var videoPlayerTitle = t.isVideo ? _i18n2.default.t('mejs.video-player') : _i18n2.default.t('mejs.audio-player');
3684
+
3685
+ var offscreen = _document2.default.createElement('span');
3686
+ offscreen.className = t.options.classPrefix + 'offscreen';
3687
+ offscreen.innerText = videoPlayerTitle;
3688
+ t.media.parentNode.insertBefore(offscreen, t.media);
3689
+
3690
+ t.container = _document2.default.createElement('div');
3691
+ t.getElement(t.container).id = t.id;
3692
+ t.getElement(t.container).className = t.options.classPrefix + 'container ' + t.options.classPrefix + 'container-keyboard-inactive ' + t.media.className;
3693
+ t.getElement(t.container).tabIndex = 0;
3694
+ t.getElement(t.container).setAttribute('role', 'application');
3695
+ t.getElement(t.container).setAttribute('aria-label', videoPlayerTitle);
3696
+ t.getElement(t.container).innerHTML = '<div class="' + t.options.classPrefix + 'inner">' + ('<div class="' + t.options.classPrefix + 'mediaelement"></div>') + ('<div class="' + t.options.classPrefix + 'layers"></div>') + ('<div class="' + t.options.classPrefix + 'controls"></div>') + '</div>';
3697
+ t.getElement(t.container).addEventListener('focus', function (e) {
3698
+ if (!t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) {
3699
+ t.showControls(true);
3700
+
3701
+ var btnSelector = (0, _general.isNodeAfter)(e.relatedTarget, t.getElement(t.container)) ? '.' + t.options.classPrefix + 'controls .' + t.options.classPrefix + 'button:last-child > button' : '.' + t.options.classPrefix + 'playpause-button > button',
3702
+ button = t.getElement(t.container).querySelector(btnSelector);
3703
+
3704
+ button.focus();
3705
+ }
3706
+ });
3707
+ t.node.parentNode.insertBefore(t.getElement(t.container), t.node);
3708
+
3709
+ if (!t.options.features.length && !t.options.useDefaultControls) {
3710
+ t.getElement(t.container).style.background = 'transparent';
3711
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls').style.display = 'none';
3712
+ }
3713
+
3714
+ if (t.isVideo && t.options.stretching === 'fill' && !dom.hasClass(t.getElement(t.container).parentNode, t.options.classPrefix + 'fill-container')) {
3715
+ t.outerContainer = t.media.parentNode;
3716
+
3717
+ var wrapper = _document2.default.createElement('div');
3718
+ wrapper.className = t.options.classPrefix + 'fill-container';
3719
+ t.getElement(t.container).parentNode.insertBefore(wrapper, t.getElement(t.container));
3720
+ wrapper.appendChild(t.getElement(t.container));
3721
+ }
3722
+
3723
+ if (_constants.IS_ANDROID) {
3724
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'android');
3725
+ }
3726
+ if (_constants.IS_IOS) {
3727
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'ios');
3728
+ }
3729
+ if (_constants.IS_IPAD) {
3730
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'ipad');
3731
+ }
3732
+ if (_constants.IS_IPHONE) {
3733
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'iphone');
3734
+ }
3735
+ dom.addClass(t.getElement(t.container), t.isVideo ? t.options.classPrefix + 'video' : t.options.classPrefix + 'audio');
3736
+
3737
+ if (_constants.IS_SAFARI && !_constants.IS_IOS) {
3738
+
3739
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'hide-cues');
3740
+
3741
+ var cloneNode = t.node.cloneNode(),
3742
+ children = t.node.children,
3743
+ mediaFiles = [],
3744
+ tracks = [];
3745
+
3746
+ for (var i = 0, total = children.length; i < total; i++) {
3747
+ var childNode = children[i];
3748
+
3749
+ (function () {
3750
+ switch (childNode.tagName.toLowerCase()) {
3751
+ case 'source':
3752
+ var elements = {};
3753
+ Array.prototype.slice.call(childNode.attributes).forEach(function (item) {
3754
+ elements[item.name] = item.value;
3755
+ });
3756
+ elements.type = (0, _media.formatType)(elements.src, elements.type);
3757
+ mediaFiles.push(elements);
3758
+ break;
3759
+ case 'track':
3760
+ childNode.mode = 'hidden';
3761
+ tracks.push(childNode);
3762
+ break;
3763
+ default:
3764
+ cloneNode.appendChild(childNode);
3765
+ break;
3766
+ }
3767
+ })();
3768
+ }
3769
+
3770
+ t.node.remove();
3771
+ t.node = t.media = cloneNode;
3772
+
3773
+ if (mediaFiles.length) {
3774
+ t.mediaFiles = mediaFiles;
3775
+ }
3776
+ if (tracks.length) {
3777
+ t.trackFiles = tracks;
3778
+ }
3779
+ }
3780
+
3781
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'mediaelement').appendChild(t.node);
3782
+
3783
+ t.media.player = t;
3784
+
3785
+ t.controls = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls');
3786
+ t.layers = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'layers');
3787
+
3788
+ var tagType = t.isVideo ? 'video' : 'audio',
3789
+ capsTagName = tagType.substring(0, 1).toUpperCase() + tagType.substring(1);
3790
+
3791
+ if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
3792
+ t.width = t.options[tagType + 'Width'];
3793
+ } else if (t.node.style.width !== '' && t.node.style.width !== null) {
3794
+ t.width = t.node.style.width;
3795
+ } else if (t.node.getAttribute('width')) {
3796
+ t.width = t.node.getAttribute('width');
3797
+ } else {
3798
+ t.width = t.options['default' + capsTagName + 'Width'];
3799
+ }
3800
+
3801
+ if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
3802
+ t.height = t.options[tagType + 'Height'];
3803
+ } else if (t.node.style.height !== '' && t.node.style.height !== null) {
3804
+ t.height = t.node.style.height;
3805
+ } else if (t.node.getAttribute('height')) {
3806
+ t.height = t.node.getAttribute('height');
3807
+ } else {
3808
+ t.height = t.options['default' + capsTagName + 'Height'];
3809
+ }
3810
+
3811
+ t.initialAspectRatio = t.height >= t.width ? t.width / t.height : t.height / t.width;
3812
+
3813
+ t.setPlayerSize(t.width, t.height);
3814
+
3815
+ playerOptions.pluginWidth = t.width;
3816
+ playerOptions.pluginHeight = t.height;
3817
+ } else if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
3818
+ t.node.style.display = 'none';
3819
+ }
3820
+
3821
+ _mejs2.default.MepDefaults = playerOptions;
3822
+
3823
+ new _mediaelement2.default(t.media, playerOptions, t.mediaFiles);
3824
+
3825
+ if (t.getElement(t.container) !== undefined && t.options.features.length && t.controlsAreVisible && !t.options.hideVideoControlsOnLoad) {
3826
+ var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
3827
+ t.getElement(t.container).dispatchEvent(event);
3828
+ }
3829
+ }
3830
+ }, {
3831
+ key: 'showControls',
3832
+ value: function showControls(doAnimation) {
3833
+ var t = this;
3834
+
3835
+ doAnimation = doAnimation === undefined || doAnimation;
3836
+
3837
+ if (t.controlsAreVisible || !t.isVideo) {
3838
+ return;
3839
+ }
3840
+
3841
+ if (doAnimation) {
3842
+ (function () {
3843
+ dom.fadeIn(t.getElement(t.controls), 200, function () {
3844
+ dom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
3845
+ var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
3846
+ t.getElement(t.container).dispatchEvent(event);
3847
+ });
3848
+
3849
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
3850
+
3851
+ var _loop = function _loop(i, total) {
3852
+ dom.fadeIn(controls[i], 200, function () {
3853
+ dom.removeClass(controls[i], t.options.classPrefix + 'offscreen');
3854
+ });
3855
+ };
3856
+
3857
+ for (var i = 0, total = controls.length; i < total; i++) {
3858
+ _loop(i, total);
3859
+ }
3860
+ })();
3861
+ } else {
3862
+ dom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
3863
+ t.getElement(t.controls).style.display = '';
3864
+ t.getElement(t.controls).style.opacity = 1;
3865
+
3866
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
3867
+ for (var i = 0, total = controls.length; i < total; i++) {
3868
+ dom.removeClass(controls[i], t.options.classPrefix + 'offscreen');
3869
+ controls[i].style.display = '';
3870
+ }
3871
+
3872
+ var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
3873
+ t.getElement(t.container).dispatchEvent(event);
3874
+ }
3875
+
3876
+ t.controlsAreVisible = true;
3877
+ t.setControlsSize();
3878
+ }
3879
+ }, {
3880
+ key: 'hideControls',
3881
+ value: function hideControls(doAnimation, forceHide) {
3882
+ var t = this;
3883
+
3884
+ doAnimation = doAnimation === undefined || doAnimation;
3885
+
3886
+ if (forceHide !== true && (!t.controlsAreVisible || t.options.alwaysShowControls || t.paused && t.readyState === 4 && (!t.options.hideVideoControlsOnLoad && t.currentTime <= 0 || !t.options.hideVideoControlsOnPause && t.currentTime > 0) || t.isVideo && !t.options.hideVideoControlsOnLoad && !t.readyState || t.ended)) {
3887
+ return;
3888
+ }
3889
+
3890
+ if (doAnimation) {
3891
+ (function () {
3892
+ dom.fadeOut(t.getElement(t.controls), 200, function () {
3893
+ dom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
3894
+ t.getElement(t.controls).style.display = '';
3895
+ var event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));
3896
+ t.getElement(t.container).dispatchEvent(event);
3897
+ });
3898
+
3899
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
3900
+
3901
+ var _loop2 = function _loop2(i, total) {
3902
+ dom.fadeOut(controls[i], 200, function () {
3903
+ dom.addClass(controls[i], t.options.classPrefix + 'offscreen');
3904
+ controls[i].style.display = '';
3905
+ });
3906
+ };
3907
+
3908
+ for (var i = 0, total = controls.length; i < total; i++) {
3909
+ _loop2(i, total);
3910
+ }
3911
+ })();
3912
+ } else {
3913
+ dom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
3914
+ t.getElement(t.controls).style.display = '';
3915
+ t.getElement(t.controls).style.opacity = 0;
3916
+
3917
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
3918
+ for (var i = 0, total = controls.length; i < total; i++) {
3919
+ dom.addClass(controls[i], t.options.classPrefix + 'offscreen');
3920
+ controls[i].style.display = '';
3921
+ }
3922
+
3923
+ var event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));
3924
+ t.getElement(t.container).dispatchEvent(event);
3925
+ }
3926
+
3927
+ t.controlsAreVisible = false;
3928
+ }
3929
+ }, {
3930
+ key: 'startControlsTimer',
3931
+ value: function startControlsTimer(timeout) {
3932
+ var t = this;
3933
+
3934
+ timeout = typeof timeout !== 'undefined' ? timeout : t.options.controlsTimeoutDefault;
3935
+
3936
+ t.killControlsTimer('start');
3937
+
3938
+ t.controlsTimer = setTimeout(function () {
3939
+ t.hideControls();
3940
+ t.killControlsTimer('hide');
3941
+ }, timeout);
3942
+ }
3943
+ }, {
3944
+ key: 'killControlsTimer',
3945
+ value: function killControlsTimer() {
3946
+ var t = this;
3947
+
3948
+ if (t.controlsTimer !== null) {
3949
+ clearTimeout(t.controlsTimer);
3950
+ delete t.controlsTimer;
3951
+ t.controlsTimer = null;
3952
+ }
3953
+ }
3954
+ }, {
3955
+ key: 'disableControls',
3956
+ value: function disableControls() {
3957
+ var t = this;
3958
+
3959
+ t.killControlsTimer();
3960
+ t.controlsEnabled = false;
3961
+ t.hideControls(false, true);
3962
+ }
3963
+ }, {
3964
+ key: 'enableControls',
3965
+ value: function enableControls() {
3966
+ var t = this;
3967
+
3968
+ t.controlsEnabled = true;
3969
+ t.showControls(false);
3970
+ }
3971
+ }, {
3972
+ key: '_setDefaultPlayer',
3973
+ value: function _setDefaultPlayer() {
3974
+ var t = this;
3975
+ if (t.proxy) {
3976
+ t.proxy.pause();
3977
+ }
3978
+ t.proxy = new _default2.default(t);
3979
+ t.media.addEventListener('loadedmetadata', function () {
3980
+ if (t.getCurrentTime() > 0 && t.currentMediaTime > 0) {
3981
+ t.setCurrentTime(t.currentMediaTime);
3982
+ if (!_constants.IS_IOS && !_constants.IS_ANDROID) {
3983
+ t.play();
3984
+ }
3985
+ }
3986
+ });
3987
+ }
3988
+ }, {
3989
+ key: '_meReady',
3990
+ value: function _meReady(media, domNode) {
3991
+ var t = this,
3992
+ autoplayAttr = domNode.getAttribute('autoplay'),
3993
+ autoplay = !(autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false'),
3994
+ isNative = media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);
3995
+
3996
+ if (t.getElement(t.controls)) {
3997
+ t.enableControls();
3998
+ }
3999
+
4000
+ if (t.getElement(t.container) && t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play')) {
4001
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play').style.display = '';
4002
+ }
4003
+
4004
+ if (t.created) {
4005
+ return;
4006
+ }
4007
+
4008
+ t.created = true;
4009
+ t.media = media;
4010
+ t.domNode = domNode;
4011
+
4012
+ if (!(_constants.IS_ANDROID && t.options.AndroidUseNativeControls) && !(_constants.IS_IPAD && t.options.iPadUseNativeControls) && !(_constants.IS_IPHONE && t.options.iPhoneUseNativeControls)) {
4013
+ if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
4014
+ if (autoplay && isNative) {
4015
+ t.play();
4016
+ }
4017
+
4018
+ if (t.options.success) {
4019
+
4020
+ if (typeof t.options.success === 'string') {
4021
+ _window2.default[t.options.success](t.media, t.domNode, t);
4022
+ } else {
4023
+ t.options.success(t.media, t.domNode, t);
4024
+ }
4025
+ }
4026
+
4027
+ return;
4028
+ }
4029
+
4030
+ t.featurePosition = {};
4031
+
4032
+ t._setDefaultPlayer();
4033
+
4034
+ t.buildposter(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
4035
+ t.buildkeyboard(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
4036
+ t.buildoverlays(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
4037
+
4038
+ if (t.options.useDefaultControls) {
4039
+ var defaultControls = ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'];
4040
+ t.options.features = defaultControls.concat(t.options.features.filter(function (item) {
4041
+ return defaultControls.indexOf(item) === -1;
4042
+ }));
4043
+ }
4044
+
4045
+ t.buildfeatures(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
4046
+
4047
+ var event = (0, _general.createEvent)('controlsready', t.getElement(t.container));
4048
+ t.getElement(t.container).dispatchEvent(event);
4049
+
4050
+ t.setPlayerSize(t.width, t.height);
4051
+ t.setControlsSize();
4052
+
4053
+ if (t.isVideo) {
4054
+ t.clickToPlayPauseCallback = function () {
4055
+
4056
+ if (t.options.clickToPlayPause) {
4057
+ var button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),
4058
+ pressed = button.getAttribute('aria-pressed');
4059
+
4060
+ if (t.paused && pressed) {
4061
+ t.pause();
4062
+ } else if (t.paused) {
4063
+ t.play();
4064
+ } else {
4065
+ t.pause();
4066
+ }
4067
+
4068
+ button.setAttribute('aria-pressed', !pressed);
4069
+ t.getElement(t.container).focus();
4070
+ }
4071
+ };
4072
+
4073
+ t.createIframeLayer();
4074
+
4075
+ t.media.addEventListener('click', t.clickToPlayPauseCallback);
4076
+
4077
+ if ((_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls) {
4078
+ t.node.addEventListener('touchstart', function () {
4079
+ if (t.controlsAreVisible) {
4080
+ t.hideControls(false);
4081
+ } else {
4082
+ if (t.controlsEnabled) {
4083
+ t.showControls(false);
4084
+ }
4085
+ }
4086
+ }, _constants.SUPPORT_PASSIVE_EVENT ? { passive: true } : false);
4087
+ } else {
4088
+ t.getElement(t.container).addEventListener('mouseenter', function () {
4089
+ if (t.controlsEnabled) {
4090
+ if (!t.options.alwaysShowControls) {
4091
+ t.killControlsTimer('enter');
4092
+ t.showControls();
4093
+ t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
4094
+ }
4095
+ }
4096
+ });
4097
+ t.getElement(t.container).addEventListener('mousemove', function () {
4098
+ if (t.controlsEnabled) {
4099
+ if (!t.controlsAreVisible) {
4100
+ t.showControls();
4101
+ }
4102
+ if (!t.options.alwaysShowControls) {
4103
+ t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
4104
+ }
4105
+ }
4106
+ });
4107
+ t.getElement(t.container).addEventListener('mouseleave', function () {
4108
+ if (t.controlsEnabled) {
4109
+ if (!t.paused && !t.options.alwaysShowControls) {
4110
+ t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
4111
+ }
4112
+ }
4113
+ });
4114
+ }
4115
+
4116
+ if (t.options.hideVideoControlsOnLoad) {
4117
+ t.hideControls(false);
4118
+ }
4119
+
4120
+ if (t.options.enableAutosize) {
4121
+ t.media.addEventListener('loadedmetadata', function (e) {
4122
+ var target = e !== undefined ? e.detail.target || e.target : t.media;
4123
+ if (t.options.videoHeight <= 0 && !t.domNode.getAttribute('height') && !t.domNode.style.height && target !== null && !isNaN(target.videoHeight)) {
4124
+ t.setPlayerSize(target.videoWidth, target.videoHeight);
4125
+ t.setControlsSize();
4126
+ t.media.setSize(target.videoWidth, target.videoHeight);
4127
+ }
4128
+ });
4129
+ }
4130
+ }
4131
+
4132
+ t.media.addEventListener('play', function () {
4133
+ t.hasFocus = true;
4134
+
4135
+ for (var playerIndex in _mejs2.default.players) {
4136
+ if (_mejs2.default.players.hasOwnProperty(playerIndex)) {
4137
+ var p = _mejs2.default.players[playerIndex];
4138
+
4139
+ if (p.id !== t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
4140
+ p.pause();
4141
+ p.hasFocus = false;
4142
+ }
4143
+ }
4144
+ }
4145
+
4146
+ if (!(_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls && t.isVideo) {
4147
+ t.hideControls();
4148
+ }
4149
+ });
4150
+
4151
+ t.media.addEventListener('ended', function () {
4152
+ if (t.options.autoRewind) {
4153
+ try {
4154
+ t.setCurrentTime(0);
4155
+
4156
+ setTimeout(function () {
4157
+ var loadingElement = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-loading');
4158
+ if (loadingElement && loadingElement.parentNode) {
4159
+ loadingElement.parentNode.style.display = 'none';
4160
+ }
4161
+ }, 20);
4162
+ } catch (exp) {
4163
+
4164
+ }
4165
+ }
4166
+
4167
+ if (typeof t.media.renderer.stop === 'function') {
4168
+ t.media.renderer.stop();
4169
+ } else {
4170
+ t.pause();
4171
+ }
4172
+
4173
+ if (t.setProgressRail) {
4174
+ t.setProgressRail();
4175
+ }
4176
+ if (t.setCurrentRail) {
4177
+ t.setCurrentRail();
4178
+ }
4179
+
4180
+ if (t.options.loop) {
4181
+ t.play();
4182
+ } else if (!t.options.alwaysShowControls && t.controlsEnabled) {
4183
+ t.showControls();
4184
+ }
4185
+ });
4186
+
4187
+ t.media.addEventListener('loadedmetadata', function () {
4188
+
4189
+ (0, _time.calculateTimeFormat)(t.getDuration(), t.options, t.options.framesPerSecond || 25);
4190
+
4191
+ if (t.updateDuration) {
4192
+ t.updateDuration();
4193
+ }
4194
+ if (t.updateCurrent) {
4195
+ t.updateCurrent();
4196
+ }
4197
+
4198
+ if (!t.isFullScreen) {
4199
+ t.setPlayerSize(t.width, t.height);
4200
+ t.setControlsSize();
4201
+ }
4202
+ });
4203
+
4204
+ var duration = null;
4205
+ t.media.addEventListener('timeupdate', function () {
4206
+ if (!isNaN(t.getDuration()) && duration !== t.getDuration()) {
4207
+ duration = t.getDuration();
4208
+ (0, _time.calculateTimeFormat)(duration, t.options, t.options.framesPerSecond || 25);
4209
+
4210
+ if (t.updateDuration) {
4211
+ t.updateDuration();
4212
+ }
4213
+ if (t.updateCurrent) {
4214
+ t.updateCurrent();
4215
+ }
4216
+
4217
+ t.setControlsSize();
4218
+ }
4219
+ });
4220
+
4221
+ t.getElement(t.container).addEventListener('click', function (e) {
4222
+ dom.addClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');
4223
+ });
4224
+
4225
+ t.getElement(t.container).addEventListener('focusin', function (e) {
4226
+ dom.removeClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');
4227
+ if (t.isVideo && !_constants.IS_ANDROID && !_constants.IS_IOS && t.controlsEnabled && !t.options.alwaysShowControls) {
4228
+ t.killControlsTimer('enter');
4229
+ t.showControls();
4230
+ t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
4231
+ }
4232
+ });
4233
+
4234
+ t.getElement(t.container).addEventListener('focusout', function (e) {
4235
+ setTimeout(function () {
4236
+ if (e.relatedTarget) {
4237
+ if (t.keyboardAction && !e.relatedTarget.closest('.' + t.options.classPrefix + 'container')) {
4238
+ t.keyboardAction = false;
4239
+ if (t.isVideo && !t.options.alwaysShowControls && !t.paused) {
4240
+ t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
4241
+ }
4242
+ }
4243
+ }
4244
+ }, 0);
4245
+ });
4246
+
4247
+ setTimeout(function () {
4248
+ t.setPlayerSize(t.width, t.height);
4249
+ t.setControlsSize();
4250
+ }, 0);
4251
+
4252
+ t.globalResizeCallback = function () {
4253
+ if (!(t.isFullScreen || _constants.HAS_TRUE_NATIVE_FULLSCREEN && _document2.default.webkitIsFullScreen)) {
4254
+ t.setPlayerSize(t.width, t.height);
4255
+ }
4256
+
4257
+ t.setControlsSize();
4258
+ };
4259
+
4260
+ t.globalBind('resize', t.globalResizeCallback);
4261
+ }
4262
+
4263
+ if (autoplay && isNative) {
4264
+ t.play();
4265
+ }
4266
+
4267
+ if (t.options.success) {
4268
+ if (typeof t.options.success === 'string') {
4269
+ _window2.default[t.options.success](t.media, t.domNode, t);
4270
+ } else {
4271
+ t.options.success(t.media, t.domNode, t);
4272
+ }
4273
+ }
4274
+ }
4275
+ }, {
4276
+ key: '_handleError',
4277
+ value: function _handleError(e, media, node) {
4278
+ var t = this,
4279
+ play = t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-play');
4280
+
4281
+ if (play) {
4282
+ play.style.display = 'none';
4283
+ }
4284
+
4285
+ if (t.options.error) {
4286
+ t.options.error(e, media, node);
4287
+ }
4288
+
4289
+ if (t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay')) {
4290
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay').remove();
4291
+ }
4292
+
4293
+ var errorContainer = _document2.default.createElement('div');
4294
+ errorContainer.className = t.options.classPrefix + 'cannotplay';
4295
+ errorContainer.style.width = '100%';
4296
+ errorContainer.style.height = '100%';
4297
+
4298
+ var errorContent = typeof t.options.customError === 'function' ? t.options.customError(t.media, t.media.originalNode) : t.options.customError,
4299
+ imgError = '';
4300
+
4301
+ if (!errorContent) {
4302
+ var poster = t.media.originalNode.getAttribute('poster');
4303
+ if (poster) {
4304
+ imgError = '<img src="' + poster + '" alt="' + _mejs2.default.i18n.t('mejs.download-file') + '">';
4305
+ }
4306
+
4307
+ if (e.message) {
4308
+ errorContent = '<p>' + e.message + '</p>';
4309
+ }
4310
+
4311
+ if (e.urls) {
4312
+ for (var i = 0, total = e.urls.length; i < total; i++) {
4313
+ var url = e.urls[i];
4314
+ errorContent += '<a href="' + url.src + '" data-type="' + url.type + '"><span>' + _mejs2.default.i18n.t('mejs.download-file') + ': ' + url.src + '</span></a>';
4315
+ }
4316
+ }
4317
+ }
4318
+
4319
+ if (errorContent && t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error')) {
4320
+ errorContainer.innerHTML = errorContent;
4321
+ t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').innerHTML = '' + imgError + errorContainer.outerHTML;
4322
+ t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').parentNode.style.display = 'block';
4323
+ }
4324
+
4325
+ if (t.controlsEnabled) {
4326
+ t.disableControls();
4327
+ }
4328
+ }
4329
+ }, {
4330
+ key: 'setPlayerSize',
4331
+ value: function setPlayerSize(width, height) {
4332
+ var t = this;
4333
+
4334
+ if (!t.options.setDimensions) {
4335
+ return false;
4336
+ }
4337
+
4338
+ if (typeof width !== 'undefined') {
4339
+ t.width = width;
4340
+ }
4341
+
4342
+ if (typeof height !== 'undefined') {
4343
+ t.height = height;
4344
+ }
4345
+
4346
+ switch (t.options.stretching) {
4347
+ case 'fill':
4348
+ if (t.isVideo) {
4349
+ t.setFillMode();
4350
+ } else {
4351
+ t.setDimensions(t.width, t.height);
4352
+ }
4353
+ break;
4354
+ case 'responsive':
4355
+ t.setResponsiveMode();
4356
+ break;
4357
+ case 'none':
4358
+ t.setDimensions(t.width, t.height);
4359
+ break;
4360
+
4361
+ default:
4362
+ if (t.hasFluidMode() === true) {
4363
+ t.setResponsiveMode();
4364
+ } else {
4365
+ t.setDimensions(t.width, t.height);
4366
+ }
4367
+ break;
4368
+ }
4369
+ }
4370
+ }, {
4371
+ key: 'hasFluidMode',
4372
+ value: function hasFluidMode() {
4373
+ var t = this;
4374
+
4375
+ return t.height.toString().indexOf('%') !== -1 || t.node && t.node.style.maxWidth && t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width || t.node && t.node.currentStyle && t.node.currentStyle.maxWidth === '100%';
4376
+ }
4377
+ }, {
4378
+ key: 'setResponsiveMode',
4379
+ value: function setResponsiveMode() {
4380
+ var t = this,
4381
+ parent = function () {
4382
+
4383
+ var parentEl = void 0,
4384
+ el = t.getElement(t.container);
4385
+
4386
+ while (el) {
4387
+ try {
4388
+ if (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {
4389
+ return _window2.default.frameElement;
4390
+ } else {
4391
+ parentEl = el.parentElement;
4392
+ }
4393
+ } catch (e) {
4394
+ parentEl = el.parentElement;
4395
+ }
4396
+
4397
+ if (parentEl && dom.visible(parentEl)) {
4398
+ return parentEl;
4399
+ }
4400
+ el = parentEl;
4401
+ }
4402
+
4403
+ return null;
4404
+ }(),
4405
+ parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null),
4406
+ nativeWidth = function () {
4407
+ if (t.isVideo) {
4408
+ if (t.node.videoWidth && t.node.videoWidth > 0) {
4409
+ return t.node.videoWidth;
4410
+ } else if (t.node.getAttribute('width')) {
4411
+ return t.node.getAttribute('width');
4412
+ } else {
4413
+ return t.options.defaultVideoWidth;
4414
+ }
4415
+ } else {
4416
+ return t.options.defaultAudioWidth;
4417
+ }
4418
+ }(),
4419
+ nativeHeight = function () {
4420
+ if (t.isVideo) {
4421
+ if (t.node.videoHeight && t.node.videoHeight > 0) {
4422
+ return t.node.videoHeight;
4423
+ } else if (t.node.getAttribute('height')) {
4424
+ return t.node.getAttribute('height');
4425
+ } else {
4426
+ return t.options.defaultVideoHeight;
4427
+ }
4428
+ } else {
4429
+ return t.options.defaultAudioHeight;
4430
+ }
4431
+ }(),
4432
+ aspectRatio = function () {
4433
+ var ratio = 1;
4434
+ if (!t.isVideo) {
4435
+ return ratio;
4436
+ }
4437
+
4438
+ if (t.node.videoWidth && t.node.videoWidth > 0 && t.node.videoHeight && t.node.videoHeight > 0) {
4439
+ ratio = t.height >= t.width ? t.node.videoWidth / t.node.videoHeight : t.node.videoHeight / t.node.videoWidth;
4440
+ } else {
4441
+ ratio = t.initialAspectRatio;
4442
+ }
4443
+
4444
+ if (isNaN(ratio) || ratio < 0.01 || ratio > 100) {
4445
+ ratio = 1;
4446
+ }
4447
+
4448
+ return ratio;
4449
+ }(),
4450
+ parentHeight = parseFloat(parentStyles.height);
4451
+
4452
+ var newHeight = void 0,
4453
+ parentWidth = parseFloat(parentStyles.width);
4454
+
4455
+ if (t.isVideo) {
4456
+ if (t.height === '100%') {
4457
+ newHeight = parseFloat(parentWidth * nativeHeight / nativeWidth, 10);
4458
+ } else {
4459
+ newHeight = t.height >= t.width ? parseFloat(parentWidth / aspectRatio, 10) : parseFloat(parentWidth * aspectRatio, 10);
4460
+ }
4461
+ } else {
4462
+ newHeight = nativeHeight;
4463
+ }
4464
+
4465
+ if (isNaN(newHeight)) {
4466
+ newHeight = parentHeight;
4467
+ }
4468
+
4469
+ if (t.getElement(t.container).parentNode.length > 0 && t.getElement(t.container).parentNode.tagName.toLowerCase() === 'body') {
4470
+ parentWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth;
4471
+ newHeight = _window2.default.innerHeight || _document2.default.documentElement.clientHeight || _document2.default.body.clientHeight;
4472
+ }
4473
+
4474
+ if (newHeight && parentWidth) {
4475
+ t.getElement(t.container).style.width = parentWidth + 'px';
4476
+ t.getElement(t.container).style.height = newHeight + 'px';
4477
+
4478
+ t.node.style.width = '100%';
4479
+ t.node.style.height = '100%';
4480
+
4481
+ if (t.isVideo && t.media.setSize) {
4482
+ t.media.setSize(parentWidth, newHeight);
4483
+ }
4484
+
4485
+ var layerChildren = t.getElement(t.layers).children;
4486
+ for (var i = 0, total = layerChildren.length; i < total; i++) {
4487
+ layerChildren[i].style.width = '100%';
4488
+ layerChildren[i].style.height = '100%';
4489
+ }
4490
+ }
4491
+ }
4492
+ }, {
4493
+ key: 'setFillMode',
4494
+ value: function setFillMode() {
4495
+ var t = this;
4496
+ var isIframe = _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null;
4497
+ var parent = function () {
4498
+ var parentEl = void 0,
4499
+ el = t.getElement(t.container);
4500
+
4501
+ while (el) {
4502
+ try {
4503
+ if (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {
4504
+ return _window2.default.frameElement;
4505
+ } else {
4506
+ parentEl = el.parentElement;
4507
+ }
4508
+ } catch (e) {
4509
+ parentEl = el.parentElement;
4510
+ }
4511
+
4512
+ if (parentEl && dom.visible(parentEl)) {
4513
+ return parentEl;
4514
+ }
4515
+ el = parentEl;
4516
+ }
4517
+
4518
+ return null;
4519
+ }();
4520
+ var parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null);
4521
+
4522
+ if (t.node.style.height !== 'none' && t.node.style.height !== t.height) {
4523
+ t.node.style.height = 'auto';
4524
+ }
4525
+ if (t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width) {
4526
+ t.node.style.maxWidth = 'none';
4527
+ }
4528
+
4529
+ if (t.node.style.maxHeight !== 'none' && t.node.style.maxHeight !== t.height) {
4530
+ t.node.style.maxHeight = 'none';
4531
+ }
4532
+
4533
+ if (t.node.currentStyle) {
4534
+ if (t.node.currentStyle.height === '100%') {
4535
+ t.node.currentStyle.height = 'auto';
4536
+ }
4537
+ if (t.node.currentStyle.maxWidth === '100%') {
4538
+ t.node.currentStyle.maxWidth = 'none';
4539
+ }
4540
+ if (t.node.currentStyle.maxHeight === '100%') {
4541
+ t.node.currentStyle.maxHeight = 'none';
4542
+ }
4543
+ }
4544
+
4545
+ if (!isIframe && !parseFloat(parentStyles.width)) {
4546
+ parent.style.width = t.media.offsetWidth + 'px';
4547
+ }
4548
+
4549
+ if (!isIframe && !parseFloat(parentStyles.height)) {
4550
+ parent.style.height = t.media.offsetHeight + 'px';
4551
+ }
4552
+
4553
+ parentStyles = getComputedStyle(parent);
4554
+
4555
+ var parentWidth = parseFloat(parentStyles.width),
4556
+ parentHeight = parseFloat(parentStyles.height);
4557
+
4558
+ t.setDimensions('100%', '100%');
4559
+
4560
+ var poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');
4561
+ if (poster) {
4562
+ poster.style.display = '';
4563
+ }
4564
+
4565
+ var targetElement = t.getElement(t.container).querySelectorAll('object, embed, iframe, video'),
4566
+ initHeight = t.height,
4567
+ initWidth = t.width,
4568
+ scaleX1 = parentWidth,
4569
+ scaleY1 = initHeight * parentWidth / initWidth,
4570
+ scaleX2 = initWidth * parentHeight / initHeight,
4571
+ scaleY2 = parentHeight,
4572
+ bScaleOnWidth = scaleX2 > parentWidth === false,
4573
+ finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2),
4574
+ finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2),
4575
+ width = bScaleOnWidth ? parentWidth + 'px' : finalWidth + 'px',
4576
+ height = bScaleOnWidth ? finalHeight + 'px' : parentHeight + 'px';
4577
+
4578
+ for (var i = 0, total = targetElement.length; i < total; i++) {
4579
+ targetElement[i].style.height = height;
4580
+ targetElement[i].style.width = width;
4581
+ if (t.media.setSize) {
4582
+ t.media.setSize(width, height);
4583
+ }
4584
+
4585
+ targetElement[i].style.marginLeft = Math.floor((parentWidth - finalWidth) / 2) + 'px';
4586
+ targetElement[i].style.marginTop = 0;
4587
+ }
4588
+ }
4589
+ }, {
4590
+ key: 'setDimensions',
4591
+ value: function setDimensions(width, height) {
4592
+ var t = this;
4593
+
4594
+ width = (0, _general.isString)(width) && width.indexOf('%') > -1 ? width : parseFloat(width) + 'px';
4595
+ height = (0, _general.isString)(height) && height.indexOf('%') > -1 ? height : parseFloat(height) + 'px';
4596
+
4597
+ t.getElement(t.container).style.width = width;
4598
+ t.getElement(t.container).style.height = height;
4599
+
4600
+ var layers = t.getElement(t.layers).children;
4601
+ for (var i = 0, total = layers.length; i < total; i++) {
4602
+ layers[i].style.width = width;
4603
+ layers[i].style.height = height;
4604
+ }
4605
+ }
4606
+ }, {
4607
+ key: 'setControlsSize',
4608
+ value: function setControlsSize() {
4609
+ var t = this;
4610
+
4611
+ if (!dom.visible(t.getElement(t.container))) {
4612
+ return;
4613
+ }
4614
+
4615
+ if (t.rail && dom.visible(t.rail)) {
4616
+ var totalStyles = t.total ? getComputedStyle(t.total, null) : null,
4617
+ totalMargin = totalStyles ? parseFloat(totalStyles.marginLeft) + parseFloat(totalStyles.marginRight) : 0,
4618
+ railStyles = getComputedStyle(t.rail),
4619
+ railMargin = parseFloat(railStyles.marginLeft) + parseFloat(railStyles.marginRight);
4620
+
4621
+ var siblingsWidth = 0;
4622
+
4623
+ var siblings = dom.siblings(t.rail, function (el) {
4624
+ return el !== t.rail;
4625
+ }),
4626
+ total = siblings.length;
4627
+ for (var i = 0; i < total; i++) {
4628
+ siblingsWidth += siblings[i].offsetWidth;
4629
+ }
4630
+
4631
+ siblingsWidth += totalMargin + (totalMargin === 0 ? railMargin * 2 : railMargin) + 1;
4632
+
4633
+ t.getElement(t.container).style.minWidth = siblingsWidth + 'px';
4634
+
4635
+ var event = (0, _general.createEvent)('controlsresize', t.getElement(t.container));
4636
+ t.getElement(t.container).dispatchEvent(event);
4637
+ } else {
4638
+ var children = t.getElement(t.controls).children;
4639
+ var minWidth = 0;
4640
+
4641
+ for (var _i = 0, _total = children.length; _i < _total; _i++) {
4642
+ minWidth += children[_i].offsetWidth;
4643
+ }
4644
+
4645
+ t.getElement(t.container).style.minWidth = minWidth + 'px';
4646
+ }
4647
+ }
4648
+ }, {
4649
+ key: 'addControlElement',
4650
+ value: function addControlElement(element, key) {
4651
+
4652
+ var t = this;
4653
+
4654
+ if (t.featurePosition[key] !== undefined) {
4655
+ var child = t.getElement(t.controls).children[t.featurePosition[key] - 1];
4656
+ child.parentNode.insertBefore(element, child.nextSibling);
4657
+ } else {
4658
+ t.getElement(t.controls).appendChild(element);
4659
+ var children = t.getElement(t.controls).children;
4660
+ for (var i = 0, total = children.length; i < total; i++) {
4661
+ if (element === children[i]) {
4662
+ t.featurePosition[key] = i;
4663
+ break;
4664
+ }
4665
+ }
4666
+ }
4667
+ }
4668
+ }, {
4669
+ key: 'createIframeLayer',
4670
+ value: function createIframeLayer() {
4671
+ var t = this;
4672
+
4673
+ if (t.isVideo && t.media.rendererName !== null && t.media.rendererName.indexOf('iframe') > -1 && !_document2.default.getElementById(t.media.id + '-iframe-overlay')) {
4674
+
4675
+ var layer = _document2.default.createElement('div'),
4676
+ target = _document2.default.getElementById(t.media.id + '_' + t.media.rendererName);
4677
+
4678
+ layer.id = t.media.id + '-iframe-overlay';
4679
+ layer.className = t.options.classPrefix + 'iframe-overlay';
4680
+ layer.addEventListener('click', function (e) {
4681
+ if (t.options.clickToPlayPause) {
4682
+ if (t.paused) {
4683
+ t.play();
4684
+ } else {
4685
+ t.pause();
4686
+ }
4687
+
4688
+ e.preventDefault();
4689
+ e.stopPropagation();
4690
+ }
4691
+ });
4692
+
4693
+ target.parentNode.insertBefore(layer, target);
4694
+ }
4695
+ }
4696
+ }, {
4697
+ key: 'resetSize',
4698
+ value: function resetSize() {
4699
+ var t = this;
4700
+
4701
+ setTimeout(function () {
4702
+ t.setPlayerSize(t.width, t.height);
4703
+ t.setControlsSize();
4704
+ }, 50);
4705
+ }
4706
+ }, {
4707
+ key: 'setPoster',
4708
+ value: function setPoster(url) {
4709
+ var t = this;
4710
+
4711
+ if (t.getElement(t.container)) {
4712
+ var posterDiv = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster');
4713
+
4714
+ if (!posterDiv) {
4715
+ posterDiv = _document2.default.createElement('div');
4716
+ posterDiv.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';
4717
+ t.getElement(t.layers).appendChild(posterDiv);
4718
+ }
4719
+
4720
+ var posterImg = posterDiv.querySelector('img');
4721
+
4722
+ if (!posterImg && url) {
4723
+ posterImg = _document2.default.createElement('img');
4724
+ posterImg.className = t.options.classPrefix + 'poster-img';
4725
+ posterImg.width = '100%';
4726
+ posterImg.height = '100%';
4727
+ posterDiv.style.display = '';
4728
+ posterDiv.appendChild(posterImg);
4729
+ }
4730
+
4731
+ if (url) {
4732
+ posterImg.setAttribute('src', url);
4733
+ posterDiv.style.backgroundImage = 'url("' + url + '")';
4734
+ posterDiv.style.display = '';
4735
+ } else if (posterImg) {
4736
+ posterDiv.style.backgroundImage = 'none';
4737
+ posterDiv.style.display = 'none';
4738
+ posterImg.remove();
4739
+ } else {
4740
+ posterDiv.style.display = 'none';
4741
+ }
4742
+ } else if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls || _constants.IS_ANDROID && t.options.AndroidUseNativeControls) {
4743
+ t.media.originalNode.poster = url;
4744
+ }
4745
+ }
4746
+ }, {
4747
+ key: 'changeSkin',
4748
+ value: function changeSkin(className) {
4749
+ var t = this;
4750
+
4751
+ t.getElement(t.container).className = t.options.classPrefix + 'container ' + className;
4752
+ t.setPlayerSize(t.width, t.height);
4753
+ t.setControlsSize();
4754
+ }
4755
+ }, {
4756
+ key: 'globalBind',
4757
+ value: function globalBind(events, callback) {
4758
+ var t = this,
4759
+ doc = t.node ? t.node.ownerDocument : _document2.default;
4760
+
4761
+ events = (0, _general.splitEvents)(events, t.id);
4762
+ if (events.d) {
4763
+ var eventList = events.d.split(' ');
4764
+ for (var i = 0, total = eventList.length; i < total; i++) {
4765
+ eventList[i].split('.').reduce(function (part, e) {
4766
+ doc.addEventListener(e, callback, false);
4767
+ return e;
4768
+ }, '');
4769
+ }
4770
+ }
4771
+ if (events.w) {
4772
+ var _eventList = events.w.split(' ');
4773
+ for (var _i2 = 0, _total2 = _eventList.length; _i2 < _total2; _i2++) {
4774
+ _eventList[_i2].split('.').reduce(function (part, e) {
4775
+ _window2.default.addEventListener(e, callback, false);
4776
+ return e;
4777
+ }, '');
4778
+ }
4779
+ }
4780
+ }
4781
+ }, {
4782
+ key: 'globalUnbind',
4783
+ value: function globalUnbind(events, callback) {
4784
+ var t = this,
4785
+ doc = t.node ? t.node.ownerDocument : _document2.default;
4786
+
4787
+ events = (0, _general.splitEvents)(events, t.id);
4788
+ if (events.d) {
4789
+ var eventList = events.d.split(' ');
4790
+ for (var i = 0, total = eventList.length; i < total; i++) {
4791
+ eventList[i].split('.').reduce(function (part, e) {
4792
+ doc.removeEventListener(e, callback, false);
4793
+ return e;
4794
+ }, '');
4795
+ }
4796
+ }
4797
+ if (events.w) {
4798
+ var _eventList2 = events.w.split(' ');
4799
+ for (var _i3 = 0, _total3 = _eventList2.length; _i3 < _total3; _i3++) {
4800
+ _eventList2[_i3].split('.').reduce(function (part, e) {
4801
+ _window2.default.removeEventListener(e, callback, false);
4802
+ return e;
4803
+ }, '');
4804
+ }
4805
+ }
4806
+ }
4807
+ }, {
4808
+ key: 'buildfeatures',
4809
+ value: function buildfeatures(player, controls, layers, media) {
4810
+ var t = this;
4811
+
4812
+ for (var i = 0, total = t.options.features.length; i < total; i++) {
4813
+ var feature = t.options.features[i];
4814
+ if (t['build' + feature]) {
4815
+ try {
4816
+ t['build' + feature](player, controls, layers, media);
4817
+ } catch (e) {
4818
+ console.error('error building ' + feature, e);
4819
+ }
4820
+ }
4821
+ }
4822
+ }
4823
+ }, {
4824
+ key: 'buildposter',
4825
+ value: function buildposter(player, controls, layers, media) {
4826
+ var t = this,
4827
+ poster = _document2.default.createElement('div');
4828
+
4829
+ poster.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';
4830
+ layers.appendChild(poster);
4831
+
4832
+ var posterUrl = media.originalNode.getAttribute('poster');
4833
+
4834
+ if (player.options.poster !== '') {
4835
+ if (posterUrl && _constants.IS_IOS) {
4836
+ media.originalNode.removeAttribute('poster');
4837
+ }
4838
+ posterUrl = player.options.poster;
4839
+ }
4840
+
4841
+ if (posterUrl) {
4842
+ t.setPoster(posterUrl);
4843
+ } else if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {
4844
+ t.setPoster(t.media.renderer.getPosterUrl());
4845
+ } else {
4846
+ poster.style.display = 'none';
4847
+ }
4848
+
4849
+ media.addEventListener('play', function () {
4850
+ poster.style.display = 'none';
4851
+ });
4852
+
4853
+ media.addEventListener('playing', function () {
4854
+ poster.style.display = 'none';
4855
+ });
4856
+
4857
+ if (player.options.showPosterWhenEnded && player.options.autoRewind) {
4858
+ media.addEventListener('ended', function () {
4859
+ poster.style.display = '';
4860
+ });
4861
+ }
4862
+
4863
+ media.addEventListener('error', function () {
4864
+ poster.style.display = 'none';
4865
+ });
4866
+
4867
+ if (player.options.showPosterWhenPaused) {
4868
+ media.addEventListener('pause', function () {
4869
+ if (!player.ended) {
4870
+ poster.style.display = '';
4871
+ }
4872
+ });
4873
+ }
4874
+ }
4875
+ }, {
4876
+ key: 'buildoverlays',
4877
+ value: function buildoverlays(player, controls, layers, media) {
4878
+
4879
+ if (!player.isVideo) {
4880
+ return;
4881
+ }
4882
+
4883
+ var t = this,
4884
+ loading = _document2.default.createElement('div'),
4885
+ error = _document2.default.createElement('div'),
4886
+ bigPlay = _document2.default.createElement('div');
4887
+
4888
+ loading.style.display = 'none';
4889
+ loading.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';
4890
+ loading.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-loading">' + ('<span class="' + t.options.classPrefix + 'overlay-loading-bg-img"></span>') + '</div>';
4891
+ layers.appendChild(loading);
4892
+
4893
+ error.style.display = 'none';
4894
+ error.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';
4895
+ error.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-error"></div>';
4896
+ layers.appendChild(error);
4897
+
4898
+ bigPlay.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer ' + t.options.classPrefix + 'overlay-play';
4899
+ bigPlay.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-button" role="button" tabindex="0" ' + ('aria-label="' + _i18n2.default.t('mejs.play') + '" aria-pressed="false"></div>');
4900
+ bigPlay.addEventListener('click', function () {
4901
+ if (t.options.clickToPlayPause) {
4902
+
4903
+ var button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),
4904
+ pressed = button.getAttribute('aria-pressed');
4905
+
4906
+ if (t.paused) {
4907
+ t.play();
4908
+ } else {
4909
+ t.pause();
4910
+ }
4911
+
4912
+ button.setAttribute('aria-pressed', !!pressed);
4913
+ t.getElement(t.container).focus();
4914
+ }
4915
+ });
4916
+
4917
+ bigPlay.addEventListener('keydown', function (e) {
4918
+ var keyPressed = e.keyCode || e.which || 0;
4919
+
4920
+ if (keyPressed === 13 || _constants.IS_FIREFOX && keyPressed === 32) {
4921
+ var event = (0, _general.createEvent)('click', bigPlay);
4922
+ bigPlay.dispatchEvent(event);
4923
+ return false;
4924
+ }
4925
+ });
4926
+
4927
+ layers.appendChild(bigPlay);
4928
+
4929
+ if (t.media.rendererName !== null && (/(youtube|facebook)/i.test(t.media.rendererName) && !(t.media.originalNode.getAttribute('poster') || player.options.poster || typeof t.media.renderer.getPosterUrl === 'function' && t.media.renderer.getPosterUrl()) || _constants.IS_STOCK_ANDROID || t.media.originalNode.getAttribute('autoplay'))) {
4930
+ bigPlay.style.display = 'none';
4931
+ }
4932
+
4933
+ var hasError = false;
4934
+
4935
+ media.addEventListener('play', function () {
4936
+ bigPlay.style.display = 'none';
4937
+ loading.style.display = 'none';
4938
+ error.style.display = 'none';
4939
+ hasError = false;
4940
+ });
4941
+ media.addEventListener('playing', function () {
4942
+ bigPlay.style.display = 'none';
4943
+ loading.style.display = 'none';
4944
+ error.style.display = 'none';
4945
+ hasError = false;
4946
+ });
4947
+ media.addEventListener('seeking', function () {
4948
+ bigPlay.style.display = 'none';
4949
+ loading.style.display = '';
4950
+ hasError = false;
4951
+ });
4952
+ media.addEventListener('seeked', function () {
4953
+ bigPlay.style.display = t.paused && !_constants.IS_STOCK_ANDROID ? '' : 'none';
4954
+ loading.style.display = 'none';
4955
+ hasError = false;
4956
+ });
4957
+ media.addEventListener('pause', function () {
4958
+ loading.style.display = 'none';
4959
+ if (!_constants.IS_STOCK_ANDROID && !hasError) {
4960
+ bigPlay.style.display = '';
4961
+ }
4962
+ hasError = false;
4963
+ });
4964
+ media.addEventListener('waiting', function () {
4965
+ loading.style.display = '';
4966
+ hasError = false;
4967
+ });
4968
+
4969
+ media.addEventListener('loadeddata', function () {
4970
+ loading.style.display = '';
4971
+
4972
+ if (_constants.IS_ANDROID) {
4973
+ media.canplayTimeout = setTimeout(function () {
4974
+ if (_document2.default.createEvent) {
4975
+ var evt = _document2.default.createEvent('HTMLEvents');
4976
+ evt.initEvent('canplay', true, true);
4977
+ return media.dispatchEvent(evt);
4978
+ }
4979
+ }, 300);
4980
+ }
4981
+ hasError = false;
4982
+ });
4983
+ media.addEventListener('canplay', function () {
4984
+ loading.style.display = 'none';
4985
+
4986
+ clearTimeout(media.canplayTimeout);
4987
+ hasError = false;
4988
+ });
4989
+
4990
+ media.addEventListener('error', function (e) {
4991
+ t._handleError(e, t.media, t.node);
4992
+ loading.style.display = 'none';
4993
+ bigPlay.style.display = 'none';
4994
+ hasError = true;
4995
+ });
4996
+
4997
+ media.addEventListener('loadedmetadata', function () {
4998
+ if (!t.controlsEnabled) {
4999
+ t.enableControls();
5000
+ }
5001
+ });
5002
+
5003
+ media.addEventListener('keydown', function (e) {
5004
+ t.onkeydown(player, media, e);
5005
+ hasError = false;
5006
+ });
5007
+ }
5008
+ }, {
5009
+ key: 'buildkeyboard',
5010
+ value: function buildkeyboard(player, controls, layers, media) {
5011
+
5012
+ var t = this;
5013
+
5014
+ t.getElement(t.container).addEventListener('keydown', function () {
5015
+ t.keyboardAction = true;
5016
+ });
5017
+
5018
+ t.globalKeydownCallback = function (event) {
5019
+ var container = _document2.default.activeElement.closest('.' + t.options.classPrefix + 'container'),
5020
+ target = t.media.closest('.' + t.options.classPrefix + 'container');
5021
+ t.hasFocus = !!(container && target && container.id === target.id);
5022
+ return t.onkeydown(player, media, event);
5023
+ };
5024
+
5025
+ t.globalClickCallback = function (event) {
5026
+ t.hasFocus = !!event.target.closest('.' + t.options.classPrefix + 'container');
5027
+ };
5028
+
5029
+ t.globalBind('keydown', t.globalKeydownCallback);
5030
+
5031
+ t.globalBind('click', t.globalClickCallback);
5032
+ }
5033
+ }, {
5034
+ key: 'onkeydown',
5035
+ value: function onkeydown(player, media, e) {
5036
+
5037
+ if (player.hasFocus && player.options.enableKeyboard) {
5038
+ for (var i = 0, total = player.options.keyActions.length; i < total; i++) {
5039
+ var keyAction = player.options.keyActions[i];
5040
+
5041
+ for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
5042
+ if (e.keyCode === keyAction.keys[j]) {
5043
+ keyAction.action(player, media, e.keyCode, e);
5044
+ e.preventDefault();
5045
+ e.stopPropagation();
5046
+ return;
5047
+ }
5048
+ }
5049
+ }
5050
+ }
5051
+
5052
+ return true;
5053
+ }
5054
+ }, {
5055
+ key: 'play',
5056
+ value: function play() {
5057
+ this.proxy.play();
5058
+ }
5059
+ }, {
5060
+ key: 'pause',
5061
+ value: function pause() {
5062
+ this.proxy.pause();
5063
+ }
5064
+ }, {
5065
+ key: 'load',
5066
+ value: function load() {
5067
+ this.proxy.load();
5068
+ }
5069
+ }, {
5070
+ key: 'setCurrentTime',
5071
+ value: function setCurrentTime(time) {
5072
+ this.proxy.setCurrentTime(time);
5073
+ }
5074
+ }, {
5075
+ key: 'getCurrentTime',
5076
+ value: function getCurrentTime() {
5077
+ return this.proxy.currentTime;
5078
+ }
5079
+ }, {
5080
+ key: 'getDuration',
5081
+ value: function getDuration() {
5082
+ return this.proxy.duration;
5083
+ }
5084
+ }, {
5085
+ key: 'setVolume',
5086
+ value: function setVolume(volume) {
5087
+ this.proxy.volume = volume;
5088
+ }
5089
+ }, {
5090
+ key: 'getVolume',
5091
+ value: function getVolume() {
5092
+ return this.proxy.getVolume();
5093
+ }
5094
+ }, {
5095
+ key: 'setMuted',
5096
+ value: function setMuted(value) {
5097
+ this.proxy.setMuted(value);
5098
+ }
5099
+ }, {
5100
+ key: 'setSrc',
5101
+ value: function setSrc(src) {
5102
+ if (!this.controlsEnabled) {
5103
+ this.enableControls();
5104
+ }
5105
+ this.proxy.setSrc(src);
5106
+ }
5107
+ }, {
5108
+ key: 'getSrc',
5109
+ value: function getSrc() {
5110
+ return this.proxy.getSrc();
5111
+ }
5112
+ }, {
5113
+ key: 'canPlayType',
5114
+ value: function canPlayType(type) {
5115
+ return this.proxy.canPlayType(type);
5116
+ }
5117
+ }, {
5118
+ key: 'remove',
5119
+ value: function remove() {
5120
+ var t = this,
5121
+ rendererName = t.media.rendererName,
5122
+ src = t.media.originalNode.src;
5123
+
5124
+ for (var featureIndex in t.options.features) {
5125
+ var feature = t.options.features[featureIndex];
5126
+ if (t['clean' + feature]) {
5127
+ try {
5128
+ t['clean' + feature](t, t.getElement(t.layers), t.getElement(t.controls), t.media);
5129
+ } catch (e) {
5130
+ console.error('error cleaning ' + feature, e);
5131
+ }
5132
+ }
5133
+ }
5134
+
5135
+ var nativeWidth = t.node.getAttribute('width'),
5136
+ nativeHeight = t.node.getAttribute('height');
5137
+
5138
+ if (nativeWidth) {
5139
+ if (nativeWidth.indexOf('%') === -1) {
5140
+ nativeWidth = nativeWidth + 'px';
5141
+ }
5142
+ } else {
5143
+ nativeWidth = 'auto';
5144
+ }
5145
+
5146
+ if (nativeHeight) {
5147
+ if (nativeHeight.indexOf('%') === -1) {
5148
+ nativeHeight = nativeHeight + 'px';
5149
+ }
5150
+ } else {
5151
+ nativeHeight = 'auto';
5152
+ }
5153
+
5154
+ t.node.style.width = nativeWidth;
5155
+ t.node.style.height = nativeHeight;
5156
+
5157
+ t.setPlayerSize(0, 0);
5158
+
5159
+ if (!t.isDynamic) {
5160
+ (function () {
5161
+ t.node.setAttribute('controls', true);
5162
+ t.node.setAttribute('id', t.node.getAttribute('id').replace('_' + rendererName, '').replace('_from_mejs', ''));
5163
+ var poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');
5164
+ if (poster) {
5165
+ t.node.setAttribute('poster', poster.src);
5166
+ }
5167
+
5168
+ delete t.node.autoplay;
5169
+
5170
+ if (t.media.canPlayType((0, _media.getTypeFromFile)(src)) !== '') {
5171
+ t.node.setAttribute('src', src);
5172
+ }
5173
+
5174
+ if (~rendererName.indexOf('iframe')) {
5175
+ var layer = _document2.default.getElementById(t.media.id + '-iframe-overlay');
5176
+ layer.remove();
5177
+ }
5178
+
5179
+ var node = t.node.cloneNode();
5180
+ node.style.display = '';
5181
+ t.getElement(t.container).parentNode.insertBefore(node, t.getElement(t.container));
5182
+ t.node.remove();
5183
+
5184
+ if (t.mediaFiles) {
5185
+ for (var i = 0, total = t.mediaFiles.length; i < total; i++) {
5186
+ var source = _document2.default.createElement('source');
5187
+ source.setAttribute('src', t.mediaFiles[i].src);
5188
+ source.setAttribute('type', t.mediaFiles[i].type);
5189
+ node.appendChild(source);
5190
+ }
5191
+ }
5192
+ if (t.trackFiles) {
5193
+ var _loop3 = function _loop3(_i4, _total4) {
5194
+ var track = t.trackFiles[_i4];
5195
+ var newTrack = _document2.default.createElement('track');
5196
+ newTrack.kind = track.kind;
5197
+ newTrack.label = track.label;
5198
+ newTrack.srclang = track.srclang;
5199
+ newTrack.src = track.src;
5200
+
5201
+ node.appendChild(newTrack);
5202
+ newTrack.addEventListener('load', function () {
5203
+ this.mode = 'showing';
5204
+ node.textTracks[_i4].mode = 'showing';
5205
+ });
5206
+ };
5207
+
5208
+ for (var _i4 = 0, _total4 = t.trackFiles.length; _i4 < _total4; _i4++) {
5209
+ _loop3(_i4, _total4);
5210
+ }
5211
+ }
5212
+
5213
+ delete t.node;
5214
+ delete t.mediaFiles;
5215
+ delete t.trackFiles;
5216
+ })();
5217
+ } else {
5218
+ t.getElement(t.container).parentNode.insertBefore(t.node, t.getElement(t.container));
5219
+ }
5220
+
5221
+ if (typeof t.media.renderer.destroy === 'function') {
5222
+ t.media.renderer.destroy();
5223
+ }
5224
+
5225
+ delete _mejs2.default.players[t.id];
5226
+
5227
+ if (_typeof(t.getElement(t.container)) === 'object') {
5228
+ var offscreen = t.getElement(t.container).parentNode.querySelector('.' + t.options.classPrefix + 'offscreen');
5229
+ offscreen.remove();
5230
+ t.getElement(t.container).remove();
5231
+ }
5232
+ t.globalUnbind('resize', t.globalResizeCallback);
5233
+ t.globalUnbind('keydown', t.globalKeydownCallback);
5234
+ t.globalUnbind('click', t.globalClickCallback);
5235
+
5236
+ delete t.media.player;
5237
+ }
5238
+ }, {
5239
+ key: 'paused',
5240
+ get: function get() {
5241
+ return this.proxy.paused;
5242
+ }
5243
+ }, {
5244
+ key: 'muted',
5245
+ get: function get() {
5246
+ return this.proxy.muted;
5247
+ },
5248
+ set: function set(muted) {
5249
+ this.setMuted(muted);
5250
+ }
5251
+ }, {
5252
+ key: 'ended',
5253
+ get: function get() {
5254
+ return this.proxy.ended;
5255
+ }
5256
+ }, {
5257
+ key: 'readyState',
5258
+ get: function get() {
5259
+ return this.proxy.readyState;
5260
+ }
5261
+ }, {
5262
+ key: 'currentTime',
5263
+ set: function set(time) {
5264
+ this.setCurrentTime(time);
5265
+ },
5266
+ get: function get() {
5267
+ return this.getCurrentTime();
5268
+ }
5269
+ }, {
5270
+ key: 'duration',
5271
+ get: function get() {
5272
+ return this.getDuration();
5273
+ }
5274
+ }, {
5275
+ key: 'volume',
5276
+ set: function set(volume) {
5277
+ this.setVolume(volume);
5278
+ },
5279
+ get: function get() {
5280
+ return this.getVolume();
5281
+ }
5282
+ }, {
5283
+ key: 'src',
5284
+ set: function set(src) {
5285
+ this.setSrc(src);
5286
+ },
5287
+ get: function get() {
5288
+ return this.getSrc();
5289
+ }
5290
+ }]);
5291
+
5292
+ return MediaElementPlayer;
5293
+ }();
5294
+
5295
+ _window2.default.MediaElementPlayer = MediaElementPlayer;
5296
+ _mejs2.default.MediaElementPlayer = MediaElementPlayer;
5297
+
5298
+ exports.default = MediaElementPlayer;
5299
+
5300
+ },{"17":17,"2":2,"25":25,"26":26,"27":27,"28":28,"3":3,"30":30,"5":5,"6":6,"7":7}],17:[function(_dereq_,module,exports){
5301
+ 'use strict';
5302
+
5303
+ Object.defineProperty(exports, "__esModule", {
5304
+ value: true
5305
+ });
5306
+
5307
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
5308
+
5309
+ var _window = _dereq_(3);
5310
+
5311
+ var _window2 = _interopRequireDefault(_window);
5312
+
5313
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5314
+
5315
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5316
+
5317
+ var DefaultPlayer = function () {
5318
+ function DefaultPlayer(player) {
5319
+ _classCallCheck(this, DefaultPlayer);
5320
+
5321
+ this.media = player.media;
5322
+ this.isVideo = player.isVideo;
5323
+ this.classPrefix = player.options.classPrefix;
5324
+ this.createIframeLayer = function () {
5325
+ return player.createIframeLayer();
5326
+ };
5327
+ this.setPoster = function (url) {
5328
+ return player.setPoster(url);
5329
+ };
5330
+ return this;
5331
+ }
5332
+
5333
+ _createClass(DefaultPlayer, [{
5334
+ key: 'play',
5335
+ value: function play() {
5336
+ this.media.play();
5337
+ }
5338
+ }, {
5339
+ key: 'pause',
5340
+ value: function pause() {
5341
+ this.media.pause();
5342
+ }
5343
+ }, {
5344
+ key: 'load',
5345
+ value: function load() {
5346
+ var t = this;
5347
+
5348
+ if (!t.isLoaded) {
5349
+ t.media.load();
5350
+ }
5351
+
5352
+ t.isLoaded = true;
5353
+ }
5354
+ }, {
5355
+ key: 'setCurrentTime',
5356
+ value: function setCurrentTime(time) {
5357
+ this.media.setCurrentTime(time);
5358
+ }
5359
+ }, {
5360
+ key: 'getCurrentTime',
5361
+ value: function getCurrentTime() {
5362
+ return this.media.currentTime;
5363
+ }
5364
+ }, {
5365
+ key: 'getDuration',
5366
+ value: function getDuration() {
5367
+ return this.media.getDuration();
5368
+ }
5369
+ }, {
5370
+ key: 'setVolume',
5371
+ value: function setVolume(volume) {
5372
+ this.media.setVolume(volume);
5373
+ }
5374
+ }, {
5375
+ key: 'getVolume',
5376
+ value: function getVolume() {
5377
+ return this.media.getVolume();
5378
+ }
5379
+ }, {
5380
+ key: 'setMuted',
5381
+ value: function setMuted(value) {
5382
+ this.media.setMuted(value);
5383
+ }
5384
+ }, {
5385
+ key: 'setSrc',
5386
+ value: function setSrc(src) {
5387
+ var t = this,
5388
+ layer = document.getElementById(t.media.id + '-iframe-overlay');
5389
+
5390
+ if (layer) {
5391
+ layer.remove();
5392
+ }
5393
+
5394
+ t.media.setSrc(src);
5395
+ t.createIframeLayer();
5396
+ if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {
5397
+ t.setPoster(t.media.renderer.getPosterUrl());
5398
+ }
5399
+ }
5400
+ }, {
5401
+ key: 'getSrc',
5402
+ value: function getSrc() {
5403
+ return this.media.getSrc();
5404
+ }
5405
+ }, {
5406
+ key: 'canPlayType',
5407
+ value: function canPlayType(type) {
5408
+ return this.media.canPlayType(type);
5409
+ }
5410
+ }, {
5411
+ key: 'paused',
5412
+ get: function get() {
5413
+ return this.media.paused;
5414
+ }
5415
+ }, {
5416
+ key: 'muted',
5417
+ set: function set(muted) {
5418
+ this.setMuted(muted);
5419
+ },
5420
+ get: function get() {
5421
+ return this.media.muted;
5422
+ }
5423
+ }, {
5424
+ key: 'ended',
5425
+ get: function get() {
5426
+ return this.media.ended;
5427
+ }
5428
+ }, {
5429
+ key: 'readyState',
5430
+ get: function get() {
5431
+ return this.media.readyState;
5432
+ }
5433
+ }, {
5434
+ key: 'currentTime',
5435
+ set: function set(time) {
5436
+ this.setCurrentTime(time);
5437
+ },
5438
+ get: function get() {
5439
+ return this.getCurrentTime();
5440
+ }
5441
+ }, {
5442
+ key: 'duration',
5443
+ get: function get() {
5444
+ return this.getDuration();
5445
+ }
5446
+ }, {
5447
+ key: 'volume',
5448
+ set: function set(volume) {
5449
+ this.setVolume(volume);
5450
+ },
5451
+ get: function get() {
5452
+ return this.getVolume();
5453
+ }
5454
+ }, {
5455
+ key: 'src',
5456
+ set: function set(src) {
5457
+ this.setSrc(src);
5458
+ },
5459
+ get: function get() {
5460
+ return this.getSrc();
5461
+ }
5462
+ }]);
5463
+
5464
+ return DefaultPlayer;
5465
+ }();
5466
+
5467
+ exports.default = DefaultPlayer;
5468
+
5469
+
5470
+ _window2.default.DefaultPlayer = DefaultPlayer;
5471
+
5472
+ },{"3":3}],18:[function(_dereq_,module,exports){
5473
+ 'use strict';
5474
+
5475
+ var _window = _dereq_(3);
5476
+
5477
+ var _window2 = _interopRequireDefault(_window);
5478
+
5479
+ var _mejs = _dereq_(7);
5480
+
5481
+ var _mejs2 = _interopRequireDefault(_mejs);
5482
+
5483
+ var _player = _dereq_(16);
5484
+
5485
+ var _player2 = _interopRequireDefault(_player);
5486
+
5487
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5488
+
5489
+ if (typeof jQuery !== 'undefined') {
5490
+ _mejs2.default.$ = _window2.default.jQuery = _window2.default.$ = jQuery;
5491
+ } else if (typeof Zepto !== 'undefined') {
5492
+ _mejs2.default.$ = _window2.default.Zepto = _window2.default.$ = Zepto;
5493
+ } else if (typeof ender !== 'undefined') {
5494
+ _mejs2.default.$ = _window2.default.ender = _window2.default.$ = ender;
5495
+ }
5496
+
5497
+ (function ($) {
5498
+ if (typeof $ !== 'undefined') {
5499
+ $.fn.mediaelementplayer = function (options) {
5500
+ if (options === false) {
5501
+ this.each(function () {
5502
+ var player = $(this).data('mediaelementplayer');
5503
+ if (player) {
5504
+ player.remove();
5505
+ }
5506
+ $(this).removeData('mediaelementplayer');
5507
+ });
5508
+ } else {
5509
+ this.each(function () {
5510
+ $(this).data('mediaelementplayer', new _player2.default(this, options));
5511
+ });
5512
+ }
5513
+ return this;
5514
+ };
5515
+
5516
+ $(document).ready(function () {
5517
+ $('.' + _mejs2.default.MepDefaults.classPrefix + 'player').mediaelementplayer();
5518
+ });
5519
+ }
5520
+ })(_mejs2.default.$);
5521
+
5522
+ },{"16":16,"3":3,"7":7}],19:[function(_dereq_,module,exports){
5523
+ 'use strict';
5524
+
5525
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5526
+
5527
+ var _window = _dereq_(3);
5528
+
5529
+ var _window2 = _interopRequireDefault(_window);
5530
+
5531
+ var _mejs = _dereq_(7);
5532
+
5533
+ var _mejs2 = _interopRequireDefault(_mejs);
5534
+
5535
+ var _renderer = _dereq_(8);
5536
+
5537
+ var _general = _dereq_(27);
5538
+
5539
+ var _media = _dereq_(28);
5540
+
5541
+ var _constants = _dereq_(25);
5542
+
5543
+ var _dom = _dereq_(26);
5544
+
5545
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5546
+
5547
+ var NativeDash = {
5548
+
5549
+ promise: null,
5550
+
5551
+ load: function load(settings) {
5552
+ if (typeof dashjs !== 'undefined') {
5553
+ NativeDash.promise = new Promise(function (resolve) {
5554
+ resolve();
5555
+ }).then(function () {
5556
+ NativeDash._createPlayer(settings);
5557
+ });
5558
+ } else {
5559
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';
5560
+
5561
+ NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);
5562
+ NativeDash.promise.then(function () {
5563
+ NativeDash._createPlayer(settings);
5564
+ });
5565
+ }
5566
+
5567
+ return NativeDash.promise;
5568
+ },
5569
+
5570
+ _createPlayer: function _createPlayer(settings) {
5571
+ var player = dashjs.MediaPlayer().create();
5572
+ _window2.default['__ready__' + settings.id](player);
5573
+ return player;
5574
+ }
5575
+ };
5576
+
5577
+ var DashNativeRenderer = {
5578
+ name: 'native_dash',
5579
+ options: {
5580
+ prefix: 'native_dash',
5581
+ dash: {
5582
+ path: 'https://cdn.dashjs.org/latest/dash.all.min.js',
5583
+ debug: false,
5584
+ drm: {},
5585
+
5586
+ robustnessLevel: ''
5587
+ }
5588
+ },
5589
+
5590
+ canPlayType: function canPlayType(type) {
5591
+ return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;
5592
+ },
5593
+
5594
+ create: function create(mediaElement, options, mediaFiles) {
5595
+
5596
+ var originalNode = mediaElement.originalNode,
5597
+ id = mediaElement.id + '_' + options.prefix,
5598
+ autoplay = originalNode.autoplay,
5599
+ children = originalNode.children;
5600
+
5601
+ var node = null,
5602
+ dashPlayer = null;
5603
+
5604
+ originalNode.removeAttribute('type');
5605
+ for (var i = 0, total = children.length; i < total; i++) {
5606
+ children[i].removeAttribute('type');
5607
+ }
5608
+
5609
+ node = originalNode.cloneNode(true);
5610
+ options = Object.assign(options, mediaElement.options);
5611
+
5612
+ var props = _mejs2.default.html5media.properties,
5613
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
5614
+ return e !== 'error';
5615
+ }),
5616
+ attachNativeEvents = function attachNativeEvents(e) {
5617
+ var event = (0, _general.createEvent)(e.type, mediaElement);
5618
+ mediaElement.dispatchEvent(event);
5619
+ },
5620
+ assignGettersSetters = function assignGettersSetters(propName) {
5621
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
5622
+
5623
+ node['get' + capName] = function () {
5624
+ return dashPlayer !== null ? node[propName] : null;
5625
+ };
5626
+
5627
+ node['set' + capName] = function (value) {
5628
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
5629
+ if (propName === 'src') {
5630
+ var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
5631
+ node[propName] = source;
5632
+ if (dashPlayer !== null) {
5633
+ dashPlayer.reset();
5634
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
5635
+ node.removeEventListener(events[_i], attachNativeEvents);
5636
+ }
5637
+ dashPlayer = NativeDash._createPlayer({
5638
+ options: options.dash,
5639
+ id: id
5640
+ });
5641
+
5642
+ if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {
5643
+ dashPlayer.setProtectionData(value.drm);
5644
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
5645
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
5646
+ }
5647
+ }
5648
+ dashPlayer.attachSource(source);
5649
+ if (autoplay) {
5650
+ dashPlayer.play();
5651
+ }
5652
+ }
5653
+ } else {
5654
+ node[propName] = value;
5655
+ }
5656
+ }
5657
+ };
5658
+ };
5659
+
5660
+ for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {
5661
+ assignGettersSetters(props[_i2]);
5662
+ }
5663
+
5664
+ _window2.default['__ready__' + id] = function (_dashPlayer) {
5665
+ mediaElement.dashPlayer = dashPlayer = _dashPlayer;
5666
+
5667
+ var dashEvents = dashjs.MediaPlayer.events,
5668
+ assignEvents = function assignEvents(eventName) {
5669
+ if (eventName === 'loadedmetadata') {
5670
+ dashPlayer.getDebug().setLogToBrowserConsole(options.dash.debug);
5671
+ dashPlayer.initialize();
5672
+ dashPlayer.setScheduleWhilePaused(false);
5673
+ dashPlayer.setFastSwitchEnabled(true);
5674
+ dashPlayer.attachView(node);
5675
+ dashPlayer.setAutoPlay(false);
5676
+
5677
+ if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {
5678
+ dashPlayer.setProtectionData(options.dash.drm);
5679
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
5680
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
5681
+ }
5682
+ }
5683
+ dashPlayer.attachSource(node.getSrc());
5684
+ }
5685
+
5686
+ node.addEventListener(eventName, attachNativeEvents);
5687
+ };
5688
+
5689
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
5690
+ assignEvents(events[_i3]);
5691
+ }
5692
+
5693
+ var assignMdashEvents = function assignMdashEvents(e) {
5694
+ if (e.type.toLowerCase() === 'error') {
5695
+ mediaElement.generateError(e.message, node.src);
5696
+ console.error(e);
5697
+ } else {
5698
+ var _event = (0, _general.createEvent)(e.type, mediaElement);
5699
+ _event.data = e;
5700
+ mediaElement.dispatchEvent(_event);
5701
+ }
5702
+ };
5703
+
5704
+ for (var eventType in dashEvents) {
5705
+ if (dashEvents.hasOwnProperty(eventType)) {
5706
+ dashPlayer.on(dashEvents[eventType], function (e) {
5707
+ return assignMdashEvents(e);
5708
+ });
5709
+ }
5710
+ }
5711
+ };
5712
+
5713
+ if (mediaFiles && mediaFiles.length > 0) {
5714
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
5715
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
5716
+ node.setAttribute('src', mediaFiles[_i4].src);
5717
+ if (typeof mediaFiles[_i4].drm !== 'undefined') {
5718
+ options.dash.drm = mediaFiles[_i4].drm;
5719
+ }
5720
+ break;
5721
+ }
5722
+ }
5723
+ }
5724
+
5725
+ node.setAttribute('id', id);
5726
+
5727
+ originalNode.parentNode.insertBefore(node, originalNode);
5728
+ originalNode.autoplay = false;
5729
+ originalNode.style.display = 'none';
5730
+
5731
+ node.setSize = function (width, height) {
5732
+ node.style.width = width + 'px';
5733
+ node.style.height = height + 'px';
5734
+ return node;
5735
+ };
5736
+
5737
+ node.hide = function () {
5738
+ node.pause();
5739
+ node.style.display = 'none';
5740
+ return node;
5741
+ };
5742
+
5743
+ node.show = function () {
5744
+ node.style.display = '';
5745
+ return node;
5746
+ };
5747
+
5748
+ node.destroy = function () {
5749
+ if (dashPlayer !== null) {
5750
+ dashPlayer.reset();
5751
+ }
5752
+ };
5753
+
5754
+ var event = (0, _general.createEvent)('rendererready', node);
5755
+ mediaElement.dispatchEvent(event);
5756
+
5757
+ mediaElement.promises.push(NativeDash.load({
5758
+ options: options.dash,
5759
+ id: id
5760
+ }));
5761
+
5762
+ return node;
5763
+ }
5764
+ };
5765
+
5766
+ _media.typeChecks.push(function (url) {
5767
+ return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;
5768
+ });
5769
+
5770
+ _renderer.renderer.add(DashNativeRenderer);
5771
+
5772
+ },{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],20:[function(_dereq_,module,exports){
5773
+ 'use strict';
5774
+
5775
+ Object.defineProperty(exports, "__esModule", {
5776
+ value: true
5777
+ });
5778
+ exports.PluginDetector = undefined;
5779
+
5780
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5781
+
5782
+ var _window = _dereq_(3);
5783
+
5784
+ var _window2 = _interopRequireDefault(_window);
5785
+
5786
+ var _document = _dereq_(2);
5787
+
5788
+ var _document2 = _interopRequireDefault(_document);
5789
+
5790
+ var _mejs = _dereq_(7);
5791
+
5792
+ var _mejs2 = _interopRequireDefault(_mejs);
5793
+
5794
+ var _i18n = _dereq_(5);
5795
+
5796
+ var _i18n2 = _interopRequireDefault(_i18n);
5797
+
5798
+ var _renderer = _dereq_(8);
5799
+
5800
+ var _general = _dereq_(27);
5801
+
5802
+ var _constants = _dereq_(25);
5803
+
5804
+ var _media = _dereq_(28);
5805
+
5806
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5807
+
5808
+ var PluginDetector = exports.PluginDetector = {
5809
+ plugins: [],
5810
+
5811
+ hasPluginVersion: function hasPluginVersion(plugin, v) {
5812
+ var pv = PluginDetector.plugins[plugin];
5813
+ v[1] = v[1] || 0;
5814
+ v[2] = v[2] || 0;
5815
+ return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];
5816
+ },
5817
+
5818
+ addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
5819
+ PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);
5820
+ },
5821
+
5822
+ detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {
5823
+
5824
+ var version = [0, 0, 0],
5825
+ description = void 0,
5826
+ ax = void 0;
5827
+
5828
+ if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {
5829
+ description = _constants.NAV.plugins[pluginName].description;
5830
+ if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {
5831
+ version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.');
5832
+ for (var i = 0, total = version.length; i < total; i++) {
5833
+ version[i] = parseInt(version[i].match(/\d+/), 10);
5834
+ }
5835
+ }
5836
+ } else if (_window2.default.ActiveXObject !== undefined) {
5837
+ try {
5838
+ ax = new ActiveXObject(activeX);
5839
+ if (ax) {
5840
+ version = axDetect(ax);
5841
+ }
5842
+ } catch (e) {
5843
+
5844
+ }
5845
+ }
5846
+ return version;
5847
+ }
5848
+ };
5849
+
5850
+ PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {
5851
+ var version = [],
5852
+ d = ax.GetVariable("$version");
5853
+
5854
+ if (d) {
5855
+ d = d.split(" ")[1].split(",");
5856
+ version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
5857
+ }
5858
+ return version;
5859
+ });
5860
+
5861
+ var FlashMediaElementRenderer = {
5862
+ create: function create(mediaElement, options, mediaFiles) {
5863
+
5864
+ var flash = {};
5865
+ var isActive = false;
5866
+
5867
+ flash.options = options;
5868
+ flash.id = mediaElement.id + '_' + flash.options.prefix;
5869
+ flash.mediaElement = mediaElement;
5870
+ flash.flashState = {};
5871
+ flash.flashApi = null;
5872
+ flash.flashApiStack = [];
5873
+
5874
+ var props = _mejs2.default.html5media.properties,
5875
+ assignGettersSetters = function assignGettersSetters(propName) {
5876
+ flash.flashState[propName] = null;
5877
+
5878
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
5879
+
5880
+ flash['get' + capName] = function () {
5881
+ if (flash.flashApi !== null) {
5882
+ if (typeof flash.flashApi['get_' + propName] === 'function') {
5883
+ var value = flash.flashApi['get_' + propName]();
5884
+
5885
+ if (propName === 'buffered') {
5886
+ return {
5887
+ start: function start() {
5888
+ return 0;
5889
+ },
5890
+ end: function end() {
5891
+ return value;
5892
+ },
5893
+ length: 1
5894
+ };
5895
+ }
5896
+ return value;
5897
+ } else {
5898
+ return null;
5899
+ }
5900
+ } else {
5901
+ return null;
5902
+ }
5903
+ };
5904
+
5905
+ flash['set' + capName] = function (value) {
5906
+ if (propName === 'src') {
5907
+ value = (0, _media.absolutizeUrl)(value);
5908
+ }
5909
+
5910
+ if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {
5911
+ try {
5912
+ flash.flashApi['set_' + propName](value);
5913
+ } catch (e) {
5914
+
5915
+ }
5916
+ } else {
5917
+ flash.flashApiStack.push({
5918
+ type: 'set',
5919
+ propName: propName,
5920
+ value: value
5921
+ });
5922
+ }
5923
+ };
5924
+ };
5925
+
5926
+ for (var i = 0, total = props.length; i < total; i++) {
5927
+ assignGettersSetters(props[i]);
5928
+ }
5929
+
5930
+ var methods = _mejs2.default.html5media.methods,
5931
+ assignMethods = function assignMethods(methodName) {
5932
+ flash[methodName] = function () {
5933
+ if (isActive) {
5934
+ if (flash.flashApi !== null) {
5935
+ if (flash.flashApi['fire_' + methodName]) {
5936
+ try {
5937
+ flash.flashApi['fire_' + methodName]();
5938
+ } catch (e) {
5939
+
5940
+ }
5941
+ } else {
5942
+
5943
+ }
5944
+ } else {
5945
+ flash.flashApiStack.push({
5946
+ type: 'call',
5947
+ methodName: methodName
5948
+ });
5949
+ }
5950
+ }
5951
+ };
5952
+ };
5953
+ methods.push('stop');
5954
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
5955
+ assignMethods(methods[_i]);
5956
+ }
5957
+
5958
+ var initEvents = ['rendererready'];
5959
+
5960
+ for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {
5961
+ var event = (0, _general.createEvent)(initEvents[_i2], flash);
5962
+ mediaElement.dispatchEvent(event);
5963
+ }
5964
+
5965
+ _window2.default['__ready__' + flash.id] = function () {
5966
+
5967
+ flash.flashReady = true;
5968
+ flash.flashApi = _document2.default.getElementById('__' + flash.id);
5969
+
5970
+ if (flash.flashApiStack.length) {
5971
+ for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {
5972
+ var stackItem = flash.flashApiStack[_i3];
5973
+
5974
+ if (stackItem.type === 'set') {
5975
+ var propName = stackItem.propName,
5976
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
5977
+
5978
+ flash['set' + capName](stackItem.value);
5979
+ } else if (stackItem.type === 'call') {
5980
+ flash[stackItem.methodName]();
5981
+ }
5982
+ }
5983
+ }
5984
+ };
5985
+
5986
+ _window2.default['__event__' + flash.id] = function (eventName, message) {
5987
+ var event = (0, _general.createEvent)(eventName, flash);
5988
+ if (message) {
5989
+ try {
5990
+ event.data = JSON.parse(message);
5991
+ event.details.data = JSON.parse(message);
5992
+ } catch (e) {
5993
+ event.message = message;
5994
+ }
5995
+ }
5996
+
5997
+ flash.mediaElement.dispatchEvent(event);
5998
+ };
5999
+
6000
+ flash.flashWrapper = _document2.default.createElement('div');
6001
+
6002
+ if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {
6003
+ flash.options.shimScriptAccess = 'sameDomain';
6004
+ }
6005
+
6006
+ var autoplay = mediaElement.originalNode.autoplay,
6007
+ flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],
6008
+ isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',
6009
+ flashHeight = isVideo ? mediaElement.originalNode.height : 1,
6010
+ flashWidth = isVideo ? mediaElement.originalNode.width : 1;
6011
+
6012
+ if (mediaElement.originalNode.getAttribute('src')) {
6013
+ flashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));
6014
+ }
6015
+
6016
+ if (flash.options.enablePseudoStreaming === true) {
6017
+ flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);
6018
+ flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);
6019
+ }
6020
+
6021
+ if (flash.options.streamDelimiter) {
6022
+ flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));
6023
+ }
6024
+
6025
+ if (flash.options.proxyType) {
6026
+ flashVars.push('proxytype=' + flash.options.proxyType);
6027
+ }
6028
+
6029
+ mediaElement.appendChild(flash.flashWrapper);
6030
+ mediaElement.originalNode.style.display = 'none';
6031
+
6032
+ var settings = [];
6033
+
6034
+ if (_constants.IS_IE || _constants.IS_EDGE) {
6035
+ var specialIEContainer = _document2.default.createElement('div');
6036
+ flash.flashWrapper.appendChild(specialIEContainer);
6037
+
6038
+ if (_constants.IS_EDGE) {
6039
+ settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"'];
6040
+ } else {
6041
+ settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"'];
6042
+ }
6043
+
6044
+ if (!isVideo) {
6045
+ settings.push('style="clip: rect(0 0 0 0); position: absolute;"');
6046
+ }
6047
+
6048
+ specialIEContainer.outerHTML = '<object ' + settings.join(' ') + '>' + ('<param name="movie" value="' + flash.options.pluginPath + flash.options.filename + '?x=' + new Date() + '" />') + ('<param name="flashvars" value="' + flashVars.join('&amp;') + '" />') + '<param name="quality" value="high" />' + '<param name="bgcolor" value="#000000" />' + '<param name="wmode" value="transparent" />' + ('<param name="allowScriptAccess" value="' + flash.options.shimScriptAccess + '" />') + '<param name="allowFullScreen" value="true" />' + ('<div>' + _i18n2.default.t('mejs.install-flash') + '</div>') + '</object>';
6049
+ } else {
6050
+
6051
+ settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"'];
6052
+
6053
+ if (isVideo) {
6054
+ settings.push('width="' + flashWidth + '"');
6055
+ settings.push('height="' + flashHeight + '"');
6056
+ } else {
6057
+ settings.push('style="position: fixed; left: -9999em; top: -9999em;"');
6058
+ }
6059
+
6060
+ flash.flashWrapper.innerHTML = '<embed ' + settings.join(' ') + '>';
6061
+ }
6062
+
6063
+ flash.flashNode = flash.flashWrapper.lastChild;
6064
+
6065
+ flash.hide = function () {
6066
+ isActive = false;
6067
+ if (isVideo) {
6068
+ flash.flashNode.style.display = 'none';
6069
+ }
6070
+ };
6071
+ flash.show = function () {
6072
+ isActive = true;
6073
+ if (isVideo) {
6074
+ flash.flashNode.style.display = '';
6075
+ }
6076
+ };
6077
+ flash.setSize = function (width, height) {
6078
+ flash.flashNode.style.width = width + 'px';
6079
+ flash.flashNode.style.height = height + 'px';
6080
+
6081
+ if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {
6082
+ flash.flashApi.fire_setSize(width, height);
6083
+ }
6084
+ };
6085
+
6086
+ flash.destroy = function () {
6087
+ flash.flashNode.remove();
6088
+ };
6089
+
6090
+ if (mediaFiles && mediaFiles.length > 0) {
6091
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
6092
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
6093
+ flash.setSrc(mediaFiles[_i4].src);
6094
+ break;
6095
+ }
6096
+ }
6097
+ }
6098
+
6099
+ return flash;
6100
+ }
6101
+ };
6102
+
6103
+ var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);
6104
+
6105
+ if (hasFlash) {
6106
+ _media.typeChecks.push(function (url) {
6107
+ url = url.toLowerCase();
6108
+
6109
+ if (url.startsWith('rtmp')) {
6110
+ if (~url.indexOf('.mp3')) {
6111
+ return 'audio/rtmp';
6112
+ } else {
6113
+ return 'video/rtmp';
6114
+ }
6115
+ } else if (/\.og(a|g)/i.test(url)) {
6116
+ return 'audio/ogg';
6117
+ } else if (~url.indexOf('.m3u8')) {
6118
+ return 'application/x-mpegURL';
6119
+ } else if (~url.indexOf('.mpd')) {
6120
+ return 'application/dash+xml';
6121
+ } else if (~url.indexOf('.flv')) {
6122
+ return 'video/flv';
6123
+ } else {
6124
+ return null;
6125
+ }
6126
+ });
6127
+
6128
+ var FlashMediaElementVideoRenderer = {
6129
+ name: 'flash_video',
6130
+ options: {
6131
+ prefix: 'flash_video',
6132
+ filename: 'mediaelement-flash-video.swf',
6133
+ enablePseudoStreaming: false,
6134
+
6135
+ pseudoStreamingStartQueryParam: 'start',
6136
+
6137
+ pseudoStreamingType: 'byte',
6138
+
6139
+ proxyType: '',
6140
+
6141
+ streamDelimiter: ''
6142
+ },
6143
+
6144
+ canPlayType: function canPlayType(type) {
6145
+ return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());
6146
+ },
6147
+
6148
+ create: FlashMediaElementRenderer.create
6149
+
6150
+ };
6151
+ _renderer.renderer.add(FlashMediaElementVideoRenderer);
6152
+
6153
+ var FlashMediaElementHlsVideoRenderer = {
6154
+ name: 'flash_hls',
6155
+ options: {
6156
+ prefix: 'flash_hls',
6157
+ filename: 'mediaelement-flash-video-hls.swf'
6158
+ },
6159
+
6160
+ canPlayType: function canPlayType(type) {
6161
+ return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());
6162
+ },
6163
+
6164
+ create: FlashMediaElementRenderer.create
6165
+ };
6166
+ _renderer.renderer.add(FlashMediaElementHlsVideoRenderer);
6167
+
6168
+ var FlashMediaElementMdashVideoRenderer = {
6169
+ name: 'flash_dash',
6170
+ options: {
6171
+ prefix: 'flash_dash',
6172
+ filename: 'mediaelement-flash-video-mdash.swf'
6173
+ },
6174
+
6175
+ canPlayType: function canPlayType(type) {
6176
+ return ~['application/dash+xml'].indexOf(type.toLowerCase());
6177
+ },
6178
+
6179
+ create: FlashMediaElementRenderer.create
6180
+ };
6181
+ _renderer.renderer.add(FlashMediaElementMdashVideoRenderer);
6182
+
6183
+ var FlashMediaElementAudioRenderer = {
6184
+ name: 'flash_audio',
6185
+ options: {
6186
+ prefix: 'flash_audio',
6187
+ filename: 'mediaelement-flash-audio.swf'
6188
+ },
6189
+
6190
+ canPlayType: function canPlayType(type) {
6191
+ return ~['audio/mp3'].indexOf(type.toLowerCase());
6192
+ },
6193
+
6194
+ create: FlashMediaElementRenderer.create
6195
+ };
6196
+ _renderer.renderer.add(FlashMediaElementAudioRenderer);
6197
+
6198
+ var FlashMediaElementAudioOggRenderer = {
6199
+ name: 'flash_audio_ogg',
6200
+ options: {
6201
+ prefix: 'flash_audio_ogg',
6202
+ filename: 'mediaelement-flash-audio-ogg.swf'
6203
+ },
6204
+
6205
+ canPlayType: function canPlayType(type) {
6206
+ return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());
6207
+ },
6208
+
6209
+ create: FlashMediaElementRenderer.create
6210
+ };
6211
+ _renderer.renderer.add(FlashMediaElementAudioOggRenderer);
6212
+ }
6213
+
6214
+ },{"2":2,"25":25,"27":27,"28":28,"3":3,"5":5,"7":7,"8":8}],21:[function(_dereq_,module,exports){
6215
+ 'use strict';
6216
+
6217
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
6218
+
6219
+ var _window = _dereq_(3);
6220
+
6221
+ var _window2 = _interopRequireDefault(_window);
6222
+
6223
+ var _mejs = _dereq_(7);
6224
+
6225
+ var _mejs2 = _interopRequireDefault(_mejs);
6226
+
6227
+ var _renderer = _dereq_(8);
6228
+
6229
+ var _general = _dereq_(27);
6230
+
6231
+ var _constants = _dereq_(25);
6232
+
6233
+ var _media = _dereq_(28);
6234
+
6235
+ var _dom = _dereq_(26);
6236
+
6237
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6238
+
6239
+ var NativeFlv = {
6240
+
6241
+ promise: null,
6242
+
6243
+ load: function load(settings) {
6244
+ if (typeof flvjs !== 'undefined') {
6245
+ NativeFlv.promise = new Promise(function (resolve) {
6246
+ resolve();
6247
+ }).then(function () {
6248
+ NativeFlv._createPlayer(settings);
6249
+ });
6250
+ } else {
6251
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';
6252
+
6253
+ NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);
6254
+ NativeFlv.promise.then(function () {
6255
+ NativeFlv._createPlayer(settings);
6256
+ });
6257
+ }
6258
+
6259
+ return NativeFlv.promise;
6260
+ },
6261
+
6262
+ _createPlayer: function _createPlayer(settings) {
6263
+ flvjs.LoggingControl.enableDebug = settings.options.debug;
6264
+ flvjs.LoggingControl.enableVerbose = settings.options.debug;
6265
+ var player = flvjs.createPlayer(settings.options, settings.configs);
6266
+ _window2.default['__ready__' + settings.id](player);
6267
+ return player;
6268
+ }
6269
+ };
6270
+
6271
+ var FlvNativeRenderer = {
6272
+ name: 'native_flv',
6273
+ options: {
6274
+ prefix: 'native_flv',
6275
+ flv: {
6276
+ path: 'https://cdn.jsdelivr.net/npm/flv.js@latest',
6277
+
6278
+ cors: true,
6279
+ debug: false
6280
+ }
6281
+ },
6282
+
6283
+ canPlayType: function canPlayType(type) {
6284
+ return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;
6285
+ },
6286
+
6287
+ create: function create(mediaElement, options, mediaFiles) {
6288
+
6289
+ var originalNode = mediaElement.originalNode,
6290
+ id = mediaElement.id + '_' + options.prefix;
6291
+
6292
+ var node = null,
6293
+ flvPlayer = null;
6294
+
6295
+ node = originalNode.cloneNode(true);
6296
+ options = Object.assign(options, mediaElement.options);
6297
+
6298
+ var props = _mejs2.default.html5media.properties,
6299
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
6300
+ return e !== 'error';
6301
+ }),
6302
+ attachNativeEvents = function attachNativeEvents(e) {
6303
+ var event = (0, _general.createEvent)(e.type, mediaElement);
6304
+ mediaElement.dispatchEvent(event);
6305
+ },
6306
+ assignGettersSetters = function assignGettersSetters(propName) {
6307
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
6308
+
6309
+ node['get' + capName] = function () {
6310
+ return flvPlayer !== null ? node[propName] : null;
6311
+ };
6312
+
6313
+ node['set' + capName] = function (value) {
6314
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
6315
+ if (propName === 'src') {
6316
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
6317
+ if (flvPlayer !== null) {
6318
+ var _flvOptions = {};
6319
+ _flvOptions.type = 'flv';
6320
+ _flvOptions.url = value;
6321
+ _flvOptions.cors = options.flv.cors;
6322
+ _flvOptions.debug = options.flv.debug;
6323
+ _flvOptions.path = options.flv.path;
6324
+ var _flvConfigs = options.flv.configs;
6325
+
6326
+ flvPlayer.destroy();
6327
+ for (var i = 0, total = events.length; i < total; i++) {
6328
+ node.removeEventListener(events[i], attachNativeEvents);
6329
+ }
6330
+ flvPlayer = NativeFlv._createPlayer({
6331
+ options: _flvOptions,
6332
+ configs: _flvConfigs,
6333
+ id: id
6334
+ });
6335
+ flvPlayer.attachMediaElement(node);
6336
+ flvPlayer.load();
6337
+ }
6338
+ } else {
6339
+ node[propName] = value;
6340
+ }
6341
+ }
6342
+ };
6343
+ };
6344
+
6345
+ for (var i = 0, total = props.length; i < total; i++) {
6346
+ assignGettersSetters(props[i]);
6347
+ }
6348
+
6349
+ _window2.default['__ready__' + id] = function (_flvPlayer) {
6350
+ mediaElement.flvPlayer = flvPlayer = _flvPlayer;
6351
+
6352
+ var flvEvents = flvjs.Events,
6353
+ assignEvents = function assignEvents(eventName) {
6354
+ if (eventName === 'loadedmetadata') {
6355
+ flvPlayer.unload();
6356
+ flvPlayer.detachMediaElement();
6357
+ flvPlayer.attachMediaElement(node);
6358
+ flvPlayer.load();
6359
+ }
6360
+
6361
+ node.addEventListener(eventName, attachNativeEvents);
6362
+ };
6363
+
6364
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
6365
+ assignEvents(events[_i]);
6366
+ }
6367
+
6368
+ var assignFlvEvents = function assignFlvEvents(name, data) {
6369
+ if (name === 'error') {
6370
+ var message = data[0] + ': ' + data[1] + ' ' + data[2].msg;
6371
+ mediaElement.generateError(message, node.src);
6372
+ } else {
6373
+ var _event = (0, _general.createEvent)(name, mediaElement);
6374
+ _event.data = data;
6375
+ mediaElement.dispatchEvent(_event);
6376
+ }
6377
+ };
6378
+
6379
+ var _loop = function _loop(eventType) {
6380
+ if (flvEvents.hasOwnProperty(eventType)) {
6381
+ flvPlayer.on(flvEvents[eventType], function () {
6382
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
6383
+ args[_key] = arguments[_key];
6384
+ }
6385
+
6386
+ return assignFlvEvents(flvEvents[eventType], args);
6387
+ });
6388
+ }
6389
+ };
6390
+
6391
+ for (var eventType in flvEvents) {
6392
+ _loop(eventType);
6393
+ }
6394
+ };
6395
+
6396
+ if (mediaFiles && mediaFiles.length > 0) {
6397
+ for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {
6398
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {
6399
+ node.setAttribute('src', mediaFiles[_i2].src);
6400
+ break;
6401
+ }
6402
+ }
6403
+ }
6404
+
6405
+ node.setAttribute('id', id);
6406
+
6407
+ originalNode.parentNode.insertBefore(node, originalNode);
6408
+ originalNode.autoplay = false;
6409
+ originalNode.style.display = 'none';
6410
+
6411
+ var flvOptions = {};
6412
+ flvOptions.type = 'flv';
6413
+ flvOptions.url = node.src;
6414
+ flvOptions.cors = options.flv.cors;
6415
+ flvOptions.debug = options.flv.debug;
6416
+ flvOptions.path = options.flv.path;
6417
+ var flvConfigs = options.flv.configs;
6418
+
6419
+ node.setSize = function (width, height) {
6420
+ node.style.width = width + 'px';
6421
+ node.style.height = height + 'px';
6422
+ return node;
6423
+ };
6424
+
6425
+ node.hide = function () {
6426
+ if (flvPlayer !== null) {
6427
+ flvPlayer.pause();
6428
+ }
6429
+ node.style.display = 'none';
6430
+ return node;
6431
+ };
6432
+
6433
+ node.show = function () {
6434
+ node.style.display = '';
6435
+ return node;
6436
+ };
6437
+
6438
+ node.destroy = function () {
6439
+ if (flvPlayer !== null) {
6440
+ flvPlayer.destroy();
6441
+ }
6442
+ };
6443
+
6444
+ var event = (0, _general.createEvent)('rendererready', node);
6445
+ mediaElement.dispatchEvent(event);
6446
+
6447
+ mediaElement.promises.push(NativeFlv.load({
6448
+ options: flvOptions,
6449
+ configs: flvConfigs,
6450
+ id: id
6451
+ }));
6452
+
6453
+ return node;
6454
+ }
6455
+ };
6456
+
6457
+ _media.typeChecks.push(function (url) {
6458
+ return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;
6459
+ });
6460
+
6461
+ _renderer.renderer.add(FlvNativeRenderer);
6462
+
6463
+ },{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],22:[function(_dereq_,module,exports){
6464
+ 'use strict';
6465
+
6466
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
6467
+
6468
+ var _window = _dereq_(3);
6469
+
6470
+ var _window2 = _interopRequireDefault(_window);
6471
+
6472
+ var _mejs = _dereq_(7);
6473
+
6474
+ var _mejs2 = _interopRequireDefault(_mejs);
6475
+
6476
+ var _renderer = _dereq_(8);
6477
+
6478
+ var _general = _dereq_(27);
6479
+
6480
+ var _constants = _dereq_(25);
6481
+
6482
+ var _media = _dereq_(28);
6483
+
6484
+ var _dom = _dereq_(26);
6485
+
6486
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6487
+
6488
+ var NativeHls = {
6489
+
6490
+ promise: null,
6491
+
6492
+ load: function load(settings) {
6493
+ if (typeof Hls !== 'undefined') {
6494
+ NativeHls.promise = new Promise(function (resolve) {
6495
+ resolve();
6496
+ }).then(function () {
6497
+ NativeHls._createPlayer(settings);
6498
+ });
6499
+ } else {
6500
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';
6501
+
6502
+ NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);
6503
+ NativeHls.promise.then(function () {
6504
+ NativeHls._createPlayer(settings);
6505
+ });
6506
+ }
6507
+
6508
+ return NativeHls.promise;
6509
+ },
6510
+
6511
+ _createPlayer: function _createPlayer(settings) {
6512
+ var player = new Hls(settings.options);
6513
+ _window2.default['__ready__' + settings.id](player);
6514
+ return player;
6515
+ }
6516
+ };
6517
+
6518
+ var HlsNativeRenderer = {
6519
+ name: 'native_hls',
6520
+ options: {
6521
+ prefix: 'native_hls',
6522
+ hls: {
6523
+ path: 'https://cdn.jsdelivr.net/npm/hls.js@latest',
6524
+
6525
+ autoStartLoad: false,
6526
+ debug: false
6527
+ }
6528
+ },
6529
+
6530
+ canPlayType: function canPlayType(type) {
6531
+ return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;
6532
+ },
6533
+
6534
+ create: function create(mediaElement, options, mediaFiles) {
6535
+
6536
+ var originalNode = mediaElement.originalNode,
6537
+ id = mediaElement.id + '_' + options.prefix,
6538
+ preload = originalNode.getAttribute('preload'),
6539
+ autoplay = originalNode.autoplay;
6540
+
6541
+ var hlsPlayer = null,
6542
+ node = null,
6543
+ index = 0,
6544
+ total = mediaFiles.length;
6545
+
6546
+ node = originalNode.cloneNode(true);
6547
+ options = Object.assign(options, mediaElement.options);
6548
+ options.hls.autoStartLoad = preload && preload !== 'none' || autoplay;
6549
+
6550
+ var props = _mejs2.default.html5media.properties,
6551
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
6552
+ return e !== 'error';
6553
+ }),
6554
+ attachNativeEvents = function attachNativeEvents(e) {
6555
+ var event = (0, _general.createEvent)(e.type, mediaElement);
6556
+ mediaElement.dispatchEvent(event);
6557
+ },
6558
+ assignGettersSetters = function assignGettersSetters(propName) {
6559
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
6560
+
6561
+ node['get' + capName] = function () {
6562
+ return hlsPlayer !== null ? node[propName] : null;
6563
+ };
6564
+
6565
+ node['set' + capName] = function (value) {
6566
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
6567
+ if (propName === 'src') {
6568
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
6569
+ if (hlsPlayer !== null) {
6570
+ hlsPlayer.destroy();
6571
+ for (var i = 0, _total = events.length; i < _total; i++) {
6572
+ node.removeEventListener(events[i], attachNativeEvents);
6573
+ }
6574
+ hlsPlayer = NativeHls._createPlayer({
6575
+ options: options.hls,
6576
+ id: id
6577
+ });
6578
+ hlsPlayer.loadSource(value);
6579
+ hlsPlayer.attachMedia(node);
6580
+ }
6581
+ } else {
6582
+ node[propName] = value;
6583
+ }
6584
+ }
6585
+ };
6586
+ };
6587
+
6588
+ for (var i = 0, _total2 = props.length; i < _total2; i++) {
6589
+ assignGettersSetters(props[i]);
6590
+ }
6591
+
6592
+ _window2.default['__ready__' + id] = function (_hlsPlayer) {
6593
+ mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;
6594
+ var hlsEvents = Hls.Events,
6595
+ assignEvents = function assignEvents(eventName) {
6596
+ if (eventName === 'loadedmetadata') {
6597
+ var url = mediaElement.originalNode.src;
6598
+ hlsPlayer.detachMedia();
6599
+ hlsPlayer.loadSource(url);
6600
+ hlsPlayer.attachMedia(node);
6601
+ }
6602
+
6603
+ node.addEventListener(eventName, attachNativeEvents);
6604
+ };
6605
+
6606
+ for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {
6607
+ assignEvents(events[_i]);
6608
+ }
6609
+
6610
+ var recoverDecodingErrorDate = void 0,
6611
+ recoverSwapAudioCodecDate = void 0;
6612
+ var assignHlsEvents = function assignHlsEvents(name, data) {
6613
+ if (name === 'hlsError') {
6614
+ console.warn(data);
6615
+ data = data[1];
6616
+
6617
+ if (data.fatal) {
6618
+ switch (data.type) {
6619
+ case 'mediaError':
6620
+ var now = new Date().getTime();
6621
+ if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {
6622
+ recoverDecodingErrorDate = new Date().getTime();
6623
+ hlsPlayer.recoverMediaError();
6624
+ } else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {
6625
+ recoverSwapAudioCodecDate = new Date().getTime();
6626
+ console.warn('Attempting to swap Audio Codec and recover from media error');
6627
+ hlsPlayer.swapAudioCodec();
6628
+ hlsPlayer.recoverMediaError();
6629
+ } else {
6630
+ var message = 'Cannot recover, last media error recovery failed';
6631
+ mediaElement.generateError(message, node.src);
6632
+ console.error(message);
6633
+ }
6634
+ break;
6635
+ case 'networkError':
6636
+ if (data.details === 'manifestLoadError') {
6637
+ if (index < total && mediaFiles[index + 1] !== undefined) {
6638
+ node.setSrc(mediaFiles[index++].src);
6639
+ node.load();
6640
+ node.play();
6641
+ } else {
6642
+ var _message = 'Network error';
6643
+ mediaElement.generateError(_message, mediaFiles);
6644
+ console.error(_message);
6645
+ }
6646
+ } else {
6647
+ var _message2 = 'Network error';
6648
+ mediaElement.generateError(_message2, mediaFiles);
6649
+ console.error(_message2);
6650
+ }
6651
+ break;
6652
+ default:
6653
+ hlsPlayer.destroy();
6654
+ break;
6655
+ }
6656
+ }
6657
+ } else {
6658
+ var _event = (0, _general.createEvent)(name, mediaElement);
6659
+ _event.data = data;
6660
+ mediaElement.dispatchEvent(_event);
6661
+ }
6662
+ };
6663
+
6664
+ var _loop = function _loop(eventType) {
6665
+ if (hlsEvents.hasOwnProperty(eventType)) {
6666
+ hlsPlayer.on(hlsEvents[eventType], function () {
6667
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
6668
+ args[_key] = arguments[_key];
6669
+ }
6670
+
6671
+ return assignHlsEvents(hlsEvents[eventType], args);
6672
+ });
6673
+ }
6674
+ };
6675
+
6676
+ for (var eventType in hlsEvents) {
6677
+ _loop(eventType);
6678
+ }
6679
+ };
6680
+
6681
+ if (total > 0) {
6682
+ for (; index < total; index++) {
6683
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
6684
+ node.setAttribute('src', mediaFiles[index].src);
6685
+ break;
6686
+ }
6687
+ }
6688
+ }
6689
+
6690
+ if (preload !== 'auto' && !autoplay) {
6691
+ node.addEventListener('play', function () {
6692
+ if (hlsPlayer !== null) {
6693
+ hlsPlayer.startLoad();
6694
+ }
6695
+ });
6696
+
6697
+ node.addEventListener('pause', function () {
6698
+ if (hlsPlayer !== null) {
6699
+ hlsPlayer.stopLoad();
6700
+ }
6701
+ });
6702
+ }
6703
+
6704
+ node.setAttribute('id', id);
6705
+
6706
+ originalNode.parentNode.insertBefore(node, originalNode);
6707
+ originalNode.autoplay = false;
6708
+ originalNode.style.display = 'none';
6709
+
6710
+ node.setSize = function (width, height) {
6711
+ node.style.width = width + 'px';
6712
+ node.style.height = height + 'px';
6713
+ return node;
6714
+ };
6715
+
6716
+ node.hide = function () {
6717
+ node.pause();
6718
+ node.style.display = 'none';
6719
+ return node;
6720
+ };
6721
+
6722
+ node.show = function () {
6723
+ node.style.display = '';
6724
+ return node;
6725
+ };
6726
+
6727
+ node.destroy = function () {
6728
+ if (hlsPlayer !== null) {
6729
+ hlsPlayer.stopLoad();
6730
+ hlsPlayer.destroy();
6731
+ }
6732
+ };
6733
+
6734
+ var event = (0, _general.createEvent)('rendererready', node);
6735
+ mediaElement.dispatchEvent(event);
6736
+
6737
+ mediaElement.promises.push(NativeHls.load({
6738
+ options: options.hls,
6739
+ id: id
6740
+ }));
6741
+
6742
+ return node;
6743
+ }
6744
+ };
6745
+
6746
+ _media.typeChecks.push(function (url) {
6747
+ return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;
6748
+ });
6749
+
6750
+ _renderer.renderer.add(HlsNativeRenderer);
6751
+
6752
+ },{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],23:[function(_dereq_,module,exports){
6753
+ 'use strict';
6754
+
6755
+ var _window = _dereq_(3);
6756
+
6757
+ var _window2 = _interopRequireDefault(_window);
6758
+
6759
+ var _document = _dereq_(2);
6760
+
6761
+ var _document2 = _interopRequireDefault(_document);
6762
+
6763
+ var _mejs = _dereq_(7);
6764
+
6765
+ var _mejs2 = _interopRequireDefault(_mejs);
6766
+
6767
+ var _renderer = _dereq_(8);
6768
+
6769
+ var _general = _dereq_(27);
6770
+
6771
+ var _constants = _dereq_(25);
6772
+
6773
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6774
+
6775
+ var HtmlMediaElement = {
6776
+ name: 'html5',
6777
+ options: {
6778
+ prefix: 'html5'
6779
+ },
6780
+
6781
+ canPlayType: function canPlayType(type) {
6782
+
6783
+ var mediaElement = _document2.default.createElement('video');
6784
+
6785
+ if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {
6786
+ return 'yes';
6787
+ } else if (mediaElement.canPlayType) {
6788
+ return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');
6789
+ } else {
6790
+ return '';
6791
+ }
6792
+ },
6793
+
6794
+ create: function create(mediaElement, options, mediaFiles) {
6795
+
6796
+ var id = mediaElement.id + '_' + options.prefix;
6797
+ var isActive = false;
6798
+
6799
+ var node = null;
6800
+
6801
+ if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {
6802
+ node = _document2.default.createElement('audio');
6803
+ mediaElement.appendChild(node);
6804
+ } else {
6805
+ node = mediaElement.originalNode;
6806
+ }
6807
+
6808
+ node.setAttribute('id', id);
6809
+
6810
+ var props = _mejs2.default.html5media.properties,
6811
+ assignGettersSetters = function assignGettersSetters(propName) {
6812
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
6813
+
6814
+ node['get' + capName] = function () {
6815
+ return node[propName];
6816
+ };
6817
+
6818
+ node['set' + capName] = function (value) {
6819
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
6820
+ node[propName] = value;
6821
+ }
6822
+ };
6823
+ };
6824
+
6825
+ for (var i = 0, _total = props.length; i < _total; i++) {
6826
+ assignGettersSetters(props[i]);
6827
+ }
6828
+
6829
+ var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
6830
+ return e !== 'error';
6831
+ }),
6832
+ assignEvents = function assignEvents(eventName) {
6833
+ node.addEventListener(eventName, function (e) {
6834
+ if (isActive) {
6835
+ var _event = (0, _general.createEvent)(e.type, e.target);
6836
+ mediaElement.dispatchEvent(_event);
6837
+ }
6838
+ });
6839
+ };
6840
+
6841
+ for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {
6842
+ assignEvents(events[_i]);
6843
+ }
6844
+
6845
+ node.setSize = function (width, height) {
6846
+ node.style.width = width + 'px';
6847
+ node.style.height = height + 'px';
6848
+ return node;
6849
+ };
6850
+
6851
+ node.hide = function () {
6852
+ isActive = false;
6853
+ node.style.display = 'none';
6854
+
6855
+ return node;
6856
+ };
6857
+
6858
+ node.show = function () {
6859
+ isActive = true;
6860
+ node.style.display = '';
6861
+
6862
+ return node;
6863
+ };
6864
+
6865
+ var index = 0,
6866
+ total = mediaFiles.length;
6867
+ if (total > 0) {
6868
+ for (; index < total; index++) {
6869
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
6870
+ node.setAttribute('src', mediaFiles[index].src);
6871
+ break;
6872
+ }
6873
+ }
6874
+ }
6875
+
6876
+ node.addEventListener('error', function (e) {
6877
+ if (e.target.error.code === 4 && isActive) {
6878
+ if (index < total && mediaFiles[index + 1] !== undefined) {
6879
+ node.src = mediaFiles[index++].src;
6880
+ node.load();
6881
+ node.play();
6882
+ } else {
6883
+ mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);
6884
+ }
6885
+ }
6886
+ });
6887
+
6888
+ var event = (0, _general.createEvent)('rendererready', node);
6889
+ mediaElement.dispatchEvent(event);
6890
+
6891
+ return node;
6892
+ }
6893
+ };
6894
+
6895
+ _window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;
6896
+
6897
+ _renderer.renderer.add(HtmlMediaElement);
6898
+
6899
+ },{"2":2,"25":25,"27":27,"3":3,"7":7,"8":8}],24:[function(_dereq_,module,exports){
6900
+ 'use strict';
6901
+
6902
+ var _window = _dereq_(3);
6903
+
6904
+ var _window2 = _interopRequireDefault(_window);
6905
+
6906
+ var _document = _dereq_(2);
6907
+
6908
+ var _document2 = _interopRequireDefault(_document);
6909
+
6910
+ var _mejs = _dereq_(7);
6911
+
6912
+ var _mejs2 = _interopRequireDefault(_mejs);
6913
+
6914
+ var _renderer = _dereq_(8);
6915
+
6916
+ var _general = _dereq_(27);
6917
+
6918
+ var _media = _dereq_(28);
6919
+
6920
+ var _dom = _dereq_(26);
6921
+
6922
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6923
+
6924
+ var YouTubeApi = {
6925
+ isIframeStarted: false,
6926
+
6927
+ isIframeLoaded: false,
6928
+
6929
+ iframeQueue: [],
6930
+
6931
+ enqueueIframe: function enqueueIframe(settings) {
6932
+ YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;
6933
+
6934
+ if (YouTubeApi.isLoaded) {
6935
+ YouTubeApi.createIframe(settings);
6936
+ } else {
6937
+ YouTubeApi.loadIframeApi();
6938
+ YouTubeApi.iframeQueue.push(settings);
6939
+ }
6940
+ },
6941
+
6942
+ loadIframeApi: function loadIframeApi() {
6943
+ if (!YouTubeApi.isIframeStarted) {
6944
+ (0, _dom.loadScript)('https://www.youtube.com/player_api');
6945
+ YouTubeApi.isIframeStarted = true;
6946
+ }
6947
+ },
6948
+
6949
+ iFrameReady: function iFrameReady() {
6950
+
6951
+ YouTubeApi.isLoaded = true;
6952
+ YouTubeApi.isIframeLoaded = true;
6953
+
6954
+ while (YouTubeApi.iframeQueue.length > 0) {
6955
+ var settings = YouTubeApi.iframeQueue.pop();
6956
+ YouTubeApi.createIframe(settings);
6957
+ }
6958
+ },
6959
+
6960
+ createIframe: function createIframe(settings) {
6961
+ return new YT.Player(settings.containerId, settings);
6962
+ },
6963
+
6964
+ getYouTubeId: function getYouTubeId(url) {
6965
+
6966
+ var youTubeId = '';
6967
+
6968
+ if (url.indexOf('?') > 0) {
6969
+ youTubeId = YouTubeApi.getYouTubeIdFromParam(url);
6970
+
6971
+ if (youTubeId === '') {
6972
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
6973
+ }
6974
+ } else {
6975
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
6976
+ }
6977
+
6978
+ var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);
6979
+ youTubeId = id.split('?');
6980
+ return youTubeId[0];
6981
+ },
6982
+
6983
+ getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {
6984
+
6985
+ if (url === undefined || url === null || !url.trim().length) {
6986
+ return null;
6987
+ }
6988
+
6989
+ var parts = url.split('?'),
6990
+ parameters = parts[1].split('&');
6991
+
6992
+ var youTubeId = '';
6993
+
6994
+ for (var i = 0, total = parameters.length; i < total; i++) {
6995
+ var paramParts = parameters[i].split('=');
6996
+ if (paramParts[0] === 'v') {
6997
+ youTubeId = paramParts[1];
6998
+ break;
6999
+ }
7000
+ }
7001
+
7002
+ return youTubeId;
7003
+ },
7004
+
7005
+ getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {
7006
+
7007
+ if (url === undefined || url === null || !url.trim().length) {
7008
+ return null;
7009
+ }
7010
+
7011
+ var parts = url.split('?');
7012
+ url = parts[0];
7013
+ return url.substring(url.lastIndexOf('/') + 1);
7014
+ },
7015
+
7016
+ getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {
7017
+ if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {
7018
+ return url;
7019
+ }
7020
+
7021
+ var parts = url.split('/');
7022
+ parts[2] = parts[2].replace('.com', '-nocookie.com');
7023
+ return parts.join('/');
7024
+ }
7025
+ };
7026
+
7027
+ var YouTubeIframeRenderer = {
7028
+ name: 'youtube_iframe',
7029
+
7030
+ options: {
7031
+ prefix: 'youtube_iframe',
7032
+
7033
+ youtube: {
7034
+ autoplay: 0,
7035
+ controls: 0,
7036
+ disablekb: 1,
7037
+ end: 0,
7038
+ loop: 0,
7039
+ modestbranding: 0,
7040
+ playsinline: 0,
7041
+ rel: 0,
7042
+ showinfo: 0,
7043
+ start: 0,
7044
+ iv_load_policy: 3,
7045
+
7046
+ nocookie: false,
7047
+
7048
+ imageQuality: null
7049
+ }
7050
+ },
7051
+
7052
+ canPlayType: function canPlayType(type) {
7053
+ return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());
7054
+ },
7055
+
7056
+ create: function create(mediaElement, options, mediaFiles) {
7057
+
7058
+ var youtube = {},
7059
+ apiStack = [],
7060
+ readyState = 4;
7061
+
7062
+ var youTubeApi = null,
7063
+ paused = true,
7064
+ ended = false,
7065
+ youTubeIframe = null,
7066
+ volume = 1;
7067
+
7068
+ youtube.options = options;
7069
+ youtube.id = mediaElement.id + '_' + options.prefix;
7070
+ youtube.mediaElement = mediaElement;
7071
+
7072
+ var props = _mejs2.default.html5media.properties,
7073
+ assignGettersSetters = function assignGettersSetters(propName) {
7074
+
7075
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
7076
+
7077
+ youtube['get' + capName] = function () {
7078
+ if (youTubeApi !== null) {
7079
+ var value = null;
7080
+
7081
+ switch (propName) {
7082
+ case 'currentTime':
7083
+ return youTubeApi.getCurrentTime();
7084
+ case 'duration':
7085
+ return youTubeApi.getDuration();
7086
+ case 'volume':
7087
+ volume = youTubeApi.getVolume() / 100;
7088
+ return volume;
7089
+ case 'paused':
7090
+ return paused;
7091
+ case 'ended':
7092
+ return ended;
7093
+ case 'muted':
7094
+ return youTubeApi.isMuted();
7095
+ case 'buffered':
7096
+ var percentLoaded = youTubeApi.getVideoLoadedFraction(),
7097
+ duration = youTubeApi.getDuration();
7098
+ return {
7099
+ start: function start() {
7100
+ return 0;
7101
+ },
7102
+ end: function end() {
7103
+ return percentLoaded * duration;
7104
+ },
7105
+ length: 1
7106
+ };
7107
+ case 'src':
7108
+ return youTubeApi.getVideoUrl();
7109
+ case 'readyState':
7110
+ return readyState;
7111
+ }
7112
+
7113
+ return value;
7114
+ } else {
7115
+ return null;
7116
+ }
7117
+ };
7118
+
7119
+ youtube['set' + capName] = function (value) {
7120
+ if (youTubeApi !== null) {
7121
+ switch (propName) {
7122
+ case 'src':
7123
+ var url = typeof value === 'string' ? value : value[0].src,
7124
+ _videoId = YouTubeApi.getYouTubeId(url);
7125
+
7126
+ if (mediaElement.originalNode.autoplay) {
7127
+ youTubeApi.loadVideoById(_videoId);
7128
+ } else {
7129
+ youTubeApi.cueVideoById(_videoId);
7130
+ }
7131
+ break;
7132
+ case 'currentTime':
7133
+ youTubeApi.seekTo(value);
7134
+ break;
7135
+ case 'muted':
7136
+ if (value) {
7137
+ youTubeApi.mute();
7138
+ } else {
7139
+ youTubeApi.unMute();
7140
+ }
7141
+ setTimeout(function () {
7142
+ var event = (0, _general.createEvent)('volumechange', youtube);
7143
+ mediaElement.dispatchEvent(event);
7144
+ }, 50);
7145
+ break;
7146
+ case 'volume':
7147
+ volume = value;
7148
+ youTubeApi.setVolume(value * 100);
7149
+ setTimeout(function () {
7150
+ var event = (0, _general.createEvent)('volumechange', youtube);
7151
+ mediaElement.dispatchEvent(event);
7152
+ }, 50);
7153
+ break;
7154
+ case 'readyState':
7155
+ var event = (0, _general.createEvent)('canplay', youtube);
7156
+ mediaElement.dispatchEvent(event);
7157
+ break;
7158
+ default:
7159
+
7160
+ break;
7161
+ }
7162
+ } else {
7163
+ apiStack.push({ type: 'set', propName: propName, value: value });
7164
+ }
7165
+ };
7166
+ };
7167
+
7168
+ for (var i = 0, total = props.length; i < total; i++) {
7169
+ assignGettersSetters(props[i]);
7170
+ }
7171
+
7172
+ var methods = _mejs2.default.html5media.methods,
7173
+ assignMethods = function assignMethods(methodName) {
7174
+ youtube[methodName] = function () {
7175
+ if (youTubeApi !== null) {
7176
+ switch (methodName) {
7177
+ case 'play':
7178
+ paused = false;
7179
+ return youTubeApi.playVideo();
7180
+ case 'pause':
7181
+ paused = true;
7182
+ return youTubeApi.pauseVideo();
7183
+ case 'load':
7184
+ return null;
7185
+ }
7186
+ } else {
7187
+ apiStack.push({ type: 'call', methodName: methodName });
7188
+ }
7189
+ };
7190
+ };
7191
+
7192
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
7193
+ assignMethods(methods[_i]);
7194
+ }
7195
+
7196
+ var errorHandler = function errorHandler(error) {
7197
+ var message = '';
7198
+ switch (error.data) {
7199
+ case 2:
7200
+ message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';
7201
+ break;
7202
+ case 5:
7203
+ message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';
7204
+ break;
7205
+ case 100:
7206
+ message = 'The video requested was not found. Either video has been removed or has been marked as private.';
7207
+ break;
7208
+ case 101:
7209
+ case 105:
7210
+ message = 'The owner of the requested video does not allow it to be played in embedded players.';
7211
+ break;
7212
+ default:
7213
+ message = 'Unknown error.';
7214
+ break;
7215
+ }
7216
+ mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);
7217
+ };
7218
+
7219
+ var youtubeContainer = _document2.default.createElement('div');
7220
+ youtubeContainer.id = youtube.id;
7221
+
7222
+ if (youtube.options.youtube.nocookie) {
7223
+ mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);
7224
+ }
7225
+
7226
+ mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);
7227
+ mediaElement.originalNode.style.display = 'none';
7228
+
7229
+ var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',
7230
+ height = isAudio ? '1' : mediaElement.originalNode.height,
7231
+ width = isAudio ? '1' : mediaElement.originalNode.width,
7232
+ videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),
7233
+ youtubeSettings = {
7234
+ id: youtube.id,
7235
+ containerId: youtubeContainer.id,
7236
+ videoId: videoId,
7237
+ height: height,
7238
+ width: width,
7239
+ playerVars: Object.assign({
7240
+ controls: 0,
7241
+ rel: 0,
7242
+ disablekb: 1,
7243
+ showinfo: 0,
7244
+ modestbranding: 0,
7245
+ html5: 1,
7246
+ iv_load_policy: 3
7247
+ }, youtube.options.youtube),
7248
+ origin: _window2.default.location.host,
7249
+ events: {
7250
+ onReady: function onReady(e) {
7251
+ mediaElement.youTubeApi = youTubeApi = e.target;
7252
+ mediaElement.youTubeState = {
7253
+ paused: true,
7254
+ ended: false
7255
+ };
7256
+
7257
+ if (apiStack.length) {
7258
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
7259
+
7260
+ var stackItem = apiStack[_i2];
7261
+
7262
+ if (stackItem.type === 'set') {
7263
+ var propName = stackItem.propName,
7264
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
7265
+
7266
+ youtube['set' + capName](stackItem.value);
7267
+ } else if (stackItem.type === 'call') {
7268
+ youtube[stackItem.methodName]();
7269
+ }
7270
+ }
7271
+ }
7272
+
7273
+ youTubeIframe = youTubeApi.getIframe();
7274
+
7275
+ if (mediaElement.originalNode.muted) {
7276
+ youTubeApi.mute();
7277
+ }
7278
+
7279
+ var events = ['mouseover', 'mouseout'],
7280
+ assignEvents = function assignEvents(e) {
7281
+ var newEvent = (0, _general.createEvent)(e.type, youtube);
7282
+ mediaElement.dispatchEvent(newEvent);
7283
+ };
7284
+
7285
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
7286
+ youTubeIframe.addEventListener(events[_i3], assignEvents, false);
7287
+ }
7288
+
7289
+ var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
7290
+
7291
+ for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {
7292
+ var event = (0, _general.createEvent)(initEvents[_i4], youtube);
7293
+ mediaElement.dispatchEvent(event);
7294
+ }
7295
+ },
7296
+ onStateChange: function onStateChange(e) {
7297
+ var events = [];
7298
+
7299
+ switch (e.data) {
7300
+ case -1:
7301
+ events = ['loadedmetadata'];
7302
+ paused = true;
7303
+ ended = false;
7304
+ break;
7305
+ case 0:
7306
+ events = ['ended'];
7307
+ paused = false;
7308
+ ended = !youtube.options.youtube.loop;
7309
+ if (!youtube.options.youtube.loop) {
7310
+ youtube.stopInterval();
7311
+ }
7312
+ break;
7313
+ case 1:
7314
+ events = ['play', 'playing'];
7315
+ paused = false;
7316
+ ended = false;
7317
+ youtube.startInterval();
7318
+ break;
7319
+ case 2:
7320
+ events = ['pause'];
7321
+ paused = true;
7322
+ ended = false;
7323
+ youtube.stopInterval();
7324
+ break;
7325
+ case 3:
7326
+ events = ['progress'];
7327
+ ended = false;
7328
+ break;
7329
+ case 5:
7330
+ events = ['loadeddata', 'loadedmetadata', 'canplay'];
7331
+ paused = true;
7332
+ ended = false;
7333
+ break;
7334
+ }
7335
+
7336
+ for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {
7337
+ var event = (0, _general.createEvent)(events[_i5], youtube);
7338
+ mediaElement.dispatchEvent(event);
7339
+ }
7340
+ },
7341
+ onError: function onError(e) {
7342
+ return errorHandler(e);
7343
+ }
7344
+ }
7345
+ };
7346
+
7347
+ if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {
7348
+ youtubeSettings.playerVars.playsinline = 1;
7349
+ }
7350
+
7351
+ if (mediaElement.originalNode.controls) {
7352
+ youtubeSettings.playerVars.controls = 1;
7353
+ }
7354
+ if (mediaElement.originalNode.autoplay) {
7355
+ youtubeSettings.playerVars.autoplay = 1;
7356
+ }
7357
+ if (mediaElement.originalNode.loop) {
7358
+ youtubeSettings.playerVars.loop = 1;
7359
+ }
7360
+
7361
+ if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {
7362
+ youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
7363
+ }
7364
+
7365
+ YouTubeApi.enqueueIframe(youtubeSettings);
7366
+
7367
+ youtube.onEvent = function (eventName, player, _youTubeState) {
7368
+ if (_youTubeState !== null && _youTubeState !== undefined) {
7369
+ mediaElement.youTubeState = _youTubeState;
7370
+ }
7371
+ };
7372
+
7373
+ youtube.setSize = function (width, height) {
7374
+ if (youTubeApi !== null) {
7375
+ youTubeApi.setSize(width, height);
7376
+ }
7377
+ };
7378
+ youtube.hide = function () {
7379
+ youtube.stopInterval();
7380
+ youtube.pause();
7381
+ if (youTubeIframe) {
7382
+ youTubeIframe.style.display = 'none';
7383
+ }
7384
+ };
7385
+ youtube.show = function () {
7386
+ if (youTubeIframe) {
7387
+ youTubeIframe.style.display = '';
7388
+ }
7389
+ };
7390
+ youtube.destroy = function () {
7391
+ youTubeApi.destroy();
7392
+ };
7393
+ youtube.interval = null;
7394
+
7395
+ youtube.startInterval = function () {
7396
+ youtube.interval = setInterval(function () {
7397
+ var event = (0, _general.createEvent)('timeupdate', youtube);
7398
+ mediaElement.dispatchEvent(event);
7399
+ }, 250);
7400
+ };
7401
+ youtube.stopInterval = function () {
7402
+ if (youtube.interval) {
7403
+ clearInterval(youtube.interval);
7404
+ }
7405
+ };
7406
+ youtube.getPosterUrl = function () {
7407
+ var quality = options.youtube.imageQuality,
7408
+ resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],
7409
+ id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
7410
+ return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';
7411
+ };
7412
+
7413
+ return youtube;
7414
+ }
7415
+ };
7416
+
7417
+ _window2.default.onYouTubePlayerAPIReady = function () {
7418
+ YouTubeApi.iFrameReady();
7419
+ };
7420
+
7421
+ _media.typeChecks.push(function (url) {
7422
+ return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null
7423
+ );
7424
+ });
7425
+
7426
+ _renderer.renderer.add(YouTubeIframeRenderer);
7427
+
7428
+ },{"2":2,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],25:[function(_dereq_,module,exports){
7429
+ 'use strict';
7430
+
7431
+ Object.defineProperty(exports, "__esModule", {
7432
+ value: true
7433
+ });
7434
+ exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;
7435
+
7436
+ var _window = _dereq_(3);
7437
+
7438
+ var _window2 = _interopRequireDefault(_window);
7439
+
7440
+ var _document = _dereq_(2);
7441
+
7442
+ var _document2 = _interopRequireDefault(_document);
7443
+
7444
+ var _mejs = _dereq_(7);
7445
+
7446
+ var _mejs2 = _interopRequireDefault(_mejs);
7447
+
7448
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7449
+
7450
+ var NAV = exports.NAV = _window2.default.navigator;
7451
+ var UA = exports.UA = NAV.userAgent.toLowerCase();
7452
+ var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;
7453
+ var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;
7454
+ var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;
7455
+ var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;
7456
+ var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);
7457
+ var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);
7458
+ var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);
7459
+ var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);
7460
+ var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
7461
+ var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
7462
+ var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
7463
+ var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
7464
+ var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
7465
+ var element = _document2.default.createElement('x'),
7466
+ documentElement = _document2.default.documentElement,
7467
+ getComputedStyle = _window2.default.getComputedStyle;
7468
+
7469
+ if (!('pointerEvents' in element.style)) {
7470
+ return false;
7471
+ }
7472
+
7473
+ element.style.pointerEvents = 'auto';
7474
+ element.style.pointerEvents = 'x';
7475
+ documentElement.appendChild(element);
7476
+ var supports = getComputedStyle && getComputedStyle(element, '').pointerEvents === 'auto';
7477
+ element.remove();
7478
+ return !!supports;
7479
+ }();
7480
+
7481
+ var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
7482
+ var supportsPassive = false;
7483
+ try {
7484
+ var opts = Object.defineProperty({}, 'passive', {
7485
+ get: function get() {
7486
+ supportsPassive = true;
7487
+ }
7488
+ });
7489
+ _window2.default.addEventListener('test', null, opts);
7490
+ } catch (e) {}
7491
+
7492
+ return supportsPassive;
7493
+ }();
7494
+
7495
+ var html5Elements = ['source', 'track', 'audio', 'video'];
7496
+ var video = void 0;
7497
+
7498
+ for (var i = 0, total = html5Elements.length; i < total; i++) {
7499
+ video = _document2.default.createElement(html5Elements[i]);
7500
+ }
7501
+
7502
+ var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_ANDROID && (IS_CHROME || IS_STOCK_ANDROID) || IS_IE && /edge/i.test(UA);
7503
+
7504
+ var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;
7505
+
7506
+ var hasNativeFullscreen = video.requestFullscreen !== undefined;
7507
+
7508
+ if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {
7509
+ hasNativeFullscreen = false;
7510
+ hasiOSFullScreen = false;
7511
+ }
7512
+
7513
+ var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;
7514
+ var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;
7515
+ var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;
7516
+ var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;
7517
+ var nativeFullScreenEnabled = hasTrueNativeFullScreen;
7518
+ var fullScreenEventName = '';
7519
+ var isFullScreen = void 0,
7520
+ requestFullScreen = void 0,
7521
+ cancelFullScreen = void 0;
7522
+
7523
+ if (hasMozNativeFullScreen) {
7524
+ nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;
7525
+ } else if (hasMsNativeFullScreen) {
7526
+ nativeFullScreenEnabled = _document2.default.msFullscreenEnabled;
7527
+ }
7528
+
7529
+ if (IS_CHROME) {
7530
+ hasiOSFullScreen = false;
7531
+ }
7532
+
7533
+ if (hasTrueNativeFullScreen) {
7534
+ if (hasWebkitNativeFullScreen) {
7535
+ fullScreenEventName = 'webkitfullscreenchange';
7536
+ } else if (hasMozNativeFullScreen) {
7537
+ fullScreenEventName = 'mozfullscreenchange';
7538
+ } else if (hasMsNativeFullScreen) {
7539
+ fullScreenEventName = 'MSFullscreenChange';
7540
+ }
7541
+
7542
+ exports.isFullScreen = isFullScreen = function isFullScreen() {
7543
+ if (hasMozNativeFullScreen) {
7544
+ return _document2.default.mozFullScreen;
7545
+ } else if (hasWebkitNativeFullScreen) {
7546
+ return _document2.default.webkitIsFullScreen;
7547
+ } else if (hasMsNativeFullScreen) {
7548
+ return _document2.default.msFullscreenElement !== null;
7549
+ }
7550
+ };
7551
+
7552
+ exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {
7553
+ if (hasWebkitNativeFullScreen) {
7554
+ el.webkitRequestFullScreen();
7555
+ } else if (hasMozNativeFullScreen) {
7556
+ el.mozRequestFullScreen();
7557
+ } else if (hasMsNativeFullScreen) {
7558
+ el.msRequestFullscreen();
7559
+ }
7560
+ };
7561
+
7562
+ exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {
7563
+ if (hasWebkitNativeFullScreen) {
7564
+ _document2.default.webkitCancelFullScreen();
7565
+ } else if (hasMozNativeFullScreen) {
7566
+ _document2.default.mozCancelFullScreen();
7567
+ } else if (hasMsNativeFullScreen) {
7568
+ _document2.default.msExitFullscreen();
7569
+ }
7570
+ };
7571
+ }
7572
+
7573
+ var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;
7574
+ var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;
7575
+ var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;
7576
+ var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;
7577
+ var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;
7578
+ var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;
7579
+ var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;
7580
+ var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;
7581
+ exports.isFullScreen = isFullScreen;
7582
+ exports.requestFullScreen = requestFullScreen;
7583
+ exports.cancelFullScreen = cancelFullScreen;
7584
+
7585
+
7586
+ _mejs2.default.Features = _mejs2.default.Features || {};
7587
+ _mejs2.default.Features.isiPad = IS_IPAD;
7588
+ _mejs2.default.Features.isiPod = IS_IPOD;
7589
+ _mejs2.default.Features.isiPhone = IS_IPHONE;
7590
+ _mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;
7591
+ _mejs2.default.Features.isAndroid = IS_ANDROID;
7592
+ _mejs2.default.Features.isIE = IS_IE;
7593
+ _mejs2.default.Features.isEdge = IS_EDGE;
7594
+ _mejs2.default.Features.isChrome = IS_CHROME;
7595
+ _mejs2.default.Features.isFirefox = IS_FIREFOX;
7596
+ _mejs2.default.Features.isSafari = IS_SAFARI;
7597
+ _mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;
7598
+ _mejs2.default.Features.hasMSE = HAS_MSE;
7599
+ _mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;
7600
+ _mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;
7601
+ _mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;
7602
+ _mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;
7603
+ _mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;
7604
+ _mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;
7605
+ _mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;
7606
+ _mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;
7607
+ _mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;
7608
+ _mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;
7609
+ _mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;
7610
+ _mejs2.default.Features.isFullScreen = isFullScreen;
7611
+ _mejs2.default.Features.requestFullScreen = requestFullScreen;
7612
+ _mejs2.default.Features.cancelFullScreen = cancelFullScreen;
7613
+
7614
+ },{"2":2,"3":3,"7":7}],26:[function(_dereq_,module,exports){
7615
+ 'use strict';
7616
+
7617
+ Object.defineProperty(exports, "__esModule", {
7618
+ value: true
7619
+ });
7620
+ exports.removeClass = exports.addClass = exports.hasClass = undefined;
7621
+ exports.loadScript = loadScript;
7622
+ exports.offset = offset;
7623
+ exports.toggleClass = toggleClass;
7624
+ exports.fadeOut = fadeOut;
7625
+ exports.fadeIn = fadeIn;
7626
+ exports.siblings = siblings;
7627
+ exports.visible = visible;
7628
+ exports.ajax = ajax;
7629
+
7630
+ var _window = _dereq_(3);
7631
+
7632
+ var _window2 = _interopRequireDefault(_window);
7633
+
7634
+ var _document = _dereq_(2);
7635
+
7636
+ var _document2 = _interopRequireDefault(_document);
7637
+
7638
+ var _mejs = _dereq_(7);
7639
+
7640
+ var _mejs2 = _interopRequireDefault(_mejs);
7641
+
7642
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7643
+
7644
+ function loadScript(url) {
7645
+ return new Promise(function (resolve, reject) {
7646
+ var script = _document2.default.createElement('script');
7647
+ script.src = url;
7648
+ script.async = true;
7649
+ script.onload = function () {
7650
+ script.remove();
7651
+ resolve();
7652
+ };
7653
+ script.onerror = function () {
7654
+ script.remove();
7655
+ reject();
7656
+ };
7657
+ _document2.default.head.appendChild(script);
7658
+ });
7659
+ }
7660
+
7661
+ function offset(el) {
7662
+ var rect = el.getBoundingClientRect(),
7663
+ scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,
7664
+ scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;
7665
+ return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
7666
+ }
7667
+
7668
+ var hasClassMethod = void 0,
7669
+ addClassMethod = void 0,
7670
+ removeClassMethod = void 0;
7671
+
7672
+ if ('classList' in _document2.default.documentElement) {
7673
+ hasClassMethod = function hasClassMethod(el, className) {
7674
+ return el.classList !== undefined && el.classList.contains(className);
7675
+ };
7676
+ addClassMethod = function addClassMethod(el, className) {
7677
+ return el.classList.add(className);
7678
+ };
7679
+ removeClassMethod = function removeClassMethod(el, className) {
7680
+ return el.classList.remove(className);
7681
+ };
7682
+ } else {
7683
+ hasClassMethod = function hasClassMethod(el, className) {
7684
+ return new RegExp('\\b' + className + '\\b').test(el.className);
7685
+ };
7686
+ addClassMethod = function addClassMethod(el, className) {
7687
+ if (!hasClass(el, className)) {
7688
+ el.className += ' ' + className;
7689
+ }
7690
+ };
7691
+ removeClassMethod = function removeClassMethod(el, className) {
7692
+ el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
7693
+ };
7694
+ }
7695
+
7696
+ var hasClass = exports.hasClass = hasClassMethod;
7697
+ var addClass = exports.addClass = addClassMethod;
7698
+ var removeClass = exports.removeClass = removeClassMethod;
7699
+
7700
+ function toggleClass(el, className) {
7701
+ hasClass(el, className) ? removeClass(el, className) : addClass(el, className);
7702
+ }
7703
+
7704
+ function fadeOut(el) {
7705
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
7706
+ var callback = arguments[2];
7707
+
7708
+ if (!el.style.opacity) {
7709
+ el.style.opacity = 1;
7710
+ }
7711
+
7712
+ var start = null;
7713
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
7714
+ start = start || timestamp;
7715
+ var progress = timestamp - start;
7716
+ var opacity = parseFloat(1 - progress / duration, 2);
7717
+ el.style.opacity = opacity < 0 ? 0 : opacity;
7718
+ if (progress > duration) {
7719
+ if (callback && typeof callback === 'function') {
7720
+ callback();
7721
+ }
7722
+ } else {
7723
+ _window2.default.requestAnimationFrame(animate);
7724
+ }
7725
+ });
7726
+ }
7727
+
7728
+ function fadeIn(el) {
7729
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
7730
+ var callback = arguments[2];
7731
+
7732
+ if (!el.style.opacity) {
7733
+ el.style.opacity = 0;
7734
+ }
7735
+
7736
+ var start = null;
7737
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
7738
+ start = start || timestamp;
7739
+ var progress = timestamp - start;
7740
+ var opacity = parseFloat(progress / duration, 2);
7741
+ el.style.opacity = opacity > 1 ? 1 : opacity;
7742
+ if (progress > duration) {
7743
+ if (callback && typeof callback === 'function') {
7744
+ callback();
7745
+ }
7746
+ } else {
7747
+ _window2.default.requestAnimationFrame(animate);
7748
+ }
7749
+ });
7750
+ }
7751
+
7752
+ function siblings(el, filter) {
7753
+ var siblings = [];
7754
+ el = el.parentNode.firstChild;
7755
+ do {
7756
+ if (!filter || filter(el)) {
7757
+ siblings.push(el);
7758
+ }
7759
+ } while (el = el.nextSibling);
7760
+ return siblings;
7761
+ }
7762
+
7763
+ function visible(elem) {
7764
+ if (elem.getClientRects !== undefined && elem.getClientRects === 'function') {
7765
+ return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
7766
+ }
7767
+ return !!(elem.offsetWidth || elem.offsetHeight);
7768
+ }
7769
+
7770
+ function ajax(url, dataType, success, error) {
7771
+ var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
7772
+
7773
+ var type = 'application/x-www-form-urlencoded; charset=UTF-8',
7774
+ completed = false,
7775
+ accept = '*/'.concat('*');
7776
+
7777
+ switch (dataType) {
7778
+ case 'text':
7779
+ type = 'text/plain';
7780
+ break;
7781
+ case 'json':
7782
+ type = 'application/json, text/javascript';
7783
+ break;
7784
+ case 'html':
7785
+ type = 'text/html';
7786
+ break;
7787
+ case 'xml':
7788
+ type = 'application/xml, text/xml';
7789
+ break;
7790
+ }
7791
+
7792
+ if (type !== 'application/x-www-form-urlencoded') {
7793
+ accept = type + ', */*; q=0.01';
7794
+ }
7795
+
7796
+ if (xhr) {
7797
+ xhr.open('GET', url, true);
7798
+ xhr.setRequestHeader('Accept', accept);
7799
+ xhr.onreadystatechange = function () {
7800
+ if (completed) {
7801
+ return;
7802
+ }
7803
+
7804
+ if (xhr.readyState === 4) {
7805
+ if (xhr.status === 200) {
7806
+ completed = true;
7807
+ var data = void 0;
7808
+ switch (dataType) {
7809
+ case 'json':
7810
+ data = JSON.parse(xhr.responseText);
7811
+ break;
7812
+ case 'xml':
7813
+ data = xhr.responseXML;
7814
+ break;
7815
+ default:
7816
+ data = xhr.responseText;
7817
+ break;
7818
+ }
7819
+ success(data);
7820
+ } else if (typeof error === 'function') {
7821
+ error(xhr.status);
7822
+ }
7823
+ }
7824
+ };
7825
+
7826
+ xhr.send();
7827
+ }
7828
+ }
7829
+
7830
+ _mejs2.default.Utils = _mejs2.default.Utils || {};
7831
+ _mejs2.default.Utils.offset = offset;
7832
+ _mejs2.default.Utils.hasClass = hasClass;
7833
+ _mejs2.default.Utils.addClass = addClass;
7834
+ _mejs2.default.Utils.removeClass = removeClass;
7835
+ _mejs2.default.Utils.toggleClass = toggleClass;
7836
+ _mejs2.default.Utils.fadeIn = fadeIn;
7837
+ _mejs2.default.Utils.fadeOut = fadeOut;
7838
+ _mejs2.default.Utils.siblings = siblings;
7839
+ _mejs2.default.Utils.visible = visible;
7840
+ _mejs2.default.Utils.ajax = ajax;
7841
+ _mejs2.default.Utils.loadScript = loadScript;
7842
+
7843
+ },{"2":2,"3":3,"7":7}],27:[function(_dereq_,module,exports){
7844
+ 'use strict';
7845
+
7846
+ Object.defineProperty(exports, "__esModule", {
7847
+ value: true
7848
+ });
7849
+ exports.escapeHTML = escapeHTML;
7850
+ exports.debounce = debounce;
7851
+ exports.isObjectEmpty = isObjectEmpty;
7852
+ exports.splitEvents = splitEvents;
7853
+ exports.createEvent = createEvent;
7854
+ exports.isNodeAfter = isNodeAfter;
7855
+ exports.isString = isString;
7856
+
7857
+ var _mejs = _dereq_(7);
7858
+
7859
+ var _mejs2 = _interopRequireDefault(_mejs);
7860
+
7861
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7862
+
7863
+ function escapeHTML(input) {
7864
+
7865
+ if (typeof input !== 'string') {
7866
+ throw new Error('Argument passed must be a string');
7867
+ }
7868
+
7869
+ var map = {
7870
+ '&': '&amp;',
7871
+ '<': '&lt;',
7872
+ '>': '&gt;',
7873
+ '"': '&quot;'
7874
+ };
7875
+
7876
+ return input.replace(/[&<>"]/g, function (c) {
7877
+ return map[c];
7878
+ });
7879
+ }
7880
+
7881
+ function debounce(func, wait) {
7882
+ var _this = this,
7883
+ _arguments = arguments;
7884
+
7885
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7886
+
7887
+
7888
+ if (typeof func !== 'function') {
7889
+ throw new Error('First argument must be a function');
7890
+ }
7891
+
7892
+ if (typeof wait !== 'number') {
7893
+ throw new Error('Second argument must be a numeric value');
7894
+ }
7895
+
7896
+ var timeout = void 0;
7897
+ return function () {
7898
+ var context = _this,
7899
+ args = _arguments;
7900
+ var later = function later() {
7901
+ timeout = null;
7902
+ if (!immediate) {
7903
+ func.apply(context, args);
7904
+ }
7905
+ };
7906
+ var callNow = immediate && !timeout;
7907
+ clearTimeout(timeout);
7908
+ timeout = setTimeout(later, wait);
7909
+
7910
+ if (callNow) {
7911
+ func.apply(context, args);
7912
+ }
7913
+ };
7914
+ }
7915
+
7916
+ function isObjectEmpty(instance) {
7917
+ return Object.getOwnPropertyNames(instance).length <= 0;
7918
+ }
7919
+
7920
+ function splitEvents(events, id) {
7921
+ var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
7922
+
7923
+ var ret = { d: [], w: [] };
7924
+ (events || '').split(' ').forEach(function (v) {
7925
+ var eventName = '' + v + (id ? '.' + id : '');
7926
+
7927
+ if (eventName.startsWith('.')) {
7928
+ ret.d.push(eventName);
7929
+ ret.w.push(eventName);
7930
+ } else {
7931
+ ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
7932
+ }
7933
+ });
7934
+
7935
+ ret.d = ret.d.join(' ');
7936
+ ret.w = ret.w.join(' ');
7937
+ return ret;
7938
+ }
7939
+
7940
+ function createEvent(eventName, target) {
7941
+
7942
+ if (typeof eventName !== 'string') {
7943
+ throw new Error('Event name must be a string');
7944
+ }
7945
+
7946
+ var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
7947
+ detail = {
7948
+ target: target
7949
+ };
7950
+
7951
+ if (eventFrags !== null) {
7952
+ eventName = eventFrags[1];
7953
+ detail.namespace = eventFrags[2];
7954
+ }
7955
+
7956
+ return new window.CustomEvent(eventName, {
7957
+ detail: detail
7958
+ });
7959
+ }
7960
+
7961
+ function isNodeAfter(sourceNode, targetNode) {
7962
+
7963
+ return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
7964
+ }
7965
+
7966
+ function isString(value) {
7967
+ return typeof value === 'string';
7968
+ }
7969
+
7970
+ _mejs2.default.Utils = _mejs2.default.Utils || {};
7971
+ _mejs2.default.Utils.escapeHTML = escapeHTML;
7972
+ _mejs2.default.Utils.debounce = debounce;
7973
+ _mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
7974
+ _mejs2.default.Utils.splitEvents = splitEvents;
7975
+ _mejs2.default.Utils.createEvent = createEvent;
7976
+ _mejs2.default.Utils.isNodeAfter = isNodeAfter;
7977
+ _mejs2.default.Utils.isString = isString;
7978
+
7979
+ },{"7":7}],28:[function(_dereq_,module,exports){
7980
+ 'use strict';
7981
+
7982
+ Object.defineProperty(exports, "__esModule", {
7983
+ value: true
7984
+ });
7985
+ exports.typeChecks = undefined;
7986
+ exports.absolutizeUrl = absolutizeUrl;
7987
+ exports.formatType = formatType;
7988
+ exports.getMimeFromType = getMimeFromType;
7989
+ exports.getTypeFromFile = getTypeFromFile;
7990
+ exports.getExtension = getExtension;
7991
+ exports.normalizeExtension = normalizeExtension;
7992
+
7993
+ var _mejs = _dereq_(7);
7994
+
7995
+ var _mejs2 = _interopRequireDefault(_mejs);
7996
+
7997
+ var _general = _dereq_(27);
7998
+
7999
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8000
+
8001
+ var typeChecks = exports.typeChecks = [];
8002
+
8003
+ function absolutizeUrl(url) {
8004
+
8005
+ if (typeof url !== 'string') {
8006
+ throw new Error('`url` argument must be a string');
8007
+ }
8008
+
8009
+ var el = document.createElement('div');
8010
+ el.innerHTML = '<a href="' + (0, _general.escapeHTML)(url) + '">x</a>';
8011
+ return el.firstChild.href;
8012
+ }
8013
+
8014
+ function formatType(url) {
8015
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
8016
+
8017
+ return url && !type ? getTypeFromFile(url) : type;
8018
+ }
8019
+
8020
+ function getMimeFromType(type) {
8021
+
8022
+ if (typeof type !== 'string') {
8023
+ throw new Error('`type` argument must be a string');
8024
+ }
8025
+
8026
+ return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
8027
+ }
8028
+
8029
+ function getTypeFromFile(url) {
8030
+
8031
+ if (typeof url !== 'string') {
8032
+ throw new Error('`url` argument must be a string');
8033
+ }
8034
+
8035
+ for (var i = 0, total = typeChecks.length; i < total; i++) {
8036
+ var type = typeChecks[i](url);
8037
+
8038
+ if (type) {
8039
+ return type;
8040
+ }
8041
+ }
8042
+
8043
+ var ext = getExtension(url),
8044
+ normalizedExt = normalizeExtension(ext);
8045
+
8046
+ var mime = 'video/mp4';
8047
+
8048
+ if (normalizedExt) {
8049
+ if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg', 'mov'].indexOf(normalizedExt)) {
8050
+ mime = 'video/' + normalizedExt;
8051
+ } else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
8052
+ mime = 'audio/' + normalizedExt;
8053
+ }
8054
+ }
8055
+
8056
+ return mime;
8057
+ }
8058
+
8059
+ function getExtension(url) {
8060
+
8061
+ if (typeof url !== 'string') {
8062
+ throw new Error('`url` argument must be a string');
8063
+ }
8064
+
8065
+ var baseUrl = url.split('?')[0],
8066
+ baseName = baseUrl.split('\\').pop().split('/').pop();
8067
+ return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
8068
+ }
8069
+
8070
+ function normalizeExtension(extension) {
8071
+
8072
+ if (typeof extension !== 'string') {
8073
+ throw new Error('`extension` argument must be a string');
8074
+ }
8075
+
8076
+ switch (extension) {
8077
+ case 'mp4':
8078
+ case 'm4v':
8079
+ return 'mp4';
8080
+ case 'webm':
8081
+ case 'webma':
8082
+ case 'webmv':
8083
+ return 'webm';
8084
+ case 'ogg':
8085
+ case 'oga':
8086
+ case 'ogv':
8087
+ return 'ogg';
8088
+ default:
8089
+ return extension;
8090
+ }
8091
+ }
8092
+
8093
+ _mejs2.default.Utils = _mejs2.default.Utils || {};
8094
+ _mejs2.default.Utils.typeChecks = typeChecks;
8095
+ _mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
8096
+ _mejs2.default.Utils.formatType = formatType;
8097
+ _mejs2.default.Utils.getMimeFromType = getMimeFromType;
8098
+ _mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
8099
+ _mejs2.default.Utils.getExtension = getExtension;
8100
+ _mejs2.default.Utils.normalizeExtension = normalizeExtension;
8101
+
8102
+ },{"27":27,"7":7}],29:[function(_dereq_,module,exports){
8103
+ 'use strict';
8104
+
8105
+ var _document = _dereq_(2);
8106
+
8107
+ var _document2 = _interopRequireDefault(_document);
8108
+
8109
+ var _promisePolyfill = _dereq_(4);
8110
+
8111
+ var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);
8112
+
8113
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8114
+
8115
+ (function (arr) {
8116
+ arr.forEach(function (item) {
8117
+ if (item.hasOwnProperty('remove')) {
8118
+ return;
8119
+ }
8120
+ Object.defineProperty(item, 'remove', {
8121
+ configurable: true,
8122
+ enumerable: true,
8123
+ writable: true,
8124
+ value: function remove() {
8125
+ this.parentNode.removeChild(this);
8126
+ }
8127
+ });
8128
+ });
8129
+ })([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
8130
+
8131
+ (function () {
8132
+
8133
+ if (typeof window.CustomEvent === 'function') {
8134
+ return false;
8135
+ }
8136
+
8137
+ function CustomEvent(event, params) {
8138
+ params = params || { bubbles: false, cancelable: false, detail: undefined };
8139
+ var evt = _document2.default.createEvent('CustomEvent');
8140
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
8141
+ return evt;
8142
+ }
8143
+
8144
+ CustomEvent.prototype = window.Event.prototype;
8145
+ window.CustomEvent = CustomEvent;
8146
+ })();
8147
+
8148
+ if (typeof Object.assign !== 'function') {
8149
+ Object.assign = function (target) {
8150
+
8151
+ if (target === null || target === undefined) {
8152
+ throw new TypeError('Cannot convert undefined or null to object');
8153
+ }
8154
+
8155
+ var to = Object(target);
8156
+
8157
+ for (var index = 1, total = arguments.length; index < total; index++) {
8158
+ var nextSource = arguments[index];
8159
+
8160
+ if (nextSource !== null) {
8161
+ for (var nextKey in nextSource) {
8162
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
8163
+ to[nextKey] = nextSource[nextKey];
8164
+ }
8165
+ }
8166
+ }
8167
+ }
8168
+ return to;
8169
+ };
8170
+ }
8171
+
8172
+ if (!String.prototype.startsWith) {
8173
+ String.prototype.startsWith = function (searchString, position) {
8174
+ position = position || 0;
8175
+ return this.substr(position, searchString.length) === searchString;
8176
+ };
8177
+ }
8178
+
8179
+ if (!Element.prototype.matches) {
8180
+ Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
8181
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
8182
+ i = matches.length - 1;
8183
+ while (--i >= 0 && matches.item(i) !== this) {}
8184
+ return i > -1;
8185
+ };
8186
+ }
8187
+
8188
+ if (window.Element && !Element.prototype.closest) {
8189
+ Element.prototype.closest = function (s) {
8190
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
8191
+ i = void 0,
8192
+ el = this;
8193
+ do {
8194
+ i = matches.length;
8195
+ while (--i >= 0 && matches.item(i) !== el) {}
8196
+ } while (i < 0 && (el = el.parentElement));
8197
+ return el;
8198
+ };
8199
+ }
8200
+
8201
+ (function () {
8202
+ var lastTime = 0;
8203
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
8204
+ for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
8205
+ window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
8206
+ window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
8207
+ }
8208
+
8209
+ if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
8210
+ var currTime = new Date().getTime();
8211
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
8212
+ var id = window.setTimeout(function () {
8213
+ callback(currTime + timeToCall);
8214
+ }, timeToCall);
8215
+ lastTime = currTime + timeToCall;
8216
+ return id;
8217
+ };
8218
+
8219
+ if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
8220
+ clearTimeout(id);
8221
+ };
8222
+ })();
8223
+
8224
+ if (/firefox/i.test(navigator.userAgent)) {
8225
+ var getComputedStyle = window.getComputedStyle;
8226
+ window.getComputedStyle = function (el, pseudoEl) {
8227
+ var t = getComputedStyle(el, pseudoEl);
8228
+ return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
8229
+ };
8230
+ }
8231
+
8232
+ if (!window.Promise) {
8233
+ window.Promise = _promisePolyfill2.default;
8234
+ }
8235
+
8236
+ (function (constructor) {
8237
+ if (constructor && constructor.prototype && constructor.prototype.children === null) {
8238
+ Object.defineProperty(constructor.prototype, 'children', {
8239
+ get: function get() {
8240
+ var i = 0,
8241
+ node = void 0,
8242
+ nodes = this.childNodes,
8243
+ children = [];
8244
+ while (node = nodes[i++]) {
8245
+ if (node.nodeType === 1) {
8246
+ children.push(node);
8247
+ }
8248
+ }
8249
+ return children;
8250
+ }
8251
+ });
8252
+ }
8253
+ })(window.Node || window.Element);
8254
+
8255
+ },{"2":2,"4":4}],30:[function(_dereq_,module,exports){
8256
+ 'use strict';
8257
+
8258
+ Object.defineProperty(exports, "__esModule", {
8259
+ value: true
8260
+ });
8261
+ exports.isDropFrame = isDropFrame;
8262
+ exports.secondsToTimeCode = secondsToTimeCode;
8263
+ exports.timeCodeToSeconds = timeCodeToSeconds;
8264
+ exports.calculateTimeFormat = calculateTimeFormat;
8265
+ exports.convertSMPTEtoSeconds = convertSMPTEtoSeconds;
8266
+
8267
+ var _mejs = _dereq_(7);
8268
+
8269
+ var _mejs2 = _interopRequireDefault(_mejs);
8270
+
8271
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8272
+
8273
+ function isDropFrame() {
8274
+ var fps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25;
8275
+
8276
+ return !(fps % 1 === 0);
8277
+ }
8278
+ function secondsToTimeCode(time) {
8279
+ var forceHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
8280
+ var showFrameCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
8281
+ var fps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 25;
8282
+ var secondsDecimalLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
8283
+ var timeFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'hh:mm:ss';
8284
+
8285
+
8286
+ time = !time || typeof time !== 'number' || time < 0 ? 0 : time;
8287
+
8288
+ var dropFrames = Math.round(fps * 0.066666),
8289
+ timeBase = Math.round(fps),
8290
+ framesPer24Hours = Math.round(fps * 3600) * 24,
8291
+ framesPer10Minutes = Math.round(fps * 600),
8292
+ frameSep = isDropFrame(fps) ? ';' : ':',
8293
+ hours = void 0,
8294
+ minutes = void 0,
8295
+ seconds = void 0,
8296
+ frames = void 0,
8297
+ f = Math.round(time * fps);
8298
+
8299
+ if (isDropFrame(fps)) {
8300
+
8301
+ if (f < 0) {
8302
+ f = framesPer24Hours + f;
8303
+ }
8304
+
8305
+ f = f % framesPer24Hours;
8306
+
8307
+ var d = Math.floor(f / framesPer10Minutes);
8308
+ var m = f % framesPer10Minutes;
8309
+ f = f + dropFrames * 9 * d;
8310
+ if (m > dropFrames) {
8311
+ f = f + dropFrames * Math.floor((m - dropFrames) / Math.round(timeBase * 60 - dropFrames));
8312
+ }
8313
+
8314
+ var timeBaseDivision = Math.floor(f / timeBase);
8315
+
8316
+ hours = Math.floor(Math.floor(timeBaseDivision / 60) / 60);
8317
+ minutes = Math.floor(timeBaseDivision / 60) % 60;
8318
+
8319
+ if (showFrameCount) {
8320
+ seconds = timeBaseDivision % 60;
8321
+ } else {
8322
+ seconds = Math.floor(f / timeBase % 60).toFixed(secondsDecimalLength);
8323
+ }
8324
+ } else {
8325
+ hours = Math.floor(time / 3600) % 24;
8326
+ minutes = Math.floor(time / 60) % 60;
8327
+ if (showFrameCount) {
8328
+ seconds = Math.floor(time % 60);
8329
+ } else {
8330
+ seconds = Math.floor(time % 60).toFixed(secondsDecimalLength);
8331
+ }
8332
+ }
8333
+ hours = hours <= 0 ? 0 : hours;
8334
+ minutes = minutes <= 0 ? 0 : minutes;
8335
+ seconds = seconds <= 0 ? 0 : seconds;
8336
+
8337
+ seconds = seconds === 60 ? 0 : seconds;
8338
+ minutes = minutes === 60 ? 0 : minutes;
8339
+
8340
+ var timeFormatFrags = timeFormat.split(':');
8341
+ var timeFormatSettings = {};
8342
+ for (var i = 0, total = timeFormatFrags.length; i < total; ++i) {
8343
+ var unique = '';
8344
+ for (var j = 0, t = timeFormatFrags[i].length; j < t; j++) {
8345
+ if (unique.indexOf(timeFormatFrags[i][j]) < 0) {
8346
+ unique += timeFormatFrags[i][j];
8347
+ }
8348
+ }
8349
+ if (~['f', 's', 'm', 'h'].indexOf(unique)) {
8350
+ timeFormatSettings[unique] = timeFormatFrags[i].length;
8351
+ }
8352
+ }
8353
+
8354
+ var result = forceHours || hours > 0 ? (hours < 10 && timeFormatSettings.h > 1 ? '0' + hours : hours) + ':' : '';
8355
+ result += (minutes < 10 && timeFormatSettings.m > 1 ? '0' + minutes : minutes) + ':';
8356
+ result += '' + (seconds < 10 && timeFormatSettings.s > 1 ? '0' + seconds : seconds);
8357
+
8358
+ if (showFrameCount) {
8359
+ frames = (f % timeBase).toFixed(0);
8360
+ frames = frames <= 0 ? 0 : frames;
8361
+ result += frames < 10 && timeFormatSettings.f ? frameSep + '0' + frames : '' + frameSep + frames;
8362
+ }
8363
+
8364
+ return result;
8365
+ }
8366
+
8367
+ function timeCodeToSeconds(time) {
8368
+ var fps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
8369
+
8370
+
8371
+ if (typeof time !== 'string') {
8372
+ throw new TypeError('Time must be a string');
8373
+ }
8374
+
8375
+ if (time.indexOf(';') > 0) {
8376
+ time = time.replace(';', ':');
8377
+ }
8378
+
8379
+ if (!/\d{2}(\:\d{2}){0,3}/i.test(time)) {
8380
+ throw new TypeError('Time code must have the format `00:00:00`');
8381
+ }
8382
+
8383
+ var parts = time.split(':');
8384
+
8385
+ var output = void 0,
8386
+ hours = 0,
8387
+ minutes = 0,
8388
+ seconds = 0,
8389
+ frames = 0,
8390
+ totalMinutes = 0,
8391
+ dropFrames = Math.round(fps * 0.066666),
8392
+ timeBase = Math.round(fps),
8393
+ hFrames = timeBase * 3600,
8394
+ mFrames = timeBase * 60;
8395
+
8396
+ switch (parts.length) {
8397
+ default:
8398
+ case 1:
8399
+ seconds = parseInt(parts[0], 10);
8400
+ break;
8401
+ case 2:
8402
+ minutes = parseInt(parts[0], 10);
8403
+ seconds = parseInt(parts[1], 10);
8404
+ break;
8405
+ case 3:
8406
+ hours = parseInt(parts[0], 10);
8407
+ minutes = parseInt(parts[1], 10);
8408
+ seconds = parseInt(parts[2], 10);
8409
+ break;
8410
+ case 4:
8411
+ hours = parseInt(parts[0], 10);
8412
+ minutes = parseInt(parts[1], 10);
8413
+ seconds = parseInt(parts[2], 10);
8414
+ frames = parseInt(parts[3], 10);
8415
+ break;
8416
+ }
8417
+
8418
+ if (isDropFrame(fps)) {
8419
+ totalMinutes = 60 * hours + minutes;
8420
+ output = hFrames * hours + mFrames * minutes + timeBase * seconds + frames - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10));
8421
+ } else {
8422
+ output = (hFrames * hours + mFrames * minutes + fps * seconds + frames) / fps;
8423
+ }
8424
+
8425
+ return parseFloat(output.toFixed(3));
8426
+ }
8427
+
8428
+ function calculateTimeFormat(time, options) {
8429
+ var fps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 25;
8430
+
8431
+
8432
+ time = !time || typeof time !== 'number' || time < 0 ? 0 : time;
8433
+
8434
+ var hours = Math.floor(time / 3600) % 24,
8435
+ minutes = Math.floor(time / 60) % 60,
8436
+ seconds = Math.floor(time % 60),
8437
+ frames = Math.floor((time % 1 * fps).toFixed(3)),
8438
+ lis = [[frames, 'f'], [seconds, 's'], [minutes, 'm'], [hours, 'h']];
8439
+
8440
+ var format = options.timeFormat,
8441
+ firstTwoPlaces = format[1] === format[0],
8442
+ separatorIndex = firstTwoPlaces ? 2 : 1,
8443
+ separator = format.length < separatorIndex ? format[separatorIndex] : ':',
8444
+ firstChar = format[0],
8445
+ required = false;
8446
+
8447
+ for (var i = 0, len = lis.length; i < len; i++) {
8448
+ if (~format.indexOf(lis[i][1])) {
8449
+ required = true;
8450
+ } else if (required) {
8451
+ var hasNextValue = false;
8452
+ for (var j = i; j < len; j++) {
8453
+ if (lis[j][0] > 0) {
8454
+ hasNextValue = true;
8455
+ break;
8456
+ }
8457
+ }
8458
+
8459
+ if (!hasNextValue) {
8460
+ break;
8461
+ }
8462
+
8463
+ if (!firstTwoPlaces) {
8464
+ format = firstChar + format;
8465
+ }
8466
+ format = lis[i][1] + separator + format;
8467
+ if (firstTwoPlaces) {
8468
+ format = lis[i][1] + format;
8469
+ }
8470
+ firstChar = lis[i][1];
8471
+ }
8472
+ }
8473
+
8474
+ options.timeFormat = format;
8475
+ }
8476
+
8477
+ function convertSMPTEtoSeconds(SMPTE) {
8478
+
8479
+ if (typeof SMPTE !== 'string') {
8480
+ throw new TypeError('Argument must be a string value');
8481
+ }
8482
+
8483
+ SMPTE = SMPTE.replace(',', '.');
8484
+
8485
+ var decimalLen = ~SMPTE.indexOf('.') ? SMPTE.split('.')[1].length : 0;
8486
+
8487
+ var secs = 0,
8488
+ multiplier = 1;
8489
+
8490
+ SMPTE = SMPTE.split(':').reverse();
8491
+
8492
+ for (var i = 0, total = SMPTE.length; i < total; i++) {
8493
+ multiplier = 1;
8494
+ if (i > 0) {
8495
+ multiplier = Math.pow(60, i);
8496
+ }
8497
+ secs += Number(SMPTE[i]) * multiplier;
8498
+ }
8499
+ return Number(secs.toFixed(decimalLen));
8500
+ }
8501
+
8502
+ _mejs2.default.Utils = _mejs2.default.Utils || {};
8503
+ _mejs2.default.Utils.secondsToTimeCode = secondsToTimeCode;
8504
+ _mejs2.default.Utils.timeCodeToSeconds = timeCodeToSeconds;
8505
+ _mejs2.default.Utils.calculateTimeFormat = calculateTimeFormat;
8506
+ _mejs2.default.Utils.convertSMPTEtoSeconds = convertSMPTEtoSeconds;
8507
+
8508
+ },{"7":7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]);
mediaelement/v4/mediaelement-and-player.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * MediaElement.js
3
+ * http://www.mediaelementjs.com/
4
+ *
5
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
6
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
7
+ *
8
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
9
+ * License: MIT
10
+ *
11
+ */
12
+ !function e(t,n,i){function o(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n||e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,t,n){},{}],2:[function(e,t,n){(function(n){var i,o=void 0!==n?n:"undefined"!=typeof window?window:{},r=e(1);"undefined"!=typeof document?i=document:(i=o["__GLOBAL_DOCUMENT_CACHE@4"])||(i=o["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,t,n){(function(e){var n;n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,n){!function(e){function n(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,i._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void a(t.promise,e)}r(t.promise,i)}else(1===e._state?r:a)(t.promise,e._value)})):e._deferreds.push(t)}function r(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(t){a(e,t)}}function a(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,r(t,e))},function(e){n||(n=!0,a(t,e))})}catch(e){if(n)return;n=!0,a(t,e)}}var d=setTimeout;i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var i=new this.constructor(n);return o(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,i)),i},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function i(r,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){i(r,e)},n)}t[r]=a,0==--o&&e(t)}catch(e){n(e)}}if(0===t.length)return e([]);for(var o=t.length,r=0;r<t.length;r++)i(r,t[r])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){for(var i=0,o=e.length;i<o;i++)e[i].then(t,n)})},i._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){d(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=i:e.Promise||(e.Promise=i)}(this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e){return e&&e.__esModule?e:{default:e}}(e(7)),r=e(15),a=e(27),s={lang:"en",en:r.EN};s.language=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(null!==t&&void 0!==t&&t.length){if("string"!=typeof t[0])throw new TypeError("Language code must be a string value");if(!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(t[0]))throw new TypeError("Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters");s.lang=t[0],void 0===s[t[0]]?(t[1]=null!==t[1]&&void 0!==t[1]&&"object"===i(t[1])?t[1]:{},s[t[0]]=(0,a.isObjectEmpty)(t[1])?r.EN:t[1]):null!==t[1]&&void 0!==t[1]&&"object"===i(t[1])&&(s[t[0]]=t[1])}return s.lang},s.t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,o=void 0,r=s.language(),l=function(e,t,n){if("object"!==(void 0===e?"undefined":i(e))||"number"!=typeof t||"number"!=typeof n)return e;return[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])>2&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])%100>0&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])>=2&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])>2&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])>6&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100>=3&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:(arguments.length<=0?void 0:arguments[0])%100>=11?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])%100>1&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100>10&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==s[r]&&(n=s[r][e],null!==t&&"number"==typeof t&&(o=s[r]["mejs.plural-form"],n=l.apply(null,[n,t,o]))),!n&&s.en&&(n=s.en[e],null!==t&&"number"==typeof t&&(o=s.en["mejs.plural-form"],n=l.apply(null,[n,t,o]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,a.escapeHTML)(n)}return e},o.default.i18n=s,"undefined"!=typeof mejsL10n&&o.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=s},{15:15,27:27,7:7}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=i(e(3)),a=i(e(2)),s=i(e(7)),l=e(27),d=e(28),u=e(8),c=e(25),f=function e(t,n,i){var f=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var p=this;i=Array.isArray(i)?i:null,p.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(p.defaults,n),p.mediaElement=a.default.createElement(n.fakeNodeName);var m=t,h=!1;if("string"==typeof t?p.mediaElement.originalNode=a.default.getElementById(t):(p.mediaElement.originalNode=t,m=t.id),void 0===p.mediaElement.originalNode||null===p.mediaElement.originalNode)return null;p.mediaElement.options=n,m=m||"mejs_"+Math.random().toString().slice(2),p.mediaElement.originalNode.setAttribute("id",m+"_from_mejs");var v=p.mediaElement.originalNode.tagName.toLowerCase();["video","audio"].indexOf(v)>-1&&!p.mediaElement.originalNode.getAttribute("preload")&&p.mediaElement.originalNode.setAttribute("preload","none"),p.mediaElement.originalNode.parentNode.insertBefore(p.mediaElement,p.mediaElement.originalNode),p.mediaElement.appendChild(p.mediaElement.originalNode);var g=function(e,t){if("https:"===r.default.location.protocol&&0===e.indexOf("http:")&&c.IS_IOS&&s.default.html5media.mediaTypes.indexOf(t)>-1){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var t=(r.default.URL||r.default.webkitURL).createObjectURL(this.response);return p.mediaElement.originalNode.setAttribute("src",t),t}return e},n.open("GET",e),n.responseType="blob",n.send()}return e},y=void 0;if(null!==i)y=i;else if(null!==p.mediaElement.originalNode)switch(y=[],p.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":y.push({type:"",src:p.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var E=p.mediaElement.originalNode.children.length,b=p.mediaElement.originalNode.getAttribute("src");if(b){var S=p.mediaElement.originalNode,x=(0,d.formatType)(b,S.getAttribute("type"));y.push({type:x,src:g(b,x)})}for(var w=0;w<E;w++){var P=p.mediaElement.originalNode.children[w];if("source"===P.tagName.toLowerCase()){var T=P.getAttribute("src"),C=(0,d.formatType)(T,P.getAttribute("type"));y.push({type:C,src:g(T,C)})}}}p.mediaElement.id=m,p.mediaElement.renderers={},p.mediaElement.events={},p.mediaElement.promises=[],p.mediaElement.renderer=null,p.mediaElement.rendererName=null,p.mediaElement.changeRenderer=function(e,t){var n=f,i=Object.keys(t[0]).length>2?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(i),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var o=n.mediaElement.renderers[e],r=null;if(void 0!==o&&null!==o)return o.show(),o.setSrc(i),n.mediaElement.renderer=o,n.mediaElement.rendererName=e,!0;for(var a=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:u.renderer.order,s=0,l=a.length;s<l;s++){var d=a[s];if(d===e){r=u.renderer.renderers[d];var c=Object.assign(r.options,n.mediaElement.options);return o=r.create(n.mediaElement,c,t),o.name=e,n.mediaElement.renderers[r.name]=o,n.mediaElement.renderer=o,n.mediaElement.rendererName=e,o.show(),!0}}return!1},p.mediaElement.setSize=function(e,t){void 0!==p.mediaElement.renderer&&null!==p.mediaElement.renderer&&p.mediaElement.renderer.setSize(e,t)},p.mediaElement.generateError=function(e,t){e=e||"",t=Array.isArray(t)?t:[];var n=(0,l.createEvent)("error",p.mediaElement);n.message=e,n.urls=t,p.mediaElement.dispatchEvent(n),h=!0};var k=s.default.html5media.properties,_=s.default.html5media.methods,N=function(e,t,n,i){var o=e[t];Object.defineProperty(e,t,{get:function(){return n.apply(e,[o])},set:function(t){return o=i.apply(e,[t])}})},A=function(e){if("src"!==e){var t=""+e.substring(0,1).toUpperCase()+e.substring(1),n=function(){return void 0!==p.mediaElement.renderer&&null!==p.mediaElement.renderer&&"function"==typeof p.mediaElement.renderer["get"+t]?p.mediaElement.renderer["get"+t]():null},i=function(e){void 0!==p.mediaElement.renderer&&null!==p.mediaElement.renderer&&"function"==typeof p.mediaElement.renderer["set"+t]&&p.mediaElement.renderer["set"+t](e)};N(p.mediaElement,e,n,i),p.mediaElement["get"+t]=n,p.mediaElement["set"+t]=i}},L=function(){return void 0!==p.mediaElement.renderer&&null!==p.mediaElement.renderer?p.mediaElement.renderer.getSrc():null},F=function(e){var t=[];if("string"==typeof e)t.push({src:e,type:e?(0,d.getTypeFromFile)(e):""});else if("object"===(void 0===e?"undefined":o(e))&&void 0!==e.src){var n=(0,d.absolutizeUrl)(e.src),i=e.type,r=Object.assign(e,{src:n,type:""!==i&&null!==i&&void 0!==i||!n?i:(0,d.getTypeFromFile)(n)});t.push(r)}else if(Array.isArray(e))for(var a=0,s=e.length;a<s;a++){var c=(0,d.absolutizeUrl)(e[a].src),f=e[a].type,m=Object.assign(e[a],{src:c,type:""!==f&&null!==f&&void 0!==f||!c?f:(0,d.getTypeFromFile)(c)});t.push(m)}var h=u.renderer.select(t,p.mediaElement.options.renderers.length?p.mediaElement.options.renderers:[]),v=void 0;if(p.mediaElement.paused||(p.mediaElement.pause(),v=(0,l.createEvent)("pause",p.mediaElement),p.mediaElement.dispatchEvent(v)),p.mediaElement.originalNode.src=t[0].src||"",null!==h||!t[0].src)return t[0].src?p.mediaElement.changeRenderer(h.rendererName,t):null;p.mediaElement.generateError("No renderer found",t)},j=function(e,t){try{if("play"===e&&"native_dash"===p.mediaElement.rendererName){var n=p.mediaElement.renderer[e](t);n&&"function"==typeof n.then&&n.catch(function(){p.mediaElement.paused&&setTimeout(function(){var e=p.mediaElement.renderer.play();void 0!==e&&e.catch(function(){p.mediaElement.renderer.paused||p.mediaElement.renderer.pause()})},150)})}else p.mediaElement.renderer[e](t)}catch(e){p.mediaElement.generateError(e,y)}},I=function(e){p.mediaElement[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return void 0!==p.mediaElement.renderer&&null!==p.mediaElement.renderer&&"function"==typeof p.mediaElement.renderer[e]&&(p.mediaElement.promises.length?Promise.all(p.mediaElement.promises).then(function(){j(e,n)}).catch(function(e){p.mediaElement.generateError(e,y)}):j(e,n)),null}};N(p.mediaElement,"src",L,F),p.mediaElement.getSrc=L,p.mediaElement.setSrc=F;for(var M=0,O=k.length;M<O;M++)A(k[M]);for(var D=0,V=_.length;D<V;D++)I(_[D]);return p.mediaElement.addEventListener=function(e,t){p.mediaElement.events[e]=p.mediaElement.events[e]||[],p.mediaElement.events[e].push(t)},p.mediaElement.removeEventListener=function(e,t){if(!e)return p.mediaElement.events={},!0;var n=p.mediaElement.events[e];if(!n)return!0;if(!t)return p.mediaElement.events[e]=[],!0;for(var i=0;i<n.length;i++)if(n[i]===t)return p.mediaElement.events[e].splice(i,1),!0;return!1},p.mediaElement.dispatchEvent=function(e){var t=p.mediaElement.events[e.type];if(t)for(var n=0;n<t.length;n++)t[n].apply(null,[e])},p.mediaElement.destroy=function(){var e=p.mediaElement.originalNode.cloneNode(!0),t=p.mediaElement.parentElement;e.removeAttribute("id"),e.remove(),p.mediaElement.remove(),t.append(e)},y.length&&(p.mediaElement.src=y),p.mediaElement.promises.length?Promise.all(p.mediaElement.promises).then(function(){p.mediaElement.options.success&&p.mediaElement.options.success(p.mediaElement,p.mediaElement.originalNode)}).catch(function(){h&&p.mediaElement.options.error&&p.mediaElement.options.error(p.mediaElement,p.mediaElement.originalNode)}):(p.mediaElement.options.success&&p.mediaElement.options.success(p.mediaElement,p.mediaElement.originalNode),h&&p.mediaElement.options.error&&p.mediaElement.options.error(p.mediaElement,p.mediaElement.originalNode)),p.mediaElement};r.default.MediaElement=f,s.default.MediaElement=f,n.default=f},{2:2,25:25,27:27,28:28,3:3,7:7,8:8}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(e(3)),o={};o.version="4.2.8",o.html5media={properties:["volume","src","currentTime","muted","duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable","currentSrc","preload","bufferedBytes","bufferedTime","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","autoplay","loop","controls"],readOnlyProperties:["duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable"],methods:["load","play","pause","canPlayType"],events:["loadstart","durationchange","loadedmetadata","loadeddata","progress","canplay","canplaythrough","suspend","abort","error","emptied","stalled","play","playing","pause","waiting","seeking","seeked","timeupdate","ended","ratechange","volumechange"],mediaTypes:["audio/mp3","audio/ogg","audio/oga","audio/wav","audio/x-wav","audio/wave","audio/x-pn-wav","audio/mpeg","audio/mp4","video/mp4","video/webm","video/ogg","video/ogv"]},i.default.mejs=o,n.default=o},{3:3}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderer=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(e){return e&&e.__esModule?e:{default:e}}(e(7)),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return o(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var i=[/^(html5|native)/i,/^flash/i,/iframe$/i],o=function(e){for(var t=0,n=i.length;t<n;t++)if(i[t].test(e))return t;return i.length};t.sort(function(e,t){return o(e)-o(t)})}for(var r=0,a=t.length;r<a;r++){var s=t[r],l=this.renderers[s];if(null!==l&&void 0!==l)for(var d=0,u=e.length;d<u;d++)if("function"==typeof l.canPlayType&&"string"==typeof e[d].type&&l.canPlayType(e[d].type))return{rendererName:l.name,src:e[d].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":i(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),s=n.renderer=new a;r.default.Renderers=s},{7:7}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e(3)),r=i(e(2)),a=i(e(5)),s=e(16),l=i(s),d=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e(25)),u=e(27),c=e(26),f=e(28);Object.assign(s.config,{usePluginFullScreen:!0,fullscreenText:null,useFakeFullscreen:!1}),Object.assign(l.default.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,isPluginClickThroughCreated:!1,fullscreenMode:"",containerSizeTimeout:null,buildfullscreen:function(e){if(e.isVideo){e.isInIframe=o.default.location!==o.default.parent.location,e.detectFullscreenMode();var t=this,n=(0,u.isString)(t.options.fullscreenText)?t.options.fullscreenText:a.default.t("mejs.fullscreen"),i=r.default.createElement("div");if(i.className=t.options.classPrefix+"button "+t.options.classPrefix+"fullscreen-button",i.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+n+'" aria-label="'+n+'" tabindex="0"></button>',t.addControlElement(i,"fullscreen"),i.addEventListener("click",function(){d.HAS_TRUE_NATIVE_FULLSCREEN&&d.IS_FULLSCREEN||e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}),e.fullscreenBtn=i,t.options.keyActions.push({keys:[70],action:function(e,t,n,i){i.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),t.exitFullscreenCallback=function(n){27===(n.which||n.keyCode||0)&&(d.HAS_TRUE_NATIVE_FULLSCREEN&&d.IS_FULLSCREEN||t.isFullScreen)&&e.exitFullScreen()},t.globalBind("keydown",t.exitFullscreenCallback),t.normalHeight=0,t.normalWidth=0,d.HAS_TRUE_NATIVE_FULLSCREEN){e.globalBind(d.FULLSCREEN_EVENT_NAME,function(){e.isFullScreen&&(d.isFullScreen()?(e.isNativeFullScreen=!0,e.setControlsSize()):(e.isNativeFullScreen=!1,e.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return d.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":d.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&d.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t,t},enterFullScreen:function(){var e=this,t=null!==e.media.rendererName&&/(html5|native)/i.test(e.media.rendererName),n=getComputedStyle(e.getElement(e.container));if(!1===e.options.useFakeFullscreen&&d.IS_IOS&&d.HAS_IOS_FULLSCREEN&&"function"==typeof e.media.originalNode.webkitEnterFullscreen&&e.media.originalNode.canPlayType((0,f.getTypeFromFile)(e.media.getSrc())))e.media.originalNode.webkitEnterFullscreen();else{if((0,c.addClass)(r.default.documentElement,e.options.classPrefix+"fullscreen"),(0,c.addClass)(e.getElement(e.container),e.options.classPrefix+"container-fullscreen"),e.normalHeight=parseFloat(n.height),e.normalWidth=parseFloat(n.width),"native-native"!==e.fullscreenMode&&"plugin-native"!==e.fullscreenMode||(d.requestFullScreen(e.getElement(e.container)),e.isInIframe&&setTimeout(function t(){if(e.isNativeFullScreen){var n=o.default.innerWidth||r.default.documentElement.clientWidth||r.default.body.clientWidth,i=screen.width;Math.abs(i-n)>.002*i?e.exitFullScreen():setTimeout(t,500)}},1e3)),e.getElement(e.container).style.width="100%",e.getElement(e.container).style.height="100%",e.containerSizeTimeout=setTimeout(function(){e.getElement(e.container).style.width="100%",e.getElement(e.container).style.height="100%",e.setControlsSize()},500),t)e.node.style.width="100%",e.node.style.height="100%";else for(var i=e.getElement(e.container).querySelectorAll("embed, object, video"),a=i.length,s=0;s<a;s++)i[s].style.width="100%",i[s].style.height="100%";e.options.setDimensions&&"function"==typeof e.media.setSize&&e.media.setSize(screen.width,screen.height);for(var l=e.getElement(e.layers).children,p=l.length,m=0;m<p;m++)l[m].style.width="100%",l[m].style.height="100%";e.fullscreenBtn&&((0,c.removeClass)(e.fullscreenBtn,e.options.classPrefix+"fullscreen"),(0,c.addClass)(e.fullscreenBtn,e.options.classPrefix+"unfullscreen")),e.setControlsSize(),e.isFullScreen=!0;var h=Math.min(screen.width/e.width,screen.height/e.height),v=e.getElement(e.container).querySelector("."+e.options.classPrefix+"captions-text");v&&(v.style.fontSize=100*h+"%",v.style.lineHeight="normal",e.getElement(e.container).querySelector("."+e.options.classPrefix+"captions-position").style.bottom=(screen.height-e.normalHeight)/2-e.getElement(e.controls).offsetHeight/2+h+15+"px");var g=(0,u.createEvent)("enteredfullscreen",e.getElement(e.container));e.getElement(e.container).dispatchEvent(g)}},exitFullScreen:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName);if(clearTimeout(this.containerSizeTimeout),d.HAS_TRUE_NATIVE_FULLSCREEN&&(d.IS_FULLSCREEN||this.isFullScreen)&&d.cancelFullScreen(),(0,c.removeClass)(r.default.documentElement,this.options.classPrefix+"fullscreen"),(0,c.removeClass)(this.getElement(this.container),this.options.classPrefix+"container-fullscreen"),this.options.setDimensions){if(this.getElement(this.container).style.width=this.normalWidth+"px",this.getElement(this.container).style.height=this.normalHeight+"px",e)this.node.style.width=this.normalWidth+"px",this.node.style.height=this.normalHeight+"px";else for(var t=this.getElement(this.container).querySelectorAll("embed, object, video"),n=t.length,i=0;i<n;i++)t[i].style.width=this.normalWidth+"px",t[i].style.height=this.normalHeight+"px";"function"==typeof this.media.setSize&&this.media.setSize(this.normalWidth,this.normalHeight);for(var o=this.getElement(this.layers).children,a=o.length,s=0;s<a;s++)o[s].style.width=this.normalWidth+"px",o[s].style.height=this.normalHeight+"px"}this.fullscreenBtn&&((0,c.removeClass)(this.fullscreenBtn,this.options.classPrefix+"unfullscreen"),(0,c.addClass)(this.fullscreenBtn,this.options.classPrefix+"fullscreen")),this.setControlsSize(),this.isFullScreen=!1;var l=this.getElement(this.container).querySelector("."+this.options.classPrefix+"captions-text");l&&(l.style.fontSize="",l.style.lineHeight="",this.getElement(this.container).querySelector("."+this.options.classPrefix+"captions-position").style.bottom="");var f=(0,u.createEvent)("exitedfullscreen",this.getElement(this.container));this.getElement(this.container).dispatchEvent(f)}})},{16:16,2:2,25:25,26:26,27:27,28:28,3:3,5:5}],10:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e(2)),r=e(16),a=i(r),s=i(e(5)),l=e(27),d=e(26);Object.assign(r.config,{playText:null,pauseText:null}),Object.assign(a.default.prototype,{buildplaypause:function(e,t,n,i){function r(e){"play"===e?((0,d.removeClass)(p,a.options.classPrefix+"play"),(0,d.removeClass)(p,a.options.classPrefix+"replay"),(0,d.addClass)(p,a.options.classPrefix+"pause"),m.setAttribute("title",f),m.setAttribute("aria-label",f)):((0,d.removeClass)(p,a.options.classPrefix+"pause"),(0,d.removeClass)(p,a.options.classPrefix+"replay"),(0,d.addClass)(p,a.options.classPrefix+"play"),m.setAttribute("title",c),m.setAttribute("aria-label",c))}var a=this,u=a.options,c=(0,l.isString)(u.playText)?u.playText:s.default.t("mejs.play"),f=(0,l.isString)(u.pauseText)?u.pauseText:s.default.t("mejs.pause"),p=o.default.createElement("div");p.className=a.options.classPrefix+"button "+a.options.classPrefix+"playpause-button "+a.options.classPrefix+"play",p.innerHTML='<button type="button" aria-controls="'+a.id+'" title="'+c+'" aria-label="'+f+'" tabindex="0"></button>',p.addEventListener("click",function(){a.paused?a.play():a.pause()});var m=p.querySelector("button");a.addControlElement(p,"playpause"),r("pse"),i.addEventListener("loadedmetadata",function(){-1===i.rendererName.indexOf("flash")&&r("pse")}),i.addEventListener("play",function(){r("play")}),i.addEventListener("playing",function(){r("play")}),i.addEventListener("pause",function(){r("pse")}),i.addEventListener("ended",function(){e.options.loop||((0,d.removeClass)(p,a.options.classPrefix+"pause"),(0,d.removeClass)(p,a.options.classPrefix+"play"),(0,d.addClass)(p,a.options.classPrefix+"replay"),m.setAttribute("title",c),m.setAttribute("aria-label",c))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e(2)),r=e(16),a=i(r),s=i(e(5)),l=e(25),d=e(30),u=e(26);Object.assign(r.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(a.default.prototype,{buildprogress:function(e,t,n,i){var a=0,c=!1,f=!1,p=this,m=e.options.autoRewind,h=e.options.enableProgressTooltip?'<span class="'+p.options.classPrefix+'time-float"><span class="'+p.options.classPrefix+'time-float-current">00:00</span><span class="'+p.options.classPrefix+'time-float-corner"></span></span>':"",v=o.default.createElement("div");v.className=p.options.classPrefix+"time-rail",v.innerHTML='<span class="'+p.options.classPrefix+"time-total "+p.options.classPrefix+'time-slider"><span class="'+p.options.classPrefix+'time-buffering"></span><span class="'+p.options.classPrefix+'time-loaded"></span><span class="'+p.options.classPrefix+'time-current"></span><span class="'+p.options.classPrefix+'time-hovered no-hover"></span><span class="'+p.options.classPrefix+'time-handle"><span class="'+p.options.classPrefix+'time-handle-content"></span></span>'+h+"</span>",p.addControlElement(v,"progress"),p.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&e.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer()),e.getElement(e.container).querySelector("."+r.config.classPrefix+"time-total").focus();var t=Math.max(e.currentTime-e.options.defaultSeekBackwardInterval(e),0);e.setCurrentTime(t)}}},{keys:[39,228],action:function(e){if(!isNaN(e.duration)&&e.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer()),e.getElement(e.container).querySelector("."+r.config.classPrefix+"time-total").focus();var t=Math.min(e.currentTime+e.options.defaultSeekForwardInterval(e),e.duration);e.setCurrentTime(t)}}}),p.rail=t.querySelector("."+p.options.classPrefix+"time-rail"),p.total=t.querySelector("."+p.options.classPrefix+"time-total"),p.loaded=t.querySelector("."+p.options.classPrefix+"time-loaded"),p.current=t.querySelector("."+p.options.classPrefix+"time-current"),p.handle=t.querySelector("."+p.options.classPrefix+"time-handle"),p.timefloat=t.querySelector("."+p.options.classPrefix+"time-float"),p.timefloatcurrent=t.querySelector("."+p.options.classPrefix+"time-float-current"),p.slider=t.querySelector("."+p.options.classPrefix+"time-slider"),p.hovered=t.querySelector("."+p.options.classPrefix+"time-hovered"),p.buffer=t.querySelector("."+p.options.classPrefix+"time-buffering"),p.newTime=0,p.forcedHandlePause=!1,p.setTransformStyle=function(e,t){e.style.transform=t,e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t},p.buffer.style.display="none";var g=function(t){var n=getComputedStyle(p.total),i=(0,u.offset)(p.total),o=p.total.offsetWidth,r=void 0!==n.webkitTransform?"webkitTransform":void 0!==n.mozTransform?"mozTransform ":void 0!==n.oTransform?"oTransform":void 0!==n.msTransform?"msTransform":"transform",a="WebKitCSSMatrix"in window?"WebKitCSSMatrix":"MSCSSMatrix"in window?"MSCSSMatrix":"CSSMatrix"in window?"CSSMatrix":void 0,s=0,f=0,m=0,h=void 0;if(h=t.originalEvent&&t.originalEvent.changedTouches?t.originalEvent.changedTouches[0].pageX:t.changedTouches?t.changedTouches[0].pageX:t.pageX,p.getDuration()){if(h<i.left?h=i.left:h>o+i.left&&(h=o+i.left),m=h-i.left,s=m/o,p.newTime=s<=.02?0:s*p.getDuration(),c&&null!==p.getCurrentTime()&&p.newTime.toFixed(4)!==p.getCurrentTime().toFixed(4)&&(p.setCurrentRailHandle(p.newTime),p.updateCurrent(p.newTime)),!l.IS_IOS&&!l.IS_ANDROID){if(m<0&&(m=0),p.options.useSmoothHover&&null!==a&&void 0!==window[a]){var v=new window[a](getComputedStyle(p.handle)[r]).m41,g=m/parseFloat(getComputedStyle(p.total).width)-v/parseFloat(getComputedStyle(p.total).width);p.hovered.style.left=v+"px",p.setTransformStyle(p.hovered,"scaleX("+g+")"),p.hovered.setAttribute("pos",m),g>=0?(0,u.removeClass)(p.hovered,"negative"):(0,u.addClass)(p.hovered,"negative")}if(p.timefloat){var y=p.timefloat.offsetWidth/2,E=mejs.Utils.offset(p.getElement(p.container)),b=getComputedStyle(p.timefloat);f=h-E.left<p.timefloat.offsetWidth?y:h-E.left>=p.getElement(p.container).offsetWidth-y?p.total.offsetWidth-y:m,(0,u.hasClass)(p.getElement(p.container),p.options.classPrefix+"long-video")&&(f+=parseFloat(b.marginLeft)/2+p.timefloat.offsetWidth/2),p.timefloat.style.left=f+"px",p.timefloatcurrent.innerHTML=(0,d.secondsToTimeCode)(p.newTime,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat),p.timefloat.style.display="block"}}}else l.IS_IOS||l.IS_ANDROID||!p.timefloat||(f=p.timefloat.offsetWidth+o>=p.getElement(p.container).offsetWidth?p.timefloat.offsetWidth/2:0,p.timefloat.style.left=f+"px",p.timefloat.style.left=f+"px",p.timefloat.style.display="block")},y=function(){new Date-a>=1e3&&p.play()},E=function(){c&&null!==p.getCurrentTime()&&p.newTime.toFixed(4)!==p.getCurrentTime().toFixed(4)&&(p.setCurrentTime(p.newTime),p.setCurrentRail(),p.updateCurrent(p.newTime)),p.forcedHandlePause&&(p.slider.focus(),p.play()),p.forcedHandlePause=!1};p.slider.addEventListener("focus",function(){e.options.autoRewind=!1}),p.slider.addEventListener("blur",function(){e.options.autoRewind=m}),p.slider.addEventListener("keydown",function(t){if(new Date-a>=1e3&&(f=p.paused),p.options.keyActions.length){var n=t.which||t.keyCode||0,o=p.getDuration(),r=e.options.defaultSeekForwardInterval(i),s=e.options.defaultSeekBackwardInterval(i),d=p.getCurrentTime(),u=p.getElement(p.container).querySelector("."+p.options.classPrefix+"volume-slider");if(38===n||40===n){u&&(u.style.display="block"),p.isVideo&&(p.showControls(),p.startControlsTimer());var c=38===n?Math.min(p.volume+.1,1):Math.max(p.volume-.1,0),m=c<=0;return p.setVolume(c),void p.setMuted(m)}switch(u&&(u.style.display="none"),n){case 37:p.getDuration()!==1/0&&(d-=s);break;case 39:p.getDuration()!==1/0&&(d+=r);break;case 36:d=0;break;case 35:d=o;break;case 13:case 32:return void(l.IS_FIREFOX&&(p.paused?p.play():p.pause()));default:return}d=d<0?0:d>=o?o:Math.floor(d),a=new Date,f||e.pause(),d<p.getDuration()&&!f&&setTimeout(y,1100),p.setCurrentTime(d),e.showControls(),t.preventDefault(),t.stopPropagation()}});var b=["mousedown","touchstart"];p.slider.addEventListener("dragstart",function(){return!1});for(var S=0,x=b.length;S<x;S++)p.slider.addEventListener(b[S],function(e){if(p.forcedHandlePause=!1,p.getDuration()!==1/0&&(1===e.which||0===e.which)){p.paused||(p.pause(),p.forcedHandlePause=!0),c=!0,g(e);for(var t=["mouseup","touchend"],n=0,i=t.length;n<i;n++)p.getElement(p.container).addEventListener(t[n],function(e){var t=e.target;(t===p.slider||t.closest("."+p.options.classPrefix+"time-slider"))&&g(e)});p.globalBind("mouseup.dur touchend.dur",function(){E(),c=!1,p.timefloat&&(p.timefloat.style.display="none")})}},!(!l.SUPPORT_PASSIVE_EVENT||"touchstart"!==b[S])&&{passive:!0});p.slider.addEventListener("mouseenter",function(e){e.target===p.slider&&p.getDuration()!==1/0&&(p.getElement(p.container).addEventListener("mousemove",function(e){var t=e.target;(t===p.slider||t.closest("."+p.options.classPrefix+"time-slider"))&&g(e)}),!p.timefloat||l.IS_IOS||l.IS_ANDROID||(p.timefloat.style.display="block"),p.hovered&&!l.IS_IOS&&!l.IS_ANDROID&&p.options.useSmoothHover&&(0,u.removeClass)(p.hovered,"no-hover"))}),p.slider.addEventListener("mouseleave",function(){p.getDuration()!==1/0&&(c||(p.timefloat&&(p.timefloat.style.display="none"),p.hovered&&p.options.useSmoothHover&&(0,u.addClass)(p.hovered,"no-hover")))}),p.broadcastCallback=function(n){var r=t.querySelector("."+p.options.classPrefix+"broadcast");if(p.options.forceLive||p.getDuration()===1/0){if(!r||p.options.forceLive){var a=o.default.createElement("span");a.className=p.options.classPrefix+"broadcast",a.innerText=s.default.t("mejs.live-broadcast"),p.slider.style.display="none",p.rail.appendChild(a)}}else r&&(p.slider.style.display="",r.remove()),e.setProgressRail(n),p.forcedHandlePause||e.setCurrentRail(n),function(){var t=p.getCurrentTime(),n=s.default.t("mejs.time-slider"),o=(0,d.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat),r=p.getDuration();p.slider.setAttribute("role","slider"),p.slider.tabIndex=0,i.paused?(p.slider.setAttribute("aria-label",n),p.slider.setAttribute("aria-valuemin",0),p.slider.setAttribute("aria-valuemax",r),p.slider.setAttribute("aria-valuenow",t),p.slider.setAttribute("aria-valuetext",o)):(p.slider.removeAttribute("aria-label"),p.slider.removeAttribute("aria-valuemin"),p.slider.removeAttribute("aria-valuemax"),p.slider.removeAttribute("aria-valuenow"),p.slider.removeAttribute("aria-valuetext"))}()},i.addEventListener("progress",p.broadcastCallback),i.addEventListener("timeupdate",p.broadcastCallback),i.addEventListener("play",function(){p.buffer.style.display="none"}),i.addEventListener("playing",function(){p.buffer.style.display="none"}),i.addEventListener("seeking",function(){p.buffer.style.display=""}),i.addEventListener("seeked",function(){p.buffer.style.display="none"}),i.addEventListener("pause",function(){p.buffer.style.display="none"}),i.addEventListener("waiting",function(){p.buffer.style.display=""}),i.addEventListener("loadeddata",function(){p.buffer.style.display=""}),i.addEventListener("canplay",function(){p.buffer.style.display="none"}),i.addEventListener("error",function(){p.buffer.style.display="none"}),p.getElement(p.container).addEventListener("controlsresize",function(t){p.getDuration()!==1/0&&(e.setProgressRail(t),p.forcedHandlePause||e.setCurrentRail(t))})},cleanprogress:function(e,t,n,i){i.removeEventListener("progress",e.broadcastCallback),i.removeEventListener("timeupdate",e.broadcastCallback),e.rail&&e.rail.remove()},setProgressRail:function(e){var t=void 0!==e?e.detail.target||e.target:this.media,n=null;t&&t.buffered&&t.buffered.length>0&&t.buffered.end&&this.getDuration()?n=t.buffered.end(t.buffered.length-1)/this.getDuration():t&&void 0!==t.bytesTotal&&t.bytesTotal>0&&void 0!==t.bufferedBytes?n=t.bufferedBytes/t.bytesTotal:e&&e.lengthComputable&&0!==e.total&&(n=e.loaded/e.total),null!==n&&(n=Math.min(1,Math.max(0,n)),this.loaded&&this.setTransformStyle(this.loaded,"scaleX("+n+")"))},setCurrentRailHandle:function(e){this.setCurrentRailMain(this,e)},setCurrentRail:function(){this.setCurrentRailMain(this)},setCurrentRailMain:function(e,t){if(void 0!==e.getCurrentTime()&&e.getDuration()){var n=void 0===t?e.getCurrentTime():t;if(e.total&&e.handle){var i=parseFloat(getComputedStyle(e.total).width),o=Math.round(i*n/e.getDuration()),r=o-Math.round(e.handle.offsetWidth/2);if(r=r<0?0:r,e.setTransformStyle(e.current,"scaleX("+o/i+")"),e.setTransformStyle(e.handle,"translateX("+r+"px)"),e.options.useSmoothHover&&!(0,u.hasClass)(e.hovered,"no-hover")){var a=parseInt(e.hovered.getAttribute("pos"),10),s=(a=isNaN(a)?0:a)/i-r/i;e.hovered.style.left=r+"px",e.setTransformStyle(e.hovered,"scaleX("+s+")"),s>=0?(0,u.removeClass)(e.hovered,"negative"):(0,u.addClass)(e.hovered,"negative")}}}}})},{16:16,2:2,25:25,26:26,30:30,5:5}],12:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e(2)),r=e(16),a=i(r),s=e(30),l=e(26);Object.assign(r.config,{duration:0,timeAndDurationSeparator:"<span> | </span>"}),Object.assign(a.default.prototype,{buildcurrent:function(e,t,n,i){var r=this,a=o.default.createElement("div");a.className=r.options.classPrefix+"time",a.setAttribute("role","timer"),a.setAttribute("aria-live","off"),a.innerHTML='<span class="'+r.options.classPrefix+'currenttime">'+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"</span>",r.addControlElement(a,"current"),e.updateCurrent(),r.updateTimeCallback=function(){r.controlsAreVisible&&e.updateCurrent()},i.addEventListener("timeupdate",r.updateTimeCallback)},cleancurrent:function(e,t,n,i){i.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,i){var r=this;if(t.lastChild.querySelector("."+r.options.classPrefix+"currenttime"))t.querySelector("."+r.options.classPrefix+"time").innerHTML+=r.options.timeAndDurationSeparator+'<span class="'+r.options.classPrefix+'duration">'+(0,s.secondsToTimeCode)(r.options.duration,r.options.alwaysShowHours,r.options.showTimecodeFrameCount,r.options.framesPerSecond,r.options.secondsDecimalLength,r.options.timeFormat)+"</span>";else{t.querySelector("."+r.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+r.options.classPrefix+"currenttime").parentNode,r.options.classPrefix+"currenttime-container");var a=o.default.createElement("div");a.className=r.options.classPrefix+"time "+r.options.classPrefix+"duration-container",a.innerHTML='<span class="'+r.options.classPrefix+'duration">'+(0,s.secondsToTimeCode)(r.options.duration,r.options.alwaysShowHours,r.options.showTimecodeFrameCount,r.options.framesPerSecond,r.options.secondsDecimalLength,r.options.timeFormat)+"</span>",r.addControlElement(a,"duration")}r.updateDurationCallback=function(){r.controlsAreVisible&&e.updateDuration()},i.addEventListener("timeupdate",r.updateDurationCallback)},cleanduration:function(e,t,n,i){i.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this.getCurrentTime();isNaN(e)&&(e=0);var t=(0,s.secondsToTimeCode)(e,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond,this.options.secondsDecimalLength,this.options.timeFormat);t.length>5?(0,l.addClass)(this.getElement(this.container),this.options.classPrefix+"long-video"):(0,l.removeClass)(this.getElement(this.container),this.options.classPrefix+"long-video"),this.getElement(this.controls).querySelector("."+this.options.classPrefix+"currenttime")&&(this.getElement(this.controls).querySelector("."+this.options.classPrefix+"currenttime").innerText=t)},updateDuration:function(){var e=this.getDuration();(isNaN(e)||e===1/0||e<0)&&(this.media.duration=this.options.duration=e=0),this.options.duration>0&&(e=this.options.duration);var t=(0,s.secondsToTimeCode)(e,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond,this.options.secondsDecimalLength,this.options.timeFormat);t.length>5?(0,l.addClass)(this.getElement(this.container),this.options.classPrefix+"long-video"):(0,l.removeClass)(this.getElement(this.container),this.options.classPrefix+"long-video"),this.getElement(this.controls).querySelector("."+this.options.classPrefix+"duration")&&e>0&&(this.getElement(this.controls).querySelector("."+this.options.classPrefix+"duration").innerHTML=t)}})},{16:16,2:2,26:26,30:30}],13:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e(2)),r=i(e(7)),a=i(e(5)),s=e(16),l=i(s),d=e(30),u=e(27),c=e(26);Object.assign(s.config,{startLanguage:"",tracksText:null,chaptersText:null,tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),Object.assign(l.default.prototype,{hasChapters:!1,buildtracks:function(e,t,n,i){if(this.findTracks(),e.tracks.length||e.trackFiles&&0!==!e.trackFiles.length){var r=this,s=r.options.tracksAriaLive?' role="log" aria-live="assertive" aria-atomic="false"':"",l=(0,u.isString)(r.options.tracksText)?r.options.tracksText:a.default.t("mejs.captions-subtitles"),d=(0,u.isString)(r.options.chaptersText)?r.options.chaptersText:a.default.t("mejs.captions-chapters"),f=null===e.trackFiles?e.tracks.length:e.trackFiles.length;if(r.domNode.textTracks)for(var p=r.domNode.textTracks.length-1;p>=0;p--)r.domNode.textTracks[p].mode="hidden";r.cleartracks(e),e.captions=o.default.createElement("div"),e.captions.className=r.options.classPrefix+"captions-layer "+r.options.classPrefix+"layer",e.captions.innerHTML='<div class="'+r.options.classPrefix+"captions-position "+r.options.classPrefix+'captions-position-hover"'+s+'><span class="'+r.options.classPrefix+'captions-text"></span></div>',e.captions.style.display="none",n.insertBefore(e.captions,n.firstChild),e.captionsText=e.captions.querySelector("."+r.options.classPrefix+"captions-text"),e.captionsButton=o.default.createElement("div"),e.captionsButton.className=r.options.classPrefix+"button "+r.options.classPrefix+"captions-button",e.captionsButton.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button><div class="'+r.options.classPrefix+"captions-selector "+r.options.classPrefix+'offscreen"><ul class="'+r.options.classPrefix+'captions-selector-list"><li class="'+r.options.classPrefix+'captions-selector-list-item"><input type="radio" class="'+r.options.classPrefix+'captions-selector-input" name="'+e.id+'_captions" id="'+e.id+'_captions_none" value="none" checked disabled><label class="'+r.options.classPrefix+"captions-selector-label "+r.options.classPrefix+'captions-selected" for="'+e.id+'_captions_none">'+a.default.t("mejs.none")+"</label></li></ul></div>",r.addControlElement(e.captionsButton,"tracks"),e.captionsButton.querySelector("."+r.options.classPrefix+"captions-selector-input").disabled=!1,e.chaptersButton=o.default.createElement("div"),e.chaptersButton.className=r.options.classPrefix+"button "+r.options.classPrefix+"chapters-button",e.chaptersButton.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+d+'" aria-label="'+d+'" tabindex="0"></button><div class="'+r.options.classPrefix+"chapters-selector "+r.options.classPrefix+'offscreen"><ul class="'+r.options.classPrefix+'chapters-selector-list"></ul></div>';for(var m=0,h=0;h<f;h++){var v=e.tracks[h].kind;e.tracks[h].src.trim()&&("subtitles"===v||"captions"===v?m++:"chapters"!==v||t.querySelector("."+r.options.classPrefix+"chapter-selector")||e.captionsButton.parentNode.insertBefore(e.chaptersButton,e.captionsButton))}e.trackToLoad=-1,e.selectedTrack=null,e.isLoadingTrack=!1;for(var g=0;g<f;g++){var y=e.tracks[g].kind;!e.tracks[g].src.trim()||"subtitles"!==y&&"captions"!==y||e.addTrackButton(e.tracks[g].trackId,e.tracks[g].srclang,e.tracks[g].label)}e.loadNextTrack();var E=["mouseenter","focusin"],b=["mouseleave","focusout"];if(r.options.toggleCaptionsButtonWhenOnlyOne&&1===m)e.captionsButton.addEventListener("click",function(t){var n="none";null===e.selectedTrack&&(n=e.tracks[0].trackId);var i=t.keyCode||t.which;e.setTrack(n,void 0!==i)});else{for(var S=e.captionsButton.querySelectorAll("."+r.options.classPrefix+"captions-selector-label"),x=e.captionsButton.querySelectorAll("input[type=radio]"),w=0,P=E.length;w<P;w++)e.captionsButton.addEventListener(E[w],function(){(0,c.removeClass)(this.querySelector("."+r.options.classPrefix+"captions-selector"),r.options.classPrefix+"offscreen")});for(var T=0,C=b.length;T<C;T++)e.captionsButton.addEventListener(b[T],function(){(0,c.addClass)(this.querySelector("."+r.options.classPrefix+"captions-selector"),r.options.classPrefix+"offscreen")});for(var k=0,_=x.length;k<_;k++)x[k].addEventListener("click",function(t){var n=t.keyCode||t.which;e.setTrack(this.value,void 0!==n)});for(var N=0,A=S.length;N<A;N++)S[N].addEventListener("click",function(e){var t=(0,c.siblings)(this,function(e){return"INPUT"===e.tagName})[0],n=(0,u.createEvent)("click",t);t.dispatchEvent(n),e.preventDefault()});e.captionsButton.addEventListener("keydown",function(e){e.stopPropagation()})}for(var L=0,F=E.length;L<F;L++)e.chaptersButton.addEventListener(E[L],function(){this.querySelector("."+r.options.classPrefix+"chapters-selector-list").children.length&&(0,c.removeClass)(this.querySelector("."+r.options.classPrefix+"chapters-selector"),r.options.classPrefix+"offscreen")});for(var j=0,I=b.length;j<I;j++)e.chaptersButton.addEventListener(b[j],function(){(0,c.addClass)(this.querySelector("."+r.options.classPrefix+"chapters-selector"),r.options.classPrefix+"offscreen")});e.chaptersButton.addEventListener("keydown",function(e){e.stopPropagation()}),e.options.alwaysShowControls?(0,c.addClass)(e.getElement(e.container).querySelector("."+r.options.classPrefix+"captions-position"),r.options.classPrefix+"captions-position-hover"):(e.getElement(e.container).addEventListener("controlsshown",function(){(0,c.addClass)(e.getElement(e.container).querySelector("."+r.options.classPrefix+"captions-position"),r.options.classPrefix+"captions-position-hover")}),e.getElement(e.container).addEventListener("controlshidden",function(){i.paused||(0,c.removeClass)(e.getElement(e.container).querySelector("."+r.options.classPrefix+"captions-position"),r.options.classPrefix+"captions-position-hover")})),i.addEventListener("timeupdate",function(){e.displayCaptions()}),""!==e.options.slidesSelector&&(e.slidesContainer=o.default.querySelectorAll(e.options.slidesSelector),i.addEventListener("timeupdate",function(){e.displaySlides()}))}},cleartracks:function(e){e&&(e.captions&&e.captions.remove(),e.chapters&&e.chapters.remove(),e.captionsText&&e.captionsText.remove(),e.captionsButton&&e.captionsButton.remove(),e.chaptersButton&&e.chaptersButton.remove())},rebuildtracks:function(){this.findTracks(),this.buildtracks(this,this.getElement(this.controls),this.getElement(this.layers),this.media)},findTracks:function(){var e=null===this.trackFiles?this.node.querySelectorAll("track"):this.trackFiles,t=e.length;this.tracks=[];for(var n=0;n<t;n++){var i=e[n],o=i.getAttribute("srclang").toLowerCase()||"",r=this.id+"_track_"+n+"_"+i.getAttribute("kind")+"_"+o;this.tracks.push({trackId:r,srclang:o,src:i.getAttribute("src"),kind:i.getAttribute("kind"),label:i.getAttribute("label")||"",entries:[],isLoaded:!1})}},setTrack:function(e,t){for(var n=this,i=n.captionsButton.querySelectorAll('input[type="radio"]'),o=n.captionsButton.querySelectorAll("."+n.options.classPrefix+"captions-selected"),r=n.captionsButton.querySelector('input[value="'+e+'"]'),a=0,s=i.length;a<s;a++)i[a].checked=!1;for(var l=0,d=o.length;l<d;l++)(0,c.removeClass)(o[l],n.options.classPrefix+"captions-selected");r.checked=!0;for(var f=(0,c.siblings)(r,function(e){return(0,c.hasClass)(e,n.options.classPrefix+"captions-selector-label")}),p=0,m=f.length;p<m;p++)(0,c.addClass)(f[p],n.options.classPrefix+"captions-selected");if("none"===e)n.selectedTrack=null,(0,c.removeClass)(n.captionsButton,n.options.classPrefix+"captions-enabled");else for(var h=0,v=n.tracks.length;h<v;h++){var g=n.tracks[h];if(g.trackId===e){null===n.selectedTrack&&(0,c.addClass)(n.captionsButton,n.options.classPrefix+"captions-enabled"),n.selectedTrack=g,n.captions.setAttribute("lang",n.selectedTrack.srclang),n.displayCaptions();break}}var y=(0,u.createEvent)("captionschange",n.media);y.detail.caption=n.selectedTrack,n.media.dispatchEvent(y),t||setTimeout(function(){n.getElement(n.container).focus()},500)},loadNextTrack:function(){this.trackToLoad++,this.trackToLoad<this.tracks.length?(this.isLoadingTrack=!0,this.loadTrack(this.trackToLoad)):(this.isLoadingTrack=!1,this.checkForTracks())},loadTrack:function(e){var t=this,n=t.tracks[e];void 0===n||void 0===n.src&&""===n.src||(0,c.ajax)(n.src,"text",function(e){n.entries="string"==typeof e&&/<tt\s+xml/gi.exec(e)?r.default.TrackFormatParser.dfxp.parse(e):r.default.TrackFormatParser.webvtt.parse(e),n.isLoaded=!0,t.enableTrackButton(n),t.loadNextTrack(),"slides"===n.kind?t.setupSlides(n):"chapters"!==n.kind||t.hasChapters||(t.drawChapters(n),t.hasChapters=!0)},function(){t.removeTrackButton(n.trackId),t.loadNextTrack()})},enableTrackButton:function(e){var t=this,n=e.srclang,i=o.default.getElementById(""+e.trackId);if(i){var s=e.label;""===s&&(s=a.default.t(r.default.language.codes[n])||n),i.disabled=!1;for(var l=(0,c.siblings)(i,function(e){return(0,c.hasClass)(e,t.options.classPrefix+"captions-selector-label")}),d=0,f=l.length;d<f;d++)l[d].innerHTML=s;if(t.options.startLanguage===n){i.checked=!0;var p=(0,u.createEvent)("click",i);i.dispatchEvent(p)}}},removeTrackButton:function(e){var t=o.default.getElementById(""+e);if(t){var n=t.closest("li");n&&n.remove()}},addTrackButton:function(e,t,n){""===n&&(n=a.default.t(r.default.language.codes[t])||t),this.captionsButton.querySelector("ul").innerHTML+='<li class="'+this.options.classPrefix+'captions-selector-list-item"><input type="radio" class="'+this.options.classPrefix+'captions-selector-input" name="'+this.id+'_captions" id="'+e+'" value="'+e+'" disabled><label class="'+this.options.classPrefix+'captions-selector-label"for="'+e+'">'+n+" (loading)</label></li>"},checkForTracks:function(){var e=!1;if(this.options.hideCaptionsButtonWhenEmpty){for(var t=0,n=this.tracks.length;t<n;t++){var i=this.tracks[t].kind;if(("subtitles"===i||"captions"===i)&&this.tracks[t].isLoaded){e=!0;break}}this.captionsButton.style.display=e?"":"none",this.setControlsSize()}},displayCaptions:function(){if(void 0!==this.tracks){var e=this.selectedTrack;if(null!==e&&e.isLoaded){var t=this.searchTrackPosition(e.entries,this.media.currentTime);if(t>-1)return this.captionsText.innerHTML=function(e){var t=o.default.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),i=n.length;i--;)n[i].remove();for(var r=t.getElementsByTagName("*"),a=0,s=r.length;a<s;a++)for(var l=r[a].attributes,d=Array.prototype.slice.call(l),u=0,c=d.length;u<c;u++)d[u].name.startsWith("on")||d[u].value.startsWith("javascript")?r[a].remove():"style"===d[u].name&&r[a].removeAttribute(d[u].name);return t.innerHTML}(e.entries[t].text),this.captionsText.className=this.options.classPrefix+"captions-text "+(e.entries[t].identifier||""),this.captions.style.display="",void(this.captions.style.height="0px");this.captions.style.display="none"}else this.captions.style.display="none"}},setupSlides:function(e){this.slides=e,this.slides.entries.imgs=[this.slides.entries.length],this.showSlide(0)},showSlide:function(e){var t=this,n=this;if(void 0!==n.tracks&&void 0!==n.slidesContainer){var i=n.slides.entries[e].text,r=n.slides.entries[e].imgs;if(void 0===r||void 0===r.fadeIn){var a=o.default.createElement("img");a.src=i,a.addEventListener("load",function(){var e=t,i=(0,c.siblings)(e,function(e){return i(e)});e.style.display="none",n.slidesContainer.innerHTML+=e.innerHTML,(0,c.fadeIn)(n.slidesContainer.querySelector(a));for(var o=0,r=i.length;o<r;o++)(0,c.fadeOut)(i[o],400)}),n.slides.entries[e].imgs=r=a}else if(!(0,c.visible)(r)){var s=(0,c.siblings)(self,function(e){return s(e)});(0,c.fadeIn)(n.slidesContainer.querySelector(r));for(var l=0,d=s.length;l<d;l++)(0,c.fadeOut)(s[l])}}},displaySlides:function(){if(void 0!==this.slides){var e=this.slides,t=this.searchTrackPosition(e.entries,this.media.currentTime);t>-1&&this.showSlide(t)}},drawChapters:function(e){var t=this,n=e.entries.length;if(n){t.chaptersButton.querySelector("ul").innerHTML="";for(var i=0;i<n;i++)t.chaptersButton.querySelector("ul").innerHTML+='<li class="'+t.options.classPrefix+'chapters-selector-list-item" role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false"><input type="radio" class="'+t.options.classPrefix+'captions-selector-input" name="'+t.id+'_chapters" id="'+t.id+"_chapters_"+i+'" value="'+e.entries[i].start+'" disabled><label class="'+t.options.classPrefix+'chapters-selector-label"for="'+t.id+"_chapters_"+i+'">'+e.entries[i].text+"</label></li>";for(var o=t.chaptersButton.querySelectorAll('input[type="radio"]'),r=t.chaptersButton.querySelectorAll("."+t.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a<s;a++)o[a].disabled=!1,o[a].checked=!1,o[a].addEventListener("click",function(e){var n=t.chaptersButton.querySelectorAll("li"),i=(0,c.siblings)(this,function(e){return(0,c.hasClass)(e,t.options.classPrefix+"chapters-selector-label")})[0];this.checked=!0,this.parentNode.setAttribute("aria-checked",!0),(0,c.addClass)(i,t.options.classPrefix+"chapters-selected"),(0,c.removeClass)(t.chaptersButton.querySelector("."+t.options.classPrefix+"chapters-selected"),t.options.classPrefix+"chapters-selected");for(var o=0,r=n.length;o<r;o++)n[o].setAttribute("aria-checked",!1);void 0===(e.keyCode||e.which)&&setTimeout(function(){t.getElement(t.container).focus()},500),t.media.setCurrentTime(parseFloat(this.value)),t.media.paused&&t.media.play()});for(var l=0,d=r.length;l<d;l++)r[l].addEventListener("click",function(e){var t=(0,c.siblings)(this,function(e){return"INPUT"===e.tagName})[0],n=(0,u.createEvent)("click",t);t.dispatchEvent(n),e.preventDefault()})}},searchTrackPosition:function(e,t){for(var n=0,i=e.length-1,o=void 0,r=void 0,a=void 0;n<=i;){if(o=n+i>>1,r=e[o].start,a=e[o].stop,t>=r&&t<a)return o;r<t?n=o+1:r>t&&(i=o-1)}return-1}}),r.default.language={codes:{af:"mejs.afrikaans",sq:"mejs.albanian",ar:"mejs.arabic",be:"mejs.belarusian",bg:"mejs.bulgarian",ca:"mejs.catalan",zh:"mejs.chinese","zh-cn":"mejs.chinese-simplified","zh-tw":"mejs.chines-traditional",hr:"mejs.croatian",cs:"mejs.czech",da:"mejs.danish",nl:"mejs.dutch",en:"mejs.english",et:"mejs.estonian",fl:"mejs.filipino",fi:"mejs.finnish",fr:"mejs.french",gl:"mejs.galician",de:"mejs.german",el:"mejs.greek",ht:"mejs.haitian-creole",iw:"mejs.hebrew",hi:"mejs.hindi",hu:"mejs.hungarian",is:"mejs.icelandic",id:"mejs.indonesian",ga:"mejs.irish",it:"mejs.italian",ja:"mejs.japanese",ko:"mejs.korean",lv:"mejs.latvian",lt:"mejs.lithuanian",mk:"mejs.macedonian",ms:"mejs.malay",mt:"mejs.maltese",no:"mejs.norwegian",fa:"mejs.persian",pl:"mejs.polish",pt:"mejs.portuguese",ro:"mejs.romanian",ru:"mejs.russian",sr:"mejs.serbian",sk:"mejs.slovak",sl:"mejs.slovenian",es:"mejs.spanish",sw:"mejs.swahili",sv:"mejs.swedish",tl:"mejs.tagalog",th:"mejs.thai",tr:"mejs.turkish",uk:"mejs.ukrainian",vi:"mejs.vietnamese",cy:"mejs.welsh",yi:"mejs.yiddish"}},r.default.TrackFormatParser={webvtt:{pattern:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],i=void 0,o=void 0,r=void 0,a=0,s=t.length;a<s;a++){if((i=this.pattern.exec(t[a]))&&a<t.length){for(a-1>=0&&""!==t[a-1]&&(r=t[a-1]),o=t[++a],a++;""!==t[a]&&a<t.length;)o=o+"\n"+t[a],a++;o=o.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),n.push({identifier:r,start:0===(0,d.convertSMPTEtoSeconds)(i[1])?.2:(0,d.convertSMPTEtoSeconds)(i[1]),stop:(0,d.convertSMPTEtoSeconds)(i[3]),text:o,settings:i[5]})}r=""}return n}},dfxp:{parse:function(e){var t=(e=$(e).filter("tt")).firstChild,n=t.querySelectorAll("p"),i=e.getElementById(""+t.attr("style")),o=[],r=void 0;if(i.length){i.removeAttribute("id");var a=i.attributes;if(a.length){r={};for(var s=0,l=a.length;s<l;s++)r[a[s].name.split(":")[1]]=a[s].value}}for(var u=0,c=n.length;u<c;u++){var f=void 0,p={start:null,stop:null,style:null,text:null};if(n.eq(u).attr("begin")&&(p.start=(0,d.convertSMPTEtoSeconds)(n.eq(u).attr("begin"))),!p.start&&n.eq(u-1).attr("end")&&(p.start=(0,d.convertSMPTEtoSeconds)(n.eq(u-1).attr("end"))),n.eq(u).attr("end")&&(p.stop=(0,d.convertSMPTEtoSeconds)(n.eq(u).attr("end"))),!p.stop&&n.eq(u+1).attr("begin")&&(p.stop=(0,d.convertSMPTEtoSeconds)(n.eq(u+1).attr("begin"))),r){f="";for(var m in r)f+=m+":"+r[m]+";"}f&&(p.style=f),0===p.start&&(p.start=.2),p.text=n.eq(u).innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),o.push(p)}return o}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e(2)),r=e(16),a=i(r),s=i(e(5)),l=e(25),d=e(27),u=e(26);Object.assign(r.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(a.default.prototype,{buildvolume:function(e,t,n,i){if(!l.IS_ANDROID&&!l.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,c=a.isVideo?a.options.videoVolume:a.options.audioVolume,f=(0,d.isString)(a.options.muteText)?a.options.muteText:s.default.t("mejs.mute"),p=(0,d.isString)(a.options.unmuteText)?a.options.unmuteText:s.default.t("mejs.unmute"),m=(0,d.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:s.default.t("mejs.volume-help-text"),h=o.default.createElement("div");if(h.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",h.innerHTML="horizontal"===c?'<button type="button" aria-controls="'+a.id+'" title="'+f+'" aria-label="'+f+'" tabindex="0"></button>':'<button type="button" aria-controls="'+a.id+'" title="'+f+'" aria-label="'+f+'" tabindex="0"></button><a href="javascript:void(0);" class="'+a.options.classPrefix+'volume-slider" aria-label="'+s.default.t("mejs.volume-slider")+'" aria-valuemin="0" aria-valuemax="100" role="slider" aria-orientation="vertical"><span class="'+a.options.classPrefix+'offscreen">'+m+'</span><div class="'+a.options.classPrefix+'volume-total"><div class="'+a.options.classPrefix+'volume-current"></div><div class="'+a.options.classPrefix+'volume-handle"></div></div></a>',a.addControlElement(h,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider");(t||e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider").matches(":focus"))&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),n>0&&e.setMuted(!1)}},{keys:[40],action:function(e){var t=e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider");t&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.max(e.volume-.1,0);e.setVolume(n),n<=.1&&e.setMuted(!0)}},{keys:[77],action:function(e){e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider").style.display="block",e.isVideo&&(e.showControls(),e.startControlsTimer()),e.media.muted?e.setMuted(!1):e.setMuted(!0)}}),"horizontal"===c){var v=o.default.createElement("a");v.className=a.options.classPrefix+"horizontal-volume-slider",v.href="javascript:void(0);",v.setAttribute("aria-label",s.default.t("mejs.volume-slider")),v.setAttribute("aria-valuemin",0),v.setAttribute("aria-valuemax",100),v.setAttribute("role","slider"),v.innerHTML+='<span class="'+a.options.classPrefix+'offscreen">'+m+'</span><div class="'+a.options.classPrefix+'horizontal-volume-total"><div class="'+a.options.classPrefix+'horizontal-volume-current"></div><div class="'+a.options.classPrefix+'horizontal-volume-handle"></div></div>',h.parentNode.insertBefore(v,h.nextSibling)}var g=!1,y=!1,E=!1,b="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),S="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),x="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),w="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),P=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,u.removeClass)(h,a.options.classPrefix+"mute"),(0,u.addClass)(h,a.options.classPrefix+"unmute");var t=h.firstElementChild;t.setAttribute("title",p),t.setAttribute("aria-label",p)}else{(0,u.removeClass)(h,a.options.classPrefix+"unmute"),(0,u.addClass)(h,a.options.classPrefix+"mute");var n=h.firstElementChild;n.setAttribute("title",f),n.setAttribute("aria-label",f)}var i=100*e+"%",o=getComputedStyle(w);"vertical"===c?(x.style.bottom=0,x.style.height=i,w.style.bottom=i,w.style.marginBottom=-parseFloat(o.height)/2+"px"):(x.style.left=0,x.style.width=i,w.style.left=i,w.style.marginLeft=-parseFloat(o.width)/2+"px")}},T=function(e){var t=(0,u.offset)(S),n=getComputedStyle(S);E=!0;var i=null;if("vertical"===c){var o=parseFloat(n.height);if(i=(o-(e.pageY-t.top))/o,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);i=(e.pageX-t.left)/r}i=Math.max(0,i),i=Math.min(i,1),P(i),a.setMuted(0===i),a.setVolume(i),e.preventDefault(),e.stopPropagation()},C=function(){a.muted?(P(0),(0,u.removeClass)(h,a.options.classPrefix+"mute"),(0,u.addClass)(h,a.options.classPrefix+"unmute")):(P(i.volume),(0,u.removeClass)(h,a.options.classPrefix+"unmute"),(0,u.addClass)(h,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==c||(b.style.display="none")}),h.addEventListener("mouseenter",function(e){e.target===h&&(b.style.display="block",y=!0,e.preventDefault(),e.stopPropagation())}),h.addEventListener("focusin",function(){b.style.display="block",y=!0}),h.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==c||(b.style.display="none")}),h.addEventListener("mouseleave",function(){y=!1,g||"vertical"!==c||(b.style.display="none")}),h.addEventListener("focusout",function(){y=!1}),h.addEventListener("keydown",function(e){if(a.options.keyActions.length){var t=e.which||e.keyCode||0,n=i.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}g=!1,P(n),i.setVolume(n),e.preventDefault(),e.stopPropagation()}}),h.querySelector("button").addEventListener("click",function(){i.setMuted(!i.muted);var e=(0,d.createEvent)("volumechange",i);i.dispatchEvent(e)}),b.addEventListener("dragstart",function(){return!1}),b.addEventListener("mouseover",function(){y=!0}),b.addEventListener("focusin",function(){b.style.display="block",y=!0}),b.addEventListener("focusout",function(){y=!1,g||"vertical"!==c||(b.style.display="none")}),b.addEventListener("mousedown",function(e){T(e),a.globalBind("mousemove.vol",function(e){var t=e.target;g&&(t===b||t.closest("vertical"===c?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&T(e)}),a.globalBind("mouseup.vol",function(){g=!1,y||"vertical"!==c||(b.style.display="none")}),g=!0,e.preventDefault(),e.stopPropagation()}),i.addEventListener("volumechange",function(e){g||C(),function(){var e=Math.floor(100*i.volume);b.setAttribute("aria-valuenow",e),b.setAttribute("aria-valuetext",e+"%")}()});var k=!1;i.addEventListener("rendererready",function(){E||setTimeout(function(){k=!0,(0===e.options.startVolume||i.originalNode.muted)&&(i.setMuted(!0),e.options.startVolume=0),i.setVolume(e.options.startVolume),a.setControlsSize()},250)}),i.addEventListener("loadedmetadata",function(){setTimeout(function(){E||k||((0===e.options.startVolume||i.originalNode.muted)&&i.setMuted(!0),i.setVolume(e.options.startVolume),a.setControlsSize()),k=!1},250)}),(0===e.options.startVolume||i.originalNode.muted)&&(i.setMuted(!0),e.options.startVolume=0,C()),a.getElement(a.container).addEventListener("controlsresize",function(){C()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=i(e(3)),s=i(e(2)),l=i(e(7)),d=i(e(6)),u=i(e(17)),c=i(e(5)),f=e(25),p=e(27),m=e(30),h=e(28),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e(26));l.default.mepIndex=0,l.default.players={};var g=n.config={poster:"",showPosterWhenEnded:!1,showPosterWhenPaused:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:40,defaultSeekBackwardInterval:function(e){return.05*e.getDuration()},defaultSeekForwardInterval:function(e){return.05*e.getDuration()},setDimensions:!0,audioWidth:-1,audioHeight:-1,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,hideVideoControlsOnPause:!1,clickToPlayPause:!0,controlsTimeoutDefault:1500,controlsTimeoutMouseEnter:2500,controlsTimeoutMouseLeave:1e3,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],useDefaultControls:!1,isVideo:!0,stretching:"auto",classPrefix:"mejs__",enableKeyboard:!0,pauseOtherPlayers:!0,secondsDecimalLength:0,customError:null,keyActions:[{keys:[32,179],action:function(e){f.IS_FIREFOX||(e.paused||e.ended?e.play():e.pause())}}]};l.default.MepDefaults=g;var y=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i="string"==typeof t?s.default.getElementById(t):t;if(!(this instanceof e))return new e(i,n);if(this.node=this.media=i,this.node){if(this.media.player)return this.media.player;if(this.hasFocus=!1,this.controlsAreVisible=!0,this.controlsEnabled=!0,this.controlsTimer=null,this.currentMediaTime=0,this.proxy=null,void 0===n){var o=this.node.getAttribute("data-mejsoptions");n=o?JSON.parse(o):{}}return this.options=Object.assign({},g,n),this.options.loop&&!this.media.getAttribute("loop")?(this.media.loop=!0,this.node.loop=!0):this.media.loop&&(this.options.loop=!0),this.options.timeFormat||(this.options.timeFormat="mm:ss",this.options.alwaysShowHours&&(this.options.timeFormat="hh:mm:ss"),this.options.showTimecodeFrameCount&&(this.options.timeFormat+=":ff")),(0,m.calculateTimeFormat)(0,this.options,this.options.framesPerSecond||25),this.id="mep_"+l.default.mepIndex++,l.default.players[this.id]=this,this.init(),this}}return r(e,[{key:"getElement",value:function(e){return e}},{key:"init",value:function(){var e=this,t=Object.assign({},e.options,{success:function(t,n){e._meReady(t,n)},error:function(t){e._handleError(t)}}),n=e.node.tagName.toLowerCase();if(e.isDynamic="audio"!==n&&"video"!==n&&"iframe"!==n,e.isVideo=e.isDynamic?e.options.isVideo:"audio"!==n&&e.options.isVideo,e.mediaFiles=null,e.trackFiles=null,f.IS_IPAD&&e.options.iPadUseNativeControls||f.IS_IPHONE&&e.options.iPhoneUseNativeControls)e.node.setAttribute("controls",!0),f.IS_IPAD&&e.node.getAttribute("autoplay")&&e.play();else if(!e.isVideo&&(e.isVideo||!e.options.features.length&&!e.options.useDefaultControls)||f.IS_ANDROID&&e.options.AndroidUseNativeControls)e.isVideo||e.options.features.length||e.options.useDefaultControls||(e.node.style.display="none");else{e.node.removeAttribute("controls");var i=e.isVideo?c.default.t("mejs.video-player"):c.default.t("mejs.audio-player"),o=s.default.createElement("span");if(o.className=e.options.classPrefix+"offscreen",o.innerText=i,e.media.parentNode.insertBefore(o,e.media),e.container=s.default.createElement("div"),e.getElement(e.container).id=e.id,e.getElement(e.container).className=e.options.classPrefix+"container "+e.options.classPrefix+"container-keyboard-inactive "+e.media.className,e.getElement(e.container).tabIndex=0,e.getElement(e.container).setAttribute("role","application"),e.getElement(e.container).setAttribute("aria-label",i),e.getElement(e.container).innerHTML='<div class="'+e.options.classPrefix+'inner"><div class="'+e.options.classPrefix+'mediaelement"></div><div class="'+e.options.classPrefix+'layers"></div><div class="'+e.options.classPrefix+'controls"></div></div>',e.getElement(e.container).addEventListener("focus",function(t){if(!e.controlsAreVisible&&!e.hasFocus&&e.controlsEnabled){e.showControls(!0);var n=(0,p.isNodeAfter)(t.relatedTarget,e.getElement(e.container))?"."+e.options.classPrefix+"controls ."+e.options.classPrefix+"button:last-child > button":"."+e.options.classPrefix+"playpause-button > button";e.getElement(e.container).querySelector(n).focus()}}),e.node.parentNode.insertBefore(e.getElement(e.container),e.node),e.options.features.length||e.options.useDefaultControls||(e.getElement(e.container).style.background="transparent",e.getElement(e.container).querySelector("."+e.options.classPrefix+"controls").style.display="none"),e.isVideo&&"fill"===e.options.stretching&&!v.hasClass(e.getElement(e.container).parentNode,e.options.classPrefix+"fill-container")){e.outerContainer=e.media.parentNode;var r=s.default.createElement("div");r.className=e.options.classPrefix+"fill-container",e.getElement(e.container).parentNode.insertBefore(r,e.getElement(e.container)),r.appendChild(e.getElement(e.container))}if(f.IS_ANDROID&&v.addClass(e.getElement(e.container),e.options.classPrefix+"android"),f.IS_IOS&&v.addClass(e.getElement(e.container),e.options.classPrefix+"ios"),f.IS_IPAD&&v.addClass(e.getElement(e.container),e.options.classPrefix+"ipad"),f.IS_IPHONE&&v.addClass(e.getElement(e.container),e.options.classPrefix+"iphone"),v.addClass(e.getElement(e.container),e.isVideo?e.options.classPrefix+"video":e.options.classPrefix+"audio"),f.IS_SAFARI&&!f.IS_IOS){v.addClass(e.getElement(e.container),e.options.classPrefix+"hide-cues");for(var a=e.node.cloneNode(),u=e.node.children,m=[],g=[],y=0,E=u.length;y<E;y++){var b=u[y];!function(){switch(b.tagName.toLowerCase()){case"source":var e={};Array.prototype.slice.call(b.attributes).forEach(function(t){e[t.name]=t.value}),e.type=(0,h.formatType)(e.src,e.type),m.push(e);break;case"track":b.mode="hidden",g.push(b);break;default:a.appendChild(b)}}()}e.node.remove(),e.node=e.media=a,m.length&&(e.mediaFiles=m),g.length&&(e.trackFiles=g)}e.getElement(e.container).querySelector("."+e.options.classPrefix+"mediaelement").appendChild(e.node),e.media.player=e,e.controls=e.getElement(e.container).querySelector("."+e.options.classPrefix+"controls"),e.layers=e.getElement(e.container).querySelector("."+e.options.classPrefix+"layers");var S=e.isVideo?"video":"audio",x=S.substring(0,1).toUpperCase()+S.substring(1);e.options[S+"Width"]>0||e.options[S+"Width"].toString().indexOf("%")>-1?e.width=e.options[S+"Width"]:""!==e.node.style.width&&null!==e.node.style.width?e.width=e.node.style.width:e.node.getAttribute("width")?e.width=e.node.getAttribute("width"):e.width=e.options["default"+x+"Width"],e.options[S+"Height"]>0||e.options[S+"Height"].toString().indexOf("%")>-1?e.height=e.options[S+"Height"]:""!==e.node.style.height&&null!==e.node.style.height?e.height=e.node.style.height:e.node.getAttribute("height")?e.height=e.node.getAttribute("height"):e.height=e.options["default"+x+"Height"],e.initialAspectRatio=e.height>=e.width?e.width/e.height:e.height/e.width,e.setPlayerSize(e.width,e.height),t.pluginWidth=e.width,t.pluginHeight=e.height}if(l.default.MepDefaults=t,new d.default(e.media,t,e.mediaFiles),void 0!==e.getElement(e.container)&&e.options.features.length&&e.controlsAreVisible&&!e.options.hideVideoControlsOnLoad){var w=(0,p.createEvent)("controlsshown",e.getElement(e.container));e.getElement(e.container).dispatchEvent(w)}}},{key:"showControls",value:function(e){var t=this;if(e=void 0===e||e,!t.controlsAreVisible&&t.isVideo){if(e)!function(){v.fadeIn(t.getElement(t.controls),200,function(){v.removeClass(t.getElement(t.controls),t.options.classPrefix+"offscreen");var e=(0,p.createEvent)("controlsshown",t.getElement(t.container));t.getElement(t.container).dispatchEvent(e)});for(var e=t.getElement(t.container).querySelectorAll("."+t.options.classPrefix+"control"),n=function(n,i){v.fadeIn(e[n],200,function(){v.removeClass(e[n],t.options.classPrefix+"offscreen")})},i=0,o=e.length;i<o;i++)n(i)}();else{v.removeClass(t.getElement(t.controls),t.options.classPrefix+"offscreen"),t.getElement(t.controls).style.display="",t.getElement(t.controls).style.opacity=1;for(var n=t.getElement(t.container).querySelectorAll("."+t.options.classPrefix+"control"),i=0,o=n.length;i<o;i++)v.removeClass(n[i],t.options.classPrefix+"offscreen"),n[i].style.display="";var r=(0,p.createEvent)("controlsshown",t.getElement(t.container));t.getElement(t.container).dispatchEvent(r)}t.controlsAreVisible=!0,t.setControlsSize()}}},{key:"hideControls",value:function(e,t){var n=this;if(e=void 0===e||e,!0===t||!(!n.controlsAreVisible||n.options.alwaysShowControls||n.paused&&4===n.readyState&&(!n.options.hideVideoControlsOnLoad&&n.currentTime<=0||!n.options.hideVideoControlsOnPause&&n.currentTime>0)||n.isVideo&&!n.options.hideVideoControlsOnLoad&&!n.readyState||n.ended)){if(e)!function(){v.fadeOut(n.getElement(n.controls),200,function(){v.addClass(n.getElement(n.controls),n.options.classPrefix+"offscreen"),n.getElement(n.controls).style.display="";var e=(0,p.createEvent)("controlshidden",n.getElement(n.container));n.getElement(n.container).dispatchEvent(e)});for(var e=n.getElement(n.container).querySelectorAll("."+n.options.classPrefix+"control"),t=function(t,i){v.fadeOut(e[t],200,function(){v.addClass(e[t],n.options.classPrefix+"offscreen"),e[t].style.display=""})},i=0,o=e.length;i<o;i++)t(i)}();else{v.addClass(n.getElement(n.controls),n.options.classPrefix+"offscreen"),n.getElement(n.controls).style.display="",n.getElement(n.controls).style.opacity=0;for(var i=n.getElement(n.container).querySelectorAll("."+n.options.classPrefix+"control"),o=0,r=i.length;o<r;o++)v.addClass(i[o],n.options.classPrefix+"offscreen"),i[o].style.display="";var a=(0,p.createEvent)("controlshidden",n.getElement(n.container));n.getElement(n.container).dispatchEvent(a)}n.controlsAreVisible=!1}}},{key:"startControlsTimer",value:function(e){var t=this;e=void 0!==e?e:t.options.controlsTimeoutDefault,t.killControlsTimer("start"),t.controlsTimer=setTimeout(function(){t.hideControls(),t.killControlsTimer("hide")},e)}},{key:"killControlsTimer",value:function(){null!==this.controlsTimer&&(clearTimeout(this.controlsTimer),delete this.controlsTimer,this.controlsTimer=null)}},{key:"disableControls",value:function(){this.killControlsTimer(),this.controlsEnabled=!1,this.hideControls(!1,!0)}},{key:"enableControls",value:function(){this.controlsEnabled=!0,this.showControls(!1)}},{key:"_setDefaultPlayer",value:function(){var e=this;e.proxy&&e.proxy.pause(),e.proxy=new u.default(e),e.media.addEventListener("loadedmetadata",function(){e.getCurrentTime()>0&&e.currentMediaTime>0&&(e.setCurrentTime(e.currentMediaTime),f.IS_IOS||f.IS_ANDROID||e.play())})}},{key:"_meReady",value:function(e,t){var n=this,i=t.getAttribute("autoplay"),o=!(void 0===i||null===i||"false"===i),r=null!==e.rendererName&&/(native|html5)/i.test(n.media.rendererName);if(n.getElement(n.controls)&&n.enableControls(),n.getElement(n.container)&&n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play")&&(n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play").style.display=""),!n.created){if(n.created=!0,n.media=e,n.domNode=t,!(f.IS_ANDROID&&n.options.AndroidUseNativeControls||f.IS_IPAD&&n.options.iPadUseNativeControls||f.IS_IPHONE&&n.options.iPhoneUseNativeControls)){if(!n.isVideo&&!n.options.features.length&&!n.options.useDefaultControls)return o&&r&&n.play(),void(n.options.success&&("string"==typeof n.options.success?a.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n)));if(n.featurePosition={},n._setDefaultPlayer(),n.buildposter(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildkeyboard(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildoverlays(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.options.useDefaultControls){var d=["playpause","current","progress","duration","tracks","volume","fullscreen"];n.options.features=d.concat(n.options.features.filter(function(e){return-1===d.indexOf(e)}))}n.buildfeatures(n,n.getElement(n.controls),n.getElement(n.layers),n.media);var u=(0,p.createEvent)("controlsready",n.getElement(n.container));n.getElement(n.container).dispatchEvent(u),n.setPlayerSize(n.width,n.height),n.setControlsSize(),n.isVideo&&(n.clickToPlayPauseCallback=function(){if(n.options.clickToPlayPause){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");n.paused&&t?n.pause():n.paused?n.play():n.pause(),e.setAttribute("aria-pressed",!t),n.getElement(n.container).focus()}},n.createIframeLayer(),n.media.addEventListener("click",n.clickToPlayPauseCallback),!f.IS_ANDROID&&!f.IS_IOS||n.options.alwaysShowControls?(n.getElement(n.container).addEventListener("mouseenter",function(){n.controlsEnabled&&(n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter)))}),n.getElement(n.container).addEventListener("mousemove",function(){n.controlsEnabled&&(n.controlsAreVisible||n.showControls(),n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("mouseleave",function(){n.controlsEnabled&&(n.paused||n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))})):n.node.addEventListener("touchstart",function(){n.controlsAreVisible?n.hideControls(!1):n.controlsEnabled&&n.showControls(!1)},!!f.SUPPORT_PASSIVE_EVENT&&{passive:!0}),n.options.hideVideoControlsOnLoad&&n.hideControls(!1),n.options.enableAutosize&&n.media.addEventListener("loadedmetadata",function(e){var t=void 0!==e?e.detail.target||e.target:n.media;n.options.videoHeight<=0&&!n.domNode.getAttribute("height")&&!n.domNode.style.height&&null!==t&&!isNaN(t.videoHeight)&&(n.setPlayerSize(t.videoWidth,t.videoHeight),n.setControlsSize(),n.media.setSize(t.videoWidth,t.videoHeight))})),n.media.addEventListener("play",function(){n.hasFocus=!0;for(var e in l.default.players)if(l.default.players.hasOwnProperty(e)){var t=l.default.players[e];t.id===n.id||!n.options.pauseOtherPlayers||t.paused||t.ended||(t.pause(),t.hasFocus=!1)}f.IS_ANDROID||f.IS_IOS||n.options.alwaysShowControls||!n.isVideo||n.hideControls()}),n.media.addEventListener("ended",function(){if(n.options.autoRewind)try{n.setCurrentTime(0),setTimeout(function(){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-loading");e&&e.parentNode&&(e.parentNode.style.display="none")},20)}catch(e){}"function"==typeof n.media.renderer.stop?n.media.renderer.stop():n.pause(),n.setProgressRail&&n.setProgressRail(),n.setCurrentRail&&n.setCurrentRail(),n.options.loop?n.play():!n.options.alwaysShowControls&&n.controlsEnabled&&n.showControls()}),n.media.addEventListener("loadedmetadata",function(){(0,m.calculateTimeFormat)(n.getDuration(),n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.isFullScreen||(n.setPlayerSize(n.width,n.height),n.setControlsSize())});var c=null;n.media.addEventListener("timeupdate",function(){isNaN(n.getDuration())||c===n.getDuration()||(c=n.getDuration(),(0,m.calculateTimeFormat)(c,n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.setControlsSize())}),n.getElement(n.container).addEventListener("click",function(e){v.addClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive")}),n.getElement(n.container).addEventListener("focusin",function(e){v.removeClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive"),!n.isVideo||f.IS_ANDROID||f.IS_IOS||!n.controlsEnabled||n.options.alwaysShowControls||(n.killControls