FV Flowplayer Video Player - Version 6.0.5.24

Version Description

  • 2017/05/09 =

  • Amazon S3 - adding support for new AWS Regions - US East (Ohio), Asia Pacific (Mumbai) and EU (London).

  • End Popup - making sure it works on the last item in playlist only

  • Speed control - making sure it works for Android when using Firefox

  • Vimeo (Pro) - showing a notice to install Firefox if user has playback issues due to TLS 1.2 incompatibility on Android 4 and old OS X. More details: https://foliovision.com/2017/05/issues-with-vimeo-on-android

Download this release

Release Info

Developer FolioVision
Plugin Icon 128x128 FV Flowplayer Video Player
Version 6.0.5.24
Comparing to
See all releases

Code changes from version 2.4.2 to 6.0.5.24

Files changed (67) hide show
  1. controller/backend.php +432 -213
  2. controller/frontend.php +136 -32
  3. controller/shortcodes.php +25 -6
  4. css/admin.css +58 -3
  5. css/colorbox.css +7 -2
  6. css/flowplayer.css +605 -185
  7. css/fonts/fpicons.eot +0 -0
  8. css/fonts/fpicons.svg +23 -0
  9. css/fonts/fpicons.ttf +0 -0
  10. css/fonts/fpicons.woff +0 -0
  11. css/img/black-x2.png +0 -0
  12. css/img/black.png +0 -0
  13. css/img/black@x2.png +0 -0
  14. css/img/black_rtl-x2.png +0 -0
  15. css/img/black_rtl.png +0 -0
  16. css/img/black_rtl@x2.png +0 -0
  17. css/img/closelabel-x2.png +0 -0
  18. css/img/closelabel.png +0 -0
  19. css/img/controls.png +0 -0
  20. css/img/flowplayer-2x.png +0 -0
  21. css/img/flowplayer@2x.png +0 -0
  22. css/img/flp-share-icons-x2.png +0 -0
  23. css/img/flp-share-icons.png +0 -0
  24. css/img/loading.gif +0 -0
  25. css/img/nextlabel.gif +0 -0
  26. css/img/no_play_white@x2.png +0 -0
  27. css/img/play_black-x2.png +0 -0
  28. css/img/play_black.png +0 -0
  29. css/img/play_black@x2.png +0 -0
  30. css/img/play_black_rtl-x2.png +0 -0
  31. css/img/play_black_rtl.png +0 -0
  32. css/img/play_black_rtl@x2.png +0 -0
  33. css/img/play_white-x2.png +0 -0
  34. css/img/play_white.png +0 -0
  35. css/img/play_white@x2.png +0 -0
  36. css/img/play_white_rtl-x2.png +0 -0
  37. css/img/play_white_rtl.png +0 -0
  38. css/img/play_white_rtl@x2.png +0 -0
  39. css/img/playful_black-x2.png +0 -0
  40. css/img/playful_black.png +0 -0
  41. css/img/playful_black@x2.png +0 -0
  42. css/img/playful_black_rtl-x2.png +0 -0
  43. css/img/playful_black_rtl.png +0 -0
  44. css/img/playful_black_rtl@x2.png +0 -0
  45. css/img/playful_white-x2.png +0 -0
  46. css/img/playful_white.png +0 -0
  47. css/img/playful_white@x2.png +0 -0
  48. css/img/playful_white_rtl-x2.png +0 -0
  49. css/img/playful_white_rtl.png +0 -0
  50. css/img/playful_white_rtl@x2.png +0 -0
  51. css/img/playlist-buttons.png +0 -0
  52. css/img/prevlabel.gif +0 -0
  53. css/img/white-x2.png +0 -0
  54. css/img/white.png +0 -0
  55. css/img/white@x2.png +0 -0
  56. css/img/white_rtl-x2.png +0 -0
  57. css/img/white_rtl.png +0 -0
  58. css/img/white_rtl@x2.png +0 -0
  59. css/license.css +87 -8
  60. css/shortcode-editor.css +103 -0
  61. flowplayer.php +63 -53
  62. flowplayer/embed.min.js +1 -3
  63. flowplayer/flowplayer.dashjs.min.js +41 -0
  64. flowplayer/flowplayer.hlsjs.min.js +31 -0
  65. flowplayer/flowplayer.swf +0 -0
  66. flowplayer/flowplayerhls.swf +0 -0
  67. flowplayer/fv-flowplayer.min.js +6 -15
controller/backend.php CHANGED
@@ -20,14 +20,15 @@
20
  add_action('wp_ajax_fv_wp_flowplayer_support_mail', 'fv_wp_flowplayer_support_mail');
21
  add_action('wp_ajax_fv_wp_flowplayer_activate_extension', 'fv_wp_flowplayer_activate_extension');
22
  add_action('wp_ajax_fv_wp_flowplayer_check_template', 'fv_wp_flowplayer_check_template');
23
- add_action('wp_ajax_fv_wp_flowplayer_check_files', 'fv_wp_flowplayer_check_files');
 
24
 
25
  add_action('admin_head', 'flowplayer_admin_head');
26
  add_action('admin_footer', 'flowplayer_admin_footer');
27
  add_action('admin_print_footer_scripts', 'flowplayer_admin_footer_wp_js_restore', 999999 );
28
 
29
  add_action('admin_menu', 'flowplayer_admin');
30
- add_action('media_buttons', 'flowplayer_add_media_button', 30);
31
  add_action('media_upload_fvplayer_video', '__return_false'); // keep for compatibility!
32
 
33
 
@@ -36,12 +37,14 @@ add_action( 'wp_ajax_fv_foliopress_ajax_pointers', 'fv_wp_flowplayer_pointers_aj
36
 
37
 
38
 
39
- add_action( 'admin_enqueue_scripts', 'fv_wp_flowplayer_admin_enqueue_scripts' );
40
  add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
41
 
42
  add_action( 'after_plugin_row', 'fv_wp_flowplayer_after_plugin_row', 10, 3 );
43
 
44
- add_action( 'save_post', 'fv_wp_flowplayer_save_post'/*, 9999*/ );
 
 
45
 
46
  add_filter( 'get_user_option_closedpostboxes_fv_flowplayer_settings', 'fv_wp_flowplayer_closed_meta_boxes' );
47
 
@@ -57,8 +60,116 @@ add_action('wp_ajax_flowplayer_conversion_script', 'flowplayer_conversion_script
57
  add_action('admin_notices', 'fv_wp_flowplayer_admin_notice');
58
 
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  function flowplayer_activate() {
61
-
62
  }
63
 
64
 
@@ -121,17 +232,9 @@ function flowplayer_admin_footer_wp_js_restore() {
121
  * Administrator environment function.
122
  */
123
  function flowplayer_admin () {
124
- // if we are in administrator environment
125
- if (function_exists('add_submenu_page')) {
126
- add_options_page(
127
- 'FV Wordpress Flowplayer',
128
- 'FV Wordpress Flowplayer',
129
- 'manage_options',
130
- 'fvplayer',
131
- 'flowplayer_page'
132
- );
133
- }
134
-
135
  }
136
 
137
 
@@ -186,11 +289,11 @@ function flowplayer_add_media_button() {
186
  if( stripos($plugin,'foliopress-wysiwyg') !== FALSE )
187
  $found = true;
188
  }
189
- $button_tip = 'Insert a Flash Video Player';
190
  $wizard_url = 'media-upload.php?post_id='.$post->ID.'&type=fv-wp-flowplayer';
191
- $button_src = FV_FP_RELATIVE_PATH.'/images/icon.png';
192
- $img = (!$found) ? '<img src="' . $button_src . '" alt="' . $button_tip . '" />' : '';
193
- echo '<a title="Add FV WP Flowplayer" href="#" class="fv-wordpress-flowplayer-button" >'.$img.'</a>';
194
  }
195
 
196
 
@@ -250,6 +353,22 @@ function fv_wp_flowplayer_admin_notice() {
250
  echo "</p></div>";
251
  }
252
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  /*if( isset($_GET['page']) && $_GET['page'] == 'backend.php' ) {
254
  $options = get_option( 'fvwpflowplayer' );
255
  if( $options['key'] == 'false' ) {
@@ -258,34 +377,34 @@ function fv_wp_flowplayer_admin_notice() {
258
  echo "</p></div>";
259
  }
260
  }*/
261
-
262
- if( isset($_GET['fv-licensing']) && $_GET['fv-licensing'] == "check" ){
263
- echo '<div class="updated inline">
264
- <p>Thank you for purchase. Your license will be renewed in couple of minutes.<br/>
265
- Please make sure you upgrade <strong>FV Player Pro</strong> and <strong>FV Player VAST</strong> if you are using it.</p>
266
- </div>';
267
- }
268
  }
269
 
270
 
271
- function fv_wp_flowplayer_admin_enqueue_scripts( $page ) {
272
  if( $page !== 'post.php' && $page !== 'post-new.php' ) {
273
  return;
274
  }
275
 
276
  global $fv_wp_flowplayer_ver;
277
 
 
278
  wp_register_script('fvwpflowplayer-domwindow', flowplayer::get_plugin_url().'/js/jquery.colorbox-min.js',array('jquery'), $fv_wp_flowplayer_ver );
279
  wp_enqueue_script('fvwpflowplayer-domwindow');
280
 
281
- wp_register_script('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/js/shortcode-editor.js',array('jquery'), $fv_wp_flowplayer_ver );
282
- wp_enqueue_script('fvwpflowplayer-shortcode-editor');
283
-
 
 
 
 
 
 
 
284
  wp_register_style('fvwpflowplayer-domwindow-css', flowplayer::get_plugin_url().'/css/colorbox.css','','1.0','screen');
285
- wp_enqueue_style('fvwpflowplayer-domwindow-css');
286
  }
287
 
288
-
289
  /*
290
  Trick media uploader to show video only, while making sure we use our custom type; Also save options
291
  */
@@ -300,6 +419,8 @@ function fv_wp_flowplayer_admin_init() {
300
  }
301
 
302
  if( isset($_POST['fv-wp-flowplayer-submit']) ) {
 
 
303
  global $fv_fp;
304
  if( method_exists($fv_fp,'_set_conf') ) {
305
  $fv_fp->_set_conf();
@@ -307,14 +428,13 @@ function fv_wp_flowplayer_admin_init() {
307
  echo 'Error saving FV Flowplayer options.';
308
  }
309
  }
310
-
311
- if( isset($_GET['fv-licensing']) && $_GET['fv-licensing'] == "check" ){
312
  delete_option("fv_wordpress_flowplayer_persistent_notices");
313
 
314
- //license will expire in one minute
315
- fv_wp_flowplayer_change_transient_expiration("fv_flowplayer_license",60);
316
- fv_wp_flowplayer_delete_extensions_transients(60);
317
- }
318
 
319
  global $fv_fp;
320
  global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
@@ -328,7 +448,8 @@ function fv_wp_flowplayer_admin_init() {
328
 
329
  $version = get_option( 'fvwpflowplayer_core_ver' );
330
  if( version_compare( $fv_wp_flowplayer_core_ver, $version ) == 1 ) {
331
- fv_wp_flowplayer_admin_key_update();
 
332
  }
333
  }
334
 
@@ -340,11 +461,11 @@ function fv_wp_flowplayer_admin_init() {
340
  $fv_fp->pointer_boxes['fv_flowplayer_video_checker_service'] = array(
341
  'id' => '#wp-admin-bar-new-content',
342
  'pointerClass' => 'fv_flowplayer_video_checker_service',
343
- 'heading' => __('FV Player Video Checker', 'fv_flowplayer'),
344
- 'content' => __("<p>FV Player includes a free video checker which will check your videos for any encoding errors and helps ensure smooth playback of all your videos. To work its magic, our video checker must contact our server.</p><p>Would you like to enable the video encoding checker?</p>", 'fv_flowplayer'),
345
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
346
- 'button1' => __('Allow', 'fv_flowplayer'),
347
- 'button2' => __('Disable the video checker', 'fv_flowplayer')
348
  );
349
  } else {
350
  if(
@@ -356,30 +477,73 @@ function fv_wp_flowplayer_admin_init() {
356
  'id' => '#wp-admin-bar-new-content',
357
  'pointerClass' => 'fv_flowplayer_key_automatic',
358
  'pointerWidth' => 340,
359
- 'heading' => __('FV Flowplayer License Update', 'fv_flowplayer'),
360
- 'content' => __('New version of FV Flowplayer core has been installed for your licensed website. Please accept the automatic license key updating (connects to Foliovision servers) or update the key manually by loggin into your Foliovision account.', 'fv_flowplayer'),
361
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
362
- 'button1' => __('Always auto-update', 'fv_flowplayer'),
363
- 'button2' => __("I'll update it manually", 'fv_flowplayer')
364
  );
365
  } else if( version_compare( $fv_wp_flowplayer_core_ver, get_option('fvwpflowplayer_core_ver') ) !== 0 && preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) == 0 ) {
366
  update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
367
  }
368
  }
369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  $aOptions = get_option( 'fvwpflowplayer' );
371
- if( !isset($aOptions['version']) /*|| version_compare( $fv_wp_flowplayer_ver, $aOptions['version'] )*/ ) {
372
- update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer upgraded - please click "Check template" and "Check videos" for automated check of your site at <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">the settings page</a> for automated checks!' );
 
 
 
 
 
373
 
374
  $aOptions['version'] = $fv_wp_flowplayer_ver;
375
  update_option( 'fvwpflowplayer', $aOptions );
 
 
376
  $fv_fp->css_writeout();
 
 
 
377
  }
378
 
379
  if( isset($_GET['page']) && $_GET['page'] == 'fvplayer' ) {
380
  wp_enqueue_script('common');
381
  wp_enqueue_script('wp-lists');
382
  wp_enqueue_script('postbox');
 
 
 
383
  }
384
 
385
 
@@ -395,18 +559,19 @@ function fv_wp_flowplayer_admin_init() {
395
 
396
  $aCheck = get_transient( 'fv_flowplayer_license' );
397
  $aInstalled = get_option('fv_flowplayer_extension_install');
398
- if(
399
- isset($aCheck->valid) && $aCheck->valid &&
400
- (
401
- !isset($aInstalled['fv_player_pro']) ||
402
- ( isset($_REQUEST['nonce_fv_player_pro_install']) && wp_verify_nonce( $_REQUEST['nonce_fv_player_pro_install'], 'fv_player_pro_install') )
403
- )
404
- ) {
405
- fv_wp_flowplayer_install_extension('fv_player_pro');
406
- }
407
 
408
- }
409
- }
 
 
 
 
 
 
 
 
 
410
 
411
 
412
  function fv_wp_flowplayer_admin_key_update() {
@@ -417,9 +582,16 @@ function fv_wp_flowplayer_admin_key_update() {
417
  if( $data->domain && $data->key && stripos( home_url(), $data->domain ) !== false ) {
418
  $fv_fp->conf['key'] = $data->key;
419
  update_option( 'fvwpflowplayer', $fv_fp->conf );
420
- update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
 
 
 
421
  return true;
422
  }
 
 
 
 
423
  } else {
424
  update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer License upgrade failed - please check if you are running the plugin on your licensed domain.' );
425
  update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
@@ -433,21 +605,90 @@ function fv_wp_flowplayer_license_check( $aArgs ) {
433
 
434
  $args = array(
435
  'body' => array( 'plugin' => 'fv-wordpress-flowplayer', 'version' => $fv_wp_flowplayer_ver, 'core_ver' => $fv_wp_flowplayer_core_ver, 'type' => home_url(), 'action' => $aArgs['action'], 'admin-url' => admin_url() ),
436
- 'timeout' => 20,
437
  'user-agent' => 'fv-wordpress-flowplayer-'.$fv_wp_flowplayer_ver.' ('.$fv_wp_flowplayer_core_ver.')'
438
  );
439
- $resp = wp_remote_post( 'http://foliovision.com/?fv_remote=true', $args );
440
 
441
- if( isset($resp['body']) && $resp['body'] && $data = json_decode( preg_replace( '~[\s\S]*?<FVFLOWPLAYER>(.*?)</FVFLOWPLAYER>[\s\S]*?~', '$1', $resp['body'] ) ) ) {
442
  return $data;
443
- } else {
444
- return false;
 
 
 
 
 
 
 
445
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  }
447
 
448
 
449
  function fv_wp_flowplayer_edit_form_after_editor( ) {
450
- include dirname( __FILE__ ) . '/../view/wizard.php';
 
 
 
 
 
451
  }
452
 
453
 
@@ -660,7 +901,7 @@ function fv_wp_flowplayer_check_template() {
660
  $errors[] = 'html5.js not found in your template! Videos might not play in old browsers, like Internet Explorer 6-8. Read our instrutions <a href="https://foliovision.com/player/installation#html5js">here</a>.';
661
  }
662
 
663
- $ok[] = 'Template checker has changed. Just open any of your videos on your site and see if you get a red warning message about JavaScript not working.';
664
 
665
  $response['body'] = preg_replace( '$<!--[\s\S]+?-->$', '', $response['body'] ); // handle HTML comments
666
 
@@ -675,7 +916,7 @@ function fv_wp_flowplayer_check_template() {
675
  if( $check == - 1 ) {
676
  $errors[] = "Flowplayer script <code>$flowplayer_script</code> is old version and won't play. You need to get rid of this script.";
677
  } else if( $check == 1 ) {
678
- $ok[] = "FV Flowplayer script found: <code>$flowplayer_script</code>!";
679
  $fv_flowplayer_pos = strpos( $response['body'], $flowplayer_script );
680
  }
681
  }
@@ -685,20 +926,11 @@ function fv_wp_flowplayer_check_template() {
685
 
686
 
687
  // check jQuery scripts
688
- preg_match_all( '!<script[^>]*?src=[\'"]([^\'"]*?jquery[0-9.-]*?(?:\.min)?\.js[^\'"]*?)[\'"][^>]*?>\s*?</script>!', $response['body'], $jquery_scripts );
689
  if( count($jquery_scripts[1]) > 0 ) {
690
  foreach( $jquery_scripts[1] AS $jkey => $jquery_script ) {
691
- $check = fv_wp_flowplayer_check_jquery_version( $jquery_script, $jquery_scripts[1], $jkey );
692
- if( $check == - 1 ) {
693
- $errors[] = "jQuery library <code>$jquery_script</code> is old version and might not be compatible with Flowplayer.";
694
- } else if( $check == 1 ) {
695
- $ok[] = "jQuery library 1.7.1+ found: <code>$jquery_script</code>!";
696
- $jquery_pos = strpos( $response['body'], $jquery_script );
697
- } else if( $check == 2 ) {
698
- // nothing
699
- } else {
700
- $errors[] = "jQuery library <code>$jquery_script</code> found, but unable to check version, please make sure it's at least 1.7.1.";
701
- }
702
  }
703
 
704
  if( count($jquery_scripts[1]) > 1 ) {
@@ -720,7 +952,24 @@ function fv_wp_flowplayer_check_template() {
720
  }
721
 
722
  die('-1');
723
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
 
725
 
726
  function fv_wp_flowplayer_array_search_by_item( $find, $in_array, &$found, $like = false ) {
@@ -754,8 +1003,7 @@ function fv_wp_flowplayer_array_search_by_item( $find, $in_array, &$found, $like
754
  function fv_wp_flowplayer_support_mail() {
755
  if( isset( $_POST['notice'] ) && stripos( $_SERVER['HTTP_REFERER'], home_url() ) === 0 ) {
756
 
757
- global $current_user;
758
- get_currentuserinfo();
759
 
760
  $content = '<p>User: '.$current_user->display_name." (".$current_user->user_email.")</p>\n";
761
  $content .= '<p>User Agent: '.$_SERVER['HTTP_USER_AGENT']."</p>\n";
@@ -800,7 +1048,7 @@ function fv_wp_flowplayer_support_mail_phpmailer_init( $phpmailer ) {
800
 
801
  function fv_wp_flowplayer_closed_meta_boxes( $closed ) {
802
  if ( false === $closed )
803
- $closed = array( 'fv_flowplayer_amazon_options', 'fv_flowplayer_interface_options', 'fv_flowplayer_default_options', 'fv_flowplayer_ads', 'fv_flowplayer_skin' );
804
 
805
  return $closed;
806
  }
@@ -837,7 +1085,24 @@ function fv_wp_flowplayer_pointers_ajax() {
837
  update_option( 'fvwpflowplayer', $conf );
838
  }
839
  die();
 
 
 
 
 
 
 
 
 
 
840
  }
 
 
 
 
 
 
 
841
  }
842
 
843
 
@@ -870,6 +1135,9 @@ function fv_wp_flowplayer_install_extension( $plugin_package = 'fv_player_pro' )
870
  $aPluginInfo = get_transient( 'fv_flowplayer_license' );
871
  $plugin_basename = $aPluginInfo->{$plugin_package}->slug;
872
  $download_url = $aPluginInfo->{$plugin_package}->url;
 
 
 
873
 
874
  $url = wp_nonce_url( site_url().'/wp-admin/options-general.php?page=fvplayer', 'fv_player_pro_install', 'nonce_fv_player_pro_install' );
875
 
@@ -896,7 +1164,8 @@ function fv_wp_flowplayer_install_extension( $plugin_package = 'fv_player_pro' )
896
 
897
  require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
898
 
899
- if( !is_plugin_active($plugin_basename) || is_wp_error(validate_plugin($plugin_basename)) ) {
 
900
  echo '<div style="display: none;">';
901
  $objInstaller = new Plugin_Upgrader();
902
  $objInstaller->install( $download_url );
@@ -904,7 +1173,8 @@ function fv_wp_flowplayer_install_extension( $plugin_package = 'fv_player_pro' )
904
  wp_cache_flush();
905
 
906
  if ( is_wp_error( $objInstaller->skin->result ) ) {
907
- update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension install failed - '.$objInstaller->skin->result->get_error_message() );
 
908
  $bResult = false;
909
  } else {
910
  if ( $objInstaller->plugin_info() ) {
@@ -914,15 +1184,41 @@ function fv_wp_flowplayer_install_extension( $plugin_package = 'fv_player_pro' )
914
 
915
  $activate = activate_plugin( $plugin_basename );
916
  if ( is_wp_error( $activate ) ) {
917
- update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension install failed - '.$activate->get_error_message() );
918
  $bResult = false;
919
  }
920
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
921
  }
922
 
923
  if( !isset($bResult) ) {
924
  if( !isset($_GET['page']) || strcmp($_GET['page'],'fvplayer') != 0 ) {
925
- update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension installed - check the new <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer#fv_player_pro">Pro features!</a>!' );
926
  }
927
  $bResult = true;
928
  }
@@ -971,18 +1267,6 @@ function fv_wp_flowplayer_plugin_action_links($links, $file) {
971
  }
972
 
973
 
974
- function fv_flowplayer_admin_block_update_now() {
975
- $aCheck = get_transient( 'fv_flowplayer_license' );
976
- if( $aCheck && isset($aCheck->expired) && $aCheck->expired ) :
977
- ?>
978
- <script>
979
- jQuery(".update-link [href*='fv-wordpress-flowplayer']").click( function() { return confirm('Your FV Flowplayer license is expired.\n\nThanks for your early support for FV Player Pro. To enjoy the new features of Flowplayer 6 core, please renew your license. If proceed with the upgrade without renewing your license, you will lose your custom logo and your pro features.') });
980
- </script>
981
- <?php
982
- endif;
983
- }
984
-
985
-
986
  function fv_flowplayer_admin_scripts() {
987
  if (isset($_GET['page']) && $_GET['page'] == 'fvplayer') {
988
  wp_enqueue_media();
@@ -991,143 +1275,78 @@ function fv_flowplayer_admin_scripts() {
991
 
992
  //search for plugin path with {slug}.php
993
  function fv_flowplayer_get_extension_path( $slug ){
994
- $plugin_slugs = get_transient('plugin_slugs');
995
- if( !$plugin_slugs )
 
 
 
 
996
  return false;
997
 
998
- foreach( $plugin_slugs as $item ){
999
  if( stripos($item,$slug.'.php') !== false )
1000
  return $item;
1001
  }
1002
 
 
 
 
 
 
1003
  return false;
1004
  }
1005
 
1006
 
1007
- add_action( "after_plugin_row_fv-wordpress-flowplayer/flowplayer.php", 'fv_flowplayer_after_plugin_row', 10, 2 );
1008
- add_filter( 'pre_set_site_transient_update_plugins', 'fv_flowplayer_check_plugin_update' );
1009
- add_action( 'admin_init', 'fv_flowplayer_allow_update' );
1010
 
1011
- function fv_flowplayer_after_plugin_row( $file, $plugin_data ){
1012
- if( !flowplayer::is_licensed() ) {
1013
- return;
1014
- }
1015
-
1016
- $update_row = get_option('fvwpflowplayer_update_row');
1017
 
1018
- $aCheck = get_transient( 'fv_flowplayer_license' );
1019
- if( isset($aCheck->valid) && $aCheck->valid ){
1020
- return;
1021
- }
1022
-
1023
- if( $update_row != 'removed' ){
1024
- return;
1025
- }
1026
-
1027
- global $fv_player_pro_form;
1028
- if( isset($fv_player_pro_form) ) return;
1029
-
1030
- if ( is_network_admin() || !is_multisite() ) {
1031
- $wp_list_table = _get_list_table('WP_Plugins_List_Table');
1032
- $active_class = ( is_plugin_active( $plugin_data['plugin'] ) ) ? ' active' : '';
1033
- echo '<tr class="plugin-update-tr' . $active_class . '" id="fv-wordpress-flowplayer-update" data-slug="fv-wordpress-flowplayer"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
1034
-
1035
- global $fv_flowplayer_form;
1036
- preg_match( '~<form[\s\S]*?</form>~', $aCheck->message, $fv_flowplayer_form );
1037
- $fv_flowplayer_form = $fv_flowplayer_form[0];
1038
- preg_match( '~<[^>]*?type="submit"[^>]*?>~', $aCheck->message, $button );
1039
- $aCheck->message = preg_replace( '~<form[\s\S]*?</form>~', $button[0], $aCheck->message );
1040
- echo $aCheck->message;
1041
-
1042
- add_filter( 'admin_footer', 'fv_flowplayer_update_footer_html' );
1043
-
1044
- echo '<a href="'.admin_url('plugins.php?fv_flowplayer_allow_update=1').'">Click here</a> to allow upgrade anyway.';
1045
-
1046
- echo '</div></td></tr>';
1047
-
1048
- echo '<script type="text/javascript">';
1049
- echo "jQuery('#fv-wordpress-flowplayer-update').find('input[type=submit]').click( function() { jQuery('.fv_licensing_form').find('input[type=submit]').click(); return false;} );";
1050
- echo 'jQuery(document).ready( function(){jQuery("#fv-wordpress-flowplayer").addClass("update"); });';
1051
- echo '</script>';
1052
- }
1053
  }
1054
 
1055
-
1056
-
1057
-
1058
- function fv_flowplayer_check_plugin_update( $data ){
1059
- if( !flowplayer::is_licensed() ) {
1060
- return $data;
1061
- }
1062
-
1063
- $update_row = get_option('fvwpflowplayer_update_row');
1064
-
1065
- $aCheck = get_transient( 'fv_flowplayer_license' );
1066
- if( isset($aCheck->valid) && $aCheck->valid ){
1067
- return $data;
1068
- }
1069
-
1070
- if( $update_row == 'allowed' ){
1071
- return $data;
1072
- }
1073
-
1074
- if( isset($data->response['fv-wordpress-flowplayer/flowplayer.php']) ){
1075
-
1076
- global $fv_wp_flowplayer_ver;
1077
- $old_version = substr($fv_wp_flowplayer_ver,0,1);
1078
- $new_version = substr($data->response['fv-wordpress-flowplayer/flowplayer.php']->new_version,0,1);
1079
-
1080
- if( $old_version == '2' && $new_version == '6'){
1081
- unset($data->response['fv-wordpress-flowplayer/flowplayer.php']);
1082
- update_option('fvwpflowplayer_update_row', 'removed');
1083
- }
1084
- }
1085
-
1086
- return $data;
1087
  }
1088
 
 
 
 
 
 
 
1089
 
1090
 
1091
 
1092
- function fv_flowplayer_allow_update(){
1093
- if( isset($_GET['fv_flowplayer_allow_update']) ){
1094
- update_option('fvwpflowplayer_update_row', 'allowed');
1095
- delete_site_transient('update_plugins');
1096
-
1097
- wp_redirect( admin_url('plugins.php') );
1098
- }
1099
- }
1100
 
 
 
1101
 
1102
-
1103
-
1104
- function fv_wp_flowplayer_change_transient_expiration( $transient_name, $time ){
1105
- $transient_val = get_transient($transient_name);
1106
- if( $transient_val ){
1107
- set_transient($transient_name,$transient_val,$time);
1108
- return true;
1109
  }
1110
- return false;
1111
- }
1112
-
1113
-
1114
- function fv_wp_flowplayer_delete_extensions_transients( $delete_delay = false ){
1115
- if( !$delete_delay ){
1116
- delete_transient("fv-player-pro_license");
1117
- delete_transient("fv-player-vast_license");
1118
- }
1119
- else{
1120
- fv_wp_flowplayer_change_transient_expiration("fv-player-pro_license",$delete_delay);
1121
- fv_wp_flowplayer_change_transient_expiration("fv-player-vast_license",$delete_delay);
1122
  }
 
 
1123
  }
1124
 
1125
 
1126
 
1127
 
1128
- function fv_flowplayer_update_footer_html() {
1129
- global $fv_flowplayer_form;
1130
- if( flowplayer::is_licensed() && isset($fv_flowplayer_form) ) {
1131
- echo "<div style='display: none'>\n".$fv_flowplayer_form."</div>\n";
1132
- }
 
 
 
 
 
 
 
1133
  }
20
  add_action('wp_ajax_fv_wp_flowplayer_support_mail', 'fv_wp_flowplayer_support_mail');
21
  add_action('wp_ajax_fv_wp_flowplayer_activate_extension', 'fv_wp_flowplayer_activate_extension');
22
  add_action('wp_ajax_fv_wp_flowplayer_check_template', 'fv_wp_flowplayer_check_template');
23
+ add_action('wp_ajax_fv_wp_flowplayer_check_files', 'fv_wp_flowplayer_check_files');
24
+ add_action('wp_ajax_fv_wp_flowplayer_check_license', 'fv_wp_flowplayer_check_license');
25
 
26
  add_action('admin_head', 'flowplayer_admin_head');
27
  add_action('admin_footer', 'flowplayer_admin_footer');
28
  add_action('admin_print_footer_scripts', 'flowplayer_admin_footer_wp_js_restore', 999999 );
29
 
30
  add_action('admin_menu', 'flowplayer_admin');
31
+ add_action('media_buttons', 'flowplayer_add_media_button', 10);
32
  add_action('media_upload_fvplayer_video', '__return_false'); // keep for compatibility!
33
 
34
 
37
 
38
 
39
 
40
+ add_action( 'admin_enqueue_scripts', 'fv_player_shortcode_editor_scripts' );
41
  add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
42
 
43
  add_action( 'after_plugin_row', 'fv_wp_flowplayer_after_plugin_row', 10, 3 );
44
 
45
+ add_action( 'save_post', 'fv_wp_flowplayer_save_post' );
46
+ add_action( 'save_post', 'fv_wp_flowplayer_featured_image' , 10000 );
47
+
48
 
49
  add_filter( 'get_user_option_closedpostboxes_fv_flowplayer_settings', 'fv_wp_flowplayer_closed_meta_boxes' );
50
 
60
  add_action('admin_notices', 'fv_wp_flowplayer_admin_notice');
61
 
62
 
63
+
64
+ function fv_wp_flowplayer_featured_image($post_id) {
65
+ if( $parent_id = wp_is_post_revision($post_id) ) {
66
+ $post_id = $parent_id;
67
+ }
68
+
69
+ global $fv_fp;
70
+ if( !isset($fv_fp->conf['integrations']['featured_img']) || $fv_fp->conf['integrations']['featured_img'] != 'true' ){
71
+ return;
72
+ }
73
+
74
+ $thumbnail_id = get_post_thumbnail_id($post_id);
75
+ if( $thumbnail_id != 0 ) {
76
+ return;
77
+ }
78
+
79
+ $post = get_post($post_id);
80
+ if( !$post || empty($post->post_content) ){
81
+ return;
82
+ }
83
+
84
+ $sThumbUrl = array();
85
+ if (!preg_match('/(?:splash=\\\?")([^"]*.(?:jpg|gif|png))/', $post->post_content, $sThumbUrl) || empty($sThumbUrl[1])) {
86
+ return;
87
+ }
88
+
89
+ $thumbnail_id = fv_wp_flowplayer_save_to_media_library($sThumbUrl[1], $post_id);
90
+ if($thumbnail_id){
91
+ set_post_thumbnail($post_id, $thumbnail_id);
92
+ }
93
+
94
+ }
95
+
96
+ function fv_wp_flowplayer_construct_filename( $post_id ) {
97
+ $filename = get_the_title( $post_id );
98
+ $filename = sanitize_title( $filename, $post_id );
99
+ $filename = urldecode( $filename );
100
+ $filename = preg_replace( '/[^a-zA-Z0-9\-]/', '', $filename );
101
+ $filename = substr( $filename, 0, 32 );
102
+ $filename = trim( $filename, '-' );
103
+ if ( $filename == '' ) $filename = (string) $post_id;
104
+ return $filename;
105
+ }
106
+
107
+ function fv_wp_flowplayer_save_to_media_library( $image_url, $post_id ) {
108
+
109
+ $error = '';
110
+ $response = wp_remote_get( $image_url );
111
+ if( is_wp_error( $response ) ) {
112
+ $error = new WP_Error( 'thumbnail_retrieval', sprintf( __( 'Error retrieving a thumbnail from the URL <a href="%1$s">%1$s</a> using <code>wp_remote_get()</code><br />If opening that URL in your web browser returns anything else than an error page, the problem may be related to your web server and might be something your host administrator can solve.', 'video-thumbnails' ), $image_url ) . '<br>' . __( 'Error Details:', 'video-thumbnails' ) . ' ' . $response->get_error_message() );
113
+ } else {
114
+ $image_contents = $response['body'];
115
+ $image_type = wp_remote_retrieve_header( $response, 'content-type' );
116
+ }
117
+
118
+ if ( $error != '' || $image_contents == '' ) {
119
+ return false;
120
+ } else {
121
+
122
+ // Translate MIME type into an extension
123
+ if ( $image_type == 'image/jpeg' ) {
124
+ $image_extension = '.jpg';
125
+ } elseif ( $image_type == 'image/png' ) {
126
+ $image_extension = '.png';
127
+ } elseif ( $image_type == 'image/gif' ) {
128
+ $image_extension = '.gif';
129
+ } else {
130
+ return new WP_Error( 'thumbnail_upload', __( 'Unsupported MIME type:', 'video-thumbnails' ) . ' ' . $image_type );
131
+ }
132
+
133
+ // Construct a file name with extension
134
+ $new_filename = fv_wp_flowplayer_construct_filename( $post_id ) . $image_extension;
135
+
136
+ // Save the image bits using the new filename
137
+ $upload = wp_upload_bits( $new_filename, null, $image_contents );
138
+
139
+ // Stop for any errors while saving the data or else continue adding the image to the media library
140
+ if ( $upload['error'] ) {
141
+ $error = new WP_Error( 'thumbnail_upload', __( 'Error uploading image data:', 'video-thumbnails' ) . ' ' . $upload['error'] );
142
+ return $error;
143
+ } else {
144
+
145
+ $wp_filetype = wp_check_filetype( basename( $upload['file'] ), null );
146
+
147
+ $upload = apply_filters( 'wp_handle_upload', array(
148
+ 'file' => $upload['file'],
149
+ 'url' => $upload['url'],
150
+ 'type' => $wp_filetype['type']
151
+ ), 'sideload' );
152
+
153
+ // Contstruct the attachment array
154
+ $attachment = array(
155
+ 'post_mime_type' => $upload['type'],
156
+ 'post_title' => get_the_title( $post_id ),
157
+ 'post_content' => '',
158
+ 'post_status' => 'inherit'
159
+ );
160
+ // Insert the attachment
161
+ $attach_id = wp_insert_attachment( $attachment, $upload['file'], $post_id );
162
+
163
+ }
164
+
165
+ }
166
+
167
+ return $attach_id;
168
+
169
+ }
170
+
171
  function flowplayer_activate() {
172
+
173
  }
174
 
175
 
232
  * Administrator environment function.
233
  */
234
  function flowplayer_admin () {
235
+ if( function_exists('add_submenu_page') ) {
236
+ add_options_page( 'FV Player', 'FV Player', 'manage_options', 'fvplayer', 'flowplayer_page' );
237
+ }
 
 
 
 
 
 
 
 
238
  }
239
 
240
 
289
  if( stripos($plugin,'foliopress-wysiwyg') !== FALSE )
290
  $found = true;
291
  }
292
+ $button_tip = 'Insert a video';
293
  $wizard_url = 'media-upload.php?post_id='.$post->ID.'&type=fv-wp-flowplayer';
294
+ $icon = '<span> </span>';
295
+
296
+ echo '<a title="' . __('Add FV Player', 'fv-wordpress-flowplayer') . '" title="' . $button_tip . '" href="#" class="button fv-wordpress-flowplayer-button" >'.$icon.' Player</a>';
297
  }
298
 
299
 
353
  echo "</p></div>";
354
  }
355
 
356
+ if( isset($_GET['fv-licensing']) && $_GET['fv-licensing'] == "check" ){
357
+ echo '<div class="updated inline">
358
+ <p>Thank you for purchase. Your license will be renewed in couple of minutes.<br/>
359
+ Please make sure you upgrade <strong>FV Player Pro</strong> and <strong>FV Player VAST</strong> if you are using it.</p>
360
+ </div>';
361
+ }
362
+
363
+ global $FV_Player_Pro;
364
+ if( $FV_Player_Pro && version_compare($FV_Player_Pro->version,'0.5') == -1 ) :
365
+ ?>
366
+ <div class="error">
367
+ <p><?php _e( 'FV Wordpress Flowplayer: Your pro extension is installed, but it\'s not compatible with FV Flowplayer 6! Make sure you upgrade your FV Player Pro to version 0.5 or above.', 'my-text-domain' ); ?></p>
368
+ </div>
369
+ <?php
370
+ endif;
371
+
372
  /*if( isset($_GET['page']) && $_GET['page'] == 'backend.php' ) {
373
  $options = get_option( 'fvwpflowplayer' );
374
  if( $options['key'] == 'false' ) {
377
  echo "</p></div>";
378
  }
379
  }*/
 
 
 
 
 
 
 
380
  }
381
 
382
 
383
+ function fv_player_shortcode_editor_scripts( $page ) {
384
  if( $page !== 'post.php' && $page !== 'post-new.php' ) {
385
  return;
386
  }
387
 
388
  global $fv_wp_flowplayer_ver;
389
 
390
+
391
  wp_register_script('fvwpflowplayer-domwindow', flowplayer::get_plugin_url().'/js/jquery.colorbox-min.js',array('jquery'), $fv_wp_flowplayer_ver );
392
  wp_enqueue_script('fvwpflowplayer-domwindow');
393
 
394
+ wp_register_script('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/js/shortcode-editor.js',array('jquery'), $fv_wp_flowplayer_ver );
395
+ wp_register_script('fvwpflowplayer-shortcode-editor-old', flowplayer::get_plugin_url().'/js/shortcode-editor.old.js',array('jquery'), $fv_wp_flowplayer_ver );
396
+
397
+ global $fv_fp;
398
+ if( isset($fv_fp->conf["interface"]['shortcode_editor_old']) && $fv_fp->conf["interface"]['shortcode_editor_old'] == 'true' ) {
399
+ wp_enqueue_script('fvwpflowplayer-shortcode-editor-old');
400
+ } else {
401
+ wp_enqueue_script('fvwpflowplayer-shortcode-editor');
402
+ }
403
+
404
  wp_register_style('fvwpflowplayer-domwindow-css', flowplayer::get_plugin_url().'/css/colorbox.css','','1.0','screen');
405
+ wp_enqueue_style('fvwpflowplayer-domwindow-css');
406
  }
407
 
 
408
  /*
409
  Trick media uploader to show video only, while making sure we use our custom type; Also save options
410
  */
419
  }
420
 
421
  if( isset($_POST['fv-wp-flowplayer-submit']) ) {
422
+ check_admin_referer('fv_flowplayer_settings_nonce','fv_flowplayer_settings_nonce');
423
+
424
  global $fv_fp;
425
  if( method_exists($fv_fp,'_set_conf') ) {
426
  $fv_fp->_set_conf();
428
  echo 'Error saving FV Flowplayer options.';
429
  }
430
  }
431
+
432
+ if( isset($_GET['fv-licensing']) && $_GET['fv-licensing'] == "check" ){
433
  delete_option("fv_wordpress_flowplayer_persistent_notices");
434
 
435
+ //license will expire in 5 seconds in the function:
436
+ fv_wp_flowplayer_admin_key_update();
437
+ }
 
438
 
439
  global $fv_fp;
440
  global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
448
 
449
  $version = get_option( 'fvwpflowplayer_core_ver' );
450
  if( version_compare( $fv_wp_flowplayer_core_ver, $version ) == 1 ) {
451
+ fv_wp_flowplayer_admin_key_update();
452
+ fv_wp_flowplayer_delete_extensions_transients();
453
  }
454
  }
455
 
461
  $fv_fp->pointer_boxes['fv_flowplayer_video_checker_service'] = array(
462
  'id' => '#wp-admin-bar-new-content',
463
  'pointerClass' => 'fv_flowplayer_video_checker_service',
464
+ 'heading' => __('FV Player Video Checker', 'fv-wordpress-flowplayer'),
465
+ 'content' => __("<p>FV Player includes a free video checker which will check your videos for any encoding errors and helps ensure smooth playback of all your videos. To work its magic, our video checker must contact our server.</p><p>Would you like to enable the video encoding checker?</p>", 'fv-wordpress-flowplayer'),
466
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
467
+ 'button1' => __('Allow', 'fv-wordpress-flowplayer'),
468
+ 'button2' => __('Disable the video checker', 'fv-wordpress-flowplayer')
469
  );
470
  } else {
471
  if(
477
  'id' => '#wp-admin-bar-new-content',
478
  'pointerClass' => 'fv_flowplayer_key_automatic',
479
  'pointerWidth' => 340,
480
+ 'heading' => __('FV Flowplayer License Update', 'fv-wordpress-flowplayer'),
481
+ 'content' => __('New version of FV Flowplayer core has been installed for your licensed website. Please accept the automatic license key updating (connects to Foliovision servers) or update the key manually by loggin into your Foliovision account.', 'fv-wordpress-flowplayer'),
482
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
483
+ 'button1' => __('Always auto-update', 'fv-wordpress-flowplayer'),
484
+ 'button2' => __("I'll update it manually", 'fv-wordpress-flowplayer')
485
  );
486
  } else if( version_compare( $fv_wp_flowplayer_core_ver, get_option('fvwpflowplayer_core_ver') ) !== 0 && preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) == 0 ) {
487
  update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
488
  }
489
  }
490
 
491
+ if(
492
+ (stripos( $_SERVER['REQUEST_URI'], '/plugins.php') !== false || ( isset($_GET['page']) && $_GET['page'] === 'fvplayer' ) )
493
+ && $pnotices = get_option('fv_wordpress_flowplayer_persistent_notices')
494
+ ) {
495
+ $fv_fp->pointer_boxes['fv_flowplayer_license_expired'] = array(
496
+ 'id' => '#wp-admin-bar-new-content',
497
+ 'pointerClass' => 'fv_flowplayer_license_expired',
498
+ 'pointerWidth' => 340,
499
+ 'heading' => __('FV Flowplayer License Expired', 'fv-wordpress-flowplayer'),
500
+ 'content' => __( $pnotices ),
501
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
502
+ 'button1' => __('Hide this notice', 'fv-wordpress-flowplayer'),
503
+ 'button2' => __('I\'ll check this later', 'fv-wordpress-flowplayer')
504
+ );
505
+ }
506
+
507
+ if( !$fv_fp->_get_option('disable_video_hash_links') && !$fv_fp->_get_option('notification_video_links') ) {
508
+ $fv_fp->pointer_boxes['fv_player_notification_video_links'] = array(
509
+ 'id' => '#wp-admin-bar-new-content',
510
+ 'pointerClass' => 'fv_player_notification_video_links',
511
+ 'heading' => __('FV Player Video Links', 'fv-wordpress-flowplayer'),
512
+ 'content' => $fv_fp->_get_option('disableembedding') ? __("<p>Now you can enable Video Links to allow people to share exact location in your videos. Clicking that link gives them a link to play that video at the exact time.</p>", 'fv-wordpress-flowplayer') : __("<p>Each video player now contains a link in the top bar. Clicking that link gives your visitors a link to play that video at the exact time where they are watching it.</p>", 'fv-wordpress-flowplayer'),
513
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
514
+ 'button1' => __('Open Settings', 'fv-wordpress-flowplayer'),
515
+ 'button2' => __('Dismiss', 'fv-wordpress-flowplayer')
516
+ );
517
+
518
+ add_action( 'admin_print_footer_scripts', 'fv_player_pointer_scripts' );
519
+ }
520
+
521
  $aOptions = get_option( 'fvwpflowplayer' );
522
+ if( !isset($aOptions['version']) || version_compare( $fv_wp_flowplayer_ver, $aOptions['version'] ) ) {
523
+ //update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer upgraded - please click "Check template" and "Check videos" for automated check of your site at <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">the settings page</a> for automated checks!' );
524
+
525
+ if( $aOptions['version'] == '6.0.5.20' && $aOptions['playlist_advance'] == 'true' ) { // version 6.0.5 used reverse login for this option!
526
+ $aOptions['playlist_advance'] = false;
527
+ $fv_fp->conf = $aOptions;
528
+ }
529
 
530
  $aOptions['version'] = $fv_wp_flowplayer_ver;
531
  update_option( 'fvwpflowplayer', $aOptions );
532
+
533
+ fv_wp_flowplayer_pro_settings_update_for_lightbox();
534
  $fv_fp->css_writeout();
535
+
536
+ fv_wp_flowplayer_delete_extensions_transients();
537
+ delete_option('fv_flowplayer_extension_install');
538
  }
539
 
540
  if( isset($_GET['page']) && $_GET['page'] == 'fvplayer' ) {
541
  wp_enqueue_script('common');
542
  wp_enqueue_script('wp-lists');
543
  wp_enqueue_script('postbox');
544
+
545
+ wp_register_script('fv-player-admin', flowplayer::get_plugin_url().'/js/admin.js',array('jquery'), $fv_wp_flowplayer_ver );
546
+ wp_enqueue_script('fv-player-admin');
547
  }
548
 
549
 
559
 
560
  $aCheck = get_transient( 'fv_flowplayer_license' );
561
  $aInstalled = get_option('fv_flowplayer_extension_install');
562
+ if( isset($aCheck->valid) && $aCheck->valid){
 
 
 
 
 
 
 
 
563
 
564
+ if( !isset($aInstalled['fv_player_pro']) || ( isset($_REQUEST['nonce_fv_player_pro_install']) && wp_verify_nonce( $_REQUEST['nonce_fv_player_pro_install'], 'fv_player_pro_install') ) ) {
565
+ fv_wp_flowplayer_install_extension('fv_player_pro');
566
+ }
567
+ delete_option('fv_wordpress_flowplayer_persistent_notices');
568
+ }
569
+
570
+ if( isset($aCheck->expired) && $aCheck->expired && stripos( implode(get_option('active_plugins')), 'fv-player-pro' ) !== false ) {
571
+ add_filter( 'site_transient_update_plugins', 'fv_player_remove_update' );
572
+ }
573
+ }
574
+ }
575
 
576
 
577
  function fv_wp_flowplayer_admin_key_update() {
582
  if( $data->domain && $data->key && stripos( home_url(), $data->domain ) !== false ) {
583
  $fv_fp->conf['key'] = $data->key;
584
  update_option( 'fvwpflowplayer', $fv_fp->conf );
585
+ update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
586
+
587
+ fv_wp_flowplayer_change_transient_expiration("fv_flowplayer_license",5);
588
+ fv_wp_flowplayer_delete_extensions_transients(5);
589
  return true;
590
  }
591
+ } else if( isset($data->expired) && $data->expired && isset($data->message) ){
592
+ update_option( 'fv_wordpress_flowplayer_persistent_notices', $data->message );
593
+ update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
594
+ return false;
595
  } else {
596
  update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer License upgrade failed - please check if you are running the plugin on your licensed domain.' );
597
  update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
605
 
606
  $args = array(
607
  'body' => array( 'plugin' => 'fv-wordpress-flowplayer', 'version' => $fv_wp_flowplayer_ver, 'core_ver' => $fv_wp_flowplayer_core_ver, 'type' => home_url(), 'action' => $aArgs['action'], 'admin-url' => admin_url() ),
608
+ 'timeout' => 10,
609
  'user-agent' => 'fv-wordpress-flowplayer-'.$fv_wp_flowplayer_ver.' ('.$fv_wp_flowplayer_core_ver.')'
610
  );
611
+ $resp = wp_remote_post( 'https://foliovision.com/?fv_remote=true', $args );
612
 
613
+ if( !is_wp_error($resp) && isset($resp['body']) && $resp['body'] && $data = json_decode( preg_replace( '~[\s\S]*?<FVFLOWPLAYER>(.*?)</FVFLOWPLAYER>[\s\S]*?~', '$1', $resp['body'] ) ) ) {
614
  return $data;
615
+
616
+ } else if( is_wp_error($resp) && stripos($resp->get_error_message(),'SSL' ) !== false ) {
617
+ $args = array( 'sslverify' => false );
618
+ $resp = wp_remote_post( 'https://foliovision.com/?fv_remote=true', $args );
619
+
620
+ if( !is_wp_error($resp) && isset($resp['body']) && $resp['body'] && $data = json_decode( preg_replace( '~[\s\S]*?<FVFLOWPLAYER>(.*?)</FVFLOWPLAYER>[\s\S]*?~', '$1', $resp['body'] ) ) ) {
621
+ return $data;
622
+ }
623
+
624
  }
625
+
626
+ return false;
627
+ }
628
+
629
+ function fv_wp_flowplayer_pro_settings_update_for_lightbox(){
630
+ global $fv_fp;
631
+ if(isset($fv_fp->conf['pro']) && isset($fv_fp->conf['pro']['interface']['lightbox']) && $fv_fp->conf['pro']['interface']['lightbox'] == true ){
632
+ $fv_fp->conf['interface']['lightbox'] = true;
633
+ $fv_fp->conf['pro']['interface']['lightbox'] = false;
634
+ $options = get_option('fvwpflowplayer');
635
+ unset($options['pro']['interface']['lightbox']);
636
+ $options['interface']['lightbox'] = true;
637
+ update_option('fvwpflowplayer', $options);
638
+ }
639
+ if(isset($fv_fp->conf['pro']) && isset($fv_fp->conf['pro']['lightbox_images']) && $fv_fp->conf['pro']['lightbox_images'] == true ){
640
+ $fv_fp->conf['lightbox_images'] = true;
641
+ $fv_fp->conf['pro']['lightbox_images'] = false;
642
+ $options = get_option('fvwpflowplayer');
643
+ unset($options['pro']['lightbox_images']);
644
+ $options['lightbox_images'] = true;
645
+ update_option('fvwpflowplayer', $options);
646
+ }
647
+
648
+ }
649
+
650
+ function fv_wp_flowplayer_change_transient_expiration( $transient_name, $time ){
651
+ $transient_val = get_transient($transient_name);
652
+ if( $transient_val ){
653
+ set_transient($transient_name,$transient_val,$time);
654
+ return true;
655
+ }
656
+ return false;
657
+ }
658
+
659
+
660
+ function fv_wp_flowplayer_delete_extensions_transients( $delete_delay = false ){
661
+ $aTransientsLike = array('fv-player-pro_license','fv-player-vast_license','fv-player-pro_fp-private-updates','fv-player-vast_fp-private-updates');
662
+
663
+ global $wpdb;
664
+ $aWhere = array();
665
+ foreach( $aTransientsLike AS $sKey ) {
666
+ $aWhere[] = 'option_name LIKE "%'.$sKey.'%"';
667
+ }
668
+ $sWhere = implode(" OR ", $aWhere);
669
+ $aOptions = $wpdb->get_col( "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE '%_transient_fv%' AND ( ".$sWhere." )" );
670
+
671
+ foreach( $aOptions AS $sKey ) {
672
+ if( !$delete_delay ){
673
+ delete_transient( str_replace('_transient_','',$sKey) );
674
+ } else {
675
+ fv_wp_flowplayer_change_transient_expiration( str_replace('_transient_','',$sKey), $delete_delay );
676
+ }
677
+ }
678
+
679
+ $aUpdates = get_site_transient('update_plugins');
680
+ set_site_transient('update_plugins', $aUpdates );
681
+
682
  }
683
 
684
 
685
  function fv_wp_flowplayer_edit_form_after_editor( ) {
686
+ global $fv_fp;
687
+ if( isset($fv_fp->conf["interface"]['shortcode_editor_old']) && $fv_fp->conf["interface"]['shortcode_editor_old'] == 'true' ) {
688
+ include dirname( __FILE__ ) . '/../view/wizard.old.php';
689
+ } else {
690
+ include dirname( __FILE__ ) . '/../view/wizard.php';
691
+ }
692
  }
693
 
694
 
901
  $errors[] = 'html5.js not found in your template! Videos might not play in old browsers, like Internet Explorer 6-8. Read our instrutions <a href="https://foliovision.com/player/installation#html5js">here</a>.';
902
  }
903
 
904
+ $ok[] = __('Template checker has changed. Just open any of your videos on your site and see if you get a red warning message about JavaScript not working.', 'fv-wordpress-flowplayer');
905
 
906
  $response['body'] = preg_replace( '$<!--[\s\S]+?-->$', '', $response['body'] ); // handle HTML comments
907
 
916
  if( $check == - 1 ) {
917
  $errors[] = "Flowplayer script <code>$flowplayer_script</code> is old version and won't play. You need to get rid of this script.";
918
  } else if( $check == 1 ) {
919
+ $ok[] = __('FV Flowplayer script found: ', 'fv-wordpress-flowplayer') . "<code>$flowplayer_script</code>!";
920
  $fv_flowplayer_pos = strpos( $response['body'], $flowplayer_script );
921
  }
922
  }
926
 
927
 
928
  // check jQuery scripts
929
+ preg_match_all( '!<script[^>]*?src=[\'"]([^\'"]*?/jquery[0-9.-]*?(?:\.min)?\.js[^\'"]*?)[\'"][^>]*?>\s*?</script>!', $response['body'], $jquery_scripts );
930
  if( count($jquery_scripts[1]) > 0 ) {
931
  foreach( $jquery_scripts[1] AS $jkey => $jquery_script ) {
932
+ $ok[] = __('jQuery library found: ', 'fv-wordpress-flowplayer') . "<code>$jquery_script</code>!";
933
+ $jquery_pos = strpos( $response['body'], $jquery_script );
 
 
 
 
 
 
 
 
 
934
  }
935
 
936
  if( count($jquery_scripts[1]) > 1 ) {
952
  }
953
 
954
  die('-1');
955
+ }
956
+
957
+
958
+ function fv_wp_flowplayer_check_license() {
959
+ if( stripos( $_SERVER['HTTP_REFERER'], home_url() ) === 0 ) {
960
+ if( fv_wp_flowplayer_admin_key_update() ) {
961
+ $output = array( 'errors' => false, 'ok' => array(__('License key acquired successfully. <a href="">Reload</a>', 'fv-wordpress-flowplayer')) );
962
+ fv_wp_flowplayer_install_extension();
963
+ } else {
964
+ $message = get_option('fv_wordpress_flowplayer_deferred_notices');
965
+ if( !$message ) $message = get_option('fv_wordpress_flowplayer_persistent_notices');
966
+ $output = array( 'errors' => array($message), 'ok' => false );
967
+ }
968
+ echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
969
+ die();
970
+ }
971
+ die('-1');
972
+ }
973
 
974
 
975
  function fv_wp_flowplayer_array_search_by_item( $find, $in_array, &$found, $like = false ) {
1003
  function fv_wp_flowplayer_support_mail() {
1004
  if( isset( $_POST['notice'] ) && stripos( $_SERVER['HTTP_REFERER'], home_url() ) === 0 ) {
1005
 
1006
+ $current_user = wp_get_current_user();
 
1007
 
1008
  $content = '<p>User: '.$current_user->display_name." (".$current_user->user_email.")</p>\n";
1009
  $content .= '<p>User Agent: '.$_SERVER['HTTP_USER_AGENT']."</p>\n";
1048
 
1049
  function fv_wp_flowplayer_closed_meta_boxes( $closed ) {
1050
  if ( false === $closed )
1051
+ $closed = array( 'fv_flowplayer_amazon_options', 'fv_flowplayer_interface_options', 'fv_flowplayer_default_options', 'fv_flowplayer_ads', 'fv_flowplayer_integrations', 'fv_player_pro' );
1052
 
1053
  return $closed;
1054
  }
1085
  update_option( 'fvwpflowplayer', $conf );
1086
  }
1087
  die();
1088
+ }
1089
+
1090
+ if( isset($_POST['key']) && $_POST['key'] == 'fv_player_notification_video_links' && isset($_POST['value']) ) {
1091
+ check_ajax_referer('fv_player_notification_video_links');
1092
+ $conf = get_option( 'fvwpflowplayer' );
1093
+ if( $conf ) {
1094
+ $conf['notification_video_links'] = 'true';
1095
+ update_option( 'fvwpflowplayer', $conf );
1096
+ }
1097
+ die();
1098
  }
1099
+
1100
+ if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_license_expired' && isset($_POST['value']) && $_POST['value'] === 'true' ) {
1101
+ check_ajax_referer('fv_flowplayer_license_expired');
1102
+ delete_option("fv_wordpress_flowplayer_persistent_notices");
1103
+ die();
1104
+ }
1105
+
1106
  }
1107
 
1108
 
1135
  $aPluginInfo = get_transient( 'fv_flowplayer_license' );
1136
  $plugin_basename = $aPluginInfo->{$plugin_package}->slug;
1137
  $download_url = $aPluginInfo->{$plugin_package}->url;
1138
+
1139
+ $sPluginBasenameReal = fv_flowplayer_get_extension_path( str_replace( '_', '-', $plugin_package ) );
1140
+ $plugin_basename = $sPluginBasenameReal ? $sPluginBasenameReal : $plugin_basename;
1141
 
1142
  $url = wp_nonce_url( site_url().'/wp-admin/options-general.php?page=fvplayer', 'fv_player_pro_install', 'nonce_fv_player_pro_install' );
1143
 
1164
 
1165
  require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1166
 
1167
+ $sTaskDone = __('FV Flowplayer Pro extension installed - check the new ', 'fv-wordpress-flowplayer') . '<a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer#fv_player_pro">' . __('Pro features', 'fv-wordpress-flowplayer') . '</a>!';
1168
+ if( !$sPluginBasenameReal || is_wp_error(validate_plugin($plugin_basename)) ) {
1169
  echo '<div style="display: none;">';
1170
  $objInstaller = new Plugin_Upgrader();
1171
  $objInstaller->install( $download_url );
1173
  wp_cache_flush();
1174
 
1175
  if ( is_wp_error( $objInstaller->skin->result ) ) {
1176
+
1177
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', __('FV Flowplayer Pro extension install failed - ', 'fv-wordpress-flowplayer') . $objInstaller->skin->result->get_error_message() );
1178
  $bResult = false;
1179
  } else {
1180
  if ( $objInstaller->plugin_info() ) {
1184
 
1185
  $activate = activate_plugin( $plugin_basename );
1186
  if ( is_wp_error( $activate ) ) {
1187
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', __('FV Flowplayer Pro extension install failed - ', 'fv-wordpress-flowplayer') . $activate->get_error_message());
1188
  $bResult = false;
1189
  }
1190
  }
1191
+
1192
+ } else if( $sPluginBasenameReal ) {
1193
+ $sTaskDone = __('FV Flowplayer Pro extension upgraded successfully!', 'fv-wordpress-flowplayer');
1194
+
1195
+ echo '<div style="display: none;">';
1196
+ $objInstaller = new Plugin_Upgrader();
1197
+ $objInstaller->upgrade( $sPluginBasenameReal );
1198
+ echo '</div></div>'; // explanation: extra closing tag just to be safe (in case of "The plugin is at the latest version.")
1199
+ wp_cache_flush();
1200
+
1201
+ if ( is_wp_error( $objInstaller->skin->result ) ) {
1202
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension upgrade failed - '.$objInstaller->skin->result->get_error_message() );
1203
+ $bResult = false;
1204
+ } else {
1205
+ if ( $objInstaller->plugin_info() ) {
1206
+ $plugin_basename = $objInstaller->plugin_info();
1207
+
1208
+ }
1209
+
1210
+ $activate = activate_plugin( $plugin_basename );
1211
+ if ( is_wp_error( $activate ) ) {
1212
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension upgrade failed - '.$activate->get_error_message() );
1213
+ $bResult = false;
1214
+ }
1215
+ }
1216
+
1217
  }
1218
 
1219
  if( !isset($bResult) ) {
1220
  if( !isset($_GET['page']) || strcmp($_GET['page'],'fvplayer') != 0 ) {
1221
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', $sTaskDone );
1222
  }
1223
  $bResult = true;
1224
  }
1267
  }
1268
 
1269
 
 
 
 
 
 
 
 
 
 
 
 
 
1270
  function fv_flowplayer_admin_scripts() {
1271
  if (isset($_GET['page']) && $_GET['page'] == 'fvplayer') {
1272
  wp_enqueue_media();
1275
 
1276
  //search for plugin path with {slug}.php
1277
  function fv_flowplayer_get_extension_path( $slug ){
1278
+ $aPluginSlugs = get_transient('plugin_slugs');
1279
+ $aPluginSlugs = is_array($aPluginSlugs) ? $aPluginSlugs : array( 'fv-player-pro/fv-player-pro.php');
1280
+ $aActivePlugins = get_option('active_plugins');
1281
+ $aInactivePlugins = array_diff($aPluginSlugs,$aActivePlugins);
1282
+
1283
+ if( !$aPluginSlugs )
1284
  return false;
1285
 
1286
+ foreach( $aActivePlugins as $item ){
1287
  if( stripos($item,$slug.'.php') !== false )
1288
  return $item;
1289
  }
1290
 
1291
+ foreach( $aInactivePlugins as $item ){
1292
+ if( stripos($item,$slug.'.php') !== false )
1293
+ return $item;
1294
+ }
1295
+
1296
  return false;
1297
  }
1298
 
1299
 
 
 
 
1300
 
 
 
 
 
 
 
1301
 
1302
+ function fv_player_disable_object_cache($value=null){
1303
+ global $_wp_using_ext_object_cache, $fv_player_wp_using_ext_object_cache_prev;
1304
+ $fv_player_wp_using_ext_object_cache_prev = $_wp_using_ext_object_cache;
1305
+ $_wp_using_ext_object_cache = false;
1306
+ return $value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1307
  }
1308
 
1309
+ function fv_player_enable_object_cache($value=null){
1310
+ global $_wp_using_ext_object_cache, $fv_player_wp_using_ext_object_cache_prev;
1311
+ $_wp_using_ext_object_cache = $fv_player_wp_using_ext_object_cache_prev;
1312
+ return $value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1313
  }
1314
 
1315
+ add_filter( 'pre_set_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
1316
+ add_filter( 'pre_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
1317
+ add_action( 'delete_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
1318
+ add_action( 'set_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
1319
+ add_filter( 'transient_fv_flowplayer_license', 'fv_player_enable_object_cache' );
1320
+ add_action( 'deleted_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
1321
 
1322
 
1323
 
 
 
 
 
 
 
 
 
1324
 
1325
+ function fv_player_remove_update( $objUpdates ) {
1326
+ if( !$objUpdates || !isset($objUpdates->response) || count($objUpdates->response) == 0 ) return $objUpdates;
1327
 
1328
+ foreach( $objUpdates->response AS $key => $objUpdate ) {
1329
+ if( stripos($key,'fv-wordpress-flowplayer') === 0 ) {
1330
+ unset($objUpdates->response[$key]);
 
 
 
 
1331
  }
 
 
 
 
 
 
 
 
 
 
 
 
1332
  }
1333
+
1334
+ return $objUpdates;
1335
  }
1336
 
1337
 
1338
 
1339
 
1340
+ function fv_player_pointer_scripts() {
1341
+ ?>
1342
+ <script>
1343
+ (function ($) {
1344
+ $(document).on('click', '.fv_player_notification_video_links .button-primary', function(e) {
1345
+ $(document).ajaxComplete( function() {
1346
+ window.location = '<?php echo site_url('wp-admin/options-general.php?page=fvplayer'); ?>#playlist_advance';
1347
+ });
1348
+ });
1349
+ })(jQuery);
1350
+ </script>
1351
+ <?php
1352
  }
controller/frontend.php CHANGED
@@ -36,35 +36,46 @@ add_filter( 'run_ngg_resource_manager', '__return_false' ); // Nextgen Gallery
36
 
37
  function fv_flowplayer_ap_action_init(){
38
  // Localization
39
- load_plugin_textdomain('fv_flowplayer', false, dirname(dirname(plugin_basename(__FILE__))) . "/languages");
40
  }
41
  add_action('init', 'fv_flowplayer_ap_action_init');
42
 
43
  function fv_flowplayer_get_js_translations() {
44
 
45
- $aStrings = Array(
46
- 0 => __('', 'flowplayer'),
47
- 1 => __('Video loading aborted', 'fv_flowplayer'),
48
- 2 => __('Network error', 'fv_flowplayer'),
49
- 3 => __('Video not properly encoded', 'fv_flowplayer'),
50
- 4 => __('Video file not found', 'fv_flowplayer'),
51
- 5 => __('Unsupported video', 'fv_flowplayer'),
52
- 6 => __('Skin not found', 'fv_flowplayer'),
53
- 7 => __('SWF file not found', 'fv_flowplayer'),
54
- 8 => __('Subtitles not found', 'fv_flowplayer'),
55
- 9 => __('Invalid RTMP URL', 'fv_flowplayer'),
56
- 10 => __('Unsupported video format. Try installing Adobe Flash.', 'fv_flowplayer'),
57
- 11 => __('Click to watch the video', 'fv_flowplayer'),
58
- 12 => __('[This post contains video, click to play]', 'fv_flowplayer'),
59
- 'video_expired' => __('<h2>Video file expired.<br />Please reload the page and play it again.</h2>', 'fv_flowplayer'),
60
- 'unsupported_format' => __('<h2>Unsupported video format.<br />Please use a Flash compatible device.</h2>','fv_flowplayer'),
61
- 'mobile_browser_detected_1' => __('Mobile browser detected, serving low bandwidth video.','fv_flowplayer'),
62
- 'mobile_browser_detected_2' => __('Click here','fv_flowplayer'),
63
- 'mobile_browser_detected_3' => __('for full quality.','fv_flowplayer'),
64
- 'live_stream_failed' => __('<h2>Live stream load failed.</h2><h3>Please try again later, perhaps the stream is currently offline.</h3>','fv_flowplayer'),
65
- 'live_stream_failed_2' => __('<h2>Live stream load failed.</h2><h3>Please try again later, perhaps the stream is currently offline.</h3>','fv_flowplayer'),
66
- 'what_is_wrong' => __('Please tell us what is wrong :','fv_flowplayer'),
67
- 'full_sentence' => __('Please give us more information (a full sentence) so we can help you better','fv_flowplayer'),
 
 
 
 
 
 
 
 
 
 
 
68
  );
69
 
70
  return $aStrings;
@@ -286,16 +297,23 @@ function flowplayer_prepare_scripts() {
286
  global $fv_fp, $fv_wp_flowplayer_ver;
287
 
288
  // don't load script in Optimize Press 2 preview
289
- if( flowplayer::is_optimizepress() ) {
290
  return;
291
  }
292
 
293
  if(
294
  isset($GLOBALS['fv_fp_scripts']) ||
295
- (isset($fv_fp->conf['js-everywhere']) && strcmp($fv_fp->conf['js-everywhere'],'true') == 0 ) ||
296
  isset($_GET['fv_wp_flowplayer_check_template'])
297
- ) {
298
- wp_enqueue_script( 'flowplayer', flowplayer::get_plugin_url().'/flowplayer/fv-flowplayer.min.js', array('jquery'), $fv_wp_flowplayer_ver, true );
 
 
 
 
 
 
 
299
 
300
  $sPluginUrl = preg_replace( '~^.*://~', '//', FV_FP_RELATIVE_PATH );
301
 
@@ -306,7 +324,28 @@ function flowplayer_prepare_scripts() {
306
  wp_enqueue_script( 'flowplayer-mediaelement', flowplayer::get_plugin_url().'/mediaelement/mediaelement-and-player.min.js', array('jquery'), $fv_wp_flowplayer_ver, true );
307
  }
308
 
309
- $aConf = array('embed' => array( 'library' => $sPluginUrl.'/flowplayer/fv-flowplayer.min.js', 'script' => $sPluginUrl.'/flowplayer/embed.min.js', 'skin' => $sPluginUrl.'/css/flowplayer.css', 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  if( $sCommercialKey ) $aConf['key'] = $sCommercialKey;
311
  if( apply_filters( 'fv_flowplayer_safety_resize', true) && !isset($fv_fp->conf['fixed_size']) || strcmp($fv_fp->conf['fixed_size'],'true') != 0 ) {
312
  $aConf['safety_resize'] = true;
@@ -327,6 +366,9 @@ function flowplayer_prepare_scripts() {
327
  wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_input', array(true) );
328
  wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_js_test', array(true) );
329
  }
 
 
 
330
 
331
  wp_localize_script( 'flowplayer', 'fv_flowplayer_translations', fv_flowplayer_get_js_translations());
332
  wp_localize_script( 'flowplayer', 'fv_fp_ajaxurl', site_url().'/wp-admin/admin-ajax.php' );
@@ -338,19 +380,39 @@ function flowplayer_prepare_scripts() {
338
  wp_localize_script( 'flowplayer', 'fv_flowplayer_popup', $fv_fp->aPopups );
339
  }
340
 
341
- if( count($GLOBALS['fv_fp_scripts']) > 0 ) {
342
  foreach( $GLOBALS['fv_fp_scripts'] AS $sKey => $aScripts ) {
343
  wp_localize_script( 'flowplayer', $sKey.'_array', $aScripts );
344
  }
345
  }
 
 
 
 
 
 
 
 
 
346
  }
 
 
 
 
 
 
 
 
 
 
 
347
  }
348
 
349
  /**
350
  * Prints flowplayer javascript content to the bottom of the page.
351
  */
352
  function flowplayer_display_scripts() {
353
- if( flowplayer::is_optimizepress() ) {
354
  return;
355
  }
356
 
@@ -371,7 +433,7 @@ function flowplayer($shortcode) {
371
  Make sure our div won't be wrapped in any P tag and that html attributes don't break the shortcode
372
  */
373
  function fv_flowplayer_the_content( $c ) {
374
- if( flowplayer::is_optimizepress() ) {
375
  return $c;
376
  }
377
 
@@ -441,3 +503,45 @@ function fv_player_caption( $caption ) {
441
  }
442
  add_filter( 'fv_player_caption', 'fv_player_caption' );
443
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  function fv_flowplayer_ap_action_init(){
38
  // Localization
39
+ load_plugin_textdomain('fv-wordpress-flowplayer', false, dirname(dirname(plugin_basename(__FILE__))) . "/languages");
40
  }
41
  add_action('init', 'fv_flowplayer_ap_action_init');
42
 
43
  function fv_flowplayer_get_js_translations() {
44
 
45
+ $sWhy = __(' <a target="_blank" href="https://foliovision.com/2017/05/issues-with-vimeo-on-android">Why?</a>','fv-wordpress-flowplayer');
46
+
47
+ $aStrings = array(
48
+ 0 => '',
49
+ 1 => __('Video loading aborted', 'fv-wordpress-flowplayer'),
50
+ 2 => __('Network error', 'fv-wordpress-flowplayer'),
51
+ 3 => __('Video not properly encoded', 'fv-wordpress-flowplayer'),
52
+ 4 => __('Video file not found', 'fv-wordpress-flowplayer'),
53
+ 5 => __('Unsupported video', 'fv-wordpress-flowplayer'),
54
+ 6 => __('Skin not found', 'fv-wordpress-flowplayer'),
55
+ 7 => __('SWF file not found', 'fv-wordpress-flowplayer'),
56
+ 8 => __('Subtitles not found', 'fv-wordpress-flowplayer'),
57
+ 9 => __('Invalid RTMP URL', 'fv-wordpress-flowplayer'),
58
+ 10 => __('Unsupported video format. Try installing Adobe Flash.', 'fv-wordpress-flowplayer'),
59
+ 11 => __('Click to watch the video', 'fv-wordpress-flowplayer'),
60
+ 12 => __('[This post contains video, click to play]', 'fv-wordpress-flowplayer'),
61
+ 'video_expired' => __('<h2>Video file expired.<br />Please reload the page and play it again.</h2>', 'fv-wordpress-flowplayer'),
62
+ 'unsupported_format' => __('<h2>Unsupported video format.<br />Please use a Flash compatible device.</h2>','fv-wordpress-flowplayer'),
63
+ 'mobile_browser_detected_1' => __('Mobile browser detected, serving low bandwidth video.','fv-wordpress-flowplayer'),
64
+ 'mobile_browser_detected_2' => __('Click here','fv-wordpress-flowplayer'),
65
+ 'mobile_browser_detected_3' => __('for full quality.','fv-wordpress-flowplayer'),
66
+ 'live_stream_failed' => __('<h2>Live stream load failed.</h2><h3>Please try again later, perhaps the stream is currently offline.</h3>','fv-wordpress-flowplayer'),
67
+ 'live_stream_failed_2' => __('<h2>Live stream load failed.</h2><h3>Please try again later, perhaps the stream is currently offline.</h3>','fv-wordpress-flowplayer'),
68
+ 'what_is_wrong' => __('Please tell us what is wrong :','fv-wordpress-flowplayer'),
69
+ 'full_sentence' => __('Please give us more information (a full sentence) so we can help you better','fv-wordpress-flowplayer'),
70
+ 'error_JSON' =>__('Admin: Error parsing JSON','fv-wordpress-flowplayer'),
71
+ 'no_support_IE9' =>__('Admin: Video checker doesn\'t support IE 9.','fv-wordpress-flowplayer'),
72
+ 'check_failed' =>__('Admin: Check failed.','fv-wordpress-flowplayer'),
73
+ 'video_issues' =>__('Video Issues','fv-wordpress-flowplayer'),
74
+ 'link_copied' =>__('Video Link Copied to Clipboard','fv-wordpress-flowplayer'),
75
+ 'embed_copied' =>__('Embed Code Copied to Clipboard','fv-wordpress-flowplayer'),
76
+ 'warning_iphone_subs' => __('This video has subtitles, that are not supported on your device.','fv-wordpress-flowplayer'),
77
+ 'warning_unstable_android' => __('You are using an old Android device. If you experience issues with the video please use <a href="https://play.google.com/store/apps/details?id=org.mozilla.firefox">Firefox</a>.','fv-wordpress-flowplayer').$sWhy,
78
+ 'warning_old_safari' => __('You are using an old Safari browser. If you experience issues with the video please use <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> or other modern browser.','fv-wordpress-flowplayer').$sWhy,
79
  );
80
 
81
  return $aStrings;
297
  global $fv_fp, $fv_wp_flowplayer_ver;
298
 
299
  // don't load script in Optimize Press 2 preview
300
+ if( flowplayer::is_special_editor() ) {
301
  return;
302
  }
303
 
304
  if(
305
  isset($GLOBALS['fv_fp_scripts']) ||
306
+ $fv_fp->_get_option('js-everywhere') ||
307
  isset($_GET['fv_wp_flowplayer_check_template'])
308
+ ){
309
+
310
+ $aDependencies = array('jquery');
311
+ if( $fv_fp->load_tabs ) {
312
+ wp_enqueue_script('jquery-ui-tabs', false, array('jquery','jquery-ui-core'), $fv_wp_flowplayer_ver, true);
313
+ $aDependencies[] = 'jquery-ui-tabs';
314
+ }
315
+
316
+ wp_enqueue_script( 'flowplayer', flowplayer::get_plugin_url().'/flowplayer/fv-flowplayer.min.js', $aDependencies, $fv_wp_flowplayer_ver, true );
317
 
318
  $sPluginUrl = preg_replace( '~^.*://~', '//', FV_FP_RELATIVE_PATH );
319
 
324
  wp_enqueue_script( 'flowplayer-mediaelement', flowplayer::get_plugin_url().'/mediaelement/mediaelement-and-player.min.js', array('jquery'), $fv_wp_flowplayer_ver, true );
325
  }
326
 
327
+ $aConf = array( 'fullscreen' => true, 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver, 'swfHls' => $sPluginUrl.'/flowplayer/flowplayerhls.swf?ver='.$fv_wp_flowplayer_ver );
328
+
329
+ if( !empty($fv_fp->conf['rtmp-live-buffer']) && $fv_fp->conf['rtmp-live-buffer'] == 'true' ) {
330
+ $aConf['bufferTime'] = apply_filters( 'fv_player_rtmp_bufferTime', 3 );
331
+ }
332
+
333
+ if( !empty($fv_fp->conf['integrations']['embed_iframe']) && $fv_fp->conf['integrations']['embed_iframe'] == 'true' ) {
334
+ $aConf['embed'] = false;
335
+ } else {
336
+ $aConf['embed'] = array( 'library' => $sPluginUrl.'/flowplayer/fv-flowplayer.min.js', 'script' => $sPluginUrl.'/flowplayer/embed.min.js', 'skin' => $sPluginUrl.'/css/flowplayer.css', 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver, 'swfHls' => $sPluginUrl.'/flowplayer/flowplayerhls.swf?ver='.$fv_wp_flowplayer_ver );
337
+ }
338
+
339
+ if( !isset($fv_fp->conf['ui_speed_increment']) || empty($fv_fp->conf['ui_speed_increment']) || $fv_fp->conf['ui_speed_increment'] == 0.25){
340
+ $aConf['speeds'] = array( 0.25,0.5,0.75,1,1.25,1.5,1.75,2 );
341
+ }elseif($fv_fp->conf['ui_speed_increment'] == 0.1){
342
+ $aConf['speeds'] = array( 0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2 );
343
+ }elseif($fv_fp->conf['ui_speed_increment'] == 0.5){
344
+ $aConf['speeds'] = array( 0.25,0.5,1,1.5,2 );
345
+ }
346
+
347
+ $aConf['video_hash_links'] = empty($fv_fp->aCurArgs['linking']) ? !$fv_fp->_get_option('disable_video_hash_links' ) : $fv_fp->aCurArgs['linking'] === 'true';
348
+
349
  if( $sCommercialKey ) $aConf['key'] = $sCommercialKey;
350
  if( apply_filters( 'fv_flowplayer_safety_resize', true) && !isset($fv_fp->conf['fixed_size']) || strcmp($fv_fp->conf['fixed_size'],'true') != 0 ) {
351
  $aConf['safety_resize'] = true;
366
  wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_input', array(true) );
367
  wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_js_test', array(true) );
368
  }
369
+ if( current_user_can('edit_posts') ) {
370
+ wp_localize_script( 'flowplayer', 'fv_flowplayer_user_edit', array(true) );
371
+ }
372
 
373
  wp_localize_script( 'flowplayer', 'fv_flowplayer_translations', fv_flowplayer_get_js_translations());
374
  wp_localize_script( 'flowplayer', 'fv_fp_ajaxurl', site_url().'/wp-admin/admin-ajax.php' );
380
  wp_localize_script( 'flowplayer', 'fv_flowplayer_popup', $fv_fp->aPopups );
381
  }
382
 
383
+ if( isset($GLOBALS['fv_fp_scripts']) && count($GLOBALS['fv_fp_scripts']) > 0 ) {
384
  foreach( $GLOBALS['fv_fp_scripts'] AS $sKey => $aScripts ) {
385
  wp_localize_script( 'flowplayer', $sKey.'_array', $aScripts );
386
  }
387
  }
388
+
389
+ if( $fv_fp->load_dash ) {
390
+ wp_enqueue_script( 'flowplayer-dash', flowplayer::get_plugin_url().'/flowplayer/flowplayer.dashjs.min.js', array('flowplayer'), $fv_wp_flowplayer_ver, true );
391
+ }
392
+
393
+ if( $fv_fp->load_hlsjs && isset($fv_fp->conf['hlsjs']) && $fv_fp->conf['hlsjs'] == 'true' ) {
394
+ wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/flowplayer/flowplayer.hlsjs.min.js', array('flowplayer'), $fv_wp_flowplayer_ver, true );
395
+ }
396
+
397
  }
398
+
399
+ global $FV_Player_lightbox;
400
+ if( $FV_Player_lightbox->bLoad || isset($fv_fp->conf['lightbox_images']) && $fv_fp->conf['lightbox_images'] == 'true' ) {
401
+ $aConf = array();
402
+ $aConf['lightbox_images'] = !empty($fv_fp->conf['lightbox_images']) && $fv_fp->conf['lightbox_images'] == 'true' ? true : false;
403
+
404
+ wp_enqueue_script( 'fv_player_lightbox', flowplayer::get_plugin_url().'/js/lightbox.js', 'jquery', $fv_wp_flowplayer_ver, true );
405
+ wp_localize_script( 'fv_player_lightbox', 'fv_player_lightbox', $aConf );
406
+
407
+ }
408
+
409
  }
410
 
411
  /**
412
  * Prints flowplayer javascript content to the bottom of the page.
413
  */
414
  function flowplayer_display_scripts() {
415
+ if( flowplayer::is_special_editor() ) {
416
  return;
417
  }
418
 
433
  Make sure our div won't be wrapped in any P tag and that html attributes don't break the shortcode
434
  */
435
  function fv_flowplayer_the_content( $c ) {
436
+ if( flowplayer::is_special_editor() ) {
437
  return $c;
438
  }
439
 
503
  }
504
  add_filter( 'fv_player_caption', 'fv_player_caption' );
505
 
506
+
507
+ add_filter( 'comment_text', 'fv_player_comment_text', 0 );
508
+ add_filter( 'bp_get_activity_content_body', 'fv_player_comment_text', 6 );
509
+ add_filter( 'bbp_get_topic_content', 'fv_player_comment_text', 0 );
510
+ add_filter( 'bbp_get_reply_content', 'fv_player_comment_text', 0 );
511
+
512
+ function fv_player_comment_text( $comment_text ) {
513
+ if( is_admin() ) return $comment_text;
514
+
515
+ global $fv_fp;
516
+ if( isset($fv_fp->conf['parse_comments']) && $fv_fp->conf['parse_comments'] == 'true' ) {
517
+ add_filter('comment_text', 'do_shortcode');
518
+ add_filter('bbp_get_topic_content', 'do_shortcode', 11);
519
+ add_filter('bbp_get_reply_content', 'do_shortcode', 11);
520
+
521
+ if( stripos($comment_text,'youtube.com') !== false || stripos($comment_text,'youtu.be') !== false ) {
522
+ $pattern = '#(?:<iframe[^>]*?src=[\'"])?((?:https?://|//)?' # Optional URL scheme. Either http, or https, or protocol-relative.
523
+ . '(?:www\.|m\.)?' # Optional www or m subdomain.
524
+ . '(?:' # Group host alternatives:
525
+ . 'youtu\.be/' # Either youtu.be,
526
+ . '|youtube\.com/' # or youtube.com
527
+ . '(?:' # Group path alternatives:
528
+ . 'embed/' # Either /embed/,
529
+ . '|v/' # or /v/,
530
+ . '|watch\?v=' # or /watch?v=,
531
+ . '|watch\?.+&v=' # or /watch?other_param&v=
532
+ . ')' # End path alternatives.
533
+ . ')' # End host alternatives.
534
+ . '([\w-]{11})' # 11 characters (Length of Youtube video ids).
535
+ . '(?![\w-]))(?:.*?</iframe>)?#'; # Rejects if overlong id.
536
+ $comment_text = preg_replace( $pattern, '[fvplayer src="$1"]', $comment_text );
537
+ }
538
+
539
+ if( stripos($comment_text,'vimeo.com') !== false ) {
540
+ $pattern = '#(?:https?://)?(?:www.)?(?:player.)?vimeo.com/(?:[/a-z]*/)*([0-9]{6,11})[?]?.*#';
541
+ $comment_text = preg_replace( $pattern, '[fvplayer src="https://vimeo.com/$1"]', $comment_text );
542
+ }
543
+ }
544
+
545
+ return $comment_text;
546
+ }
547
+
controller/shortcodes.php CHANGED
@@ -28,8 +28,9 @@ add_shortcode('fv_time','fv_player_time');
28
 
29
  function flowplayer_content_handle( $atts, $content = null, $tag ) {
30
  global $fv_fp;
31
-
32
- if( $fv_fp->conf['parse_commas'] == 'true' && strcmp($tag,'flowplayer') == 0 ) {
 
33
 
34
  if( !isset( $atts['src'] ) ) {
35
  foreach( $atts AS $key => $att ) {
@@ -120,13 +121,17 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
120
  'admin_warning' => '',
121
  'live' => '',
122
  'caption' => '',
 
123
  'logo' => '',
124
  'share' => '',
125
  'post' => '',
126
- 'speed' => ''
 
 
 
127
  ), $atts ) );
128
 
129
- if( $fv_fp->conf['parse_commas'] == 'true' && strcmp($tag,'flowplayer') == 0 ) {
130
  $arguments['width'] = preg_replace('/\,/', '', $width);
131
  $arguments['height'] = preg_replace('/\,/', '', $height);
132
  $arguments['autoplay'] = preg_replace('/\,/', '', $autoplay);
@@ -155,12 +160,16 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
155
  $arguments['admin_warning'] = $admin_warning;
156
  $arguments['live'] = $live;
157
  $arguments['caption'] = $caption;
 
158
  $arguments['logo'] = $logo;
159
  $arguments['share'] = $share;
160
  $arguments['post'] = $post;
161
  $arguments['speed'] = $speed;
 
 
162
  $arguments['src'] = trim( preg_replace('/\,/', '', $src) );
163
-
 
164
  } else {
165
  $arguments = shortcode_atts( array(
166
  'src' => '',
@@ -192,10 +201,14 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
192
  'admin_warning' => '',
193
  'live' => '',
194
  'caption' => '',
 
195
  'logo' => '',
196
  'share' => '',
197
  'post' => '',
198
- 'speed' => ''
 
 
 
199
  ), $atts );
200
  }
201
 
@@ -204,6 +217,12 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
204
  unset($arguments['mobile']);
205
  }
206
 
 
 
 
 
 
 
207
  $arguments = apply_filters( 'fv_flowplayer_shortcode', $arguments, $fv_fp, $atts );
208
 
209
  if( $post == 'this' ) {
28
 
29
  function flowplayer_content_handle( $atts, $content = null, $tag ) {
30
  global $fv_fp;
31
+ if( !$fv_fp ) return false;
32
+
33
+ if( $fv_fp->_get_option('parse_commas') && strcmp($tag,'flowplayer') == 0 ) {
34
 
35
  if( !isset( $atts['src'] ) ) {
36
  foreach( $atts AS $key => $att ) {
121
  'admin_warning' => '',
122
  'live' => '',
123
  'caption' => '',
124
+ 'caption_html' => '',
125
  'logo' => '',
126
  'share' => '',
127
  'post' => '',
128
+ 'speed' => '',
129
+ 'liststyle' => '',
130
+ 'playlist_advance' => '',
131
+ 'linking' => '',
132
  ), $atts ) );
133
 
134
+ if( $fv_fp->_get_option('parse_commas') && strcmp($tag,'flowplayer') == 0 ) {
135
  $arguments['width'] = preg_replace('/\,/', '', $width);
136
  $arguments['height'] = preg_replace('/\,/', '', $height);
137
  $arguments['autoplay'] = preg_replace('/\,/', '', $autoplay);
160
  $arguments['admin_warning'] = $admin_warning;
161
  $arguments['live'] = $live;
162
  $arguments['caption'] = $caption;
163
+ $arguments['caption_html'] = $caption_html;
164
  $arguments['logo'] = $logo;
165
  $arguments['share'] = $share;
166
  $arguments['post'] = $post;
167
  $arguments['speed'] = $speed;
168
+ $arguments['liststyle'] = $liststyle;
169
+ $arguments['playlist_advance'] = $playlist_advance;
170
  $arguments['src'] = trim( preg_replace('/\,/', '', $src) );
171
+ $arguments['linking'] = $linking;
172
+
173
  } else {
174
  $arguments = shortcode_atts( array(
175
  'src' => '',
201
  'admin_warning' => '',
202
  'live' => '',
203
  'caption' => '',
204
+ 'caption_html' => '',
205
  'logo' => '',
206
  'share' => '',
207
  'post' => '',
208
+ 'speed' => '',
209
+ 'liststyle' => '',
210
+ 'playlist_advance' => '',
211
+ 'linking' => '',
212
  ), $atts );
213
  }
214
 
217
  unset($arguments['mobile']);
218
  }
219
 
220
+ foreach( $atts AS $key => $val ) {
221
+ if( stripos($key,'subtitles_') === 0 ) {
222
+ $arguments[$key] = $val;
223
+ }
224
+ }
225
+
226
  $arguments = apply_filters( 'fv_flowplayer_shortcode', $arguments, $fv_fp, $atts );
227
 
228
  if( $post == 'this' ) {
css/admin.css CHANGED
@@ -1,4 +1,4 @@
1
- #content .fv-wp-flowplayer-notice-small, .fv-wp-flowplayer-notice-small { position: absolute; top: 1%; left: 1%; z-index: 2; }
2
  #content .flowplayer.is-mouseout .fv-wp-flowplayer-notice-small, .flowplayer.is-mouseout .fv-wp-flowplayer-notice-small { top: 1%; -webkit-transition:top .15s .3s;-moz-transition:top .15s .3s;transition:top .15s .3s }
3
  #content .flowplayer.is-mouseover.is-ready .fv-wp-flowplayer-notice-small, .flowplayer.is-mouseover.is-ready .fv-wp-flowplayer-notice-small { top: 32px }
4
  #content .fv-wp-flowplayer-notice, .fv-wp-flowplayer-notice { color: black !important; background-color: #FFFFE0; border-color: #E6DB55; margin: -1%; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; line-height: 15px; z-index: 100; width: 97%; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif }
@@ -41,8 +41,63 @@
41
  .fv-wp-flowplayer-notice-parsed.level-6 { background: #d0d0d0; }
42
  .fv-wp-flowplayer-notice-parsed.level-7 { background: #c8c8c8; }
43
  .mail-content-details { height: 200px; overflow: auto; width: 100%; }
 
44
 
 
 
45
 
46
 
47
- .flowplayer-wrapper { width: 54%; display: inline-block; float: right;}
48
- @media only screen and (max-width: 940px) {.flowplayer-wrapper { width: 100%; float: none;} .form-table2.flowplayer-settings {width: 100% !important;}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #content .fv-wp-flowplayer-notice-small, .fv-wp-flowplayer-notice-small { position: absolute; top: 1%; left: 1%; z-index: 20; }
2
  #content .flowplayer.is-mouseout .fv-wp-flowplayer-notice-small, .flowplayer.is-mouseout .fv-wp-flowplayer-notice-small { top: 1%; -webkit-transition:top .15s .3s;-moz-transition:top .15s .3s;transition:top .15s .3s }
3
  #content .flowplayer.is-mouseover.is-ready .fv-wp-flowplayer-notice-small, .flowplayer.is-mouseover.is-ready .fv-wp-flowplayer-notice-small { top: 32px }
4
  #content .fv-wp-flowplayer-notice, .fv-wp-flowplayer-notice { color: black !important; background-color: #FFFFE0; border-color: #E6DB55; margin: -1%; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; line-height: 15px; z-index: 100; width: 97%; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif }
41
  .fv-wp-flowplayer-notice-parsed.level-6 { background: #d0d0d0; }
42
  .fv-wp-flowplayer-notice-parsed.level-7 { background: #c8c8c8; }
43
  .mail-content-details { height: 200px; overflow: auto; width: 100%; }
44
+ .fv-player-interface-form-group td { width:50%; }
45
 
46
+ .flowplayer-wrapper { width: 70%; display: inline-block; float: right;}
47
+ @media only screen and (max-width: 940px) {.flowplayer-wrapper { width: 100%; float: none;} .form-table2.flowplayer-settings {width: 100% !important;}}
48
 
49
 
50
+ #fv-player-popups-settings tr.data:nth-child(even) { background-color: #eee; }
51
+ .fv-player-popup-remove { visibility: hidden; }
52
+ td:hover > .fv-player-popup-remove { visibility: visible; }
53
+ table.fv-player-popup-formats td:first-child { width: 72px }
54
+ #fv_flowplayer_popups .inside label {
55
+ display: initial;
56
+ text-align: inherit;
57
+ }
58
+ #fv-player-popups-settings > tbody > tr > td:nth-child( 1 ) {
59
+ text-align: center;
60
+ max-width: 7px;
61
+ }
62
+
63
+ .fv-metabox-holder {
64
+ padding-top:0!important;
65
+ }
66
+
67
+ .fv-nav-tab-wrapper {
68
+ border-bottom: 0px!important;
69
+ margin-left: 1px!important;
70
+ }
71
+
72
+ .fv-metabox-holder .postbox.hide-if-js {
73
+ display:block;
74
+ }
75
+
76
+ .fv-metabox-holder .postbox:first-child > .hndle, .fv-metabox-holder .postbox:first-child > .handlediv {
77
+ display:none;
78
+ }
79
+
80
+ #fv_flowplayer_admin_tabs .nav-tab-active {
81
+ background-color: #ffffff;
82
+ border-bottom: #ffffff;
83
+ }
84
+
85
+ .wp-admin .user-videos .fv-player-custom-video {
86
+ margin-bottom: 10px;
87
+ }
88
+ .wp-admin .user-videos .flowplayer, .postbox-container .fv-player-custom-video .flowplayer, .usersultra-dahsboard-center .fv-player-custom-video .flowplayer {
89
+ max-width: 432px !important;
90
+ margin: 2px;
91
+ }
92
+ .wp-admin .user-videos .fv-player-custom-video > iframe, .postbox-container .fv-player-custom-video > iframe, .usersultra-dahsboard-center .fv-player-custom-video > iframe {
93
+ display: block;
94
+ overflow: hidden;
95
+ width: 432px;
96
+ height: 243px;
97
+ }
98
+
99
+ #fv_flowplayer_interface_options p.description { line-height: 1.5; margin-bottom: 0; margin-top: 0; }
100
+
101
+ #fp-preview-wrapper{height:360px;width:420px;position:absolute;top:0px;right:50px;}
102
+ #fp-preview-wrapper>.flowplayer{position:relative; height:160px;}
103
+ #fp-preview-wrapper .fp-subtitle{height:50px;}
css/colorbox.css CHANGED
@@ -11,7 +11,8 @@ Avoid changing this area to maintain compatability with future versions of Color
11
  #fv_player_boxContent{position:relative; overflow:hidden;}
12
  #fv_player_boxLoadedContent{overflow:auto;}
13
  #fv_player_boxLoadedContent iframe{display:block; width:100%; height:100%; border:0; background-color: white;}
14
- .fv-flowplayer-shortcode-editor #fv_player_boxTitle{margin:5px; text-align: left; bottom: auto }
 
15
  #fv_player_boxLoadingOverlay, #fv_player_boxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
16
  #fv_player_boxPrevious, #fv_player_boxNext, #fv_player_boxClose, #fv_player_boxSlideshow{cursor:pointer;}
17
 
@@ -33,4 +34,8 @@ order/nesting of the generated HTML, so that the structure easier to understand.
33
  /*#fv_player_boxLoadingOverlay{ text-align: center; background:url(loading.gif) 5px 5px no-repeat #fff;}*/
34
  #fv_player_boxClose{position:absolute; top:2px; right:2px; display:block; color:#444; height: 16px; width: 16px; overflow: hidden; text-indent: 25px; background: url("img/uploader-icons.png") -98px 0 no-repeat transparent; border: 0; }
35
  #fv_player_boxClose:hover { background-position: -98px 0; }
36
-
 
 
 
 
11
  #fv_player_boxContent{position:relative; overflow:hidden;}
12
  #fv_player_boxLoadedContent{overflow:auto;}
13
  #fv_player_boxLoadedContent iframe{display:block; width:100%; height:100%; border:0; background-color: white;}
14
+ .fv-flowplayer-shortcode-editor #fv_player_boxTitle{margin:5px; text-align: left; bottom: auto;}
15
+ .fv-flowplayer-shortcode-editor #fv_player_boxClose{top:8px;right:8px;}
16
  #fv_player_boxLoadingOverlay, #fv_player_boxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
17
  #fv_player_boxPrevious, #fv_player_boxNext, #fv_player_boxClose, #fv_player_boxSlideshow{cursor:pointer;}
18
 
34
  /*#fv_player_boxLoadingOverlay{ text-align: center; background:url(loading.gif) 5px 5px no-repeat #fff;}*/
35
  #fv_player_boxClose{position:absolute; top:2px; right:2px; display:block; color:#444; height: 16px; width: 16px; overflow: hidden; text-indent: 25px; background: url("img/uploader-icons.png") -98px 0 no-repeat transparent; border: 0; }
36
  #fv_player_boxClose:hover { background-position: -98px 0; }
37
+
38
+ /* Add video button */
39
+ .wp-media-buttons .fv-wordpress-flowplayer-button span{min-width:28px;min-height: 26px;display:inline-block;background:url('../images/icon.png') no-repeat center center;vertical-align:top;}
40
+ @media only screen and (max-width: 782px) {.wp-media-buttons .fv-wordpress-flowplayer-button span{min-width:24px;display:inline-block;min-height:38px;} }
41
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {.wp-media-buttons .fv-wordpress-flowplayer-button span{background:url('../images/icon@x2.png') no-repeat center center;min-width:32px;background-size:32px auto;min-height:36px;} }
css/flowplayer.css CHANGED
@@ -1,20 +1,58 @@
1
- .flowplayer{position:relative;width:100%;background-size:contain;background-repeat:no-repeat;background-position:center center;display:inline-block; -webkit-backface-visibility: hidden }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .flowplayer *{font-weight:inherit;font-family:inherit;font-style:inherit;text-decoration:inherit;font-size:100%;padding:0;border:0;margin:0;list-style-type:none}
3
  .flowplayer a:focus{outline:0}
4
- .flowplayer video{width:100%; background: black;}
5
  .flowplayer.is-ipad video{-webkit-transform:translateX(-2048px);}
6
  .is-ready.flowplayer.is-ipad video{-webkit-transform:translateX(0)}
 
7
  .flowplayer .fp-engine,.flowplayer .fp-ui,.flowplayer .fp-message{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;z-index:1}
 
8
  .flowplayer .fp-message{display:none;text-align:center;padding-top:5%;cursor:default;}
9
  .flowplayer .fp-message h2{font-size:120%;margin-bottom:1em}
10
  .flowplayer .fp-message p{color:#666;font-size:95%}
11
- .flowplayer .fp-controls{position:absolute;bottom:0;width:100%;height:0;}
12
- .no-background.flowplayer .fp-controls{background-color:transparent !important;background-image:-moz-linear-gradient(transparent,transparent) !important;background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),to(transparent)) !important}
 
 
 
13
  .is-fullscreen.flowplayer .fp-controls{bottom:3px}
14
  .is-mouseover.flowplayer .fp-controls{bottom:0}
15
- .flowplayer .fp-waiting{/*display:none;*/margin:19% auto;text-align:center; height: 0; }
 
 
 
 
 
 
 
 
 
16
  .flowplayer .fp-waiting *{-webkit-box-shadow:0 0 5px #333;-moz-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333}
17
- .flowplayer .fp-waiting em{width:0em;height:0em;-webkit-border-radius:1em;-moz-border-radius:1em;border-radius:1em;background-color:rgba(255,255,255,0.8);display:inline-block;-webkit-animation:pulse .6s infinite;-moz-animation:pulse .6s infinite;animation:pulse .6s infinite;margin:.3em;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);}
18
  .flowplayer .fp-waiting em:nth-child(1){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}
19
  .flowplayer .fp-waiting em:nth-child(2){-webkit-animation-delay:.45s;-moz-animation-delay:.45s;animation-delay:.45s}
20
  .flowplayer .fp-waiting em:nth-child(3){-webkit-animation-delay:.6s;-moz-animation-delay:.6s;animation-delay:.6s}
@@ -29,176 +67,244 @@
29
  .flowplayer .fp-help em{background:#eee;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;margin-right:.4em;padding:.3em .6em;color:#333}
30
  .flowplayer .fp-help small{font-size:90%;color:#aaa}
31
  .flowplayer .fp-help .fp-close{display:block}
32
-
33
- @media (max-width: 600px){.flowplayer .fp-help p{font-size:9px}
34
- }.flowplayer .fp-subtitle{position:absolute;bottom:40px;left:-99999em;z-index:10;text-align:center;width:100%;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .3s;-moz-transition:opacity .3s;transition:opacity .3s;}
35
- .flowplayer .fp-subtitle p{display:inline;background-color:#333;background-color:rgba(51,51,51,0.9);color:#eee;padding:.1em .4em;font-size:16px;line-height:1.6;}
36
- .flowplayer .fp-subtitle p:after{content:'';clear:both}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  .flowplayer .fp-subtitle.fp-active{left:0;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
38
- .flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-mute,.flowplayer .fp-embed,.flowplayer .fp-close,.flowplayer .fp-play{background-image:url(img/white.png);background-size:37px 300px;}
39
- .is-rtl.flowplayer .fp-fullscreen,.is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-mute,.is-rtl.flowplayer .fp-embed,.is-rtl.flowplayer .fp-close,.is-rtl.flowplayer .fp-play{background-image:url(img/white_rtl.png)}
40
- .color-light.flowplayer .fp-fullscreen,.color-light.flowplayer .fp-unload,.color-light.flowplayer .fp-mute,.color-light.flowplayer .fp-embed,.color-light.flowplayer .fp-close,.color-light.flowplayer .fp-play{background-image:url(img/black.png);}
41
- .is-rtl.color-light.flowplayer .fp-fullscreen,.is-rtl.color-light.flowplayer .fp-unload,.is-rtl.color-light.flowplayer .fp-mute,.is-rtl.color-light.flowplayer .fp-embed,.is-rtl.color-light.flowplayer .fp-close,.is-rtl.color-light.flowplayer .fp-play{background-image:url(img/black_rtl.png)}
42
- @media (-webkit-min-device-pixel-ratio: 2){.color-light.flowplayer .fp-fullscreen,.color-light.flowplayer .fp-unload,.color-light.flowplayer .fp-mute,.color-light.flowplayer .fp-embed,.color-light.flowplayer .fp-close,.color-light.flowplayer .fp-play{background-image:url(img/black-x2.png)}
43
- .is-rtl.color-light.flowplayer .fp-fullscreen,.is-rtl.color-light.flowplayer .fp-unload,.is-rtl.color-light.flowplayer .fp-mute,.is-rtl.color-light.flowplayer .fp-embed,.is-rtl.color-light.flowplayer .fp-close,.is-rtl.color-light.flowplayer .fp-play{background-image:url(img/black_rtl-x2.png)}
44
- }@media (-webkit-min-device-pixel-ratio: 2){.flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-mute,.flowplayer .fp-embed,.flowplayer .fp-close,.flowplayer .fp-play{background-image:url(img/white-x2.png)}
45
- .is-rtl.flowplayer .fp-fullscreen,.is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-mute,.is-rtl.flowplayer .fp-embed,.is-rtl.flowplayer .fp-close,.is-rtl.flowplayer .fp-play{background-image:url(img/white_rtl-x2.png)}
46
- }.flowplayer .fp-flash-disabled{background:#333;width:390px;margin:0 auto;position:absolute;bottom:0;color:#fff}
47
- .is-splash.flowplayer .fp-ui,.is-paused.flowplayer .fp-ui{background:url(img/play_white.png) center no-repeat;background-size:12%;}
48
- .is-error.flowplayer .fp-ui{background:url(img/no_play_white.png) center no-repeat;background-size:12%;}
49
- .is-rtl.is-splash.flowplayer .fp-ui,.is-rtl.is-paused.flowplayer .fp-ui{background:url(img/play_white_rtl.png) center no-repeat;background-size:12%}
50
- @media (-webkit-min-device-pixel-ratio: 2){.is-splash.flowplayer .fp-ui,.is-paused.flowplayer .fp-ui{background:url(img/play_white-x2.png) center no-repeat;background-size:12%}
51
- .is-error.flowplayer .fp-ui {background:url(img/no_play_white-x2.png) center no-repeat;background-size:12%}
52
- .is-rtl.is-splash.flowplayer .fp-ui,.is-rtl.is-paused.flowplayer .fp-ui{background:url(img/play_white_rtl-x2.png) center no-repeat;background-size:12%}
53
- }.color-light.is-splash.flowplayer .fp-ui,.color-light.is-paused.flowplayer .fp-ui{background-image:url(img/play_black.png);}
54
- .is-rtl.color-light.is-splash.flowplayer .fp-ui,.is-rtl.color-light.is-paused.flowplayer .fp-ui{background-image:url(img/play_black_rtl.png)}
55
- @media (-webkit-min-device-pixel-ratio: 2){.color-light.is-splash.flowplayer .fp-ui,.color-light.is-paused.flowplayer .fp-ui{background-image:url(img/play_black-x2.png);}
56
- .is-rtl.color-light.is-splash.flowplayer .fp-ui,.is-rtl.color-light.is-paused.flowplayer .fp-ui{background-image:url(img/play_black_rtl-x2.png)}
57
- }.is-fullscreen.flowplayer .fp-ui{background-size:auto}
58
  .is-seeking.flowplayer .fp-ui,.is-loading.flowplayer .fp-ui{background-image:none}
59
- .flowplayer .fp-logo{position:absolute;top:auto;left:15px;bottom:30px;cursor:pointer;display:none;z-index:1;}
60
- .flowplayer .fp-logo img{width:100%; border-radius: 0; box-shadow: none; border: 0; background: transparent; }
 
 
 
 
 
 
 
 
 
61
  .is-embedded.flowplayer .fp-logo{display:block}
62
  .fixed-controls.flowplayer .fp-logo{bottom:15px}
63
- .flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-close{position:absolute;top:5px;left:auto;right:5px;display:block;width:30px;height:21px;background-position:12px -197px;cursor:pointer;}
64
- .is-rtl.flowplayer .fp-fullscreen,.is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-close{right:auto;left:5px;background-position:18px -197px}
65
- .flowplayer .fp-unload,.flowplayer .fp-close{background-position:14px -175px;display:none;}
66
- .is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-close{background-position:14px -175px}
67
- .flowplayer .fp-play{display:none;width:27px;height:20px;background-position:9px -24px;position:absolute;bottom:0;left:0;}
68
- .is-rtl.flowplayer .fp-play{background-position:18px -24px;left:auto;right:0}
69
- .play-button.flowplayer .fp-play{display:block}
70
- .is-paused.flowplayer .fp-play{background-position:9px 7px;}
71
- .is-rtl.is-paused.flowplayer .fp-play{background-position:18px 7px}
 
 
 
72
  .flowplayer.is-ready.is-closeable .fp-unload{display:block}
73
- .flowplayer.is-ready.is-closeable .fp-fullscreen{display:none}
74
- .flowplayer.is-fullscreen .fp-fullscreen{background-position:10px -217px;display:block !important;}
75
- .is-rtl.flowplayer.is-fullscreen .fp-fullscreen{background-position:21px -217px}
76
- .flowplayer.is-fullscreen .fp-unload,.flowplayer.is-fullscreen .fp-close{display:none !important}
77
- .flowplayer .fp-timeline{height:3px;position:relative;overflow:hidden;top:5px;height:10px;margin:0 150px 0 45px;}
78
- .no-volume.flowplayer .fp-timeline{margin-right:60px}
79
- .no-mute.flowplayer .fp-timeline{margin-right:140px}
80
- .no-mute.no-volume.flowplayer .fp-timeline{margin-right:45px}
81
- .play-button.flowplayer .fp-timeline{margin-left:67px}
82
- .is-rtl.flowplayer .fp-timeline{margin:0 45px 0 150px;}
83
- .no-volume.is-rtl.flowplayer .fp-timeline{margin-left:60px}
84
- .no-mute.is-rtl.flowplayer .fp-timeline{margin-left:140px}
85
- .no-mute.no-volume.is-rtl.flowplayer .fp-timeline{margin-left:45px}
86
- .play-button.is-rtl.flowplayer .fp-timeline{margin-right:67px}
87
- .is-long.flowplayer .fp-timeline{margin:0 180px 0 75px;}
88
- .no-volume.is-long.flowplayer .fp-timeline{margin-right:90px}
89
- .no-mute.is-long.flowplayer .fp-timeline{margin-right:75px}
90
- .play-button.is-long.flowplayer .fp-timeline{margin-left:97px}
91
- .is-rtl.is-long.flowplayer .fp-timeline{margin:75px 0 180px 0;}
92
- .no-volume.is-rtl.is-long.flowplayer .fp-timeline{margin-left:90px}
93
- .no-mute.is-rtl.is-long.flowplayer .fp-timeline{margin-left:75px}
94
- .play-button.is-rtl.is-long.flowplayer .fp-timeline{margin-left:97px}
95
- .aside-time.flowplayer .fp-timeline,.no-time.flowplayer .fp-timeline{margin:0 110px 0 5px}
96
- .aside-time.no-volume.flowplayer .fp-timeline,.no-time.no-volume.flowplayer .fp-timeline{margin-right:20px}
97
- .aside-time.no-mute.flowplayer .fp-timeline,.no-time.no-mute.flowplayer .fp-timeline{margin-right:5px}
98
- .play-button.no-time.flowplayer .fp-timeline,.play-button.aside-time.flowplayer .fp-timeline{margin-left:27px}
99
- .is-rtl.aside-time.flowplayer .fp-timeline,.is-rtl.no-time.flowplayer .fp-timeline{margin:0 5px 0 110px}
100
- .is-rtl.aside-time.no-volume.flowplayer .fp-timeline,.is-rtl.no-time.no-volume.flowplayer .fp-timeline{margin-left:20px}
101
- .is-rtl.aside-time.no-mute.flowplayer .fp-timeline,.is-rtl.no-time.no-mute.flowplayer .fp-timeline{margin-left:5px}
102
- .is-rtl.play-button.no-time.flowplayer .fp-timeline,.is-rtl.play-button.aside-time.flowplayer .fp-timeline{margin-right:27px}
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  .flowplayer .fp-buffer,.flowplayer .fp-progress{position:absolute;top:0;left:auto;height:100%;cursor:col-resize}
104
  .flowplayer .fp-buffer{-webkit-transition:width .25s linear;-moz-transition:width .25s linear;transition:width .25s linear}
105
  .flowplayer .fp-timeline.no-animation .fp-buffer{-webkit-transition:none;-moz-transition:none;transition:none}
 
106
  .flowplayer.is-touch .fp-timeline{overflow:visible}
107
- .flowplayer.is-touch .fp-progress{-webkit-transition:width .2s linear;-moz-transition:width .2s linear;transition:width .2s linear}
108
  .flowplayer.is-touch .fp-timeline.is-dragging .fp-progress{-webkit-transition:right .1s linear,border .1s linear,top .1s linear,left .1s linear;-moz-transition:right .1s linear,border .1s linear,top .1s linear,left .1s linear;transition:right .1s linear,border .1s linear,top .1s linear,left .1s linear}
109
- .flowplayer.is-touch.is-mouseover .fp-progress:after,.flowplayer.is-touch.is-mouseover .fp-progress:before{content:'';display:block;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;position:absolute;right:-5px}
110
  .flowplayer.is-touch.is-rtl.is-mouseover .fp-progress:after,.flowplayer.is-touch.is-rtl.is-mouseover .fp-progress:before{right:auto;left:-5px}
111
  .flowplayer.is-touch.is-rtl.is-mouseover .fp-progress:after{left:-10px;-webkit-box-shadow:-1px 0 4px rgba(0,0,0,0.5);-moz-box-shadow:-1px 0 4px rgba(0,0,0,0.5);box-shadow:-1px 0 4px rgba(0,0,0,0.5)}
112
  .flowplayer.is-touch.is-mouseover .fp-progress:before{width:10px;height:10px}
113
- .flowplayer.is-touch.is-mouseover .fp-progress:after{height:10px;width:10px;top:-5px;right:-10px;border:5px solid rgba(255,255,255,0.65);-webkit-box-shadow:1px 0 4px rgba(0,0,0,0.5);-moz-box-shadow:1px 0 4px rgba(0,0,0,0.5);box-shadow:1px 0 4px rgba(0,0,0,0.5)}
114
- .flowplayer.is-touch.is-mouseover .fp-timeline.is-dragging .fp-progress:after{border:10px solid #fff;-webkit-border-radius:20px;-moz-border-radius:20px;border-radius:20px;-webkit-transition:inherit;-moz-transition:inherit;transition:inherit;top:-10px;right:-15px}
115
  .flowplayer.is-touch.is-rtl.is-mouseover .fp-timeline.is-dragging .fp-progress:after{left:-15px;right:auto;border:10px solid #fff}
116
- .flowplayer .fp-volume{position:absolute;top:7.5px;right:5px;}
117
- .is-rtl.flowplayer .fp-volume{right:auto;left:5px}
118
- .flowplayer .fp-mute{position:relative;width:10px;height:15px;float:left;top:-5px;cursor:pointer;background-position:-2px -99px;}
119
- .is-rtl.flowplayer .fp-mute{float:right;background-position:-25px -99px}
 
 
120
  .no-mute.flowplayer .fp-mute{display:none}
121
- .flowplayer .fp-volumeslider{width:90px;height:5px;cursor:col-resize;float:left;}
122
  .is-rtl.flowplayer .fp-volumeslider{float:right}
123
  .no-volume.flowplayer .fp-volumeslider{display:none}
124
  .flowplayer .fp-volumelevel{height:100%}
125
- .flowplayer .fp-time{text-shadow:0 0 1px #000;font-size:12px;font-weight:bold;color:#fff;width:100%;}
126
  .flowplayer .fp-time.is-inverted .fp-duration{display:none}
127
  .flowplayer .fp-time.is-inverted .fp-remaining{display:inline}
128
- .flowplayer .fp-time em{width:37px;height:10px;line-height:10px;text-align:center;position:absolute;bottom:5px}
129
  .no-time.flowplayer .fp-time{display:none}
130
  .is-long.flowplayer .fp-time em{width:65px}
131
- .flowplayer .fp-elapsed{left:5px;}
132
- .play-button.flowplayer .fp-elapsed{left:27px}
133
- .is-rtl.flowplayer .fp-elapsed{left:auto;right:5px;}
134
- .play-button.is-rtl.flowplayer .fp-elapsed{right:27px}
135
- .flowplayer .fp-remaining,.flowplayer .fp-duration{right:110px;color:#eee;}
136
- .no-volume.flowplayer .fp-remaining,.no-volume.flowplayer .fp-duration{right:20px}
137
- .no-mute.flowplayer .fp-remaining,.no-mute.flowplayer .fp-duration{right:100px}
138
- .no-mute.no-volume.flowplayer .fp-remaining,.no-mute.no-volume.flowplayer .fp-duration{right:5px}
139
- .is-rtl.flowplayer .fp-remaining,.is-rtl.flowplayer .fp-duration{right:auto;left:110px;}
140
- .no-volume.is-rtl.flowplayer .fp-remaining,.no-volume.is-rtl.flowplayer .fp-duration{left:20px}
141
- .no-mute.is-rtl.flowplayer .fp-remaining,.no-mute.is-rtl.flowplayer .fp-duration{left:100px}
142
- .no-mute.no-volume.is-rtl.flowplayer .fp-remaining,.no-mute.no-volume.is-rtl.flowplayer .fp-duration{left:5px}
 
 
 
 
 
 
 
 
143
  .flowplayer .fp-remaining{display:none}
144
- .flowplayer.color-light .fp-time{color:#222;text-shadow:0 0 1px #fff}
145
- .flowplayer.color-light .fp-remaining,.flowplayer.color-light .fp-duration{color:#666}
146
- .flowplayer.aside-time .fp-time{position:absolute;top:5px;left:5px;bottom:auto !important;width:85px;}
147
  .flowplayer.aside-time .fp-time strong,.flowplayer.aside-time .fp-time em{position:static}
148
- .flowplayer.aside-time .fp-time .fp-elapsed{margin-right:5px;}
149
- .is-rtl.flowplayer.aside-time .fp-time .fp-elapsed{margin-right:auto;margin-left:5px}
150
- .flowplayer.is-long.aside-time .fp-time{width:130px}
151
  .flowplayer.is-splash,.flowplayer.is-poster{cursor:pointer;}
152
- .flowplayer.is-splash .fp-controls,.flowplayer.is-poster .fp-controls,.flowplayer.is-splash .fp-fullscreen,.flowplayer.is-poster .fp-fullscreen,.flowplayer.is-splash .fp-unload,.flowplayer.is-poster .fp-unload,.flowplayer.is-splash .fp-time,.flowplayer.is-poster .fp-time,.flowplayer.is-splash .fp-embed,.flowplayer.is-poster .fp-embed{display:none !important}
153
  .flowplayer.is-poster .fp-engine{top:-9999em}
154
- .flowplayer.is-loading .fp-waiting {height: 1em;}
155
- .flowplayer.is-loading .fp-waiting em {width:1em;height:1em;}
156
  .flowplayer.is-loading .fp-controls,.flowplayer.is-loading .fp-time{display:none}
157
  .flowplayer.is-loading .fp-ui{background-position:-9999em}
158
  .flowplayer.is-loading video.fp-engine{position:absolute;top:-9999em}
159
- .flowplayer.is-seeking .fp-waiting {height: 1em;}
160
- .flowplayer.is-seeking .fp-waiting em {width:1em;height:1em;}
161
- .flowplayer.is-playing{background-image:none !important;background-color:#333;}
162
  .flowplayer.is-playing.hls-fix.is-finished .fp-engine{position:absolute;top:-9999em}
163
- .flowplayer.is-fullscreen{position:fixed !important;top:0 !important;left:0 !important;border:0 !important;margin:0 !important;width:100% !important;height:100% !important;max-width:100% !important;max-height:100% !important;z-index:99999 !important;-webkit-box-shadow:0 !important;-moz-box-shadow:0 !important;box-shadow:0 !important;background-image:none !important;background-color:#000 !important;}
164
  .is-rtl.flowplayer.is-fullscreen{left:auto !important;right:0 !important}
 
165
  .flowplayer.is-error{border:1px solid #909090;background:#fdfdfd !important;}
166
- .flowplayer.is-error h2{font-weight:bold;font-size:large;margin-top:10%}
167
  .flowplayer.is-error .fp-message{display:block}
168
  .flowplayer.is-error object,.flowplayer.is-error video,.flowplayer.is-error .fp-controls,.flowplayer.is-error .fp-time,.flowplayer.is-error .fp-subtitle{display:none}
169
- .flowplayer.is-ready.is-muted .fp-mute{opacity:.5;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50)}
170
- .flowplayer.is-mouseout .fp-controls{all:0;-webkit-transition:height .15s ease .3s;-moz-transition:all .15s ease .3s;transition:all .15s ease .3s}
 
 
 
171
  .flowplayer.is-mouseout .fp-timeline{margin:0 !important}
172
  .flowplayer.is-mouseout .fp-timeline{-webkit-transition:height .15s .3s,top .15s .3s,margin .15s .3s;-moz-transition:height .15s .3s,top .15s .3s,margin .15s .3s;transition:height .15s .3s,top .15s .3s,margin .15s .3s;height:4px;top:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
173
- .flowplayer.is-mouseout .fp-fullscreen,.flowplayer.is-mouseout .fp-unload,.flowplayer.is-mouseout .fp-elapsed,.flowplayer.is-mouseout .fp-remaining,.flowplayer.is-mouseout .fp-duration,.flowplayer.is-mouseout .fp-embed,.flowplayer.is-mouseout .fp-volume,.flowplayer.is-mouseout .fp-play{opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .15s ease .3s;-moz-transition:opacity .15s ease .3s;transition:opacity .15s ease .3s;}
174
- .flowplayer.is-mouseover .fp-controls,.flowplayer.fixed-controls .fp-controls{height:20px}
175
- .flowplayer.is-mouseover .fp-fullscreen,.flowplayer.fixed-controls .fp-fullscreen,.flowplayer.is-mouseover .fp-unload,.flowplayer.fixed-controls .fp-unload,.flowplayer.is-mouseover .fp-elapsed,.flowplayer.fixed-controls .fp-elapsed,.flowplayer.is-mouseover .fp-remaining,.flowplayer.fixed-controls .fp-remaining,.flowplayer.is-mouseover .fp-duration,.flowplayer.fixed-controls .fp-duration,.flowplayer.is-mouseover .fp-embed,.flowplayer.fixed-controls .fp-embed,.flowplayer.is-mouseover .fp-logo,.flowplayer.fixed-controls .fp-logo,.flowplayer.is-mouseover .fp-volume,.flowplayer.fixed-controls .fp-volume,.flowplayer.is-mouseover .fp-play,.flowplayer.fixed-controls .fp-play{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
 
 
176
  .flowplayer.fixed-controls .fp-volume{display:block}
177
- .flowplayer.fixed-controls .fp-controls{bottom:-20px;}
178
  .is-fullscreen.flowplayer.fixed-controls .fp-controls{bottom:0}
179
- .flowplayer.fixed-controls .fp-time em{bottom:-15px;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);}
180
- .is-fullscreen.flowplayer.fixed-controls .fp-time em{bottom:5px}
181
  .flowplayer.is-disabled .fp-progress{background-color:#999}
182
  .flowplayer.is-flash-disabled{background-color:#333;}
183
  .flowplayer.is-flash-disabled object.fp-engine{z-index:100}
184
  .flowplayer.is-flash-disabled .fp-flash-disabled{display:block;z-index:101}
185
- .flowplayer .fp-embed{position:absolute;top:5px;left:5px;display:block;width:25px;height:20px;background-position:3px -237px;}
186
- .is-rtl.flowplayer .fp-embed{background-position:22px -237px;left:auto;right:5px}
187
-
188
- .flowplayer.aside-time .fp-embed{left:85px;}
189
- .is-rtl.flowplayer.aside-time .fp-embed{left:auto;right:85px}
190
- .flowplayer.aside-time.is-embedding .fp-time{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
191
- .flowplayer.is-long.aside-time .fp-embed{left:130px;}
192
- .is-rtl.flowplayer.is-long.aside-time .fp-embed{left:auto;right:130px}
193
- .flowplayer.no-time .fp-embed{left:5px !important;}
194
- .is-rtl.flowplayer.no-time .fp-embed{left:auto;right:5px !important}
 
 
195
  .flowplayer.is-live .fp-timeline,.flowplayer.is-live .fp-duration,.flowplayer.is-live .fp-remaining{display:none}
196
  .flowplayer .fp-context-menu{position:absolute;display:none;z-index:1001;background-color:#fff;padding:10px;border:1px solid #aaa;-webkit-box-shadow:0 0 4px #888;-moz-box-shadow:0 0 4px #888;box-shadow:0 0 4px #888;width:170px;}
197
- .flowplayer .fp-context-menu li{text-align:center;padding:10px;color:#444;margin:0 -10px 0 -10px;}
198
- .flowplayer .fp-context-menu li a{color:#00a7c8;font-size:110%}
199
  .flowplayer .fp-context-menu li:hover:not(.copyright){background-color:#eee}
200
  .flowplayer .fp-context-menu li.copyright{margin:0;padding-left:110px;background-image:url("img/flowplayer.png");background-repeat:no-repeat;background-size:100px 20px;background-position:5px 5px;border-bottom:1px solid #bbb;}
201
- @media (-webkit-min-device-pixel-ratio: 2){.flowplayer .fp-context-menu li.copyright{background-image:url("img/flowplayer@2x.png")}
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }@-moz-keyframes pulse{0%{opacity:0}
203
  100%{opacity:1}
204
  }@-webkit-keyframes pulse{0%{opacity:0}
@@ -209,24 +315,36 @@
209
  100%{opacity:1}
210
  }@keyframes pulse{0%{opacity:0}
211
  100%{opacity:1}
212
- }.flowplayer .fp-controls{background-color:#333;background-color:rgba(51,51,51,0.6)}
213
- .flowplayer.fixed-controls .fp-controls{background-color:#333}
214
- .flowplayer .fp-timeline{background-color:#666}
215
- .flowplayer .fp-buffer{background-color:#eee}
216
- .flowplayer .fp-progress{background-color:#00a7c8}
217
- .flowplayer .fp-volumeslider{background-color:#000}
218
- .flowplayer .fp-volumelevel{background-color:#fff}
219
- .flowplayer .fp-play{height:24px}
220
- .flowplayer.is-touch.is-mouseover .fp-progress:before{background-color:#00a7c8}
221
- .flowplayer.color-light .fp-controls{background-color:rgba(255,255,255,0.6)}
222
- .flowplayer.color-light.fixed-controls .fp-controls{background-color:#fff}
223
- .flowplayer.color-light .fp-volumeslider{background-color:#ddd}
224
- .flowplayer.color-light .fp-volumelevel{background-color:#222}
225
- .flowplayer.color-alt .fp-progress{background-color:#fff}
226
- .flowplayer.color-alt.is-touch.is-mouseover .fp-progress:before{background-color:#fff}
227
- .flowplayer.color-alt .fp-buffer{background-color:#999}
228
- .flowplayer.color-alt2 .fp-progress{background-color:#900}
229
- .flowplayer.color-alt2.is-touch.is-mouseover .fp-progress:before{background-color:#900}
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  .flowplayer .fp-embed-code{display:none;}
232
  .flowplayer .fvp-share-bar{opacity:0;display:none;position:absolute;top:0px;left:0px;background-color:rgba(0, 0, 0, 0.3);font-size:12px;width:100%}
@@ -234,6 +352,12 @@
234
  .flowplayer .fvp-share-bar textarea{width:400px;min-height:130px;font-family: "Lucida Console", Monaco, monospace; color:#777; white-space:nowrap; resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc; border: 1px solid #888;}
235
  .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fvp-share-bar{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
236
 
 
 
 
 
 
 
237
  /* style reset first */
238
  .flowplayer .fvp-sharing ul {
239
  list-style: none !important;
@@ -244,13 +368,13 @@
244
  /*clear: both;
245
  width: 102px;*/
246
  min-height: 24px;
247
- margin: 7px auto !important;
248
  padding: 0 !important;
249
  float: left;
250
  font-family: "Lucida Console", Monaco, monospace;
251
  }
252
  .fvp-share-bar {
253
- line-height: 24px !important;
254
  }
255
  .fvp-share-bar label {
256
  text-align: center !important;
@@ -270,9 +394,9 @@
270
  border: none !important;
271
  background: none !important;
272
  }
273
- #content .flowplayer a,
274
  .flowplayer a,
275
- .flowplayer a:hover,
276
  .fvp-share-bar .fvp-sharing a {
277
  color: #fff !important;
278
  text-shadow: none !important;
@@ -292,6 +416,11 @@
292
  overflow: hidden;
293
  background: url("img/flp-share-icons.png") no-repeat;
294
  text-indent: -9999em;
 
 
 
 
 
295
  }
296
 
297
  .fvp-share-bar .fvp-sharing a.sharing-twitter {
@@ -305,6 +434,12 @@
305
  .fvp-share-bar .fvp-sharing a.sharing-email {
306
  background-position: 0 -84px;
307
  }
 
 
 
 
 
 
308
  .flowplayer .fvp-share-bar label{float:left;color:#fff;padding: 6px 10px;}
309
  .flowplayer .fp-embed{display:none}
310
  /*.flowplayer.is-mouseover.is-ready .fp-embed-code{display:block}*/
@@ -320,19 +455,53 @@
320
  /*#content .flowplayer.is-ready .fp-embed-code.visible textarea, .flowplayer.is-ready .fp-embed-code.visible textarea { height: 140px; }*/
321
  .fvp-share-bar a.embed-code-toggle { font-weight: bold; color: white; }
322
 
323
- .flowplayer .fp-prev, .flowplayer .fp-next{/* next and prev buttons */position:absolute;top:44%;cursor:pointer;-webkit-transition:opacity .5s;-moz-transition:opacity .5s;transition:opacity .5s;background:url("img/playlist-buttons.png");opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);height:20px;width:12px;}
324
- .is-mouseover.is-ready.flowplayer .fp-prev,.is-mouseover.is-ready.flowplayer .fp-next{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
325
- .flowplayer .fp-prev{left:-20px;background-position:0 -200px;}
326
- .flowplayer .fp-prev:hover{background-position:0 -300px}
327
- .flowplayer .fp-next{right:-20px;background-position:0 -400px;}
328
- .flowplayer .fp-next:hover{background-position:0 -500px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
 
330
  .fp-playlist-external { text-align:center; margin-bottom: 24px;}
331
- .fp-playlist-external a { width:148px; display:inline-block; vertical-align:top; margin:5px 0px 0px 0px;}
332
- .fp-playlist-external a span { display:block;width:120px;height:80px;margin:0 10px;-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s;border:4px solid #fff;background:gray;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-size:auto 100px;background-position:center;}
333
  .fp-playlist-external a:hover span { border-color:#ccc }
334
- .fp-playlist-external a.is-active span { border-color:#52b9e4; }
335
- .fp-playlist-external a.is-active { color:#52b9e4;-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s; }
 
 
 
 
 
 
 
 
 
 
336
 
337
  .add_media span.wp-media-buttons-icon {
338
  background: url("img/media-button.png") no-repeat scroll left top;
@@ -376,14 +545,14 @@ a #add-format, a #add-rtmp {
376
  .flowplayer.video1, .flowplayer.video2, .flowplayer.video3, .flowplayer.video4, .flowplayer.video5, .flowplayer.video6, .flowplayer.video7, .flowplayer.video8, .flowplayer.video9, .flowplayer.video10, .flowplayer.video11, .flowplayer.video12, .flowplayer.video13, .flowplayer.video14, .flowplayer.video15, .flowplayer.video16 { background-image: none !important; }
377
 
378
  .flowplayer .fp-volume { text-align: left; }
379
- #content .flowplayer a, .flowplayer a, .flowplayer a:hover { text-decoration: none; border-bottom: none; }
380
 
381
  .flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
382
  .flowplayer .wpfp_custom_ad img { height: auto; }
383
  .flowplayer.is-playing .wpfp_custom_ad, .flowplayer.is-ready .wpfp_custom_ad { display: block; }
384
  .flowplayer.is-poster .wpfp_custom_ad { display: none; }
385
 
386
- .fv_fp_close { position: absolute; right: 2px; top: 2px; z-index: 2; }
387
  .fv_fp_close a { display: block; width: 16px; height: 16px; background: url(img/exit_btn.png) }
388
 
389
  .wpfp_custom_ad_content h1, .wpfp_custom_ad_content h2, .wpfp_custom_ad_content h3, .wpfp_custom_ad_content h4, .wpfp_custom_ad_content h5, .wpfp_custom_ad_content p { padding: 0 5px 2px 5px; margin: 0 5px 2px 5px; }
@@ -391,8 +560,13 @@ a #add-format, a #add-rtmp {
391
  .flowplayer.alignleft { margin-left: 10px; margin-bottom: 10px; }
392
  .flowplayer.alignright { margin-right: 10px; margin-bottom: 10px; }
393
 
394
- .flowplayer.no-controlbar .fp-controls{display:none}
395
- .flowplayer.no-controlbar .fp-time{display:none}
 
 
 
 
 
396
 
397
  p.fp-caption { text-align: center; }
398
 
@@ -400,54 +574,60 @@ p.fp-caption { text-align: center; }
400
  .is-splash.flowplayer .fv-player-buttons, .is-loading.flowplayer .fv-player-buttons {
401
  display: none;
402
  }
403
- .fv-player-buttons-center {
404
  position: absolute;
405
  left: 50%;
406
  margin-left: -34px;
407
- bottom: 20px;
408
  }
409
- .fv-player-buttons > ul {
410
  position: relative;
411
- z-index: 2; /* make clickable */
412
  display: block;
413
  opacity: 1;
414
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
415
  margin: 0 auto;
416
  }
417
- .fv-player-buttons > ul:last {
418
  margin-left: 0px;
419
  }
420
- .fv-player-buttons-right {
421
  position: absolute;
422
  right: 0;
423
- bottom: 20px;
424
  }
425
- .fv-player-buttons-right > ul {
426
  /*position: relative;
427
  left: -95%;*/
428
  }
429
- .fv-player-buttons-left {
430
  position: absolute;
431
  left: 0;
432
- bottom: 20px;
433
  }
434
- .fv-player-buttons-left > ul {
 
 
 
 
 
 
435
  left: 0;
436
  }
437
- .is-mouseout .fv-player-buttons > ul {
438
  opacity: 0;
439
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
440
- /* same transition as other ui elements like fullscreen */
441
  -webkit-transition: opacity .15s ease .3s;
442
  -moz-transition: opacity .15s ease .3s;
443
  transition: opacity .15s ease .3s;
444
  }
445
- .fv-player-buttons li {
446
  display: inline-block;
447
  float: left;
448
  margin: 0 0.3em;
 
449
  }
450
- .fv-player-buttons a {
451
  display: inline-block;
452
  float: left;
453
  padding: 0.4ex 0.6ex;
@@ -470,22 +650,22 @@ p.fp-caption { text-align: center; }
470
  font-size: 14px;
471
  box-sizing: border-box;
472
  }
473
- .fv-player-buttons a:active {
474
  background-color: rgba(255,255,255,0.85);
475
  }
476
- .fv-player-buttons a.current {
477
  color: #00a7c8;
478
  background-color: #555;
479
  cursor: default;
480
  }
481
- .fv-player-buttons a.fv_sp_slower {
482
  -webkit-border-radius: 1ex 0 0 1ex;
483
  -moz-border-radius: 1ex 0 0 1ex;
484
  border-radius: 1ex 0 0 1ex;
485
  margin-right: 2px;
486
  width: 2.05em;
487
  }
488
- .fv-player-buttons a.fv_sp_faster {
489
  -webkit-border-radius: 0 1ex 1ex 0;
490
  -moz-border-radius: 0 1ex 1ex 0;
491
  border-radius: 0 1ex 1ex 0;
@@ -529,3 +709,243 @@ article .entry-content .fvfp_admin_error p { line-height: 18px; }
529
  .is-ready .fvfp_duration, .is-loading .fvfp_duration { display: none; }
530
  .fp-playlist-external .dur { margin-left: 10px; display: none; }
531
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'fpicons';
3
+ src:url('fonts/fpicons.eot?ver=yg5dv7');
4
+ src:url('fonts/fpicons.eot?ver=yg5dv7#iefix') format('embedded-opentype'),
5
+ url('fonts/fpicons.woff?ver=yg5dv7') format('woff'),
6
+ url('fonts/fpicons.ttf?ver=yg5dv7') format('truetype'),
7
+ url('fonts/fpicons.svg?ver=yg5dv7#fpicons') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+
12
+ [class^="fp-i-"], [class*=" fp-i-"] {
13
+ font-family: 'fpicons';
14
+ speak: none;
15
+ font-style: normal;
16
+ font-weight: normal;
17
+ font-variant: normal;
18
+ text-transform: none;
19
+ line-height: 1;
20
+
21
+ /* Better Font Rendering =========== */
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
+ }
25
+ .flowplayer{position:relative;width:100%;counter-increment:flowplayer;background-size:contain;background-repeat:no-repeat;background-position:center center;display:inline-block;}
26
  .flowplayer *{font-weight:inherit;font-family:inherit;font-style:inherit;text-decoration:inherit;font-size:100%;padding:0;border:0;margin:0;list-style-type:none}
27
  .flowplayer a:focus{outline:0}
28
+ .flowplayer video{width:100%;-ms-transform: translateY(0) translateX(0);-webkit-transform: translateY(0) translateX(0);transform: translateY(0) translateX(0);}
29
  .flowplayer.is-ipad video{-webkit-transform:translateX(-2048px);}
30
  .is-ready.flowplayer.is-ipad video{-webkit-transform:translateX(0)}
31
+ .flowplayer .fp-player{position:absolute;top:0;left:0;width:100%;height:100%}
32
  .flowplayer .fp-engine,.flowplayer .fp-ui,.flowplayer .fp-message{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;z-index:1}
33
+ .flowplayer .fp-ui{z-index:11}
34
  .flowplayer .fp-message{display:none;text-align:center;padding-top:5%;cursor:default;}
35
  .flowplayer .fp-message h2{font-size:120%;margin-bottom:1em}
36
  .flowplayer .fp-message p{color:#666;font-size:95%}
37
+ .flowplayer .fp-title{line-height:30px;font-weight:normal;font-family:'myriad pro',Helvetica,Arial,sans-serif;font-size:11px;cursor:default;color:#fff;width:auto;max-width:50%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;float:left;padding:0 20px;}
38
+ .is-rtl.flowplayer .fp-title{float:right}
39
+ .aside-time.flowplayer .fp-title{display:none !important}
40
+ .flowplayer .fp-controls{position:absolute;bottom:0;width:100%; display: block; z-index: auto;}
41
+ .no-background.flowplayer .fp-controls{background-color:transparent !important;background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),to(transparent)) !important;background-image:-webkit-linear-gradient(top,transparent,transparent) !important;background-image:-moz-linear-gradient(top,transparent,transparent) !important;background-image:-o-linear-gradient(top,transparent,transparent) !important;background-image:linear-gradient(to bottom,transparent,transparent) !important}
42
  .is-fullscreen.flowplayer .fp-controls{bottom:3px}
43
  .is-mouseover.flowplayer .fp-controls{bottom:0}
44
+ .flowplayer .fp-controls,.flowplayer .fp-title,.flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-close,.flowplayer .fp-embed,.flowplayer.aside-time .fp-time{background-color:#000;background-color:rgba(0,0,0,0.65);}
45
+ .no-background.flowplayer .fp-controls,.no-background.flowplayer .fp-title,.no-background.flowplayer .fp-fullscreen,.no-background.flowplayer .fp-unload,.no-background.flowplayer .fp-close,.no-background.flowplayer .fp-embed,.no-background.flowplayer.aside-time .fp-time{background-color:transparent !important;background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),to(transparent)) !important;background-image:-webkit-linear-gradient(top,transparent,transparent) !important;background-image:-moz-linear-gradient(top,transparent,transparent) !important;background-image:-o-linear-gradient(top,transparent,transparent) !important;background-image:linear-gradient(to bottom,transparent,transparent) !important;text-shadow:0 0 1px #000}
46
+ .no-background.flowplayer .fp-play,.no-background.flowplayer .fp-brand{background-color:transparent !important;background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),to(transparent)) !important;background-image:-webkit-linear-gradient(top,transparent,transparent) !important;background-image:-moz-linear-gradient(top,transparent,transparent) !important;background-image:-o-linear-gradient(top,transparent,transparent) !important;background-image:linear-gradient(to bottom,transparent,transparent) !important;text-shadow:0 0 1px #000}
47
+ .flowplayer.fixed-controls .fp-controls{background-color:#000}
48
+ .flowplayer .fp-timeline{background-color:#a5a5a5}
49
+ .flowplayer .fp-buffer{background-color:#eee}
50
+ .flowplayer .fp-progress{background-color:#00a7c8}
51
+ .flowplayer .fp-volumeslider{background-color:#a5a5a5}
52
+ .flowplayer .fp-volumelevel{background-color:#00a7c8}
53
+ .flowplayer .fp-waiting{display:none;margin:19% auto;text-align:center;}
54
  .flowplayer .fp-waiting *{-webkit-box-shadow:0 0 5px #333;-moz-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333}
55
+ .flowplayer .fp-waiting em{width:1em;height:1em;-webkit-border-radius:1em;-moz-border-radius:1em;border-radius:1em;background-color:rgba(255,255,255,0.8);display:inline-block;-webkit-animation:pulse .6s infinite;-moz-animation:pulse .6s infinite;animation:pulse .6s infinite;margin:.3em;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);}
56
  .flowplayer .fp-waiting em:nth-child(1){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}
57
  .flowplayer .fp-waiting em:nth-child(2){-webkit-animation-delay:.45s;-moz-animation-delay:.45s;animation-delay:.45s}
58
  .flowplayer .fp-waiting em:nth-child(3){-webkit-animation-delay:.6s;-moz-animation-delay:.6s;animation-delay:.6s}
67
  .flowplayer .fp-help em{background:#eee;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;margin-right:.4em;padding:.3em .6em;color:#333}
68
  .flowplayer .fp-help small{font-size:90%;color:#aaa}
69
  .flowplayer .fp-help .fp-close{display:block}
70
+ .flowplayer .fp-dropdown{position:absolute;top:5px;width:100px;background-color:#000 !important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;box-sizing:border-box;-moz-box-sizing:border-box;margin:0 !important;list-style-type:none !important;}
71
+ .flowplayer .fp-dropdown:before{content:'';display:block;position:absolute;top:-5px;left:calc(50% - 5px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid rgba(51,51,51,0.9)}
72
+ .flowplayer .fp-dropdown li{padding:10px !important;margin:0 !important;color:#fff !important;font-size:11px !important;line-height: 16px;text-align:center;list-style-type:none !important;}
73
+ .flowplayer .fp-dropdown li.active{background-color:#00a7c8 !important;cursor:default !important}
74
+ .flowplayer .fp-dropdown.fp-dropup{bottom:20px;top:auto;}
75
+ .flowplayer .fp-dropdown.fp-dropup:before{top:auto;bottom:-5px;border-bottom:none;border-top:5px solid rgba(51,51,51,0.9)}
76
+ .flowplayer .fp-tooltip{background-color:#000;color:#fff;display:none;position:absolute;padding:4px 6px 6px;line-height:1}
77
+ .flowplayer .fp-tooltip:before{content:'';display:block;position:absolute;bottom:-5px;width:0;height:0;left:calc(50% - 5px);border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000}
78
+ .flowplayer .fp-timeline-tooltip{bottom:35px}
79
+ .flowplayer .fp-timeline:hover+.fp-timeline-tooltip{display:block}
80
+ .is-touch.flowplayer .fp-timeline:hover+.fp-timeline-tooltip{display:none}
81
+ .flowplayer .fp-subtitle{position:absolute;bottom:5px;left:-99999em;z-index:10;text-align:center;width:100%;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .3s;-moz-transition:opacity .3s;transition:opacity .3s;}
82
+ .flowplayer.is-mouseover .fp-subtitle{bottom:34px;}
83
+ .flowplayer.is-mouseout .fp-subtitle{-webkit-transition:bottom 0.15s ease 0.3s;-moz-transition:bottom 0.15s ease 0.3s;transition:bottom 0.15s ease 0.3s}
84
+ .flowplayer .fp-subtitle .fp-subtitle-line{display:inline-block;background-color:#000;color:#eee;padding:0 .4em;font-size:16px;border-radius: 5px;}
85
+ .flowplayer .fp-subtitle.is-wide br{display:none}
86
+ .flowplayer .fp-subtitle .fp-subtitle-line:after{content:'';clear:both}
87
+ .flowplayer .fp-subtitle .fp-subtitle-line:first-of-type{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}
88
+ .flowplayer .fp-subtitle .fp-subtitle-line:last-of-type{padding-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}
89
+ .flowplayer .fp-subtitle:not(.is-wide) .fp-subtitle-line{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}
90
+ .flowplayer .fp-subtitle:not(.is-wide) .fp-subtitle-line{padding-left:0.4em}
91
+ .flowplayer .fp-subtitle .fp-subtitle-line b{font-weight:bold}
92
+ .flowplayer .fp-subtitle .fp-subtitle-line i{font-style:italic}
93
+ .flowplayer .fp-subtitle .fp-subtitle-line u{text-decoration:underline}
94
  .flowplayer .fp-subtitle.fp-active{left:0;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
95
+ .flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-mute,.flowplayer .fp-embed,.flowplayer .fp-close,.flowplayer .fp-play,.flowplayer .fp-menu:before{font-family:'fpicons' !important;color:#fff !important;font-size:15px !important;text-align:center !important;line-height:30px !important;text-decoration:none !important;}
96
+ .is-rtl.flowplayer .fp-fullscreen,.is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-mute,.is-rtl.flowplayer .fp-embed,.is-rtl.flowplayer .fp-close,.is-rtl.flowplayer .fp-play,.is-rtl.flowplayer .fp-menu{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);transform:scale(-1,1)}
97
+ .is-rtl.flowplayer .fp-menu{-webkit-transform:none;-moz-transform:none;transform:none}
98
+ .flowplayer .fp-fullscreen:before{content:"\e602"}
99
+ .flowplayer .fp-unload:before,.flowplayer .fp-close:before{content:"\e600"}
100
+ .flowplayer .fp-mute:before{content:"\e606"}
101
+ .flowplayer .fp-embed:before{content:"\e603"}
102
+ .flowplayer .fp-play:before{content:"\e608"}
103
+ .flowplayer .fp-menu:before{content:"\e604"}
104
+ .flowplayer .fp-flash-disabled{background:#333;width:390px;margin:0 auto;position:absolute;bottom:0;color:#fff}
105
+ .is-splash.flowplayer .fp-ui,.is-paused.flowplayer .fp-ui{background:url(img/play_white.png) center no-repeat;background-size:11%;}
106
+ .is-rtl.is-splash.flowplayer .fp-ui,.is-rtl.is-paused.flowplayer .fp-ui{background:url(img/play_white_rtl.png) center no-repeat;background-size:11%}
107
+ .is-fullscreen.flowplayer .fp-ui{background-size:auto}
108
+ @media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx){.is-splash.flowplayer .fp-ui,.is-paused.flowplayer .fp-ui{background:url(img/play_white-x2.png) center no-repeat;background-size:11%}
109
+ .is-rtl.is-splash.flowplayer .fp-ui,.is-rtl.is-paused.flowplayer .fp-ui{background:url(img/play_white_rtl-x2.png) center no-repeat;background-size:11%}
110
+ .flowplayer .fvp-share-bar .fvp-sharing a {background: url("img/flp-share-icons-x2.png") no-repeat;background-size:100%}
111
+ }
 
 
 
112
  .is-seeking.flowplayer .fp-ui,.is-loading.flowplayer .fp-ui{background-image:none}
113
+ .flowplayer .fp-brand{color:#fff !important;position:absolute;right:115px;font-weight:normal !important;font-family:'myriad pro',Helvetica,Arial,sans-serif !important;text-decoration:none !important;line-height:15px !important;font-size:11px !important;height:15px;width:55px;bottom:9px;box-sizing:border-box;text-align:center;padding:1px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
114
+ .has-menu.flowplayer .fp-brand{right:152px}
115
+ .is-rtl.flowplayer .fp-brand{right:auto;left:125px}
116
+ .has-menu.is-rtl.flowplayer .fp-brand{left:152px}
117
+ .no-brand.flowplayer .fp-brand{display:none}
118
+ .no-volume.no-mute.flowplayer .fp-brand{right:10px;}
119
+ .has-menu.no-volume.no-mute.flowplayer .fp-brand{right:47px}
120
+ .no-volume.flowplayer .fp-brand{right:50px}
121
+ .no-mute.flowplayer .fp-brand{right:95px}
122
+ .flowplayer .fp-logo{position:absolute;top:auto;left:15px;bottom:40px;cursor:pointer;display:none;z-index:100;}
123
+ .flowplayer .fp-logo img{width:100%}
124
  .is-embedded.flowplayer .fp-logo{display:block}
125
  .fixed-controls.flowplayer .fp-logo{bottom:15px}
126
+ .flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-close{position:absolute;top:10px;left:auto;right:10px;display:block;width:30px;height:23px;text-align:center;cursor:pointer;height:30px;width:30px;}
127
+ .is-rtl.flowplayer .fp-fullscreen,.is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-close{right:auto;left:10px}
128
+ .flowplayer .fp-unload,.flowplayer .fp-close{display:none}
129
+ .flowplayer .fp-play{display:none;height:30px !important;position:absolute;bottom:0;left:0;text-align:center;}
130
+ .is-rtl.flowplayer .fp-play{left:auto;right:0}
131
+ .is-playing.flowplayer .fp-play:before{content:"\e607"}
132
+ .flowplayer .fp-menu{display:none;position:absolute;bottom:0;z-index:21;right:10px;}
133
+ .is-rtl.flowplayer .fp-menu{right:auto;left:10px}
134
+ .has-menu.flowplayer .fp-menu{display:block}
135
+ .flowplayer .fp-menu .fp-dropdown{z-index:12;display:none;left:-42.5px;line-height:auto;width:149px;-webkit-transform:none;-moz-transform:none;transform:none;}
136
+ .is-rtl.flowplayer .fp-menu .fp-dropdown{left:-10px}
137
+ .flowplayer .fp-menu.dropdown-open .fp-dropdown{display:block}
138
  .flowplayer.is-ready.is-closeable .fp-unload{display:block}
139
+ .flowplayer.is-ready.is-closeable .fp-embed{right:90px}
140
+ .flowplayer.is-ready.is-closeable .fp-fullscreen{right:50px}
141
+ .flowplayer.is-ready.is-closeable.is-rtl .fp-embed{right:auto;left:90px}
142
+ .flowplayer.is-ready.is-closeable.is-rtl .fp-fullscreen{right:auto;left:50px}
143
+ .flowplayer.is-fullscreen .fp-fullscreen{display:block !important;}
144
+ .flowplayer.is-fullscreen .fp-fullscreen:before{content:"\e601"}
145
+ .flowplayer .fp-timeline{height:3px;position:relative;overflow:hidden;top:10px;height:10px;margin:0 225px 0 55px;}
146
+ .no-brand.flowplayer .fp-timeline{margin-right:160px;}
147
+ .has-menu.no-brand.flowplayer .fp-timeline{margin-right:187px}
148
+ .no-volume.no-brand.flowplayer .fp-timeline{margin-right:95px}
149
+ .no-mute.no-brand.flowplayer .fp-timeline{margin-right:130px}
150
+ .no-mute.no-volume.no-brand.flowplayer .fp-timeline{margin-right:55px}
151
+ .has-menu.flowplayer .fp-timeline{margin-right:252px}
152
+ .no-volume.flowplayer .fp-timeline{margin-right:160px}
153
+ .no-mute.flowplayer .fp-timeline{margin-right:195px}
154
+ .no-mute.no-volume.flowplayer .fp-timeline{margin-right:120px;}
155
+ .has-menu.no-mute.no-volume.flowplayer .fp-timeline{margin-right:157px}
156
+ .is-rtl.flowplayer .fp-timeline{margin:0 55px 0 225px;}
157
+ .no-brand.is-rtl.flowplayer .fp-timeline{margin-left:160px;}
158
+ .has-menu.no-brand.is-rtl.flowplayer .fp-timeline{margin-left:197px}
159
+ .has-menu.is-rtl.flowplayer .fp-timeline{margin-left:262px}
160
+ .no-volume.is-rtl.flowplayer .fp-timeline{margin-left:95px}
161
+ .no-mute.is-rtl.flowplayer .fp-timeline{margin-left:130px}
162
+ .no-mute.no-volume.is-rtl.flowplayer .fp-timeline{margin-left:55px}
163
+ .is-long.flowplayer .fp-timeline{margin:0 255px 0 85px;}
164
+ .no-volume.is-long.flowplayer .fp-timeline{margin-right:180px}
165
+ .no-mute.is-long.flowplayer .fp-timeline{margin-right:140px}
166
+ .has-menu.is-long.flowplayer .fp-timeline{margin-right:292px}
167
+ .no-brand.is-long.flowplayer .fp-timeline{margin-right:190px;}
168
+ .no-volume.no-brand.is-long.flowplayer .fp-timeline{margin-right:125px}
169
+ .no-mute.no-brand.is-long.flowplayer .fp-timeline{margin-right:85px}
170
+ .has-menu.no-brand.is-long.flowplayer .fp-timeline{margin-right:227px}
171
+ .is-rtl.is-long.flowplayer .fp-timeline{margin:85px 0 190px 0;}
172
+ .no-volume.is-rtl.is-long.flowplayer .fp-timeline{margin-left:125px}
173
+ .no-mute.is-rtl.is-long.flowplayer .fp-timeline{margin-left:85px}
174
+ .aside-time.flowplayer .fp-timeline,.no-time.flowplayer .fp-timeline{margin:0 190px 0 10px;}
175
+ .has-menu.aside-time.flowplayer .fp-timeline,.has-menu.no-time.flowplayer .fp-timeline{margin-right:227px}
176
+ .aside-time.no-brand.flowplayer .fp-timeline{margin-right:115px}
177
+ .aside-time.no-volume.flowplayer .fp-timeline,.no-time.no-volume.flowplayer .fp-timeline{margin-right:115px}
178
+ .aside-time.no-mute.flowplayer .fp-timeline,.no-time.no-mute.flowplayer .fp-timeline{margin-right:75px}
179
+ .is-rtl.aside-time.flowplayer .fp-timeline,.is-rtl.no-time.flowplayer .fp-timeline{margin:0 10px 0 115px}
180
+ .is-rtl.aside-time.no-volume.flowplayer .fp-timeline,.is-rtl.no-time.no-volume.flowplayer .fp-timeline{margin-left:50px}
181
+ .is-rtl.aside-time.no-mute.flowplayer .fp-timeline,.is-rtl.no-time.no-mute.flowplayer .fp-timeline{margin-left:10px}
182
  .flowplayer .fp-buffer,.flowplayer .fp-progress{position:absolute;top:0;left:auto;height:100%;cursor:col-resize}
183
  .flowplayer .fp-buffer{-webkit-transition:width .25s linear;-moz-transition:width .25s linear;transition:width .25s linear}
184
  .flowplayer .fp-timeline.no-animation .fp-buffer{-webkit-transition:none;-moz-transition:none;transition:none}
185
+ .flowplayer .fp-progress.animated{transition-timing-function:linear;transition-property:width,height}
186
  .flowplayer.is-touch .fp-timeline{overflow:visible}
187
+ .flowplayer.is-touch .fp-progress{-webkit-transition:width .2s linear;-moz-transition:width .2s linear;transition:width .2s linear;box-sizing:border-box}
188
  .flowplayer.is-touch .fp-timeline.is-dragging .fp-progress{-webkit-transition:right .1s linear,border .1s linear,top .1s linear,left .1s linear;-moz-transition:right .1s linear,border .1s linear,top .1s linear,left .1s linear;transition:right .1s linear,border .1s linear,top .1s linear,left .1s linear}
189
+ .flowplayer.is-touch.is-mouseover .fp-progress:after,.flowplayer.is-touch.is-mouseover .fp-progress:before{content:'';box-sizing:border-box;display:block;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;position:absolute;right:-5px}
190
  .flowplayer.is-touch.is-rtl.is-mouseover .fp-progress:after,.flowplayer.is-touch.is-rtl.is-mouseover .fp-progress:before{right:auto;left:-5px}
191
  .flowplayer.is-touch.is-rtl.is-mouseover .fp-progress:after{left:-10px;-webkit-box-shadow:-1px 0 4px rgba(0,0,0,0.5);-moz-box-shadow:-1px 0 4px rgba(0,0,0,0.5);box-shadow:-1px 0 4px rgba(0,0,0,0.5)}
192
  .flowplayer.is-touch.is-mouseover .fp-progress:before{width:10px;height:10px}
193
+ .flowplayer.is-touch.is-mouseover .fp-progress:after{height:18px;width:18px;top:-4px;right:-10px;border:5px solid rgba(255,255,255,0.65);-webkit-box-shadow:1px 0 4px rgba(0,0,0,0.5);-moz-box-shadow:1px 0 4px rgba(0,0,0,0.5);box-shadow:1px 0 4px rgba(0,0,0,0.5)}
194
+ .flowplayer.is-touch.is-mouseover .fp-timeline.is-dragging .fp-progress:after{border:10px solid #fff;-webkit-border-radius:20px;-moz-border-radius:20px;border-radius:20px;-webkit-transition:inherit;-moz-transition:inherit;transition:inherit;top:-5px;right:-10px}
195
  .flowplayer.is-touch.is-rtl.is-mouseover .fp-timeline.is-dragging .fp-progress:after{left:-15px;right:auto;border:10px solid #fff}
196
+ .flowplayer .fp-volume{position:absolute;height:6px;bottom:12px;right:10px;}
197
+ .has-menu.flowplayer .fp-volume{right:37px}
198
+ .is-rtl.flowplayer .fp-volume{right:auto;left:10px}
199
+ .is-rtl.has-menu.flowplayer .fp-volume{left:37px}
200
+ .flowplayer .fp-mute{position:relative;width:30px;height:30px;float:left;top:-12px;cursor:pointer;}
201
+ .is-rtl.flowplayer .fp-mute{float:right}
202
  .no-mute.flowplayer .fp-mute{display:none}
203
+ .flowplayer .fp-volumeslider{width:75px;height:6px;cursor:col-resize;float:left;}
204
  .is-rtl.flowplayer .fp-volumeslider{float:right}
205
  .no-volume.flowplayer .fp-volumeslider{display:none}
206
  .flowplayer .fp-volumelevel{height:100%}
207
+ .flowplayer .fp-time{text-shadow:0 0 1px #000;font-size:11px;font-weight:normal;font-family:'myriad pro',Helvetica,Arial,sans-serif !important;color:#fff;width:100%;}
208
  .flowplayer .fp-time.is-inverted .fp-duration{display:none}
209
  .flowplayer .fp-time.is-inverted .fp-remaining{display:inline}
210
+ .flowplayer .fp-time em{width:35px;height:10px;line-height:10px;text-align:center;position:absolute;bottom:9px}
211
  .no-time.flowplayer .fp-time{display:none}
212
  .is-long.flowplayer .fp-time em{width:65px}
213
+ .flowplayer .fp-elapsed{left:10px;}
214
+ .is-rtl.flowplayer .fp-elapsed{left:auto;right:10px}
215
+ .flowplayer .fp-remaining,.flowplayer .fp-duration{right:180px;color:#eee;}
216
+ .no-brand.flowplayer .fp-remaining,.no-brand.flowplayer .fp-duration{right:125px;}
217
+ .has-menu.no-brand.flowplayer .fp-remaining,.has-menu.no-brand.flowplayer .fp-duration{right:152px}
218
+ .no-volume.no-brand.flowplayer .fp-remaining,.no-volume.no-brand.flowplayer .fp-duration{right:50px}
219
+ .no-mute.no-brand.flowplayer .fp-remaining,.no-mute.no-brand.flowplayer .fp-duration{right:95px}
220
+ .no-mute.no-volume.no-brand.flowplayer .fp-remaining,.no-mute.no-volume.no-brand.flowplayer .fp-duration{right:10px}
221
+ .has-menu.flowplayer .fp-remaining,.has-menu.flowplayer .fp-duration{right:217px}
222
+ .no-volume.flowplayer .fp-remaining,.no-volume.flowplayer .fp-duration{right:115px}
223
+ .no-mute.flowplayer .fp-remaining,.no-mute.flowplayer .fp-duration{right:160px}
224
+ .no-mute.no-volume.flowplayer .fp-remaining,.no-mute.no-volume.flowplayer .fp-duration{right:75px;}
225
+ .has-menu.no-mute.no-volume.flowplayer .fp-remaining,.has-menu.no-mute.no-volume.flowplayer .fp-duration{right:112px}
226
+ .is-rtl.flowplayer .fp-remaining,.is-rtl.flowplayer .fp-duration{right:auto;left:180px;}
227
+ .no-brand.is-rtl.flowplayer .fp-remaining,.no-brand.is-rtl.flowplayer .fp-duration{left:115px;}
228
+ .has-menu.no-brand.is-rtl.flowplayer .fp-remaining,.has-menu.no-brand.is-rtl.flowplayer .fp-duration{left:142px}
229
+ .has-menu.is-rtl.flowplayer .fp-remaining,.has-menu.is-rtl.flowplayer .fp-duration{left:227px}
230
+ .no-volume.is-rtl.flowplayer .fp-remaining,.no-volume.is-rtl.flowplayer .fp-duration{left:50px}
231
+ .no-mute.is-rtl.flowplayer .fp-remaining,.no-mute.is-rtl.flowplayer .fp-duration{left:95px}
232
+ .no-mute.no-volume.is-rtl.flowplayer .fp-remaining,.no-mute.no-volume.is-rtl.flowplayer .fp-duration{left:10px}
233
  .flowplayer .fp-remaining{display:none}
234
+ .flowplayer.aside-time .fp-time{position:absolute;top:10px;left:10px;bottom:auto !important;width:auto;background-color:#000;background-color:rgba(0,0,0,0.65);height:30px;padding:0 5px;-webkit-border-radius:control_border_radius;-moz-border-radius:control_border_radius;border-radius:control_border_radius;line-height:30px;text-align:center;font-size:15px;}
235
+ .no-background.flowplayer.aside-time .fp-time{background-color:transparent !important}
 
236
  .flowplayer.aside-time .fp-time strong,.flowplayer.aside-time .fp-time em{position:static}
237
+ .flowplayer.aside-time .fp-time .fp-elapsed::after{content:' / '}
 
 
238
  .flowplayer.is-splash,.flowplayer.is-poster{cursor:pointer;}
239
+ .flowplayer.is-splash .fp-controls,.flowplayer.is-poster .fp-controls,.flowplayer.is-splash .fp-fullscreen,.flowplayer.is-poster .fp-fullscreen,.flowplayer.is-splash .fp-unload,.flowplayer.is-poster .fp-unload,.flowplayer.is-splash .fp-time,.flowplayer.is-poster .fp-time,.flowplayer.is-splash .fp-embed,.flowplayer.is-poster .fp-embed,.flowplayer.is-splash .fp-title,.flowplayer.is-poster .fp-title,.flowplayer.is-splash .fp-brand,.flowplayer.is-poster .fp-brand{display:none !important}
240
  .flowplayer.is-poster .fp-engine{top:-9999em}
241
+ .flowplayer.is-loading .fp-waiting{display:block}
 
242
  .flowplayer.is-loading .fp-controls,.flowplayer.is-loading .fp-time{display:none}
243
  .flowplayer.is-loading .fp-ui{background-position:-9999em}
244
  .flowplayer.is-loading video.fp-engine{position:absolute;top:-9999em}
245
+ .flowplayer.is-seeking .fp-waiting{display:block}
246
+ .flowplayer.is-playing,.flowplayer.is-ready.is-paused{background-image:none !important;background-color:#333;}
 
247
  .flowplayer.is-playing.hls-fix.is-finished .fp-engine{position:absolute;top:-9999em}
248
+ .flowplayer.is-fullscreen{top:0 !important;left:0 !important;border:0 !important;margin:0 !important;width:100% !important;height:100% !important;max-height:100% !important; max-width:100% !important;z-index:99999 !important;-webkit-box-shadow:0 !important;-moz-box-shadow:0 !important;box-shadow:0 !important;background-image:none !important;background-color:#333;}
249
  .is-rtl.flowplayer.is-fullscreen{left:auto !important;right:0 !important}
250
+ .flowplayer.is-fullscreen .fp-player{background-color:#333}
251
  .flowplayer.is-error{border:1px solid #909090;background:#fdfdfd !important;}
252
+ .flowplayer.is-error h2{font-weight:bold;font-size:large;margin-top:10%;color: #000;}
253
  .flowplayer.is-error .fp-message{display:block}
254
  .flowplayer.is-error object,.flowplayer.is-error video,.flowplayer.is-error .fp-controls,.flowplayer.is-error .fp-time,.flowplayer.is-error .fp-subtitle{display:none}
255
+ .flowplayer.is-ready.is-muted .fp-mute{opacity:.7;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70)}
256
+ .flowplayer.is-ready.is-muted .fp-mute:before{content:"\e605"}
257
+ .flowplayer.is-mouseout .fp-controls{height:0;-webkit-transition:height .15s .3s;-moz-transition:height .15s .3s;transition:height .15s .3s}
258
+ .is-fullscreen.flowplayer.is-mouseout .fp-controls{height:3px;bottom:0}
259
+ .flowplayer.is-mouseout .fp-title{overflow:hidden}
260
  .flowplayer.is-mouseout .fp-timeline{margin:0 !important}
261
  .flowplayer.is-mouseout .fp-timeline{-webkit-transition:height .15s .3s,top .15s .3s,margin .15s .3s;-moz-transition:height .15s .3s,top .15s .3s,margin .15s .3s;transition:height .15s .3s,top .15s .3s,margin .15s .3s;height:4px;top:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
262
+ .flowplayer.is-mouseout .fp-volume{top:12px}
263
+ .flowplayer.is-mouseout .fp-fullscreen,.flowplayer.is-mouseout .fp-unload,.flowplayer.is-mouseout .fp-elapsed,.flowplayer.is-mouseout .fp-remaining,.flowplayer.is-mouseout .fp-duration,.flowplayer.is-mouseout .fp-embed,.flowplayer.is-mouseout .fp-title,.flowplayer.is-mouseout .fp-volume,.flowplayer.is-mouseout .fp-play,.flowplayer.is-mouseout .fp-menu,.flowplayer.is-mouseout .fp-brand,.flowplayer.is-mouseout .fp-timeline-tooltip,.flowplayer.is-mouseout.aside-time .fp-time{opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .15s .3s;-moz-transition:opacity .15s .3s;transition:opacity .15s .3s}
264
+ .flowplayer.is-mouseover .fp-controls,.flowplayer.fixed-controls .fp-controls{height:30px}
265
+ .flowplayer.is-mouseover .fp-title,.flowplayer.fixed-controls .fp-title{height:30px}
266
+ .flowplayer.is-mouseover .fp-fullscreen,.flowplayer.fixed-controls .fp-fullscreen,.flowplayer.is-mouseover .fp-unload,.flowplayer.fixed-controls .fp-unload,.flowplayer.is-mouseover .fp-elapsed,.flowplayer.fixed-controls .fp-elapsed,.flowplayer.is-mouseover .fp-remaining,.flowplayer.fixed-controls .fp-remaining,.flowplayer.is-mouseover .fp-duration,.flowplayer.fixed-controls .fp-duration,.flowplayer.is-mouseover .fp-embed,.flowplayer.fixed-controls .fp-embed,.flowplayer.is-mouseover .fp-logo,.flowplayer.fixed-controls .fp-logo,.flowplayer.is-mouseover .fp-volume,.flowplayer.fixed-controls .fp-volume,.flowplayer.is-mouseover .fp-play,.flowplayer.fixed-controls .fp-play,.flowplayer.is-mouseover .fp-menu,.flowplayer.fixed-controls .fp-menu{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
267
  .flowplayer.fixed-controls .fp-volume{display:block}
268
+ .flowplayer.fixed-controls .fp-controls{bottom:-30px;}
269
  .is-fullscreen.flowplayer.fixed-controls .fp-controls{bottom:0}
270
+ .flowplayer.fixed-controls .fp-time em{bottom:-20px;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);}
271
+ .is-fullscreen.flowplayer.fixed-controls .fp-time em{bottom:10px}
272
  .flowplayer.is-disabled .fp-progress{background-color:#999}
273
  .flowplayer.is-flash-disabled{background-color:#333;}
274
  .flowplayer.is-flash-disabled object.fp-engine{z-index:100}
275
  .flowplayer.is-flash-disabled .fp-flash-disabled{display:block;z-index:101}
276
+ .flowplayer .fp-embed{position:absolute;top:10px;left:auto;right:50px;display:block;width:30px;height:30px;text-align:center;}
277
+ .is-rtl.flowplayer .fp-embed{right:auto;left:50px}
278
+ .flowplayer .fp-embed-code{position:absolute;display:none;top:10px;right:67px;background-color:#333;padding:3px 5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 3px #ccc;-moz-box-shadow:0 0 3px #ccc;box-shadow:0 0 3px #ccc;font-size:12px;}
279
+ .is-closeable.flowplayer .fp-embed-code{right:99px}
280
+ .flowplayer .fp-embed-code:before{content:'';width:0;height:0;position:absolute;top:2px;right:-10px;border:5px solid transparent;border-left-color:#333}
281
+ .is-rtl.flowplayer .fp-embed-code{right:auto;left:67px;}
282
+ .is-rtl.flowplayer .fp-embed-code:before{right:auto;left:-10px;border-left-color:transparent;border-right-color:#333}
283
+ .flowplayer .fp-embed-code textarea{width:400px;height:16px;font-family:monaco,"courier new",verdana;color:#777;white-space:nowrap;resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc}
284
+ .flowplayer .fp-embed-code label{display:block;color:#999}
285
+ .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fp-embed-code{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
286
+ .flowplayer.no-time .fp-embed{left:10px !important;}
287
+ .is-rtl.flowplayer.no-time .fp-embed{left:auto;right:10px !important}
288
  .flowplayer.is-live .fp-timeline,.flowplayer.is-live .fp-duration,.flowplayer.is-live .fp-remaining{display:none}
289
  .flowplayer .fp-context-menu{position:absolute;display:none;z-index:1001;background-color:#fff;padding:10px;border:1px solid #aaa;-webkit-box-shadow:0 0 4px #888;-moz-box-shadow:0 0 4px #888;box-shadow:0 0 4px #888;width:170px;}
290
+ .flowplayer .fp-context-menu li{text-align:center !important;padding:10px;color:#444 !important;font-size:11px !important;margin:0 -10px 0 -10px;}
291
+ .flowplayer .fp-context-menu li a{color:#00a7c8 !important;font-size:12.100000000000001px !important}
292
  .flowplayer .fp-context-menu li:hover:not(.copyright){background-color:#eee}
293
  .flowplayer .fp-context-menu li.copyright{margin:0;padding-left:110px;background-image:url("img/flowplayer.png");background-repeat:no-repeat;background-size:100px 20px;background-position:5px 5px;border-bottom:1px solid #bbb;}
294
+ @media (max-width: 40em){
295
+ .flowplayer .fp-help p{font-size:9px;}
296
+ .flowplayer .fp-logo{max-width: 130px;}
297
+ .flowplayer .fp-subtitle{line-height:14px !important}
298
+ .flowplayer .fp-subtitle .fp-subtitle-line{font-size:14px !important;line-height:20px !important}
299
+ }
300
+ @media (max-width: 30em) {
301
+ .flowplayer .fp-subtitle{bottom:4px;line-height:12px !important}
302
+ .flowplayer .fp-subtitle .fp-subtitle-line{font-size:12px !important;line-height:18px !important;-webkit-text-shadow:0 0 2px #666;-moz-text-shadow:0 0 2px #666;text-shadow:0 0 2px #666}
303
+ }
304
+ @media (max-width: 22.5em) {
305
+ .flowplayer .fp-logo{max-width: 90px;}
306
+ }
307
+ @media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx){.flowplayer .fp-context-menu li.copyright{background-image:url("img/flowplayer-2x.png")}
308
  }@-moz-keyframes pulse{0%{opacity:0}
309
  100%{opacity:1}
310
  }@-webkit-keyframes pulse{0%{opacity:0}
315
  100%{opacity:1}
316
  }@keyframes pulse{0%{opacity:0}
317
  100%{opacity:1}
318
+ }.flowplayer.is-touch.is-mouseover .fp-progress:before{background-color:#00a7c8}
319
+ .flowplayer .fp-menu .fp-dropdown{right:-10px;left:auto;bottom:30px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
320
+ .flowplayer .fp-menu .fp-dropdown:before{display:none}
321
+ .is-rtl.flowplayer .fp-menu .fp-dropdown{right:auto;left:-10px}
322
+ .flowplayer .fp-play{width:30px}
323
+ .flowplayer.aside-time .fp-time{top:0;left:0}
324
+ .no-brand.flowplayer .fp-remaining,.no-brand.flowplayer .fp-duration{right:115px}
325
+ .flowplayer .fp-fullscreen,.flowplayer .fp-unload,.flowplayer .fp-close,.flowplayer .fp-embed{right:0;top:0;}
326
+ .is-rtl.flowplayer .fp-fullscreen,.is-rtl.flowplayer .fp-unload,.is-rtl.flowplayer .fp-close,.is-rtl.flowplayer .fp-embed{right:auto;left:0}
327
+ .flowplayer .fp-embed{right:32px;}
328
+ .is-rtl.flowplayer .fp-embed{right:auto;left:32px}
329
+ .flowplayer.is-closeable.is-ready .fp-fullscreen{right:32px}
330
+ .flowplayer.is-closeable.is-ready .fp-embed{right:64px}
331
+ .is-rtl.flowplayer.is-closeable.is-ready .fp-fullscreen{right:auto;left:32px}
332
+ .is-rtl.flowplayer.is-closeable.is-ready .fp-embed{right:auto;left:64px}
333
+ .flowplayer.fvp-play-button .fp-play{display:block}
334
+ .flowplayer.fvp-play-button .fp-elapsed{left:27px;}
335
+ .is-rtl.flowplayer.fvp-play-button .fp-elapsed{right:27px}
336
+ .flowplayer.fvp-play-button .fp-timeline{margin-left:72px;}
337
+ .is-rtl.flowplayer.fvp-play-button .fp-timeline{margin-right:72px}
338
+ .is-long.flowplayer.fvp-play-button .fp-timeline{margin-left:102px;}
339
+ .is-rtl.is-long.flowplayer.fvp-play-button .fp-timeline{margin-right:102px}
340
+ .no-time.flowplayer.fvp-play-button .fp-timeline,.aside-time.flowplayer.fvp-play-button .fp-timeline{margin-left:27px;}
341
+ .is-rtl.no-time.flowplayer.fvp-play-button .fp-timeline,.is-rtl.aside-time.flowplayer.fvp-play-button .fp-timeline{margin-right:27px}
342
+
343
+ .flowplayer .fp-waiting em { opacity: 1 !important; }
344
+
345
+ .is-error.flowplayer .fp-ui{background:url(img/no_play_white.png) center no-repeat;background-size:12%;}
346
+ .is-error.flowplayer .fp-ui {background:url(img/no_play_white-x2.png) center no-repeat;background-size:12%}
347
+ .flowplayer.is-fullscreen .fp-player{background-color:#000}
348
 
349
  .flowplayer .fp-embed-code{display:none;}
350
  .flowplayer .fvp-share-bar{opacity:0;display:none;position:absolute;top:0px;left:0px;background-color:rgba(0, 0, 0, 0.3);font-size:12px;width:100%}
352
  .flowplayer .fvp-share-bar textarea{width:400px;min-height:130px;font-family: "Lucida Console", Monaco, monospace; color:#777; white-space:nowrap; resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc; border: 1px solid #888;}
353
  .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fvp-share-bar{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
354
 
355
+ .flowplayer.is-fullscreen .fp-logo{z-index:2147483647;}
356
+
357
+ .flowplayer video.fp-engine {
358
+ visibility:visible;
359
+ }
360
+
361
  /* style reset first */
362
  .flowplayer .fvp-sharing ul {
363
  list-style: none !important;
368
  /*clear: both;
369
  width: 102px;*/
370
  min-height: 24px;
371
+ margin: 3px auto !important;
372
  padding: 0 !important;
373
  float: left;
374
  font-family: "Lucida Console", Monaco, monospace;
375
  }
376
  .fvp-share-bar {
377
+ line-height: 18px !important;
378
  }
379
  .fvp-share-bar label {
380
  text-align: center !important;
394
  border: none !important;
395
  background: none !important;
396
  }
397
+ /*#content .flowplayer a,
398
  .flowplayer a,
399
+ .flowplayer a:hover, viktor, please check */
400
  .fvp-share-bar .fvp-sharing a {
401
  color: #fff !important;
402
  text-shadow: none !important;
416
  overflow: hidden;
417
  background: url("img/flp-share-icons.png") no-repeat;
418
  text-indent: -9999em;
419
+ -wekbit-box-shadow: none !important;
420
+ -moz-box-shadow: none !important;
421
+ box-shadow: none !important;
422
+ border-bottom: 0 !important;
423
+ text-decoration: none !important;
424
  }
425
 
426
  .fvp-share-bar .fvp-sharing a.sharing-twitter {
434
  .fvp-share-bar .fvp-sharing a.sharing-email {
435
  background-position: 0 -84px;
436
  }
437
+ .fvp-share-bar .sharing-link{
438
+ float: left;
439
+ color: #fff;
440
+ padding: 6px 10px;
441
+ font-weight:bold;
442
+ }
443
  .flowplayer .fvp-share-bar label{float:left;color:#fff;padding: 6px 10px;}
444
  .flowplayer .fp-embed{display:none}
445
  /*.flowplayer.is-mouseover.is-ready .fp-embed-code{display:block}*/
455
  /*#content .flowplayer.is-ready .fp-embed-code.visible textarea, .flowplayer.is-ready .fp-embed-code.visible textarea { height: 140px; }*/
456
  .fvp-share-bar a.embed-code-toggle { font-weight: bold; color: white; }
457
 
458
+ .is-splash.flowplayer .fp-prev, .is-splash.flowplayer .fp-next {
459
+ display: none;
460
+ }
461
+ .flowplayer .fp-prev, .flowplayer .fp-next {
462
+ position: absolute;
463
+ top: 44%;
464
+ font-size: 240%;
465
+ color: #fff;
466
+ padding: 4px;
467
+ font-weight: bold;
468
+ text-shadow: 0 0 1px #000;
469
+ cursor: pointer;
470
+ z-index: 12; /* make clickable */
471
+ opacity: 1;
472
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
473
+ }
474
+ .flowplayer .fp-prev {
475
+ left: 5px;
476
+ }
477
+ .flowplayer .fp-next {
478
+ right: 5px;
479
+ }
480
+ .is-mouseout.flowplayer .fp-prev, .is-mouseout.flowplayer .fp-next {
481
+ opacity: 0;
482
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
483
+ /* same transition as other ui elements like fullscreen */
484
+ -webkit-transition: opacity .15s .3s;
485
+ -moz-transition: opacity .15s .3s;
486
+ transition: opacity .15s .3s;
487
+ }
488
 
489
  .fp-playlist-external { text-align:center; margin-bottom: 24px;}
490
+ .fp-playlist-external a { width:140px; display:inline-block; vertical-align:top; margin:0 auto 12px auto; border: 0;box-shadow:none !important;text-align:center;font-size:13px;line-height:1.2;}
491
+ .fp-playlist-external a span { display:block;width:120px;height:80px;margin:0 10px;-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s;border:2px solid #fff;background:gray;background-size:auto 100px;background-position:center;}
492
  .fp-playlist-external a:hover span { border-color:#ccc }
493
+ .fp-playlist-external a.is-active { -webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s; }
494
+ #content .fp-playlist-external a { border: 0}
495
+
496
+ .fp-playlist-vertical { text-align: left; overflow-x: hidden; background: #fff;max-width: 100%; }
497
+ .fp-playlist-vertical-player{ float: left!important; max-width:calc( 100% - 156px)!important;}
498
+ .fp-playlist-vertical-wrapper { margin-bottom: 24px; }
499
+ .fp-playlist-vertical-wrapper:before,.fp-playlist-vertical-wrapper:after { content:"";display:table; }
500
+ .fp-playlist-vertical-wrapper:after { clear: both; }
501
+ .fp-playlist-vertical-wrapper .flowplayer { width:65%;float:left;margin-bottom:0;margin-top:2px; }
502
+ .fp-playlist-vertical-wrapper .fp-playlist-vertical { width:34%;float:right;margin-bottom:0; }
503
+ .fp-playlist-vertical-wrapper .fp-playlist-vertical a { display:block; }
504
+ .css-videos .fp-playlist-vertical-wrapper video, .fp-playlist-vertical-wrapper video { min-height: 0 !important; height: 100% !important; }
505
 
506
  .add_media span.wp-media-buttons-icon {
507
  background: url("img/media-button.png") no-repeat scroll left top;
545
  .flowplayer.video1, .flowplayer.video2, .flowplayer.video3, .flowplayer.video4, .flowplayer.video5, .flowplayer.video6, .flowplayer.video7, .flowplayer.video8, .flowplayer.video9, .flowplayer.video10, .flowplayer.video11, .flowplayer.video12, .flowplayer.video13, .flowplayer.video14, .flowplayer.video15, .flowplayer.video16 { background-image: none !important; }
546
 
547
  .flowplayer .fp-volume { text-align: left; }
548
+ #content .flowplayer a, .flowplayer a, .flowplayer a:hover { text-decoration: none; border-bottom: none; -wekbit-box-shadow: none !important; -moz-box-shadow: none !important; box-shadow: none !important; border-bottom: 0 !important; text-decoration: none !important; }
549
 
550
  .flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
551
  .flowplayer .wpfp_custom_ad img { height: auto; }
552
  .flowplayer.is-playing .wpfp_custom_ad, .flowplayer.is-ready .wpfp_custom_ad { display: block; }
553
  .flowplayer.is-poster .wpfp_custom_ad { display: none; }
554
 
555
+ .fv_fp_close { position: absolute; right: 2px; top: 2px; z-index: 20; }
556
  .fv_fp_close a { display: block; width: 16px; height: 16px; background: url(img/exit_btn.png) }
557
 
558
  .wpfp_custom_ad_content h1, .wpfp_custom_ad_content h2, .wpfp_custom_ad_content h3, .wpfp_custom_ad_content h4, .wpfp_custom_ad_content h5, .wpfp_custom_ad_content p { padding: 0 5px 2px 5px; margin: 0 5px 2px 5px; }
560
  .flowplayer.alignleft { margin-left: 10px; margin-bottom: 10px; }
561
  .flowplayer.alignright { margin-right: 10px; margin-bottom: 10px; }
562
 
563
+ .flowplayer.no-controlbar .fp-controls a,.flowplayer.no-controlbar .fp-controls .fp-volume,.flowplayer.no-controlbar .fp-time {display:none;}
564
+ .flowplayer.is-mouseover.no-controlbar .fp-controls, .flowplayer.fixed-controls.no-controlbar .fp-controls {height:auto;}
565
+ .flowplayer.is-mouseover.no-controlbar .fp-timeline {height:4px;top:0;}
566
+ .has-menu.no-brand.flowplayer.no-controlbar .fp-timeline,.flowplayer.fvp-play-button.no-controlbar .fp-timeline {margin:0;}
567
+ .flowplayer.is-mouseover.no-controlbar .fp-controls, .flowplayer.is-mouseover.no-controlbar .fp-mute, .flowplayer.is-mouseover.no-controlbar .fp-title {height:0;}
568
+ .flowplayer.no-controlbar .fp-buffer, .flowplayer.no-controlbar .fp-progress, .flowplayer.no-controlbar .fp-timeline { cursor: auto; }
569
+ .flowplayer.no-controlbar .fp-timeline:hover+.fp-timeline-tooltip { display: none; }
570
 
571
  p.fp-caption { text-align: center; }
572
 
574
  .is-splash.flowplayer .fv-player-buttons, .is-loading.flowplayer .fv-player-buttons {
575
  display: none;
576
  }
577
+ .flowplayer .fv-player-buttons-center {
578
  position: absolute;
579
  left: 50%;
580
  margin-left: -34px;
581
+ bottom: 30px;
582
  }
583
+ .flowplayer .fv-player-buttons > ul {
584
  position: relative;
585
+ z-index: 20; /* make clickable */
586
  display: block;
587
  opacity: 1;
588
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
589
  margin: 0 auto;
590
  }
591
+ .flowplayer .fv-player-buttons > ul:last {
592
  margin-left: 0px;
593
  }
594
+ .flowplayer .fv-player-buttons-right {
595
  position: absolute;
596
  right: 0;
597
+ bottom: 30px;
598
  }
599
+ .flowplayer .fv-player-buttons-right > ul {
600
  /*position: relative;
601
  left: -95%;*/
602
  }
603
+ .flowplayer .fv-player-buttons-left {
604
  position: absolute;
605
  left: 0;
606
+ bottom: 30px;
607
  }
608
+ .flowplayer.fixed-controls .fv-player-buttons-left, .flowplayer.fixed-controls .fv-player-buttons-right, .flowplayer.fixed-controls .fv-player-buttons-center {
609
+ bottom: 0px;
610
+ }
611
+ .flowplayer.fixed-controls.is-fullscreen .fv-player-buttons-left, .flowplayer.fixed-controls.is-fullscreen .fv-player-buttons-right, .flowplayer.fixed-controls.is-fullscreen .fv-player-buttons-center {
612
+ bottom: 30px;
613
+ }
614
+ .flowplayer .fv-player-buttons-left > ul {
615
  left: 0;
616
  }
617
+ .flowplayer.is-mouseout .fv-player-buttons > ul {
618
  opacity: 0;
619
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
 
620
  -webkit-transition: opacity .15s ease .3s;
621
  -moz-transition: opacity .15s ease .3s;
622
  transition: opacity .15s ease .3s;
623
  }
624
+ .flowplayer .fv-player-buttons li {
625
  display: inline-block;
626
  float: left;
627
  margin: 0 0.3em;
628
+ padding: 0;
629
  }
630
+ .flowplayer .fv-player-buttons a {
631
  display: inline-block;
632
  float: left;
633
  padding: 0.4ex 0.6ex;
650
  font-size: 14px;
651
  box-sizing: border-box;
652
  }
653
+ .flowplayer .fv-player-buttons a:active {
654
  background-color: rgba(255,255,255,0.85);
655
  }
656
+ .flowplayer .fv-player-buttons a.current {
657
  color: #00a7c8;
658
  background-color: #555;
659
  cursor: default;
660
  }
661
+ .flowplayer .fv-player-buttons a.fv_sp_slower {
662
  -webkit-border-radius: 1ex 0 0 1ex;
663
  -moz-border-radius: 1ex 0 0 1ex;
664
  border-radius: 1ex 0 0 1ex;
665
  margin-right: 2px;
666
  width: 2.05em;
667
  }
668
+ .flowplayer .fv-player-buttons a.fv_sp_faster {
669
  -webkit-border-radius: 0 1ex 1ex 0;
670
  -moz-border-radius: 0 1ex 1ex 0;
671
  border-radius: 0 1ex 1ex 0;
709
  .is-ready .fvfp_duration, .is-loading .fvfp_duration { display: none; }
710
  .fp-playlist-external .dur { margin-left: 10px; display: none; }
711
 
712
+ .no-animation.flowplayer * { -webkit-transition:none !important;-moz-transition:none !important;transition:none !important; }
713
+
714
+ /*
715
+ * FV Flowplayer Tabs
716
+ */
717
+ .fv_flowplayer_tabs ul.ui-tabs,.fv_flowplayer_tabs ul.ui-tabs-nav{margin:0 !important;font-size:13px;font-family:Arial, Helvetica, sans-serif;font-weight:bold;line-height:24px !important}
718
+ .fv_flowplayer_tabs .ui-tabs { padding: 0; zoom: 1; }
719
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: 1px 0; }
720
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-width: 0 !important; margin: 0 4px 2px 0 !important; padding: 0 !important; list-style:none !important;line-height:24px !important;}
721
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: 4px 10px !important; color:#5E5E5E !important;line-height:24px !important;background-color:#EFEFEF;}
722
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li.ui-state-active a, .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#FFF !important; background-color:#5E5E5E;}
723
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li a, .fv_flowplayer_tabs .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-state-active a { cursor: pointer; outline: none; border: none; }
724
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-panel { padding: 4px 0; display: block; border-width: 0; background: none; }
725
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-hide { position: absolute; left: -10000px; }
726
+
727
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li.ui-corner-top, .fv_flowplayer_tabs .ui-tabs-horizontal-top .wpts_ext{padding-bottom:4px!important;height:32px; }
728
+
729
+ .fv_flowplayer_tabs .fv_flowplayer_tabs_cl{display:block;visibility:hidden;clear:left;height:0;content:".";}
730
+ .fv_flowplayer_tabs .fv_flowplayer_tabs_cr{display:block;visibility:hidden;clear:right;height:0;content:".";}
731
+
732
+ .fv_flowplayer_tabs .ui-tabs .ui-tabs-nav li i.dur {display: none; }
733
+
734
+
735
+
736
+
737
+ /*
738
+ * FV Player Lightbox
739
+ */
740
+
741
+ /*
742
+ Colorbox Core Style:
743
+ The following CSS is consistent between example themes and should not be altered.
744
+ */
745
+ #colorbox, #fv_player_pro_boxOverlay, #fv_player_pro_boxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
746
+ #fv_player_pro_boxWrapper {max-width:none;background:#fff;}
747
+ #fv_player_pro_boxOverlay{position:fixed; width:100%; height:100%;}
748
+ #fv_player_pro_boxMiddleLeft, #fv_player_pro_boxBottomLeft{clear:left;}
749
+ #fv_player_pro_boxContent{position:relative;}
750
+ #fv_player_pro_boxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
751
+ #fv_player_pro_boxTitle{margin:0;}
752
+ #fv_player_pro_boxLoadingOverlay, #fv_player_pro_boxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
753
+ #fv_player_pro_boxPrevious, #fv_player_pro_boxNext, #fv_player_pro_boxClose, #fv_player_pro_boxSlideshow{cursor:pointer;}
754
+ .fv_player_pro_boxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
755
+ .fv_player_pro_boxIframe{width:100%; height:100%; display:block; border:0;}
756
+ #colorbox, #fv_player_pro_boxContent, #fv_player_pro_boxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
757
+
758
+ /*
759
+ User Style:
760
+ Change the following styles to modify the appearance of Colorbox. They are
761
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
762
+ */
763
+ #fv_player_pro_boxOverlay{background:#000;}
764
+ #colorbox{outline:0;}
765
+ #fv_player_pro_boxTopLeft{width:14px; height:14px; background:url(img/controls.png) no-repeat 0 0;}
766
+ #fv_player_pro_boxTopCenter{height:14px;}
767
+ #fv_player_pro_boxTopRight{width:14px; height:14px; background:url(img/controls.png) no-repeat -36px 0;}
768
+ #fv_player_pro_boxBottomLeft{width:14px; height:43px; background:url(img/controls.png) no-repeat 0 -32px;}
769
+ #fv_player_pro_boxBottomCenter{height:43px;}
770
+ #fv_player_pro_boxBottomRight{width:14px; height:43px; background:url(img/controls.png) no-repeat -36px -32px;}
771
+ #fv_player_pro_boxMiddleLeft{width:14px; background:url(img/controls.png) repeat-y -175px 0;}
772
+ #fv_player_pro_boxMiddleRight{width:14px; background:url(img/controls.png) repeat-y -211px 0;}
773
+ #fv_player_pro_boxContent{background:#fff; overflow:visible;}
774
+ .fv_player_pro_boxIframe{background:#fff;}
775
+ #fv_player_pro_boxError{padding:50px; border:1px solid #ccc;}
776
+ #fv_player_pro_boxLoadedContent{margin-bottom:5px;}
777
+
778
+ #fv_player_pro_boxLoadingGraphic{background:url(img/loading.gif) no-repeat center center;}
779
+ #fv_player_pro_boxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
780
+ #fv_player_pro_boxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
781
+
782
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
783
+ #fv_player_pro_boxPrevious, #fv_player_pro_boxNext, #fv_player_pro_boxSlideshow, #fv_player_pro_boxClose {border:0; padding:0; margin:0; overflow:visible; position:absolute; bottom:-29px; background:url(img/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;box-shadow:none;-webkit-box-shadow:none;-webkit-appearance:none;}
784
+
785
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
786
+ #fv_player_pro_boxPrevious:active, #fv_player_pro_boxNext:active, #fv_player_pro_boxSlideshow:active, #fv_player_pro_boxClose:active {outline:0;}
787
+
788
+ #fv_player_pro_boxPrevious{left:0px; background-position: -51px -25px;}
789
+ #fv_player_pro_boxPrevious:hover{background-position:-51px 0px;}
790
+ #fv_player_pro_boxNext{left:27px; background-position:-75px -25px;}
791
+ #fv_player_pro_boxNext:hover{background-position:-75px 0px;}
792
+ #fv_player_pro_boxClose{right:0; background-position:-100px -25px;}
793
+ #fv_player_pro_boxClose:hover{background-position:-100px 0px;}
794
+
795
+ .fv_player_pro_boxSlideshow_on #fv_player_pro_boxSlideshow{background-position:-125px 0px; right:27px;}
796
+ .fv_player_pro_boxSlideshow_on #fv_player_pro_boxSlideshow:hover{background-position:-150px 0px;}
797
+ .fv_player_pro_boxSlideshow_off #fv_player_pro_boxSlideshow{background-position:-150px -25px; right:27px;}
798
+ .fv_player_pro_boxSlideshow_off #fv_player_pro_boxSlideshow:hover{background-position:-125px 0px;}
799
+
800
+ /* Lightbox Styling */
801
+
802
+
803
+ #fv_player_pro_boxMiddleLeft,
804
+ #fv_player_pro_boxMiddleRight,
805
+ #fv_player_pro_boxTopLeft,
806
+ #fv_player_pro_boxTopCenter,
807
+ #fv_player_pro_boxTopRight,
808
+ #fv_player_pro_boxBottomLeft,
809
+ #fv_player_pro_boxBottomRight,
810
+ #fv_player_pro_boxBottomCenter {
811
+ background: #fff;
812
+ }
813
+
814
+ #fv_player_pro_boxSlideshow,
815
+ #fv_player_pro_boxClose {
816
+ background-image: url("img/controls.png");
817
+ background-repeat: no-repeat;
818
+ }
819
+
820
+ #fv_player_pro_boxClose {
821
+ background-image: url("img/closelabel.png");
822
+ background-position: center center;
823
+ width: 66px;
824
+ }
825
+
826
+ #fv_player_pro_boxClose:hover {
827
+ background-position: center center;
828
+ }
829
+
830
+ #fv_player_pro_boxMiddleLeft,
831
+ #fv_player_pro_boxMiddleRight,
832
+ #fv_player_pro_boxTopLeft,
833
+ #fv_player_pro_boxTopRight,
834
+ #fv_player_pro_boxBottomLeft,
835
+ #fv_player_pro_boxBottomRight {
836
+ width: 10px;
837
+ }
838
+
839
+ #fv_player_pro_boxTopCenter,
840
+ #fv_player_pro_boxTopLeft,
841
+ #fv_player_pro_boxTopRight {
842
+ height: 10px;
843
+ }
844
+
845
+ #fv_player_pro_boxBottomLeft,
846
+ #fv_player_pro_boxBottomRight,
847
+ #fv_player_pro_boxBottomCenter {
848
+ height: 38px;
849
+ }
850
+
851
+ #fv_player_pro_boxTitle,
852
+ #fv_player_pro_boxCurrent {
853
+ font-weight: normal;
854
+ }
855
+
856
+ #fv_player_pro_boxLoadedContent {
857
+ position: relative;
858
+ display: inline-block;
859
+ z-index: 99998;
860
+ }
861
+
862
+ #fv_player_pro_boxCurrent {
863
+ left: 0;
864
+ }
865
+
866
+ #fv_player_pro_boxPrevious,
867
+ #fv_player_pro_boxNext {
868
+ background: none;
869
+ width: 15%;
870
+ height: auto;
871
+ top: 30px;
872
+ bottom: 80px;
873
+ display: block;
874
+ z-index: 99999;
875
+ }
876
+
877
+ #fv_player_pro_boxPrevious {
878
+ left: 0;
879
+ background: url("img/prevlabel.gif") no-repeat -999em center;
880
+ }
881
+
882
+ #fv_player_pro_boxNext {
883
+ right: -1px;
884
+ left: 85%;
885
+ background: url("img/nextlabel.gif") no-repeat 999em center;
886
+ }
887
+
888
+ #fv_player_pro_boxPrevious:hover {
889
+ background-position: -4px center;
890
+ }
891
+
892
+ #fv_player_pro_boxNext:hover {
893
+ background-position: right center;
894
+ }
895
+
896
+ @media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx){
897
+ #fv_player_pro_colorbox #fv_player_pro_boxClose {
898
+ background-image: url("img/closelabel-x2.png");
899
+ background-size: 100%;
900
+ }
901
+ }
902
+
903
+
904
+ .flowplayer {
905
+ -webkit-touch-callout: none;
906
+ -webkit-user-select: none;
907
+ -khtml-user-select: none;
908
+ -moz-user-select: none;
909
+ -ms-user-select: none;
910
+ user-select: none;
911
+ }
912
+ .fv_wp_fp_notice_content {
913
+ -webkit-touch-callout: auto;
914
+ -webkit-user-select: auto;
915
+ -khtml-user-select: auto;
916
+ -moz-user-select: auto;
917
+ -ms-user-select: auto;
918
+ user-select: auto;
919
+ }
920
+
921
+ .fv-player-warning-wrapper{
922
+ margin: 5px 0 15px;
923
+ border-left: 4px solid #fff;
924
+ border-left-color: #46b450;
925
+ }
926
+ .fv-player-warning-wrapper p{
927
+ margin: .5em;
928
+ padding: 2px;
929
+ }
930
+
931
+
932
+ .flowplayer.chrome55fix video::-internal-media-controls-download-button {
933
+ display:none;
934
+ }
935
+
936
+ .flowplayer.chrome55fix video::-webkit-media-controls-enclosure {
937
+ overflow:hidden;
938
+ }
939
+
940
+ .flowplayer.chrome55fix video::-webkit-media-controls-panel {
941
+ width: calc(100% + 48px);
942
+ }
943
+
944
+ .is-audio .fp-player {
945
+ background-size: contain;
946
+ background-position: top center;
947
+ background-repeat: no-repeat;
948
+ }
949
+
950
+
951
+ .fvfp-notice { position: absolute; top: 10%; z-index: 20; text-align: center; width: 100%; color: #fff; text-shadow: 0 0 1px #000;}
css/fonts/fpicons.eot ADDED
Binary file
css/fonts/fpicons.svg ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="fpicons" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M890.88 112.64l-53.76-53.76c-10.24-10.24-28.16-10.24-38.4 0l-665.6 660.48c-10.24 10.24-10.24 28.16 0 38.4l53.76 53.76c10.24 10.24 28.16 10.24 38.4 0l660.48-660.48c15.36-10.24 15.36-28.16 5.12-38.4zM834.56 814.080l53.76-53.76c10.24-10.24 10.24-28.16 0-38.4l-660.48-665.6c-10.24-10.24-28.16-10.24-38.4 0l-53.76 53.76c-10.24 10.24-10.24 28.16 0 38.4l660.48 665.6c10.24 10.24 28.16 10.24 38.4 0z" />
11
+ <glyph unicode="&#xe601;" d="M394.24-30.72v430.080c0 12.8 10.24 23.040 23.040 23.040h58.88c12.8 0 23.040-10.24 23.040-23.040v-430.080c0-12.8-10.24-23.040-23.040-23.040h-58.88c-12.8-2.56-23.040 7.68-23.040 23.040zM46.080 422.4h430.080c12.8 0 23.040-10.24 23.040-23.040v-58.88c0-12.8-10.24-23.040-23.040-23.040h-430.080c-12.8 0-23.040 10.24-23.040 23.040v58.88c-2.56 12.8 7.68 23.040 23.040 23.040zM58.88 58.88l304.64 304.64c10.24 10.24 25.6 10.24 33.28 0l40.96-40.96c10.24-10.24 10.24-25.6 0-33.28l-302.080-307.2c-10.24-10.24-25.6-10.24-33.28 0l-40.96 40.96c-10.24 10.24-10.24 25.6-2.56 35.84zM629.76 901.12v-430.080c0-12.8-10.24-23.040-23.040-23.040h-58.88c-12.8 0-23.040 10.24-23.040 23.040v430.080c0 12.8 10.24 23.040 23.040 23.040h58.88c12.8 2.56 23.040-7.68 23.040-23.040zM977.92 448h-430.080c-12.8 0-23.040 10.24-23.040 23.040v58.88c0 12.8 10.24 23.040 23.040 23.040h430.080c12.8 0 23.040-10.24 23.040-23.040v-58.88c2.56-12.8-7.68-23.040-23.040-23.040zM965.12 811.52l-304.64-302.080c-10.24-10.24-25.6-10.24-33.28 0l-40.96 40.96c-10.24 10.24-10.24 25.6 0 33.28l302.080 304.64c10.24 10.24 25.6 10.24 33.28 0l40.96-40.96c10.24-10.24 10.24-25.6 2.56-35.84z" />
12
+ <glyph unicode="&#xe602;" d="M166.4 437.76v-430.080c0-12.8-10.24-23.040-23.040-23.040h-58.88c-12.8 0-23.040 10.24-23.040 23.040v430.080c0 12.8 10.24 23.040 23.040 23.040h58.88c10.24 0 23.040-10.24 23.040-23.040zM514.56-17.92h-430.080c-12.8 0-23.040 10.24-23.040 23.040v58.88c0 12.8 10.24 23.040 23.040 23.040h430.080c12.8 0 23.040-10.24 23.040-23.040v-58.88c0-12.8-10.24-23.040-23.040-23.040zM499.2 348.16l-304.64-304.64c-10.24-10.24-25.6-10.24-33.28 0l-40.96 40.96c-10.24 10.24-10.24 25.6 0 33.28l304.64 304.64c10.24 10.24 25.6 10.24 33.28 0l40.96-40.96c10.24-10.24 10.24-25.6 0-33.28zM857.6 432.64v430.080c0 12.8 10.24 23.040 23.040 23.040h58.88c12.8 0 23.040-10.24 23.040-23.040v-430.080c0-12.8-10.24-23.040-23.040-23.040h-58.88c-10.24 0-23.040 10.24-23.040 23.040zM509.44 888.32h430.080c12.8 0 23.040-10.24 23.040-23.040v-58.88c0-12.8-10.24-23.040-23.040-23.040h-430.080c-12.8-2.56-23.040 10.24-23.040 23.040v56.32c0 15.36 10.24 25.6 23.040 25.6zM524.8 522.24l304.64 304.64c10.24 10.24 25.6 10.24 33.28 0l40.96-40.96c10.24-10.24 10.24-25.6 0-33.28l-304.64-304.64c-10.24-10.24-25.6-10.24-33.28 0l-40.96 40.96c-10.24 10.24-10.24 25.6 0 33.28z" />
13
+ <glyph unicode="&#xe603;" d="M509.44 69.12c-12.8 0-25.6 2.56-35.84 12.8l-414.72 304.64c-15.36 10.24-23.040 28.16-23.040 48.64s10.24 35.84 23.040 48.64l417.28 304.64c25.6 20.48 64 12.8 84.48-12.8s12.8-64-12.8-84.48l-353.28-256 350.72-258.56c25.6-20.48 33.28-56.32 12.8-84.48-10.24-12.8-28.16-23.040-48.64-23.040zM770.56 69.12c-17.92 0-35.84 7.68-48.64 23.040-20.48 25.6-12.8 64 12.8 84.48l350.72 258.56-350.72 258.56c-25.6 20.48-33.28 56.32-12.8 84.48 20.48 25.6 56.32 33.28 84.48 12.8l414.72-304.64c15.36-10.24 23.040-28.16 23.040-48.64s-10.24-35.84-23.040-48.64l-417.28-307.2c-10.24-7.68-23.040-12.8-33.28-12.8z" horiz-adv-x="1280" />
14
+ <glyph unicode="&#xe604;" d="M960 773.12v-66.56c0-10.24-7.68-20.48-20.48-20.48h-855.040c-10.24 0-20.48 7.68-20.48 20.48v66.56c0 10.24 7.68 20.48 20.48 20.48h855.040c10.24-2.56 20.48-10.24 20.48-20.48zM960 468.48v-66.56c0-10.24-7.68-20.48-20.48-20.48h-855.040c-10.24 0-20.48 7.68-20.48 20.48v66.56c0 10.24 7.68 20.48 20.48 20.48h855.040c10.24 0 20.48-10.24 20.48-20.48zM960 166.4v-66.56c0-10.24-7.68-20.48-20.48-20.48h-855.040c-10.24 0-20.48 7.68-20.48 20.48v66.56c0 10.24 7.68 20.48 20.48 20.48h855.040c10.24 0 20.48-10.24 20.48-20.48z" />
15
+ <glyph unicode="&#xe605;" d="M404.48 258.56h-294.4c-33.28 0-61.44 28.16-61.44 61.44v230.4c0 33.28 28.16 61.44 61.44 61.44h294.4c33.28 0 61.44-28.16 61.44-61.44v-230.4c0-35.84-25.6-61.44-61.44-61.44zM614.4-17.92l-391.68 437.76c-7.68 7.68-7.68 20.48 0 28.16l391.68 440.32c12.8 15.36 38.4 5.12 38.4-15.36v-878.080c0-17.92-23.040-28.16-38.4-12.8zM1223.68 243.2l-46.080-46.080c-7.68-7.68-23.040-7.68-33.28 0l-394.24 396.8c-7.68 7.68-7.68 23.040 0 33.28l46.080 46.080c7.68 7.68 23.040 7.68 33.28 0l396.8-396.8c7.68-10.24 7.68-23.040-2.56-33.28zM1180.16 673.28l46.080-46.080c7.68-7.68 7.68-23.040 0-33.28l-396.8-396.8c-7.68-7.68-23.040-7.68-33.28 0l-46.080 46.080c-7.68 7.68-7.68 23.040 0 33.28l396.8 396.8c10.24 7.68 23.040 7.68 33.28 0z" horiz-adv-x="1280" />
16
+ <glyph unicode="&#xe606;" d="M540.16 258.56h-294.4c-33.28 0-61.44 28.16-61.44 61.44v230.4c0 33.28 28.16 61.44 61.44 61.44h294.4c33.28 0 61.44-28.16 61.44-61.44v-230.4c0-35.84-25.6-61.44-61.44-61.44zM750.080-17.92l-394.24 437.76c-7.68 7.68-7.68 20.48 0 28.16l394.24 440.32c12.8 15.36 38.4 5.12 38.4-15.36v-878.080c0-17.92-23.040-28.16-38.4-12.8z" />
17
+ <glyph unicode="&#xe607;" d="M780.8 17.92h-110.080c-17.92 0-33.28 15.36-33.28 33.28v770.56c0 17.92 15.36 33.28 33.28 33.28h110.080c17.92 0 33.28-15.36 33.28-33.28v-770.56c0-20.48-15.36-33.28-33.28-33.28zM353.28 17.92h-110.080c-17.92 0-33.28 15.36-33.28 33.28v770.56c0 17.92 15.36 33.28 33.28 33.28h110.080c17.92 0 33.28-15.36 33.28-33.28v-770.56c-2.56-20.48-17.92-33.28-33.28-33.28z" />
18
+ <glyph unicode="&#xe608;" d="M120.32 808.96c0 61.44 43.52 87.040 97.28 56.32l647.68-373.76c53.76-30.72 53.76-81.92 0-112.64l-647.68-373.76c-53.76-30.72-97.28-5.12-97.28 56.32v747.52z" />
19
+ <glyph unicode="&#xe609;" d="M512-59.468c-272.986 0-494.668 221.855-494.668 494.668s221.855 494.668 494.668 494.668c272.812 0 494.668-221.855 494.668-494.668s-221.682-494.668-494.668-494.668z" />
20
+ <glyph unicode="&#xe60a;" d="M512-16.137c-248.72 0-451.336 202.789-451.336 451.336s202.789 451.336 451.336 451.336c248.547 0 451.336-202.789 451.336-451.336s-202.616-451.336-451.336-451.336zM512 849.098c-228.095 0-413.725-185.804-413.725-413.725s185.804-413.725 413.725-413.725c227.921 0 413.725 185.804 413.725 413.725s-185.63 413.725-413.725 413.725z" />
21
+ <glyph unicode="&#xe60b;" d="M402.632 556.527c0 39.171 27.905 55.117 61.357 35.531l210.416-121.154c33.972-19.586 33.972-51.651 0-71.236l-210.242-121.154c-33.972-19.586-61.357-3.64-61.357 35.531l-0.173 242.481z" />
22
+ <glyph unicode="&#xe60c;" d="M1021.44 258.56h-916.48c-28.16 0-51.2 23.040-51.2 51.2v0c0 28.16 23.040 51.2 51.2 51.2h919.040c28.16 0 51.2-23.040 51.2-51.2v0c-2.56-28.16-25.6-51.2-53.76-51.2zM832 7.68h-537.6c-28.16 0-51.2 23.040-51.2 51.2v0c0 28.16 23.040 51.2 51.2 51.2h537.6c28.16 0 51.2-23.040 51.2-51.2v0c0-28.16-23.040-51.2-51.2-51.2zM832 760.32h-537.6c-28.16 0-51.2 23.040-51.2 51.2v0c0 28.16 23.040 51.2 51.2 51.2h537.6c28.16 0 51.2-23.040 51.2-51.2v0c0-28.16-23.040-51.2-51.2-51.2zM1021.44 509.44h-916.48c-28.16 0-51.2 23.040-51.2 51.2v0c0 28.16 23.040 51.2 51.2 51.2h919.040c28.16 0 51.2-23.040 51.2-51.2v0c-2.56-28.16-25.6-51.2-53.76-51.2z" horiz-adv-x="1126" />
23
+ </font></defs></svg>
css/fonts/fpicons.ttf ADDED
Binary file
css/fonts/fpicons.woff ADDED
Binary file
css/img/black-x2.png DELETED
Binary file
css/img/black.png DELETED
Binary file
css/img/black@x2.png DELETED
Binary file
css/img/black_rtl-x2.png DELETED
Binary file
css/img/black_rtl.png DELETED
Binary file
css/img/black_rtl@x2.png DELETED
Binary file
css/img/closelabel-x2.png ADDED
Binary file
css/img/closelabel.png ADDED
Binary file
css/img/controls.png ADDED
Binary file
css/img/flowplayer-2x.png CHANGED
File without changes
css/img/flowplayer@2x.png DELETED
Binary file
css/img/flp-share-icons-x2.png ADDED
Binary file
css/img/flp-share-icons.png CHANGED
Binary file
css/img/loading.gif ADDED
Binary file
css/img/nextlabel.gif ADDED
Binary file
css/img/no_play_white@x2.png DELETED
Binary file
css/img/play_black-x2.png DELETED
Binary file
css/img/play_black.png DELETED
Binary file
css/img/play_black@x2.png DELETED
Binary file
css/img/play_black_rtl-x2.png DELETED
Binary file
css/img/play_black_rtl.png DELETED
Binary file
css/img/play_black_rtl@x2.png DELETED
Binary file
css/img/play_white-x2.png CHANGED
Binary file
css/img/play_white.png CHANGED
Binary file
css/img/play_white@x2.png DELETED
Binary file
css/img/play_white_rtl-x2.png CHANGED
Binary file
css/img/play_white_rtl.png CHANGED
Binary file
css/img/play_white_rtl@x2.png DELETED
Binary file
css/img/playful_black-x2.png DELETED
Binary file
css/img/playful_black.png DELETED
Binary file
css/img/playful_black@x2.png DELETED
Binary file
css/img/playful_black_rtl-x2.png DELETED
Binary file
css/img/playful_black_rtl.png DELETED
Binary file
css/img/playful_black_rtl@x2.png DELETED
Binary file
css/img/playful_white-x2.png DELETED
Binary file
css/img/playful_white.png DELETED
Binary file
css/img/playful_white@x2.png DELETED
Binary file
css/img/playful_white_rtl-x2.png DELETED
Binary file
css/img/playful_white_rtl.png DELETED
Binary file
css/img/playful_white_rtl@x2.png DELETED
Binary file
css/img/playlist-buttons.png DELETED
Binary file
css/img/prevlabel.gif ADDED
Binary file
css/img/white-x2.png DELETED
Binary file
css/img/white.png DELETED
Binary file
css/img/white@x2.png DELETED
Binary file
css/img/white_rtl-x2.png DELETED
Binary file
css/img/white_rtl.png DELETED
Binary file
css/img/white_rtl@x2.png DELETED
Binary file
css/license.css CHANGED
@@ -33,7 +33,7 @@
33
  }
34
  #fv_flowplayer_ad h2 {
35
  text-shadow: 1px 1px 1px #fff;
36
- padding: 9px 0;
37
  }
38
  /* paragraph */
39
  #fv_flowplayer_ad p {
@@ -60,7 +60,7 @@ a.red-button {
60
  font-size: 20px;
61
  }
62
  #fv_flowplayer_ad ul {
63
- margin: 15px 0;
64
  font-size: 16px;
65
  }
66
  #fv_flowplayer_ad ul li {
@@ -76,20 +76,99 @@ a.red-button {
76
 
77
  #wpfp_options table { width: 100% }
78
  #wpfp_options table td.first { width: 250px }
79
- #wpfp_options #fv_flowplayer_integrations table td.first { width: 350px }
80
- #wpfp_options table.flowplayer-settings { width: 46%; }
 
 
81
 
82
  div.clear { clear: both }
83
  div.column { float: left; width: 49% }
84
  div.green { background-color: #e0ffe0; border-color: #88AA88; }
85
  .amazon-s3-first .fv_fp_amazon_remove { display: none; }
86
  .form-table2 td p { line-height: 20px; }
87
- input[type=text] { width: 100%; }
88
- #wpfp_options input.button-primary, #wpfp_options input.button { margin-top: 16px }
89
  #wpfp_options input.button.no-margin { margin-top: 0px }
90
- input.small { width: 80px }
 
 
91
  td.second-column { margin-left: 20px }
92
 
93
  span.new { color: #e00; font-weight: bold }
94
 
95
- #fv_flowplayer_amazon_options label { float: right }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
  #fv_flowplayer_ad h2 {
35
  text-shadow: 1px 1px 1px #fff;
36
+ padding: 0 0 9px 0;
37
  }
38
  /* paragraph */
39
  #fv_flowplayer_ad p {
60
  font-size: 20px;
61
  }
62
  #fv_flowplayer_ad ul {
63
+ margin: 12px 0 15px;
64
  font-size: 16px;
65
  }
66
  #fv_flowplayer_ad ul li {
76
 
77
  #wpfp_options table { width: 100% }
78
  #wpfp_options table td.first { width: 250px }
79
+ #wpfp_options #fv_player_pro table td.first { width: 278px }
80
+ #wpfp_options #fv_flowplayer_integrations table td.first { width: 310px }
81
+ #wpfp_options #fv_flowplayer_integrations table tr > td:first-child { padding-top: 4px; vertical-align: top; }
82
+ #wpfp_options table.flowplayer-settings { width: 29%; }
83
 
84
  div.clear { clear: both }
85
  div.column { float: left; width: 49% }
86
  div.green { background-color: #e0ffe0; border-color: #88AA88; }
87
  .amazon-s3-first .fv_fp_amazon_remove { display: none; }
88
  .form-table2 td p { line-height: 20px; }
89
+ .meta-box-sortables input[type=text] { width: 100%; }
90
+ #wpfp_options .meta-box-sortables input.button-primary, #wpfp_options .meta-box-sortables input.button { margin-top: 16px }
91
  #wpfp_options input.button.no-margin { margin-top: 0px }
92
+ .meta-box-sortables input.small, .meta-box-sortables select.small { width: 16%; }
93
+ .meta-box-sortables input.medium { width: 50%; }
94
+ .meta-box-sortables input.large { width: 66%; }
95
  td.second-column { margin-left: 20px }
96
 
97
  span.new { color: #e00; font-weight: bold }
98
 
99
+ #fv_flowplayer_amazon_options label { float: right }
100
+
101
+ form#fv_flowplayer_admin_buttons { margin: 13px 0; }
102
+ #fv_flowplayer_admin_buttons a { color: gray; display: inline-block; text-decoration: none; }
103
+
104
+ .wp-core-ui input.fv-license-inactive {
105
+ background: #f88;
106
+ }
107
+ .wp-core-ui input.fv-license-active {
108
+ background: #8f8;
109
+ }
110
+ .wp-core-ui input.fv-license-yellow {
111
+ background: #ff8;
112
+ }
113
+ .wp-core-ui input.fv-license-inactive:hover, .wp-core-ui input.fv-license-inactive:active {
114
+ background: #f66;
115
+ }
116
+ .wp-core-ui input.fv-license-active:hover, .wp-core-ui input.fv-license-active:active {
117
+ background: #6f6;
118
+ }
119
+ .wp-core-ui input.fv-license-yellow:hover, .wp-core-ui input.fv-license-yellow:active {
120
+ background: #ff6;
121
+ }
122
+
123
+ #flowplayer-wrapper label,
124
+ #fv_flowplayer_skin_playlist label,
125
+ #fv_flowplayer_skin_subtitles label {
126
+ display: block;
127
+ text-align: right;
128
+ }
129
+ td.aligntop { vertical-align:top; }
130
+ td.aligntop > label { margin-top:4px; }
131
+ #postbox-container-tab_skin .button-primary {
132
+ margin-left: 51%;
133
+ }
134
+ #flowplayer-wrapper input[type=text], #flowplayer-wrapper select,
135
+ #fv_flowplayer_skin_playlist input[type=text], #fv_flowplayer_skin_playlist select,
136
+ #fv_flowplayer_skin_subtitles input[type=text], #fv_flowplayer_skin_subtitles select {
137
+ width: 95%;
138
+ }
139
+
140
+ #wpfp_options .button-primary {
141
+ float: right;
142
+ }
143
+
144
+ #wpfp_options #flowplayer-wrapper .button-primary,
145
+ #wpfp_options #fv_flowplayer_skin_playlist .button-primary,
146
+ #wpfp_options #fv_flowplayer_skin_subtitles .button-primary {
147
+ float: none;
148
+ }
149
+
150
+ #wpfp_options .inside label {
151
+ display: block;
152
+ text-align: right;
153
+ }
154
+
155
+ #wpfp_options .inside input + label {
156
+ display: inline-block;
157
+ }
158
+
159
+ #fv-player-popups-settings th {
160
+ text-align: right;
161
+ }
162
+
163
+ #fv_flowplayer_ads .inside label, #fv_player_pro_video_ads .inside label, #wpfp_options .inside .description label {
164
+ display: initial;
165
+ text-align: inherit;
166
+ }
167
+
168
+ #fv_flowplayer_default_options input#width, #fv_flowplayer_default_options input#height {
169
+ width: 48px;
170
+ }
171
+
172
+ .description .more {
173
+ display: none;
174
+ }
css/shortcode-editor.css ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #fv_player_boxLoadedContent iframe{ height:auto; }
2
+ #fv_player_boxLoadedContent{ background-color:white; }
3
+ #fv-player-shortcode-editor { background-color: white; }
4
+ .fv-wp-flowplayer-notice { background-color: #FFFFE0; border-color: #E6DB55; margin: 5px 0 15px; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; }
5
+ .fv-wp-flowplayer-notice.fv-wp-flowplayer-note { background-color: #F8F8F8; border-color: #E0E0E0; }
6
+ .fv-wp-flowplayer-notice p { font-family: sans-serif; font-size: 12px; margin: 0.5em 0; padding: 2px; }
7
+ .fv_wp_flowplayer_playlist_remove { display: none; }
8
+ .fv-player-tabs-header { padding:6px 0 12px; }
9
+ #fv-flowplayer-playlist table { border-bottom: 1px #eee solid; }
10
+ #fv-player-shortcode-editor table input[type=text], #fv-flowplayer-playlist table input[type=text].with-button { width: 93%; }
11
+ #fv-player-shortcode-editor table input[type=text].half-field { width: 46%; }
12
+ #fv-player-shortcode-editor table/*:first-child*/ input.with-button { width: 70%; }
13
+ #fv-player-shortcode-editor table input.fv_wp_flowplayer_field_subtitles { width: 82%; }
14
+ #fv-player-shortcode-editor table input.fv_wp_flowplayer_field_subtitles.with-button { width: 59%; }
15
+ #fv-player-shortcode-editor table select.fv_wp_flowplayer_field_subtitles_lang { width: 10%;float:left; }
16
+ #fv-flowplayer-playlist table tr.video-size { display: none; }
17
+ #fv-flowplayer-playlist table tr#fv_wp_flowplayer_add_format_wrapper { display: none; }
18
+ #fv-flowplayer-playlist table tr#fv_wp_flowplayer_file_info { display: none; }
19
+ #fv-flowplayer-playlist table .fv_wp_flowplayer_field_rtmp { visibility: hidden; }
20
+ #fv-flowplayer-playlist table .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: hidden; }
21
+ #fv-flowplayer-playlist table .hint { display: none; }
22
+ /*#fv-flowplayer-playlist table .button { display: none; }*/
23
+ #fv-flowplayer-playlist table:first-child tr.video-size { display: table-row; }
24
+ #fv-flowplayer-playlist table:first-child .hint { display: inline; }
25
+ #fv-flowplayer-playlist table:first-child tr#fv_wp_flowplayer_add_format_wrapper { display: table-row; }
26
+ #fv-flowplayer-playlist table:first-child tr#fv_wp_flowplayer_file_info { display: none; }
27
+ #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp { visibility: visible; }
28
+ #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: visible; }
29
+ /*#fv-flowplayer-playlist table:first-child .button { display: inline-block; }*/
30
+ /*#colorbox, #cboxOverlay, #cboxWrapper{ z-index: 100000; }*/
31
+
32
+ #fv-player-shortcode-editor-editor{ top:0; }
33
+ #fv-player-shortcode-editor-editor > table{ width:100%; }
34
+ #fv-player-shortcode-editor td{ vertical-align: top; }
35
+ .fv-player-tab table{ margin-bottom: 10px; }
36
+ .fv-player-tabs-header .nav-tab-wrapper{ margin:0; }
37
+ .fv_player_actions_end-toggle,.fv_player_interface_hide,.fv-player-playlist-item-title{ display:none; }
38
+ #fv_player_boxTitle{ display:none!important; }
39
+ #fv_player_boxLoadedContent{ margin-top:0; }
40
+
41
+ .fv-player-shortcode-editor-left{ width:40%; }
42
+ .fv-player-shortcode-editor-right{ width:60%; }
43
+ .fv-player-tab{position:relative;}
44
+ .fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
45
+ #fv-player-list-thumb-toggle a{ text-decoration:none;margin-left:6px;color:#b4b9be; }
46
+ #fv-player-list-thumb-toggle a.active{ color:#0073aa; }
47
+ #fv-player-list-thumb-toggle a.disabled{ cursor:default; }
48
+ .fv-player-playlist-item-title, .fv-player-playlist-item-title:hover{ margin:0;border:0;background:transparent; }
49
+
50
+ /*Playlist view*/
51
+ .is-playlist .fv-player-playlist-item-title{ display:block;padding:0 10px 12px; }
52
+ .is-playlist .fv_player_field_insert-button{ display:none; }
53
+ .is-playlist-active .playlist_edit{ display:none; }
54
+
55
+ .is-playlist .hide-if-playlist{display:none;}
56
+ .is-singular .hide-if-singular{display:none;}
57
+ .is-playlist-active .hide-if-playlist-active{display:none;}
58
+
59
+ .playlist_edit{ display:block; }
60
+ .fv-player-tab-playlist tr:not(:hover) .fvp_item_remove{visibility: hidden;}
61
+ .fv-player-tab-playlist tr:hover .fvp_item_remove{visibility: visible;color: #a00;}
62
+ .fv-player-tab-playlist a{cursor:pointer;}
63
+
64
+ .fv-player-tab-playlist .fv-player-playlist-item{ border-spacing: 0 2px; }
65
+ .fv-player-tab-playlist tbody td{ padding:3px 5px;height:50px;cursor:pointer; }
66
+ .fv-player-tab-playlist .fv-player-playlist-item tbody td:first-child{cursor:n-resize;}
67
+
68
+ .fvp_item_video-side-by-side{display:inline-block;vertical-align:top;float: left;margin-right: 1%;}
69
+ .fvp_item_video-filename {word-wrap: break-word;display: inline-block; max-width: 180px;}
70
+ .hide-thumbnails .fvp_item_video-filename {max-width: 100%;}
71
+ .fv-player-tab-playlist > table > thead > tr > th:nth-child(1),.fv-player-tab-playlist > table > tbody > tr > td:nth-child(1),
72
+ .fv-player-tab-playlist > table > thead > tr > th:nth-child(2),.fv-player-tab-playlist > table > tbody > tr > td:nth-child(2){ width:300px; }
73
+ .fv-player-tab-playlist > table > thead{ display:block; }
74
+ .fv-player-tab-playlist.hide-thumbnails .fvp_item_video-thumbnail{ display:none; }
75
+ .fv-player-tab-playlist > table > tbody{ display:block;overflow:auto;max-height:calc(100vh - 270px); }
76
+ #fv-player-list-thumb-toggle > .active{ font-weight:bold; }
77
+ #fv-player-list-thumb-toggle > a{ box-shadow:none; }
78
+ #fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
79
+
80
+ /*Preview iframe*/
81
+ #fv-player-shortcode-editor-preview{ width: 460px;position:relative; }
82
+ #fv-player-shortcode-editor-preview div,
83
+ #fv-player-shortcode-editor-preview iframe{display:none;}
84
+ #fv-player-shortcode-editor-preview.preview-loading #fv-player-shortcode-editor-preview-spinner,
85
+ #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-no,
86
+ #fv-player-shortcode-editor-preview.preview-show #fv-player-shortcode-editor-preview-iframe,
87
+ #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-new-tab{display:block;}
88
+ #fv-player-shortcode-editor-preview-spinner{background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center; position:absolute; z-index: 2; height: 200px; width: 100%;}
89
+ .fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
90
+ #fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
91
+ #fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
92
+
93
+ #fv-player-shortcode-editor-preview div.notice { display: block }
94
+
95
+ .first-item-only {
96
+ display: none;
97
+ }
98
+ .fv-player-playlist-item[data-index="0"] .first-item-only {
99
+ display: table-row;
100
+ }
101
+
102
+ .fv-player-tabs th { width: 21%; text-align: right; }
103
+ .fv-player-tabs .fv-player-tab-playlist th { text-align: left; }
flowplayer.php CHANGED
@@ -1,53 +1,63 @@
1
- <?PHP
2
- /*
3
- Plugin Name: FV Wordpress Flowplayer
4
- Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
- Description: Embed videos (MP4, WEBM, OGV, FLV) into posts or pages. Uses Flowplayer 5.
6
- Version: 2.4.2
7
- Author URI: http://foliovision.com/
8
- License: GPL-3.0
9
- License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
- */
11
-
12
- /* FV Wordpress Flowplayer - HTML5 video player with Flash fallback
13
- Copyright (C) 2013 Foliovision
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
- $fv_wp_flowplayer_ver = '2.4.2';
30
- $fv_wp_flowplayer_core_ver = '5.5.2';
31
-
32
- include( dirname( __FILE__ ) . '/includes/extra-functions.php' );
33
- if( file_exists( dirname( __FILE__ ) . '/includes/module.php' ) ) {
34
- include( dirname( __FILE__ ) . '/includes/module.php' );
35
- }
36
-
37
- include( dirname( __FILE__ ) . '/models/checker.php' );
38
- $FV_Player_Checker = new FV_Player_Checker();
39
-
40
- include_once(dirname( __FILE__ ) . '/models/flowplayer.php');
41
- include_once(dirname( __FILE__ ) . '/models/flowplayer-frontend.php');
42
- $fv_fp = new flowplayer_frontend();
43
-
44
- if( is_admin() ) {
45
- include( dirname( __FILE__ ) . '/controller/backend.php' );
46
-
47
- register_deactivation_hook( __FILE__, 'flowplayer_deactivate' );
48
-
49
- }
50
-
51
- include( dirname( __FILE__ ) . '/controller/frontend.php' );
52
- require_once( dirname( __FILE__ ) . '/controller/shortcodes.php');
53
-
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: FV Player
4
+ Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
+ Description: Formerly FV WordPress Flowplayer. Embed videos (MP4, WEBM, OGV, FLV) into posts or pages. Uses Flowplayer 6.
6
+ Version: 6.0.5.24
7
+ Author URI: http://foliovision.com/
8
+ License: GPL-3.0
9
+ License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
+ */
11
+
12
+ /* FV Player - HTML5 video player with Flash fallback
13
+ Copyright (C) 2016 Foliovision
14
+
15
+ This program is free software: you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation, either version 3 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
27
+ */
28
+
29
+ $fv_wp_flowplayer_ver = '6.0.5.24';
30
+ $fv_wp_flowplayer_core_ver = '6.0.5';
31
+
32
+ include( dirname( __FILE__ ) . '/includes/extra-functions.php' );
33
+ if( file_exists( dirname( __FILE__ ) . '/includes/module.php' ) ) {
34
+ include( dirname( __FILE__ ) . '/includes/module.php' );
35
+ }
36
+
37
+ include( dirname( __FILE__ ) . '/models/checker.php' );
38
+ $FV_Player_Checker = new FV_Player_Checker();
39
+
40
+ include_once(dirname( __FILE__ ) . '/models/flowplayer.php');
41
+ include_once(dirname( __FILE__ ) . '/models/flowplayer-frontend.php');
42
+
43
+ include_once(dirname( __FILE__ ) . '/models/lightbox.php');
44
+ include_once(dirname( __FILE__ ) . '/models/facebook-share.php');
45
+
46
+ include_once(dirname( __FILE__ ) . '/models/custom-videos.php');
47
+
48
+ include_once(dirname( __FILE__ ) . '/models/users-ultra-pro.php');
49
+
50
+ include_once(dirname( __FILE__ ) . '/models/widget.php');
51
+
52
+ $fv_fp = new flowplayer_frontend();
53
+
54
+ if( is_admin() ) {
55
+ include( dirname( __FILE__ ) . '/controller/backend.php' );
56
+
57
+ register_deactivation_hook( __FILE__, 'flowplayer_deactivate' );
58
+
59
+ }
60
+
61
+ include( dirname( __FILE__ ) . '/controller/frontend.php' );
62
+ require_once( dirname( __FILE__ ) . '/controller/shortcodes.php');
63
+
flowplayer/embed.min.js CHANGED
@@ -1,3 +1 @@
1
- /*
2
- Flowplayer Embed 5.5.2 | flowplayer.org
3
- */!function(){function c(e,t,n){if(e)return n(e);if(window.fp5ecc[t])return window.fp5ecc[t].push(n);window.fp5ecc[t]=[n];var r=document.createElement("script");r.onload=r.onreadystatechange=function(){var e=r.readyState;if(e===undefined||/complete|loaded/.test(e)){var n=window.fp5ecc[t];for(var i=0;i<n.length;i++)n[i]()}},r.async=!0,r.src=t,i.insertBefore(r,i.firstChild)}function h(e){if(window.fp5ecssc[e])return;window.fp5ecssc[e]=!0;var t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,i.insertBefore(t,i.firstChild)}var e,t=document.getElementsByTagName("script"),n=document.createElement("div");for(var r=0;r<t.length;r++)if(t[r].innerHTML.indexOf("<video")!==-1){e=t[r],e.parentNode.insertBefore(n,e),e.parentNode.removeChild(e);break}var i=document.getElementsByTagName("head")[0],s="//foliovision.com/5.5.2/commercial",o=e.getAttribute("data-library")||s+"/flowplayer.min.js",u=e.getAttribute("data-swf")||s+"/flowplayer.swf",a=e.getAttribute("data-skin")||s+"/flowplayer.css",f="//www.google-analytics.com/ga.js",l="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";window.fp5ecc=window.fp5ecc||{},window.fp5ecssc=window.fp5ecssc||{};var p=typeof jQuery!="undefined"?jQuery().jquery:"",d=p.split("."),v=typeof $!="undefined"&&jQuery!=$;c(Number(d[0])>=1&&Number(d[1])>=7,l,function(t){var r;!t&&v&&(r=jQuery.noConflict());var i=!t&&p!=="";c(typeof _gat!="undefined",f,function(){c(typeof flowplayer!="undefined",o,function(t){t||h(a),r=r||jQuery;var s=r(e),f=s.attr("src"),l=r(s.html().replace(/^[ \t\n\r]+/gm,"").replace(/[ \n\t\r]+$/gm,""));r(n).replaceWith(l),l.find(":not(video, source)").remove(),l.flowplayer({swf:u,e:1}),l.data("flowplayer").conf.embed={library:o,swf:u,script:f},i&&r.noConflict(!0)})})})}();
1
+ !function n(e,t,r){function o(u,c){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=t[u]={exports:{}};e[u][0].call(a.exports,function(n){var t=e[u][1][n];return o(t?t:n)},a,a.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(n,e){"use strict";var t=n.common.createElement("div");t.setAttribute("data-origin",e.e.href),e.e.parentNode.replaceChild(t,e.e),e.c.e=1,e.c.swf=e.c.swf||p,e.c.swfHls=e.c.swfHls||m,n(t,e.c)}function o(n){"use strict";return"function"==typeof window.requirejs?n():void a("https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js",n)}function i(n,e){"use strict";o(function(){requirejs([n],e)})}function u(n){"use strict";var e=n.common.createElement("div",{className:"flowplayer"});return e.style.display="none",document.body.appendChild(e),e}function c(n){"use strict";var e=u(n),t=0===window.getComputedStyle(e).getPropertyValue("counter-increment").indexOf("flowplayer");return n.common.removeNode(e),t}function f(n,e){"use strict";return c(n)?e(n):(document.head.appendChild(n.common.createElement("link",{rel:"stylesheet",href:h})),void e(n))}var s=window._fpes,a=n("scriptjs"),l="//foliovision.com/flowplayer/6.0.5",d=l+"/flowplayer.min.js",p=l+"/flowplayer.swf",m=l+"/flowplayerhls.swf",h=l+"/flowplayer.css";s.forEach(function(n){"use strict";i(n.l||d,function(e){f(e,function(e){r(e,n)})})})},{scriptjs:2}],2:[function(n,e,t){!function(n,t){"undefined"!=typeof e&&e.exports?e.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function n(n,e){for(var t=0,r=n.length;r>t;++t)if(!e(n[t]))return f;return 1}function e(e,t){n(e,function(n){return!t(n)})}function t(i,u,c){function f(n){return n.call?n():d[n]}function a(){if(!--w){d[y]=1,v&&v();for(var t in m)n(t.split("|"),f)&&!e(m[t],f)&&(m[t]=[])}}i=i[s]?i:[i];var l=u&&u.call,v=l?u:c,y=l?i.join(""):u,w=i.length;return setTimeout(function(){e(i,function n(e,t){return null===e?a():(e=t||-1!==e.indexOf(".js")||/^https?:\/\//.test(e)||!o?e:o+e+".js",h[e]?(y&&(p[y]=1),2==h[e]?a():setTimeout(function(){n(e,!0)},0)):(h[e]=1,y&&(p[y]=1),void r(e,a)))})},0),t}function r(n,e){var t,r=u.createElement("script");r.onload=r.onerror=r[l]=function(){r[a]&&!/^c|loade/.test(r[a])||t||(r.onload=r[l]=null,t=1,h[n]=2,e())},r.async=1,r.src=i?n+(-1===n.indexOf("?")?"?":"&")+i:n,c.insertBefore(r,c.lastChild)}var o,i,u=document,c=u.getElementsByTagName("head")[0],f=!1,s="push",a="readyState",l="onreadystatechange",d={},p={},m={},h={};return t.get=r,t.order=function(n,e,r){!function o(i){i=n.shift(),n.length?t(i,o):t(i,e,r)}()},t.path=function(n){o=n},t.urlArgs=function(n){i=n},t.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(n){d[n]||u[s](n)})&&n(r,function(n){return d[n]})?o():!function(n){m[n]=m[n]||[],m[n][s](o),i&&i(u)}(r.join("|")),t},t.done=function(n){t([null],n)},t})},{}]},{},[1]);
 
 
flowplayer/flowplayer.dashjs.min.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+
3
+ MPEG-DASH engine plugin for Flowplayer HTML5
4
+
5
+ Copyright (c) 2015-2016, Flowplayer Oy
6
+
7
+ Released under the MIT License:
8
+ http://www.opensource.org/licenses/mit-license.php
9
+
10
+ Includes hls.js
11
+ Copyright (c) 2015 Dailymotion (http://www.dailymotion.com)
12
+ https://github.com/dailymotion/hls.js/blob/master/LICENSE
13
+
14
+ Includes es5.js
15
+ https://github.com/inexorabletash/polyfill/blob/master/es5.js
16
+ for compatibility with legacy browsers
17
+
18
+ Requires Flowplayer HTML5 version 6.x
19
+ v1.0.0-8-g70e6eb8
20
+
21
+ */
22
+ /*@cc_on @*/
23
+ /*@
24
+ @if (@_jscript_version > 10)
25
+ @*/
26
+ !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(188)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,r){var i=o(r);!i[e]&&t&&(i[e]={instance:t,override:n})}function t(e,t){for(var n in l){var r=l[n];if(r.context===e&&r.name===t)return r.instance}return null}function n(e,t,n){for(var r in l){var i=l[r];if(i.context===e&&i.name===t)return void(l[r].instance=n)}l.push({name:t,context:e,instance:n})}function r(e){return function(t){return void 0===t&&(t={}),{create:function(){return a(e.__dashjs_factory_name,e.apply({context:t},arguments),t,arguments)}}}}function i(e){return function(n){var r=void 0;return void 0===n&&(n={}),{getInstance:function(){return r||(r=t(n,e.__dashjs_factory_name)),r||(r=a(e.__dashjs_factory_name,e.apply({context:n},arguments),n,arguments),l.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}}}function a(e,t,n,r){var i=o(n),a=i[e];if(a){var u=a.instance;if(!a.override)return u.apply({context:n,factory:s},r);u=u.apply({context:n,factory:s,parent:t},r);for(var l in u)t.hasOwnProperty(l)&&(t[l]=u[l])}return t}function o(e){var t=void 0;return u.forEach(function(n){n===e&&(t=n)}),t||(t=u.push(e)),t}var s=void 0,u=[],l=[];return s={extend:e,getSingletonInstance:t,setSingletonInstance:n,getSingletonFactory:i,getClassFactory:r}}();t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(75),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?s:arguments[3];if(!e)throw new Error("event type cannot be null or undefined");if(!t||"function"!=typeof t)throw new Error("listener must be a function: "+t);if(!(r(e,t,n)>=0)){a[e]=a[e]||[];var o={callback:t,scope:n,priority:i},u=a[e].some(function(t,n){if(i>t.priority)return a[e].splice(n,0,o),!0});u||a[e].push(o)}}function t(e,t,n){if(e&&t&&a[e]){var i=r(e,t,n);i<0||a[e].splice(i,1)}}function n(e,t){if(e&&a[e]){if(t=t||{},t.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");t.type=e,a[e].forEach(function(e){return e.callback.call(e.scope,t)})}}function r(e,t,n){var r=-1;return a[e]?(a[e].some(function(e,i){if(e.callback===t&&(!n||n===e.scope))return r=i,!0}),r):r}function i(){a={}}var a={},o={on:e,off:t,trigger:n,reset:i};return o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=0,u=5e3;i.__dashjs_factory_name="EventBus";var l=o["default"].getSingletonFactory(i);l.EVENT_PRIORITY_LOW=s,l.EVENT_PRIORITY_HIGH=u,t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){f=!0,d=!0,c=(new Date).getTime()}function t(e){d=e}function n(e){f=e}function r(){return f}function i(){var e="",t=null;d&&(t=(new Date).getTime(),e+="["+(t-c)+"]"),e.length>0&&(e+=" "),Array.apply(null,arguments).forEach(function(t){e+=t+" "}),f&&console.log(e),s.trigger(u["default"].LOG,{message:e})}var a=this.context,s=(0,o["default"])(a).getInstance(),l=void 0,f=void 0,d=void 0,c=void 0;return l={log:i,setLogTimestampVisible:t,setLogToBrowserConsole:n,getLogToBrowserConsole:r},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="Debug",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){function e(){var e,t;Re=[],Ie=!1,Se=!0,be=!0,He=!1,Ye=!1,Oe={enabled:!0,ttl:d},Pe={enabled:!0,ttl:c},Ae=f,Me=void 0,Ce=h,De=v,we=NaN,Ne=y,Le=E,xe=T,Fe=S,Ue=g,Be=p,Ke=D,qe=O,e={},i(e,u.HTTPRequest.MPD_TYPE,A),i(e,u.HTTPRequest.XLINK_EXPANSION_TYPE,b),i(e,u.HTTPRequest.MEDIA_SEGMENT_TYPE,I),i(e,u.HTTPRequest.INIT_SEGMENT_TYPE,I),i(e,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,I),i(e,u.HTTPRequest.INDEX_SEGMENT_TYPE,I),i(e,u.HTTPRequest.OTHER_TYPE,I),ke=e,t={},i(t,u.HTTPRequest.MPD_TYPE,M),i(t,u.HTTPRequest.XLINK_EXPANSION_TYPE,C),i(t,u.HTTPRequest.MEDIA_SEGMENT_TYPE,R),i(t,u.HTTPRequest.INIT_SEGMENT_TYPE,R),i(t,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,R),i(t,u.HTTPRequest.INDEX_SEGMENT_TYPE,R),i(t,u.HTTPRequest.OTHER_TYPE,R),je=t}function t(e){He=e}function n(){return He}function r(e){Ue=e}function a(){return Ue}function o(e){Be=e}function s(){return Be}function l(e){we=e}function P(){return isNaN(we)?Ye?_:m:we}function w(e){Ne=e}function N(){return Ne}function L(e){Le=e}function x(){return Le}function F(e){xe=e}function U(){return xe}function B(e){Fe=e}function k(){return Fe}function j(e){Ce=e}function K(){return Ce}function H(e,t){Oe.enabled=e,void 0===t||isNaN(t)||"number"!=typeof t||(Oe.ttl=t)}function q(){return Oe}function Y(e,t){Pe.enabled=e,void 0===t||isNaN(t)||"number"!=typeof t||(Pe.ttl=t)}function G(){return Pe}function V(e){De=e}function z(){return De}function W(e){ke[u.HTTPRequest.MEDIA_SEGMENT_TYPE]=e}function Q(e,t){ke[e]=t}function X(){return ke[u.HTTPRequest.MEDIA_SEGMENT_TYPE]}function Z(e){return ke[e]}function J(e){je[u.HTTPRequest.MEDIA_SEGMENT_TYPE]=e}function $(e,t){je[e]=t}function ee(){return je[u.HTTPRequest.MEDIA_SEGMENT_TYPE]}function te(e){return je[e]}function ne(e){Ke=e}function re(){return Ke}function ie(e){be=e}function ae(){return be}function oe(e){Ae=e}function se(e){Me=e}function ue(){return Ae}function le(){return Me}function fe(e){Se=e}function de(){return Se}function ce(e){Ie=e}function ge(){return Ie}function pe(e){Re=e}function he(){return Re}function ve(e){qe=!!e}function me(){return qe}function _e(){return Ye}function ye(e){Ye=e}function Ee(){}var Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0,Fe=void 0,Ue=void 0,Be=void 0,ke=void 0,je=void 0,Ke=void 0,He=void 0,qe=void 0,Ye=void 0;return Te={setBufferOccupancyABREnabled:t,getBufferOccupancyABREnabled:n,setBandwidthSafetyFactor:r,getBandwidthSafetyFactor:a,setAbandonLoadTimeout:o,getAbandonLoadTimeout:s,setLastBitrateCachingInfo:H,getLastBitrateCachingInfo:q,setLastMediaSettingsCachingInfo:Y,getLastMediaSettingsCachingInfo:G,setStableBufferTime:l,getStableBufferTime:P,setBufferTimeAtTopQuality:w,getBufferTimeAtTopQuality:N,setBufferTimeAtTopQualityLongForm:L,getBufferTimeAtTopQualityLongForm:x,setLongFormContentDurationThreshold:F,getLongFormContentDurationThreshold:U,setRichBufferThreshold:B,getRichBufferThreshold:k,setBufferToKeep:j,getBufferToKeep:K,setBufferPruningInterval:V,getBufferPruningInterval:z,setFragmentRetryAttempts:W,getFragmentRetryAttempts:X,setRetryAttemptsForType:Q,getRetryAttemptsForType:Z,setFragmentRetryInterval:J,getFragmentRetryInterval:ee,setRetryIntervalForType:$,getRetryIntervalForType:te,setWallclockTimeUpdateInterval:ne,getWallclockTimeUpdateInterval:re,setScheduleWhilePaused:ie,getScheduleWhilePaused:ae,getUseSuggestedPresentationDelay:ge,setUseSuggestedPresentationDelay:ce,setLiveDelayFragmentCount:oe,getLiveDelayFragmentCount:ue,getLiveDelay:le,setLiveDelay:se,setUseManifestDateHeaderTimeSource:fe,getUseManifestDateHeaderTimeSource:de,setUTCTimingSources:pe,getUTCTimingSources:he,setXHRWithCredentials:ve,getXHRWithCredentials:me,setFastSwitchEnabled:ye,getFastSwitchEnabled:_e,reset:Ee},e(),Te}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=r(o),u=n(7),l={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso"},f=4,d=36e4,c=36e4,g=.9,p=1e4,h=30,v=30,m=12,_=20,y=30,E=60,T=600,S=20,I=3,R=1e3,A=3,M=500,b=1,C=500,D=50,O=!1;a.__dashjs_factory_name="MediaPlayerModel";var P=s["default"].getSingletonFactory(a);P.DEFAULT_UTC_TIMING_SOURCE=l,t["default"]=P,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r){n(this,i),this.code=e||null,this.message=t||null,this.data=r||null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function a(){n(this,a),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null},i=function o(){n(this,o),this.s=null,this.d=null,this.b=[]};r.MPD_TYPE="MPD",r.XLINK_EXPANSION_TYPE="XLinkExpansion",r.INIT_SEGMENT_TYPE="InitializationSegment",r.INDEX_SEGMENT_TYPE="IndexSegment",r.MEDIA_SEGMENT_TYPE="MediaSegment",r.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",r.OTHER_TYPE="other",t.HTTPRequest=r,t.HTTPRequestTrace=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=void 0===e?s:e,i=void 0===t?u:t,a=void 0===n?null:n,o={value:r,priority:i,reason:a};return o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=999,u=.5,l=1,f=0;i.__dashjs_factory_name="SwitchRequest";var d=o["default"].getClassFactory(i);d.NO_CHANGE=s,d.DEFAULT=u,d.STRONG=l,d.WEAK=f,t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){ce=0,ge=NaN,pe=null,me=null,ye=!1,he={},_e=(0,f["default"])($).getInstance()}function t(e){ve=e,re=de.getElement(),Z(),me=ve.manifestInfo.isDynamic,ge=ve.start,te.on(p["default"].DATA_UPDATE_COMPLETED,L,this),te.on(p["default"].LIVE_EDGE_SEARCH_COMPLETED,x,this),te.on(p["default"].BYTES_APPENDED,Q,this),te.on(p["default"].BUFFER_LEVEL_STATE_CHANGED,X,this),te.on(p["default"].PERIOD_SWITCH_STARTED,n,this),ye&&(ye=!1,l())}function n(e){e.fromStreamInfo&&he[e.fromStreamInfo.id]&&delete he[e.fromStreamInfo.id]}function r(){return C(!0)+ve.duration-m()}function i(){return m()>0}function a(){return ve.id}function s(){return ve.duration}function l(){if(re){re.autoplay=!0;var e=re.play();e&&"undefined"!=typeof Promise&&e instanceof Promise&&e["catch"](function(e){"NotAllowedError"===e.name&&te.trigger(p["default"].PLAYBACK_NOT_ALLOWED),ee("Caught pending play exception - continuing ("+e+")")})}else ye=!0}function d(){if(re)return re.paused}function g(){re&&(re.pause(),re.autoplay=!1)}function h(){if(re)return re.seeking}function v(e){de&&(ee("Requesting seek to time: "+e),de.setCurrentTime(e))}function m(){if(re)return re.currentTime}function y(){if(re)return re.playbackRate}function E(){if(re)return re.played}function T(){if(re)return re.ended}function S(){return me}function I(e){ge=e}function R(){return ge}function A(e,t){var n=le.getMpd(ue.getValue()),r=void 0,i=10;r=_e.getUseSuggestedPresentationDelay()&&n.hasOwnProperty("suggestedPresentationDelay")?n.suggestedPresentationDelay:_e.getLiveDelay()?_e.getLiveDelay():isNaN(e)?2*ve.manifestInfo.minBufferTime:e*_e.getLiveDelayFragmentCount();var a=Math.max(t-i,t/2);return Math.min(r,a)}function M(){de&&re&&(te.off(p["default"].DATA_UPDATE_COMPLETED,L,this),te.off(p["default"].BUFFER_LEVEL_STATE_CHANGED,X,this),te.off(p["default"].LIVE_EDGE_SEARCH_COMPLETED,x,this),te.off(p["default"].BYTES_APPENDED,Q,this),P(),J()),de=null,ve=null,re=null,me=null,e()}function b(e){e&&(e.streamController&&(ie=e.streamController),e.timelineConverter&&(ae=e.timelineConverter),e.metricsModel&&(oe=e.metricsModel),e.dashMetrics&&(se=e.dashMetrics),e.manifestModel&&(ue=e.manifestModel),e.dashManifestModel&&(le=e.dashManifestModel),e.adapter&&(fe=e.adapter),e.videoModel&&(de=e.videoModel))}function C(e){var t=void 0,n=(0,u["default"])($).getInstance().getURIFragmentData(),r=parseInt(n.s,10),i=parseInt(n.t,10),a=NaN;if(e||(a=isNaN(r)?i:r),me)!isNaN(a)&&a>1262304e3&&(t=a-ve.manifestInfo.availableFrom.getTime()/1e3,(t>ge||t<ge-ve.manifestInfo.DVRWindowSize)&&(t=null)),t=t||ge;else if(!isNaN(a)&&a<Math.max(ve.manifestInfo.duration,ve.duration)&&a>=0)t=a;else{var o=he[ve.id];void 0===o&&(o=ie.getActiveStreamCommonEarliestTime()),t=Math.max(o,ve.start)}return t}function D(e){var t,n=oe.getReadOnlyMetricsFor("video")||oe.getReadOnlyMetricsFor("audio"),r=se.getCurrentDVRInfo(n),i=r?r.range:null;return i?e>=i.start&&e<=i.end?e:t=Math.max(i.end-2*ve.manifestInfo.minBufferTime,i.start):NaN}function O(){if(null===pe){var e=function(){W()};pe=setInterval(e,_e.getWallclockTimeUpdateInterval())}}function P(){clearInterval(pe),pe=null}function w(){var e=C(!1);e>0&&(v(e),ee("Starting playback at offset: "+e))}function N(){if(!d()&&me&&0!==re.readyState){var e=m(),t=D(e),n=!isNaN(t)&&t!==e;n&&v(t)}}function L(e){if(!e.error){var t=fe.convertDataToTrack(ue.getValue(),e.currentRepresentation),n=t.mediaInfo.streamInfo;ve.id===n.id&&(ve=n,N())}}function x(e){e.error||0===re.readyState||w()}function F(){te.trigger(p["default"].CAN_PLAY)}function U(){ee("Native video element event: play"),N(),O(),te.trigger(p["default"].PLAYBACK_STARTED,{startTime:m()})}function B(){ee("Native video element event: playing"),te.trigger(p["default"].PLAYBACK_PLAYING,{playingTime:m()})}function k(){ee("Native video element event: pause"),te.trigger(p["default"].PLAYBACK_PAUSED,{ended:T()})}function j(){var e=m();ee("Seeking to: "+e),O(),te.trigger(p["default"].PLAYBACK_SEEKING,{seekTime:e})}function K(){ee("Native video element event: seeked"),te.trigger(p["default"].PLAYBACK_SEEKED)}function H(){var e=m();e!==ce&&(ce=e,te.trigger(p["default"].PLAYBACK_TIME_UPDATED,{timeToEnd:r(),time:e}))}function q(){te.trigger(p["default"].PLAYBACK_PROGRESS)}function Y(){var e=y();ee("Native video element event: ratechange: ",e),te.trigger(p["default"].PLAYBACK_RATE_CHANGED,{playbackRate:e})}function G(){ee("Native video element event: loadedmetadata"),(!me&&ve.isFirst||ae.isTimeSyncCompleted())&&w(),te.trigger(p["default"].PLAYBACK_METADATA_LOADED),O()}function V(){ee("Native video element event: ended"),g(),P(),te.trigger(p["default"].PLAYBACK_ENDED)}function z(e){var t=e.target||e.srcElement;te.trigger(p["default"].PLAYBACK_ERROR,{error:t.error})}function W(){te.trigger(p["default"].WALLCLOCK_TIME_UPDATED,{isDynamic:me,time:new Date})}function Q(e){var t=e.bufferedRanges;if(t&&t.length){var n=Math.max(t.start(0),ve.start),r=void 0===he[ve.id]?n:Math.max(he[ve.id],n);r!==he[ve.id]&&(!me&&C(!0)<r&&m()<r&&v(r),he[ve.id]=r)}}function X(e){e.streamInfo.id===ve.id&&de.setStallState(e.mediaType,e.state===o["default"].BUFFER_EMPTY)}function Z(){re.addEventListener("canplay",F),re.addEventListener("play",U),re.addEventListener("playing",B),re.addEventListener("pause",k),re.addEventListener("error",z),re.addEventListener("seeking",j),re.addEventListener("seeked",K),re.addEventListener("timeupdate",H),re.addEventListener("progress",q),re.addEventListener("ratechange",Y),re.addEventListener("loadedmetadata",G),re.addEventListener("ended",V)}function J(){re.removeEventListener("canplay",F),re.removeEventListener("play",U),re.removeEventListener("playing",B),re.removeEventListener("pause",k),re.removeEventListener("error",z),re.removeEventListener("seeking",j),re.removeEventListener("seeked",K),re.removeEventListener("timeupdate",H),re.removeEventListener("progress",q),re.removeEventListener("ratechange",Y),re.removeEventListener("loadedmetadata",G),re.removeEventListener("ended",V)}var $=this.context,ee=(0,_["default"])($).getInstance().log,te=(0,c["default"])($).getInstance(),ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0;return ne={initialize:t,setConfig:b,getStreamStartTime:C,getTimeToStreamEnd:r,isPlaybackStarted:i,getStreamId:a,getStreamDuration:s,getTime:m,getPlaybackRate:y,getPlayedRanges:E,getEnded:T,getIsDynamic:S,setLiveStartTime:I,getLiveStartTime:R,computeLiveDelay:A,play:l,isPaused:d,pause:g,isSeeking:h,seek:v,reset:M},e(),ne}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),o=r(a),s=n(40),u=r(s),l=n(5),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(1),v=r(h),m=n(4),_=r(m);i.__dashjs_factory_name="PlaybackController",t["default"]=v["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){ue={video:!0,audio:!0},le={},fe={},de={},ce={},ge={},pe={},ve={},he={},_e=!1,ye=!1,Re=(0,d["default"])(ne).getInstance(),Ie=(0,h["default"])(ne).getInstance(),Ee=(0,A["default"])(ne).getInstance(),Te=(0,b["default"])(ne).getInstance(),Se=(0,D["default"])(ne).getInstance()}function t(e,t){he[e]=t,ve[e]=ve[e]||{},ve[e].state=P,re.on(T["default"].LOADING_PROGRESS,te,this)}function n(e){e&&(e.abrRulesCollection&&(ae=e.abrRulesCollection),e.rulesController&&(oe=e.rulesController),e.streamController&&(se=e.streamController))}function r(e,t){var n;return le[t]=le[t]||{},le[t].hasOwnProperty(e)||(le[t][e]=0),n=J(le[t][e],e),n=$(n,e,le[t][e]),n=ee(n,e)}function i(e){var t=Re.getSavedBitrateSettings(e);if(!ce.hasOwnProperty(e))if(ge.hasOwnProperty(e)){var n=Ee.getValue(),r=Te.getAdaptationForType(n,0,e).Representation;if(Array.isArray(r)){var i=Math.max(Math.round(r.length*ge[e])-1,0);ce[e]=r[i].bandwidth}else ce[e]=0}else isNaN(t)?ce[e]="video"===e?w:N:ce[e]=t;return ce[e]}function o(e,t){ce[e]=t}function u(e){return ge.hasOwnProperty(e)?ge[e]:null}function f(e,t){ge[e]=t}function c(e){return ce.hasOwnProperty("max")&&ce.max.hasOwnProperty(e)?ce.max[e]:NaN}function p(e,t){ce.max=ce.max||{},ce.max[e]=t}function v(e){return ge.hasOwnProperty("max")&&ge.max.hasOwnProperty(e)?ge.max[e]:1}function _(e,t){ge.max=ge.max||{},ge.max[e]=t}function E(e){return ue[e]}function S(e,t){ue[e]=t}function I(){return _e}function R(e){_e=e}function M(){return ye}function C(e){ye=e}function x(e,t){var n=e.getType(),i=e.getStreamInfo(),a=i.id,o=function(e){var o=r(n,a),s=e.value;s<0&&(s=0),s>o&&(s=o);var u=z(n,i);s!==u&&(ve[n].state===P||s>u)&&(X(n,a,e.confidence),U(n,i,u,s,e.reason)),t&&t()};if(E(n)){var u=ae.getRules(g["default"].QUALITY_SWITCH_RULES);oe.applyRules(u,e,o,z(n,i),function(e,t){return e=e===s["default"].NO_CHANGE?0:e,Math.max(e,t)})}else t&&t()}function F(e,t,n,i){var a=t.id,o=z(e,t),s=null!==n&&!isNaN(n)&&n%1===0;if(!s)throw new Error("argument is not an integer");n!==o&&n>=0&&n<=r(e,a)&&U(e,t,o,n,i)}function U(e,t,n,r,i){W(e,t.id,r),re.trigger(T["default"].QUALITY_CHANGE_REQUESTED,{mediaType:e,streamInfo:t,oldQuality:n,newQuality:r,reason:i})}function B(e,t){ve[e].state=t}function k(e){return ve[e].state}function j(e,t){var n=K(e);if(!n||0===n.length)return L;for(var r=n.length-1;r>=0;r--){var i=n[r];if(1e3*t>=i.bitrate)return r}return 0}function K(e){if(!e||!e.bitrateList)return null;for(var t,n=e.bitrateList,r=e.type,i=[],a=0,o=n.length;a<o;a++)t=new l["default"],t.mediaType=r,t.qualityIndex=a,t.bitrate=n[a].bandwidth,t.width=n[a].width,t.height=n[a].height,i.push(t);return i}function H(e,t){pe[e]=t}function q(e){return pe[e]}function Y(e){var t=e.type,n=e.streamInfo.id,r=e.representationCount-1;return Z(t,n,r),r}function G(e){var t,n=e.id,i=z("audio",e),a=z("video",e);return t=i===r("audio",n)&&a===r("video",n)}function V(){re.off(T["default"].LOADING_PROGRESS,te,this),clearTimeout(me),me=null,e()}function z(e,t){var n,r=t.id;return fe[r]=fe[r]||{},fe[r].hasOwnProperty(e)||(fe[r][e]=L),n=fe[r][e]}function W(e,t,n){fe[t]=fe[t]||{},fe[t][e]=n}function Q(e,t){var n;return de[t]=de[t]||{},de[t].hasOwnProperty(e)||(de[t][e]=0),n=de[t][e]}function X(e,t,n){de[t]=de[t]||{},de[t][e]=n}function Z(e,t,n){le[t]=le[t]||{},le[t][e]=n}function J(e,t){var n=c(t);if(isNaN(n)||!he[t])return e;var r=j(he[t].getMediaInfo(),n);return Math.min(e,r)}function $(e,t,n){var r=v(t);return isNaN(r)||r>=1||r<0?e:Math.min(e,Math.round(n*r))}function ee(e,t){if("video"!==t||!_e||!he[t])return e;var n=ye&&window.hasOwnProperty("devicePixelRatio"),r=n?window.devicePixelRatio:1,i=Se.getElement(),a=i.clientWidth*r,o=i.clientHeight*r,s=Ee.getValue(),u=Te.getAdaptationForType(s,0,t).Representation,l=e;if(a>0&&o>0){for(;l>0&&u[l]&&a<u[l].width&&a-u[l-1].width<u[l].width-a;)l-=1;u.length-2>=l&&u[l].width===u[l+1].width&&(l=Math.min(e,l+1))}return l}function te(e){var t=e.request.mediaType;if(E(t)){var n=function(){var n=ae.getRules(g["default"].ABANDON_FRAGMENT_RULES),r=he[t].getScheduleController();if(!r)return{v:void 0};var i=function(n){if(n.confidence===s["default"].STRONG&&n.value<z(t,se.getActiveStreamInfo())){var i=r.getFragmentModel(),a=i.getRequests({state:m["default"].FRAGMENT_MODEL_LOADING,index:e.request.index})[0];a&&(i.abortRequests(),B(t,O),F(t,se.getActiveStreamInfo(),n.value,n.reason),re.trigger(T["default"].FRAGMENT_LOADING_ABANDONED,{streamProcessor:he[t],request:a,mediaType:t}),clearTimeout(me),me=setTimeout(function(){B(t,P),me=null},Ie.getAbandonLoadTimeout()))}};oe.applyRules(n,he[t],i,e,function(e,t){return t})}();if("object"===("undefined"==typeof n?"undefined":a(n)))return n.v}}var ne=this.context,re=(0,y["default"])(ne).getInstance(),ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0;return ie={isPlayingAtTopQuality:G,updateTopQualityIndex:Y,getAverageThroughput:q,getBitrateList:K,getQualityForBitrate:j,getMaxAllowedBitrateFor:c,setMaxAllowedBitrateFor:p,getMaxAllowedRepresentationRatioFor:v,setMaxAllowedRepresentationRatioFor:_,getInitialBitrateFor:i,setInitialBitrateFor:o,getInitialRepresentationRatioFor:u,setInitialRepresentationRatioFor:f,setAutoSwitchBitrateFor:S,getAutoSwitchBitrateFor:E,setLimitBitrateByPortal:R,getLimitBitrateByPortal:I,getUsePixelRatioInLimitBitrateByPortal:M,setUsePixelRatioInLimitBitrateByPortal:C,getConfidenceFor:Q,getQualityFor:z,getAbandonmentStateFor:k,setAbandonmentStateFor:B,setPlaybackQuality:F,getPlaybackQuality:x,setAverageThroughput:H,getTopQualityIndexFor:r,initialize:t,setConfig:n,reset:V},e(),ie}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),s=r(o),u=n(165),l=r(u),f=n(50),d=r(f),c=n(47),g=r(c),p=n(5),h=r(p),v=n(30),m=r(v),_=n(3),y=r(_),E=n(2),T=r(E),S=n(1),I=r(S),R=n(31),A=r(R),M=n(12),b=r(M),C=n(19),D=r(C),O="abandonload",P="allowload",w=1e3,N=100,L=0;i.__dashjs_factory_name="AbrController";var x=I["default"].getSingletonFactory(i);x.ABANDON_LOAD=O,x.QUALITY_DEFAULT=L,t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){d.trigger(u["default"].ERROR,{error:"capability",event:e})}function t(e,t,n){d.trigger(u["default"].ERROR,{error:"download",event:{id:e,url:t,request:n}})}function n(e,t,n,r){d.trigger(u["default"].ERROR,{error:"manifestError",event:{message:e,id:t,manifest:n,event:r}})}function r(e,t,n){d.trigger(u["default"].ERROR,{error:"cc",event:{message:e,id:t,cc:n}})}function i(e){d.trigger(u["default"].ERROR,{error:"mediasource",event:e})}function a(e){d.trigger(u["default"].ERROR,{error:"key_session",event:e})}function s(e){d.trigger(u["default"].ERROR,{error:"key_message",event:e})}var l=void 0,f=this.context,d=(0,o["default"])(f).getInstance();return l={capabilityError:e,downloadError:t,manifestError:n,timedTextError:r,mediaSourceError:i,mediaKeySessionError:a,mediaKeyMessageError:s}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d="mediasource",c="mediakeys",g="manifest",p="SIDX",h="content",v="initialization",m="xlink",_="codec",y="parse",E="nostreams",T="parse";i.__dashjs_factory_name="ErrorHandler";var S=f["default"].getSingletonFactory(i);S.CAPABILITY_ERROR_MEDIASOURCE=d,S.CAPABILITY_ERROR_MEDIAKEYS=c,S.DOWNLOAD_ERROR_ID_MANIFEST=g,S.DOWNLOAD_ERROR_ID_SIDX=p,S.DOWNLOAD_ERROR_ID_CONTENT=h,S.DOWNLOAD_ERROR_ID_INITIALIZATION=v,S.DOWNLOAD_ERROR_ID_XLINK=m,S.MANIFEST_ERROR_ID_CODEC=_,S.MANIFEST_ERROR_ID_PARSE=y,S.MANIFEST_ERROR_ID_NOSTREAMS=E,S.TIMED_TEXT_ERROR_ID_PARSE=T,t["default"]=S,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n,r,i,a=!1,o=!1,s=e.ContentComponent_asArray,u="text"!==t?new RegExp(t):new RegExp("(vtt|ttml)");if(e.Representation_asArray.length>0&&e.Representation_asArray[0].hasOwnProperty("codecs")){var l=e.Representation_asArray[0].codecs;if("stpp"===l||"wvtt"===l)return"fragmentedText"===t}if(s){if(s.length>1)return"muxed"===t;s[0]&&s[0].contentType===t&&(a=!0,o=!0)}if(e.hasOwnProperty("mimeType")&&(a=u.test(e.mimeType),o=!0),!o)for(n=0,r=e.Representation_asArray.length;!o&&n<r;)i=e.Representation_asArray[n],i.hasOwnProperty("mimeType")&&(a=u.test(i.mimeType),o=!0),n++;return a}function t(t){return e(t,"audio")}function n(t){return e(t,"video")}function r(t){return e(t,"fragmentedText")}function i(t){return e(t,"text")}function a(t){return e(t,"muxed")}function s(e){return"text/vtt"===e||"application/ttml+xml"===e}function l(e){var t="";return e.hasOwnProperty("lang")&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t}function d(e){return e.hasOwnProperty("Viewpoint")?e.Viewpoint:null}function g(e){return e.hasOwnProperty("Role_asArray")?e.Role_asArray:[]}function h(e){return e.hasOwnProperty("Accessibility_asArray")?e.Accessibility_asArray:[]}function m(e){return e.hasOwnProperty("AudioChannelConfiguration_asArray")?e.AudioChannelConfiguration_asArray:[]}function y(e){return g(e).filter(function(e){return"main"===e.value})[0]}function T(){return function(e,t){return e.bandwidth-t.bandwidth}}function I(e){return void 0!==e.Representation_asArray&&null!==e.Representation_asArray&&e.Representation_asArray.sort(T()),e}function A(e,t,n){var r,i,a=t.Period_asArray[n].AdaptationSet_asArray;for(r=0,i=a.length;r<i;r++)if(a[r].hasOwnProperty("id")&&a[r].id===e)return a[r];return null}function b(e,t,n){var r=t.Period_asArray[n].AdaptationSet_asArray;return r[e]}function D(e,t,n){var r,i,a=t.Period_asArray[n].AdaptationSet_asArray;for(r=0,i=a.length;r<i;r++)if(a[r]===e)return r;return-1}function O(t,n,r){var i,a,o=t.Period_asArray[n].AdaptationSet_asArray,s=[];for(i=0,a=o.length;i<a;i++)e(o[i],r)&&s.push(I(o[i]));return s}function P(e,t,n,r){var i=O(e,t,n);if(!i||0===i.length)return null;if(i.length>1&&r)for(var a=de.getCurrentTrackFor(n,r),o=ce.getAllMediaInfoForType(e,r,n),s=0,u=i.length;s<u;s++){if(a&&de.isTracksEqual(a,o[s]))return i[s];if(y(i[s]))return i[s]}return i[0]}function w(e){var t=e.Representation_asArray[0];return t.mimeType+';codecs="'+t.codecs+'"'}function N(e){return e.Representation_asArray[0].mimeType}function L(e){return e&&e.hasOwnProperty("cenc:default_KID")?e["cenc:default_KID"]:null}function x(e){return e&&e.hasOwnProperty("ContentProtection_asArray")&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null}function F(e){var t=!1;return e.hasOwnProperty("type")&&(t="dynamic"===e.type),t}function U(e){var t,n,r=F(e);return t=!isNaN(e.timeShiftBufferDepth),n=r&&t}function B(e,t){var n=!1;return e.profiles&&e.profiles.length>0&&(n=e.profiles.indexOf(t)!==-1),n}function k(e){return B(e,"urn:mpeg:dash:profile:isoff-on-demand:2011")}function j(e){return B(e,"urn:dvb:dash:profile:dvb-dash:2014")}function K(e){var t;return t=e.hasOwnProperty("mediaPresentationDuration")?e.mediaPresentationDuration:Number.MAX_VALUE}function H(e){return e.bandwidth}function q(e){var t=NaN,n=2;return e.hasOwnProperty("minimumUpdatePeriod")&&(t=Math.max(parseFloat(e.minimumUpdatePeriod),n)),t}function Y(e){return e.Representation_asArray.length}function G(e){if(!e||!e.Representation_asArray||!e.Representation_asArray.length)return null;for(var t=I(e),n=t.Representation_asArray,r=n.length,i=[],a=0;a<r;a++)i.push({bandwidth:n[a].bandwidth,width:n[a].width||0,height:n[a].height||0});return i}function V(e,t){return t.Representation_asArray[e]}function z(e,t){for(var n,r,i,a,u,l=I(e.Period_asArray[t.period.index].AdaptationSet_asArray[t.index]),f=[],d=0;d<l.Representation_asArray.length;d++)a=l.Representation_asArray[d],n=new o["default"],n.index=d,n.adaptation=t,a.hasOwnProperty("id")&&(n.id=a.id),a.hasOwnProperty("bandwidth")&&(n.bandwidth=a.bandwidth),a.hasOwnProperty("maxPlayoutRate")&&(n.maxPlayoutRate=a.maxPlayoutRate),a.hasOwnProperty("SegmentBase")?(i=a.SegmentBase,n.segmentInfoType="SegmentBase"):a.hasOwnProperty("SegmentList")?(i=a.SegmentList,i.hasOwnProperty("SegmentTimeline")?(n.segmentInfoType="SegmentTimeline",u=i.SegmentTimeline.S_asArray[i.SegmentTimeline.S_asArray.length-1],(!u.hasOwnProperty("r")||u.r>=0)&&(n.useCalculatedLiveEdgeTime=!0)):(n.segmentInfoType="SegmentList",n.useCalculatedLiveEdgeTime=!0)):a.hasOwnProperty("SegmentTemplate")?(i=a.SegmentTemplate,i.hasOwnProperty("SegmentTimeline")?(n.segmentInfoType="SegmentTimeline",u=i.SegmentTimeline.S_asArray[i.SegmentTimeline.S_asArray.length-1],(!u.hasOwnProperty("r")||u.r>=0)&&(n.useCalculatedLiveEdgeTime=!0)):n.segmentInfoType="SegmentTemplate",i.hasOwnProperty("initialization")&&(n.initialization=i.initialization.split("$Bandwidth$").join(a.bandwidth).split("$RepresentationID$").join(a.id))):(i=a.BaseURL,n.segmentInfoType="BaseURL"),i.hasOwnProperty("Initialization")?(r=i.Initialization,r.hasOwnProperty("sourceURL")?n.initialization=r.sourceURL:r.hasOwnProperty("range")&&(n.range=r.range)):a.hasOwnProperty("mimeType")&&s(a.mimeType)&&(n.range=0),i.hasOwnProperty("timescale")&&(n.timescale=i.timescale),i.hasOwnProperty("duration")&&(n.segmentDuration=i.duration/n.timescale),i.hasOwnProperty("startNumber")&&(n.startNumber=i.startNumber),i.hasOwnProperty("indexRange")&&(n.indexRange=i.indexRange),i.hasOwnProperty("presentationTimeOffset")&&(n.presentationTimeOffset=i.presentationTimeOffset/n.timescale),n.MSETimeOffset=fe.calcMSETimeOffset(n),n.path=[t.period.index,t.index,d],f.push(n);return f}function W(e,i){for(var o,s,l=e.Period_asArray[i.index],f=[],d=0;d<l.AdaptationSet_asArray.length;d++)s=l.AdaptationSet_asArray[d],o=new u["default"],s.hasOwnProperty("id")&&(o.id=s.id),o.index=d,o.period=i,a(s)?o.type="muxed":t(s)?o.type="audio":n(s)?o.type="video":r(s)?o.type="fragmentedText":o.type="text",f.push(o);return f}function Q(e,t){var n,r,i=F(e),a=[],o=null,s=null,u=null,l=null;for(r=0,n=e.Period_asArray.length;r<n;r++)s=e.Period_asArray[r],s.hasOwnProperty("start")?(l=new f["default"],
27
+ l.start=s.start):null!==o&&s.hasOwnProperty("duration")&&null!==u?(l=new f["default"],l.start=u.start+u.duration,l.duration=s.duration):0!==r||i||(l=new f["default"],l.start=0),null!==u&&isNaN(u.duration)&&(u.duration=l.start-u.start),null!==l&&(l.id=X(s)),null!==l&&s.hasOwnProperty("duration")&&(l.duration=s.duration),null!==l&&(l.index=r,l.mpd=t,a.push(l),o=s,u=l),s=null,l=null;return 0===a.length?a:(null!==u&&isNaN(u.duration)&&(u.duration=ee(e,u)-u.start),a)}function X(e){if(!e)throw new Error("Period cannot be null or undefined");var t=f["default"].DEFAULT_ID;return e.hasOwnProperty("id")&&"__proto__"!==e.id&&(t=e.id),t}function Z(e){var t=new c["default"];return t.manifest=e,e.hasOwnProperty("availabilityStartTime")?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):t.availabilityStartTime=new Date(e.loadedTime.getTime()),e.hasOwnProperty("availabilityEndTime")&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty("suggestedPresentationDelay")&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty("timeShiftBufferDepth")&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty("maxSegmentDuration")&&(t.maxSegmentDuration=e.maxSegmentDuration),t}function J(e,t){return fe.calcPresentationTimeFromWallTime(e.loadedTime,t)}function $(e,t){var n,r=NaN;return e.hasOwnProperty("minimumUpdatePeriod")&&(n=J(e,t),r=n+e.minimumUpdatePeriod),r}function ee(e,t){var n,r=$(e,t);if(e.mediaPresentationDuration)n=e.mediaPresentationDuration;else{if(isNaN(r))throw new Error("Must have @mediaPresentationDuration or @minimumUpdatePeriod on MPD or an explicit @duration on the last period.");n=r}return n}function te(e,t){var n=e.Period_asArray,r=n[t.index].EventStream_asArray,i=[];if(r)for(var a=0;a<r.length;a++){var o=new M["default"];if(o.period=t,o.timescale=1,!r[a].hasOwnProperty("schemeIdUri"))throw new Error("Invalid EventStream. SchemeIdUri has to be set");o.schemeIdUri=r[a].schemeIdUri,r[a].hasOwnProperty("timescale")&&(o.timescale=r[a].timescale),r[a].hasOwnProperty("value")&&(o.value=r[a].value);for(var s=0;s<r[a].Event_asArray.length;s++){var u=new S["default"];u.presentationTime=0,u.eventStream=o,r[a].Event_asArray[s].hasOwnProperty("presentationTime")&&(u.presentationTime=r[a].Event_asArray[s].presentationTime),r[a].Event_asArray[s].hasOwnProperty("duration")&&(u.duration=r[a].Event_asArray[s].duration),r[a].Event_asArray[s].hasOwnProperty("id")&&(u.id=r[a].Event_asArray[s].id),i.push(u)}}return i}function ne(e,t){var n=[];if(!e)return n;for(var r=0;r<e.length;r++){var i=new M["default"];if(i.timescale=1,i.representation=t,!e[r].hasOwnProperty("schemeIdUri"))throw new Error("Invalid EventStream. SchemeIdUri has to be set");i.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty("timescale")&&(i.timescale=e[r].timescale),e[r].hasOwnProperty("value")&&(i.value=e[r].value),n.push(i)}return n}function re(e,t){var n=e.Period_asArray[t.period.index].AdaptationSet_asArray[t.index].InbandEventStream_asArray;return ne(n,null)}function ie(e,t){var n=e.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index].Representation_asArray[t.index].InbandEventStream_asArray;return ne(n,t)}function ae(e){var t=F(e),n=e.hasOwnProperty("availabilityStartTime"),r=e.UTCTiming_asArray,i=[];return(t||n)&&r&&r.forEach(function(e){var t=new p["default"];e.hasOwnProperty("schemeIdUri")&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value.toString(),i.push(t)))}),i}function oe(e){var t=[],n=e.BaseURL_asArray||[e.baseUri],r=!1;return n.some(function(n){if(n){var i=new R["default"],a=n.__text||n;return ge.isRelative(a)&&(r=!0,e.baseUri&&(a=e.baseUri+a)),i.url=a,n.hasOwnProperty("serviceLocation")&&n.serviceLocation.length?i.serviceLocation=n.serviceLocation:i.serviceLocation=a,n.hasOwnProperty("dvb:priority")&&(i.dvb_priority=n["dvb:priority"]),n.hasOwnProperty("dvb:weight")&&(i.dvb_weight=n["dvb:weight"]),t.push(i),r}}),t}function se(e){return e.hasOwnProperty("Location")&&(e.Location=e.Location_asArray[0]),e.Location}var ue=void 0,le=this.context,fe=(0,v["default"])(le).getInstance(),de=(0,_["default"])(le).getInstance(),ce=(0,E["default"])(le).getInstance(),ge=(0,C["default"])(le).getInstance();return ue={getIsTypeOf:e,getIsAudio:t,getIsVideo:n,getIsText:i,getIsMuxed:a,getIsTextTrack:s,getIsFragmentedText:r,getIsMain:y,getLanguageForAdaptation:l,getViewpointForAdaptation:d,getRolesForAdaptation:g,getAccessibilityForAdaptation:h,getAudioChannelConfigurationForAdaptation:m,processAdaptation:I,getAdaptationForIndex:b,getIndexForAdaptation:D,getAdaptationForId:A,getAdaptationsForType:O,getAdaptationForType:P,getCodec:w,getMimeType:N,getKID:L,getContentProtectionData:x,getIsDynamic:F,getIsDVR:U,getIsOnDemand:k,getIsDVB:j,getDuration:K,getBandwidth:H,getRefreshDelay:q,getRepresentationCount:Y,getBitrateListForAdaptation:G,getRepresentationFor:V,getRepresentationsForAdaptation:z,getAdaptationsForPeriod:W,getRegularPeriods:Q,getPeriodId:X,getMpd:Z,getFetchTime:J,getCheckTime:$,getEndTimeForLastPeriod:ee,getEventsForPeriod:te,getEventStreams:ne,getEventStreamForAdaptationSet:re,getEventStreamForRepresentation:ie,getUTCTimingSources:ae,getBaseURLsFromElement:oe,getRepresentationSortFunction:T,getLocation:se}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(96),o=r(a),s=n(92),u=r(s),l=n(95),f=r(l),d=n(94),c=r(d),g=n(58),p=r(g),h=n(26),v=r(h),m=n(13),_=r(m),y=n(15),E=r(y),T=n(57),S=r(T),I=n(56),R=r(I),A=n(93),M=r(A),b=n(22),C=r(b),D=n(1),O=r(D);i.__dashjs_factory_name="DashManifestModel",t["default"]=O["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){k={},O(),D()}function t(e,t){var n=f(e),i=r(e,t),a=[];return"fragmentedText"===e?void s(i[0]):(n||(n=U.getSavedMediaSettings(e),l(e,n)),void(i&&0!==i.length&&(n&&i.forEach(function(e){C(n,e)&&a.push(e)}),s(0===a.length?P(i):a.length>1?P(a):a[0]))))}function n(e){var t=e?e.type:null,n=e?e.streamInfo.id:null,r=f(t);return!(!e||!I(t))&&(k[n]=k[n]||w(),!(k[n][t].list.indexOf(e)>=0)&&(k[n][t].list.push(e),r&&C(r,e)&&!i(t,e.streamInfo)&&s(e),!0))}function r(e,t){if(!e||!t)return[];var n=t.id;return k[n]&&k[n][e]?k[n][e].list:[]}function i(e,t){return!e||!t||t&&!k[t.id]?null:k[t.id][e].current}function a(e){var t=e.type,n=e.streamInfo.id;return k[n]&&k[n][t]&&R(k[n][t].current,e)}function s(e){if(e){var t=e.type,n=e.streamInfo,r=n.id,a=i(t,n);if(k[r]&&k[r][t]&&(!a||!R(e,a))){k[r][t].current=e,a&&x.trigger(o["default"].CURRENT_TRACK_CHANGED,{oldMediaInfo:a,newMediaInfo:e,switchMode:H[t]});var s=b(e);s&&k[r][t].storeLastSettings&&(s.roles&&(s.role=s.roles[0],delete s.roles),s.accessibility&&(s.accessibility=s.accessibility[0]),s.audioChannelConfiguration&&(s.audioChannelConfiguration=s.audioChannelConfiguration[0]),U.setSavedMediaSettings(t,s))}}}function l(e,t){e&&t&&(j[e]=t)}function f(e){return e?j[e]:null}function d(e,t){var n=Y.indexOf(t)!==-1;return n?void(H[e]=t):void L("track switch mode is not supported: "+t)}function g(e){return H[e]}function h(e){var t=G.indexOf(e)!==-1;return t?void(K=e):void L("track selection mode is not supported: "+e)}function S(){return K||T}function I(e){return"audio"===e||"video"===e||"text"===e||"fragmentedText"===e}function R(e,t){var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=e.lang===t.lang,a=e.roles.toString()===t.roles.toString(),o=e.accessibility.toString()===t.accessibility.toString(),s=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString();return n&&r&&i&&a&&o&&s}function A(e){e&&e.errHandler&&(q=e.errHandler)}function M(){e(),F.resetEmbedded()}function b(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration},n=t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0;return n?t:null}function C(e,t){var n=!e.lang||e.lang===t.lang,r=!e.viewpoint||e.viewpoint===t.viewpoint,i=!e.role||!!t.roles.filter(function(t){return t===e.role})[0],a=!e.accessibility||!!t.accessibility.filter(function(t){return t===e.accessibility})[0],o=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter(function(t){return t===e.audioChannelConfiguration})[0];return n&&r&&i&&a&&o}function D(){H={audio:_,video:m}}function O(){j={audio:null,video:null}}function P(e){var t=S(),n=[],r=function(e){var t,n=0,r=[];return e.forEach(function(e){t=Math.max.apply(Math,e.bitrateList.map(function(e){return e.bandwidth})),t>n?(n=t,r=[e]):t===n&&r.push(e)}),r},i=function(e){var t,n=0,r=[];return e.forEach(function(e){t=e.representationCount,t>n?(n=t,r=[e]):t===n&&r.push(e)}),r};switch(t){case y:n=r(e),n.length>1&&(n=i(n));break;case E:n=i(e),n.length>1&&(n=r(e));break;default:L("track selection mode is not supported: "+t)}return n[0]}function w(){return{audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null}}}var N=this.context,L=(0,c["default"])(N).getInstance().log,x=(0,u["default"])(N).getInstance(),F=(0,p["default"])(N).getInstance(),U=(0,v["default"])(N).getInstance(),B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=[_,m],G=[y,E];return B={initialize:e,checkInitialMediaSettingsForType:t,addTrack:n,getTracksFor:r,getCurrentTrackFor:i,isCurrentTrack:a,setTrack:s,setInitialSettings:l,getInitialSettings:f,setSwitchMode:d,getSwitchMode:g,setSelectionModeForInitialTrack:h,getSelectionModeForInitialTrack:S,isMultiTrackSupportedByType:I,isTracksEqual:R,setConfig:A,reset:M}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=r(a),s=n(3),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d),g=n(17),p=r(g),h=n(50),v=r(h),m="neverReplace",_="alwaysReplace",y="highestBitrate",E="widestRange",T=y;i.__dashjs_factory_name="MediaController";var S=f["default"].getSingletonFactory(i);S.TRACK_SWITCH_MODE_NEVER_REPLACE=m,S.TRACK_SWITCH_MODE_ALWAYS_REPLACE=_,S.TRACK_SELECTION_MODE_HIGHEST_BITRATE=y,S.TRACK_SELECTION_MODE_WIDEST_RANGE=E,S.DEFAULT_INIT_TRACK_SELECTION_MODE=T,t["default"]=S,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){G={}}function t(e){e&&e.adapter&&(Y=e.adapter)}function n(){H.trigger(C["default"].METRICS_CHANGED)}function r(e){H.trigger(C["default"].METRIC_CHANGED,{mediaType:e}),n()}function i(e,t,n){H.trigger(C["default"].METRIC_UPDATED,{mediaType:e,metric:t,value:n}),r(e)}function a(e,t,n){H.trigger(C["default"].METRIC_ADDED,{mediaType:e,metric:t,value:n}),r(e)}function s(e){delete G[e],r(e)}function f(){G={},n()}function c(e){return G.hasOwnProperty(e)?G[e]:null}function p(e){var t;return G.hasOwnProperty(e)?t=G[e]:(t=new o["default"],G[e]=t),t}function v(e,t,n,r,i,o){var s=new u["default"];return s.tcpid=t,s.dest=n,s.topen=r,s.tclose=i,s.tconnect=o,p(e).TcpList.push(s),a(e,Y.metricsList.TCP_CONNECTION,s),s}function _(e,t,n,r){var i=new l.HTTPRequestTrace;return i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n,i}function T(e,t,n,r,i,o,s,u,f,d,c,g,h,v){var m=new l.HTTPRequest;return i&&i!==r&&(T(e,null,n,r,null,null,s,u,null,null,null,g,null,null),m.actualurl=i),m.tcpid=t,m.type=n,m.url=r,m.range=s,m.trequest=u,m.tresponse=f,m.responsecode=c,m._tfinish=d,m._stream=e,m._mediaduration=g,m._responseHeaders=h,m._serviceLocation=o,v?v.forEach(function(e){_(m,e.s,e.d,e.b)}):(delete m.interval,delete m.trace),p(e).HttpList.push(m),a(e,Y.metricsList.HTTP_REQUEST,m),m}function I(e,t,n,r,i){var o=new d["default"];return o.t=t,o.mt=n,o.to=r,i?o.lto=i:delete o.lto,p(e).RepSwitchList.push(o),a(e,Y.metricsList.TRACK_SWITCH,o),o}function A(e,t,n){var r=new g["default"];return r.t=t,r.level=n,p(e).BufferLevel.push(r),a(e,Y.metricsList.BUFFER_LEVEL,r),r}function b(e,t,n){var r=new h["default"];return r.target=n,r.state=t,p(e).BufferState.push(r),a(e,Y.metricsList.BUFFER_STATE,r),r}function D(e,t,n,r){var i=new m["default"];return i.time=t,i.range=r,i.manifestInfo=n,p(e).DVRInfo.push(i),a(e,Y.metricsList.DVR_INFO,i),i}function O(e,t){var n=new y["default"],r=p(e).DroppedFrames;return n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n?r[r.length-1]:(r.push(n),a(e,Y.metricsList.DROPPED_FRAMES,n),n)}function P(e,t,n,r,i,o,s,u,l){var f=new S["default"];return f.mediaType=e,f.t=t,f.type=n,f.startTime=r,f.availabilityStartTime=i,f.duration=o,f.quality=s,f.range=u,f.state=l,p(e).SchedulingInfo.push(f),a(e,Y.metricsList.SCHEDULING_INFO,f),f}function N(e,t,n){var r=new M["default"];r.loadingRequests=t,r.executedRequests=n,p(e).RequestsQueue=r,a(e,Y.metricsList.REQUESTS_QUEUE,r)}function L(e,t,n,r,i,o,s,u,l,f){var d=new E.ManifestUpdate,c=p("stream");return d.mediaType=e,d.type=t,d.requestTime=n,d.fetchTime=r,d.availabilityStartTime=i,d.presentationStartTime=o,d.clientTimeOffset=s,d.currentTime=u,d.buffered=l,d.latency=f,c.ManifestUpdate.push(d),a(e,Y.metricsList.MANIFEST_UPDATE,d),d}function x(e,t){if(e){for(var n in t)e[n]=t[n];i(e.mediaType,Y.metricsList.MANIFEST_UPDATE,e)}}function F(e,t,n,r,a){if(e){var o=new E.ManifestUpdateStreamInfo;return o.id=t,o.index=n,o.start=r,o.duration=a,e.streamInfo.push(o),i(e.mediaType,Y.metricsList.MANIFEST_UPDATE_STREAM_INFO,e),o}return null}function U(e,t,n,r,a,o,s,u){if(e){var l=new E.ManifestUpdateTrackInfo;return l.id=t,l.index=n,l.streamIndex=r,l.mediaType=a,l.startNumber=s,l.fragmentInfoType=u,l.presentationTimeOffset=o,e.trackInfo.push(l),i(e.mediaType,Y.metricsList.MANIFEST_UPDATE_TRACK_INFO,e),l}return null}function B(e){var t="stream";return e.trace&&Array.isArray(e.trace)?e.trace.forEach(function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel}):delete e.trace,p(t).PlayList.push(e),a(t,Y.metricsList.PLAY_LIST,e),e}function k(e){var t="stream";return p(t).DVBErrors.push(e),a(t,Y.metricsList.DVB_ERRORS,e),e}function j(e,t){var n=new w["default"];return n._s=t,p(e).BolaState=[n],a(e,"BolaState",n),n}var K=this.context,H=(0,R["default"])(K).getInstance(),q=void 0,Y=void 0,G=void 0;return q={metricsChanged:n,metricChanged:r,metricUpdated:i,metricAdded:a,clearCurrentMetricsForType:s,clearAllCurrentMetrics:f,getReadOnlyMetricsFor:c,getMetricsFor:p,addTcpConnection:v,addHttpRequest:T,addRepresentationSwitch:I,addBufferLevel:A,addBufferState:b,addDVRInfo:D,addDroppedFrames:O,addSchedulingInfo:P,addRequestsQueue:N,addManifestUpdate:L,updateManifestUpdateInfo:x,addManifestUpdateStreamInfo:F,addManifestUpdateRepresentationInfo:U,addPlayList:B,addDVBErrors:k,updateBolaState:j,setConfig:t},e(),q}Object.defineProperty(t,"__esModule",{value:!0});var a=n(171),o=r(a),s=n(185),u=r(s),l=n(7),f=n(182),d=r(f),c=n(177),g=r(c),p=n(178),h=r(p),v=n(179),m=r(v),_=n(180),y=r(_),E=n(181),T=n(184),S=r(T),I=n(3),R=r(I),A=n(183),M=r(A),b=n(2),C=r(b),D=n(1),O=r(D),P=n(176),w=r(P);i.__dashjs_factory_name="MetricsModel",t["default"]=O["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(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}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e){e&&e.dashManifestModel&&(L=e.dashManifestModel)}function t(){x=[],F={}}function n(e,t){return t.getRepresentationForQuality(e.quality)}function r(e){return F[e.streamInfo.id][e.index]}function i(e){for(var t=x.length,n=0;n<t;n++){var r=x[n];if(e.id===r.id)return r}return null}function a(e,t){var n=new s["default"],r=t.adaptation.period.mpd.manifest.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index],i=L.getRepresentationFor(t.index,r);return n.id=t.id,n.quality=t.index,n.bandwidth=L.getBandwidth(i),n.DVRWindow=t.segmentAvailabilityRange,n.fragmentDuration=t.segmentDuration||(t.segments&&t.segments.length>0?t.segments[0].duration:NaN),n.MSETimeOffset=t.MSETimeOffset,n.useCalculatedLiveEdgeTime=t.useCalculatedLiveEdgeTime,n.mediaInfo=o(e,t.adaptation),n}function o(e,t){var n,r=new l["default"],i=t.period.mpd.manifest.Period_asArray[t.period.index].AdaptationSet_asArray[t.index];return r.id=t.id,r.index=t.index,r.type=t.type,r.streamInfo=f(e,t.period),r.representationCount=L.getRepresentationCount(i),r.lang=L.getLanguageForAdaptation(i),n=L.getViewpointForAdaptation(i),r.viewpoint=n?n.value:void 0,r.accessibility=L.getAccessibilityForAdaptation(i).map(function(e){var t=e.value,n=t;return e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&"undefined"!=typeof y["default"]&&(n=t?"cea-608:"+t:"cea-608",r.embeddedCaptions=!0),n}),r.audioChannelConfiguration=L.getAudioChannelConfigurationForAdaptation(i).map(function(e){return e.value}),r.roles=L.getRolesForAdaptation(i).map(function(e){return e.value}),r.codec=L.getCodec(i),r.mimeType=L.getMimeType(i),r.contentProtection=L.getContentProtectionData(i),r.bitrateList=L.getBitrateListForAdaptation(i),r.contentProtection&&r.contentProtection.forEach(function(e){e.KID=L.getKID(e)}),r.isText=L.getIsTextTrack(r.mimeType),r}function u(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type="embeddedText",e.codec="cea-608-in-SEI",e.isText=!0,e.isEmbedded=!0,e.lang=t+" "+n,e.roles=["caption"]}function f(e,t){var n=new d["default"],r=1;return n.id=t.id,n.index=t.index,n.start=t.start,n.duration=t.duration,n.manifestInfo=c(e,t.mpd),n.isLast=1===e.Period_asArray.length||Math.abs(n.start+n.duration-n.manifestInfo.duration)<r,n.isFirst=1===e.Period_asArray.length||L.getRegularPeriods(e,L.getMpd(e))[0].id===t.id,n}function c(e,t){var n=new g["default"];return n.DVRWindowSize=t.timeShiftBufferDepth,n.loadedTime=t.manifest.loadedTime,n.availableFrom=t.availabilityStartTime,n.minBufferTime=t.manifest.minBufferTime,n.maxFragmentDuration=t.maxSegmentDuration,n.duration=L.getDuration(e),n.isDynamic=L.getIsDynamic(e),n}function p(e,t,n){var r=L.getAdaptationForType(e,t.index,n,t);if(!r)return null;var a=i(t),s=a.id,u=L.getIndexForAdaptation(r,e,t.index);return F[s]=F[s]||L.getAdaptationsForPeriod(e,a),o(e,F[s][u])}function v(e,t,n){var r,a,s,l,f,d,c=i(t),g=c.id,p=L.getAdaptationsForType(e,t.index,"embeddedText"!==n?n:"video"),h=[];if(!p)return h;for(F[g]=F[g]||L.getAdaptationsForPeriod(e,c),l=0,d=p.length;l<d;l++){if(r=p[l],s=L.getIndexForAdaptation(r,e,t.index),a=o(e,F[g][s]),"embeddedText"===n){var v=a.accessibility.length;for(f=0;f<v;f++)if(a){var m=a.accessibility[f];if(0===m.indexOf("cea-608:")){var _=m.substring(8),y=_.split(";");if("CC"===y[0].substring(0,2))for(f=0;f<y.length;f++)a||(a=o.call(this,e,F[g][s])),u(a,y[f].substring(0,3),y[f].substring(4)),h.push(a),a=null;else for(f=0;f<y.length;f++)a||(a=o.call(this,e,F[g][s])),u(a,"CC"+(f+1),y[f]),h.push(a),a=null}else 0===m.indexOf("cea-608")&&(u(a,"CC1","eng"),h.push(a),a=null)}}a&&"embeddedText"!==n&&h.push(a)}return h}function m(e){var t,n,r,i=[];if(!e)return null;for(t=L.getMpd(e),x=L.getRegularPeriods(e,t),t.checkTime=L.getCheckTime(e,x[0]),F={},n=x.length,r=0;r<n;r++)i.push(f(e,x[r]));return i}function _(e){var t=L.getMpd(e);return c(e,t)}function E(e,t){var n=e.getRepresentationController().getRepresentationForQuality(t);return e.getIndexHandler().getInitRequest(n)}function S(e,t){var r=n(t,e.getRepresentationController());return e.getIndexHandler().getNextSegmentRequest(r)}function I(e,t,r,i){var a=n(t,e.getRepresentationController());return e.getIndexHandler().getSegmentRequestForTime(a,r,i)}function R(e,t,r){var i=n(t,e.getRepresentationController());return e.getIndexHandler().generateSegmentRequestForTime(i,r)}function A(e){return e.getIndexHandler().getCurrentTime()}function M(e,t){return e.getIndexHandler().setCurrentTime(t)}function b(e,t){var n,a,o=i(t.getStreamInfo()),s=t.getMediaInfo(),u=r(s),l=t.getType();n=s.id,a=n?L.getAdaptationForId(n,e,o.index):L.getAdaptationForIndex(s.index,e,o.index),t.getRepresentationController().updateData(a,u,l)}function C(e,t,n){var r=t.getRepresentationForQuality(n);return r?a(e,r):null}function D(e,t){var n=t.getCurrentRepresentation();return n?a(e,n):null}function O(e,t,n){var r=new h["default"],i=e.scheme_id_uri,a=e.value,o=e.timescale,s=e.presentation_time_delta,u=e.event_duration,l=e.id,f=e.message_data,d=n*o+s;return t[i]?(r.eventStream=t[i],r.eventStream.value=a,r.eventStream.timescale=o,r.duration=u,r.id=l,r.presentationTime=d,r.messageData=f,r.presentationTimeDelta=s,r):null}function P(e,t,a){var o=[];return t instanceof d["default"]?o=L.getEventsForPeriod(e,i(t)):t instanceof l["default"]?o=L.getEventStreamForAdaptationSet(e,r(t)):t instanceof s["default"]&&(o=L.getEventStreamForRepresentation(e,n(t,a.getRepresentationController()))),o}function w(){x=[],F={}}var N=void 0,L=void 0,x=void 0,F=void 0;return N={initialize:t,convertDataToTrack:a,convertDataToMedia:o,convertDataToStream:f,getDataForTrack:n,getDataForMedia:r,getDataForStream:i,getStreamsInfo:m,getManifestInfo:_,getMediaInfoForType:p,getAllMediaInfoForType:v,getCurrentRepresentationInfo:D,getRepresentationInfoForQuality:C,updateData:b,getInitRequest:E,getNextFragmentRequest:S,getFragmentRequestForTime:I,generateFragmentRequestForTime:R,getIndexHandlerTime:A,setIndexHandlerTime:M,getEventsFor:P,getEvent:O,setConfig:e,reset:w,metricsList:T}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(174),s=i(o),u=n(170),l=i(u),f=n(172),d=i(f),c=n(169),g=i(c),p=n(57),h=i(p),v=n(1),m=i(v),_=n(52),y=i(_),E=n(54),T=r(E);a.__dashjs_factory_name="DashAdapter",t["default"]=m["default"].getSingletonFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(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}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=I(i,e),null===n?null:n.bandwidth}function t(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=S(i,e)}function n(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=A(i,e)}function r(e){return c(e,p.TRACK_SWITCH)}function i(e){return c(e,p.BUFFER_LEVEL)}function a(e){var t=i(e);return t?(0,h.round10)(t.level/1e3,-3):0}function s(e){return e.RequestsQueue}function l(e){if(null===e)return null;var t,n,r=e.HttpList,i=null;if(null===r||r.length<=0)return null;for(t=r.length,n=t-1;n>=0;){if(r[n].responsecode){i=r[n];break}n--}return i}function d(e){return null===e?[]:e.HttpList?e.HttpList:[]}function c(e,t){if(null===e)return null;var n=e[t];if(null===n)return null;var r=n.length;return r<=0?null:n[r-1]}function g(e){return c(e,p.DROPPED_FRAMES)}function v(e){return c(e,p.SCHEDULING_INFO)}function m(e){return c(e,p.MANIFEST_UPDATE)}function _(e){return c(e,p.DVR_INFO)}function y(e,t){var n,r,i,a={};if(null===e)return null;for(n=d(e),i=n.length-1;i>=0;i--)if(r=n[i],r.type===o.HTTPRequest.MPD_TYPE){a=T(r._responseHeaders);break}return void 0===a[t]?null:a[t]}function E(e,t){if(null===e)return null;var n,r=l(e);return null===r||null===r._responseHeaders?null:(n=T(r._responseHeaders),void 0===n[t]?null:n[t])}function T(e){var t={};if(!e)return t;for(var n=e.split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=a.indexOf(": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}function S(e,t){var n=I(e,t,!0);return null!==n?n:-1}function I(e,t,n){var r,i,a,o,s,u;for(i=e.AdaptationSet_asArray,s=0;s<i.length;s+=1)for(r=i[s],o=r.Representation_asArray,u=0;u<o.length;u+=1)if(a=o[u],t===a.id)return n?u:a;return null}function R(e,t){return(0,f["default"])(b).getInstance().getIsTypeOf(e,t)}function A(e,t){var n,r,i,a;if(!e||!t)return-1;for(r=e.AdaptationSet_asArray,a=0;a<r.length;a+=1)if(n=r[a],i=n.Representation_asArray,R(n,t))return i.length;return-1}var M=void 0,b=this.context,C=(0,u["default"])(b).getInstance();return M={getBandwidthForRepresentation:e,getIndexForRepresentation:t,getMaxIndexForBufferType:n,getCurrentRepresentationSwitch:r,getLatestBufferLevelVO:i,getCurrentBufferLevel:a,getCurrentHttpRequest:l,getHttpRequests:d,getCurrentDroppedFrames:g,getCurrentSchedulingInfo:v,getCurrentDVRInfo:_,getCurrentManifestUpdate:m,getLatestFragmentRequestHeaderValueByID:E,getLatestMPDRequestHeaderValueByID:y,getRequestsQueue:s}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=n(31),u=i(s),l=n(12),f=i(l),d=n(1),c=i(d),g=n(54),p=r(g),h=n(186);a.__dashjs_factory_name="DashMetrics",t["default"]=c["default"].getSingletonFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,n){B=!1,k=null,V=null,z=!1,W=NaN,Q=[],J=null,O||t();var r=n.getStreamProcessor();if(q=r.getMediaInfoArr(),Y.setConfig({videoModel:X}),Y.initialize(),G=!F.getIsTextTrack(e),N=(0,f["default"])(C).getInstance(),H=(0,u["default"])(C).getInstance(),H.setConfig({boxParser:N}),G){V=r.getFragmentModel(),this.buffered=(0,c["default"])(C).create(),Q=U.getTracksFor("fragmentedText",Z.getActiveStreamInfo());for(var i=U.getCurrentTrackFor("fragmentedText",Z.getActiveStreamInfo()),a=0;a<Q.length;a++)if(Q[a]===i){$=a;break}}}function t(){ee=[],q=[],X=(0,_["default"])(C).getInstance(),Y=(0,E["default"])(C).getInstance(),Y.setConfig({videoModel:X}),Y.initialize(),N=(0,f["default"])(C).getInstance(),H=(0,u["default"])(C).getInstance(),H.setConfig({boxParser:N}),G=!1,$=null,te=!1,ne=0,ae=[],ie=[],re=null,O=!0}function n(e,t){function n(e,t){var n=new o["default"],r={subtitle:"subtitles",caption:"captions"},i=function(){var e=t.roles.length>0?r[t.roles[0]]:r.caption;return e=e===r.caption||e===r.subtitle?e:r.caption},a=function(){var e=!1;return t.codec&&t.codec.search("stpp")>=0&&(e=!0),t.mimeType&&t.mimeType.search("ttml")>=0&&(e=!0),e};n.captionData=e,n.lang=t.lang,n.label=t.id,n.index=t.index,n.isTTML=a(),n.video=X.getElement(),n.defaultTrack=M(t),n.isFragmented=G,n.isEmbedded=!!t.isEmbedded,n.kind=i();var s=(q?q.length:0)+ee.length;Y.addTextTrack(n,s)}var i,a,s,u,l,f=t.mediaInfo,d=f.type,c=f.mimeType,g=f.codec||c;if(!g)return void D("No text type defined");if("fragmentedText"===d)if(z)if(u=H.getSamplesInfo(e),a=u.sampleList,!J&&a.length>0&&(J=a[0].cts-t.start*W),g.search("stpp")>=0)for(k=null!==k?k:b(g),s=0;s<a.length;s++){var h=a[s],v=h.cts,m=v-J;this.buffered.add(m/W,(m+h.duration)/W);var _=new DataView(e,h.offset,h.size);l=S["default"].Utils.dataViewToString(_,"utf-8");try{i=k.parse(l,v/W,(v+h.duration)/W),Y.addCaptions($,J/W,i)}catch(y){D("TTML parser error: "+y.message)}}else{var E=[];for(s=0;s<a.length;s++){var T=a[s];T.cts-=J,this.buffered.add(T.cts/W,(T.cts+T.duration)/W);for(var I=e.slice(T.offset,T.offset+T.size),A=S["default"].parseBuffer(I),C=0;C<A.boxes.length;C++){var O=A.boxes[C];if(D("VTT box1: "+O.type),"vtte"!==O.type&&"vttc"===O.type){D("VTT vttc boxes.length = "+O.boxes.length);for(var P=0;P<O.boxes.length;P++){var w=O.boxes[P];if(D("VTT box2: "+w.type),"payl"===w.type){var N=w.cue_text;D("VTT cue_text = "+N);var x=T.cts/W,F=(T.cts+T.duration)/W;E.push({start:x,end:F,data:N,styles:{}}),D("VTT "+x+"-"+F+" : "+N)}}}}}E.length>0&&Y.addCaptions($,0,E)}else{for(z=!0,s=0;s<q.length;s++)n(null,q[s]);W=H.getMediaTimescaleFromMoov(e)}else if("text"===d){var _=new DataView(e,0,e.byteLength);l=S["default"].Utils.dataViewToString(_,"utf-8");try{i=b(g).parse(l),n(i,f)}catch(y){L.timedTextError(y,"parse",l)}}else if("video"===d)if("InitializationSegment"===t.segmentType){if(0===ne)for(ne=H.getMediaTimescaleFromMoov(e),s=0;s<ee.length;s++)n(null,ee[s])}else{if(0===ne)return void D("CEA-608: No timescale for embeddedTextTrack yet");var U=function(e,t){function n(e,n,r){var i=null;if(X.getTTMLRenderingDiv())i=p(X.getElement(),e,n,r);else{var a=r.getDisplayText();i=[{start:e,end:n,data:a,styles:{}}]}i&&Y.addCaptions(t,0,i)}return n};u=H.getSamplesInfo(e);var B=u.sequenceNumber;if(!ae[0]&&!ae[1]){var j=void 0,K=void 0,V=void 0;for(s=0;s<ee.length;s++){if("CC1"===ee[s].id?(j=0,V=Y.getTrackIdxForId("CC1")):"CC3"===ee[s].id&&(j=1,V=Y.getTrackIdxForId("CC3")),V===-1)return void D("CEA-608: data before track is ready.");K=U(this,V),ae[s]=new R["default"].Cea608Parser(s,{newCue:K},null)}}if(ne&&ie.indexOf(B)==-1){if(null!==re&&B!==re+1)for(s=0;s<ae.length;s++)ae[s]&&ae[s].reset();for(var Q=r(e),Z=0;Z<ae.length;Z++){var te=Q.fields[Z],oe=ae[Z];if(oe){for(s=0;s<te.length;s++)oe.addData(te[s][0]/ne,te[s][1]);Q.endTime&&oe.cueSplitAtTime(Q.endTime/ne)}}re=B,ie.push(B)}}}function r(e){var t=function(e,t,n){var r=e.length;if(r>0){if(t>=e[r-1][0])e.push([t,n]);else for(var i=r-1;i>=0;i--)if(t<e[i][0]){e.splice(i,0,[t,n]);break}}else e.push([t,n])},n=N.parse(e),r=n.getBox("moof"),i=n.getBox("tfdt"),a=n.getBoxes("trun"),o=null;if(0===a.length)return null;o=a[0],a.length>1&&D("Warning: Too many truns");for(var s=r.offset+o.data_offset,u=o.sample_count,l=s,f=i.baseMediaDecodeTime,d=new DataView(e),c={startTime:null,endTime:null,fields:[[],[]]},g=0,p=0;p<u;p++){for(var h=o.samples[p],v=f+g+h.sample_composition_time_offset,m=R["default"].findCea608Nalus(d,l,h.sample_size),_=0;_<m.length;_++)for(var y=R["default"].extractCea608DataFromRange(d,m[_]),E=0;E<2;E++)y[E].length>0&&t(c.fields[E],v,y[E]);g+=h.sample_duration,l+=h.sample_size}var T=f+g;return c.startTime=f,c.endTime=T,c}function i(e){for(var t="",n=0;n<e.length;++n){var r=e[n];t+=r.uchar}var i=t.length,a=t.replace(/^\s+/,"").length;return i-a}function a(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function s(e){return"red"==e?"rgb(255, 0, 0)":"green"==e?"rgb(0, 255, 0)":"blue"==e?"rgb(0, 0, 255)":"cyan"==e?"rgb(0, 255, 255)":"magenta"==e?"rgb(255, 0, 255)":"yellow"==e?"rgb(255, 255, 0)":"white"==e?"rgb(255, 255, 255)":"black"==e?"rgb(0, 0, 0)":e}function l(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?s(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?s(t.background):"transparent")+";":"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function d(e){var t=e.replace(/^\s+/g,"");return t}function g(e){var t=e.replace(/\s+$/g,"");return t}function p(e,t,n,r){var o=null,s=null,u=!1,f=-1,c={start:t,end:n,spans:[]},p="style_cea608_white_black",h={},v={},m=[],_=void 0,y=void 0;for(_=0;_<15;++_){var E=r.rows[_],T="",S=null;if(!1===E.isEmpty()){var I=i(E.chars);null===o&&(o={x:I,y1:_,y2:_+1,p:[]}),I!==f&&u&&(o.p.push(c),c={start:t,end:n,spans:[]},o.y2=_,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o={x:I,y1:_,y2:_+1,p:[]});for(var R=0;R<E.chars.length;++R){var A=E.chars[R],M=A.penState;if(null===S||!M.equals(S)){T.trim().length>0&&(c.spans.push({name:p,line:T,row:_}),T="");var b="style_cea608_"+M.foreground+"_"+M.background;M.underline&&(b+="_underline"),M.italics&&(b+="_italics"),v.hasOwnProperty(b)||(v[b]=JSON.parse(JSON.stringify(M))),S=M,p=b}T+=A.uchar}T.trim().length>0&&c.spans.push({name:p,line:T,row:_}),u=!0,f=I}else u=!1,f=-1,o&&(o.p.push(c),c={start:t,end:n,spans:[]},o.y2=_,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o=null)}o&&(o.p.push(c),o.y2=_+1,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o=null);var C=[];for(_=0;_<m.length;++_){var D=m[_],O="sub_cea608_"+P++,w=document.createElement("div");
28
+ w.id=O;var N=a(D);w.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+N;var L=document.createElement("div");L.className="paragraph bodyStyle",L.style.cssText=l(e);var x=document.createElement("div");x.className="cueUniWrapper",x.style.cssText="unicode-bidi: normal; direction: ltr;";for(var F=0;F<D.p.length;++F){var U=D.p[F],B=0;for(y=0;y<U.spans.length;++y){var k=U.spans[y];if(k.line.length>0){if(0!==y&&B!=k.row){var j=document.createElement("br");j.className="lineBreak",x.appendChild(j)}var K=!1;B===k.row&&(K=!0),B=k.row;var H=v[k.name],q=document.createElement("span");q.className="spanPadding "+k.name+" customSpanColor",q.style.cssText=l(e,H),0!==y&&K?y===U.spans.length-1?q.textContent=g(k.line):q.textContent=k.line:0===y&&U.spans.length>1&&k.row===U.spans[1].row?q.textContent=d(k.line):q.textContent=k.line.trim(),x.appendChild(q)}}}L.appendChild(x),w.appendChild(L);var Y={bodyStyle:90};for(y in v)v.hasOwnProperty(y)&&(Y[y]=90);C.push({type:"html",start:t,end:n,cueHTMLElement:w,cueID:O,cellResolution:[32,15],isFromCEA608:!0,regions:m,regionID:D.name,videoHeight:e.videoHeight,videoWidth:e.videoWidth,fontSize:Y||{defaultFontSize:"100"},lineHeight:{},linePadding:{}})}return C}function h(){Y.deleteAllTextTracks(),B=!1,k=null,H=null,q=null,Y=null,G=!1,V=null,z=!1,W=NaN,Q=[],X=null,Z=null,O=!1,ee=null}function m(e){O||t(),"CC1"===e.id||"CC3"===e.id?ee.push(e):D("Warning: Embedded track "+e.id+" not supported!")}function y(){O=!1,ee=[],ae=[null,null],ie=[],re=null}function T(){return B}function I(e){e&&(e.errHandler&&(L=e.errHandler),e.adapter&&(x=e.adapter),e.dashManifestModel&&(F=e.dashManifestModel),e.mediaController&&(U=e.mediaController),e.videoModel&&(X=e.videoModel),e.streamController&&(Z=e.streamController),e.textTracks&&(Y=e.textTracks),e.VTTParser&&(j=e.VTTParser),e.TTMLParser&&(K=e.TTMLParser))}function A(){for(var e=X.getElement(),t=e.textTracks,n=t.length,r=n-ee.length,i=Y.getCurrentTrackIdx(),a=0;a<n;a++){var o=t[a];if(B="showing"!==o.mode,"showing"===o.mode){if(i!==a&&(Y.setCurrentTrackIdx(a),Y.addCaptions(a,0,null),G&&a<r)){var s=U.getCurrentTrackFor("fragmentedText",Z.getActiveStreamInfo()),u=Q[a];u!==s&&(V.abortRequests(),Y.deleteTrackCues(s),U.setTrack(u),$=a)}break}}B&&Y.setCurrentTrackIdx(-1)}function M(e){var t=!1;return ee.length>1?t=e.id&&"CC1"===e.id:1===ee.length?e.id&&"CC"===e.id.substring(0,2)&&(t=!0):t=e.index===q[0].index,t}function b(e){var t;return e.search("vtt")>=0?t=j:(e.search("ttml")>=0||e.search("stpp")>=0)&&(t=K,t.setConfig({videoModel:X})),t}var C=this.context,D=(0,v["default"])(C).getInstance().log,O=!1,P=0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0;return w={initialize:e,append:n,abort:h,getAllTracksAreDisabled:T,setTextTrack:A,setConfig:I,addEmbeddedTrack:m,resetEmbedded:y}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(173),o=r(a),s=n(87),u=r(s),l=n(49),f=r(l),d=n(67),c=r(d),g=n(1),p=r(g),h=n(4),v=r(h),m=n(19),_=r(m),y=n(39),E=r(y),T=n(71),S=r(T),I=n(52),R=r(I);i.__dashjs_factory_name="TextSourceBuffer",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){pe=c["default"].QUALITY_DEFAULT,he=!1,ve=0,me=Number.POSITIVE_INFINITY,ye=0,Ee=0,Se=null,Ie=O,Ae=0,Me=!1,be=!1,Ce=!1,De=!1}function n(e,t,n){Te=e,J(t),Pe=n,Le=(0,u["default"])(ne).getInstance(),Oe=(0,p["default"])(ne).getInstance(),we=(0,c["default"])(ne).getInstance(),xe=(0,C["default"])(ne).getInstance(),Ne=Pe.getScheduleController(),pe=we.getQualityFor(Te,Pe.getStreamInfo()),ie.on(E["default"].DATA_UPDATE_COMPLETED,j,this),ie.on(E["default"].INIT_FRAGMENT_LOADED,a,this),ie.on(E["default"].MEDIA_FRAGMENT_LOADED,l,this),ie.on(E["default"].QUALITY_CHANGE_REQUESTED,h,this),ie.on(E["default"].STREAM_COMPLETED,K,this),ie.on(E["default"].PLAYBACK_PROGRESS,y,this),ie.on(E["default"].PLAYBACK_TIME_UPDATED,y,this),ie.on(E["default"].PLAYBACK_RATE_CHANGED,Y,this),ie.on(E["default"].PLAYBACK_SEEKING,m,this),ie.on(E["default"].WALLCLOCK_TIME_UPDATED,q,this),ie.on(E["default"].CURRENT_TRACK_CHANGED,H,this,_["default"].EVENT_PRIORITY_HIGH),ie.on(E["default"].SOURCEBUFFER_APPEND_COMPLETED,g,this),ie.on(E["default"].SOURCEBUFFER_REMOVE_COMPLETED,B,this)}function r(e){if(!e||!_e||!Pe)return null;var t=null;try{t=se.createSourceBuffer(_e,e),t&&t.hasOwnProperty("initialize")&&t.initialize(Te,this)}catch(n){ue.mediaSourceError("Error creating "+Te+" source buffer.")}return Q(t),k(Pe.getRepresentationInfoForQuality(pe).MSETimeOffset),t}function i(){return Pe.getStreamInfo().id===le.getActiveStreamInfo().id}function a(e){e.fragmentModel===Pe.getFragmentModel()&&(re("Init fragment finished loading saving to",Te+"'s init cache"),xe.save(e.chunk),d(e.chunk))}function s(e,t){var n=xe.extract(e,Te,t);n?d(n):ie.trigger(E["default"].INIT_REQUESTED,{sender:ge})}function l(e){if(e.fragmentModel===Pe.getFragmentModel()){var t=e.chunk,n=t.bytes,r=t.quality,i=Pe.getRepresentationInfoForQuality(r),a=oe.getValue(),s=de.getEventsFor(a,i.mediaInfo,Pe),u=de.getEventsFor(a,i,Pe);if(s.length>0||u.length>0){var l=Pe.getFragmentModel().getRequests({state:o["default"].FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],f=w(n,l,s,u);Pe.getEventController().addInbandEvents(f)}t.bytes=N(n),d(t)}}function d(e){be=!0,Re=e,se.append(Se,e),"video"===e.mediaInfo.type&&e.mediaInfo.embeddedCaptions&&ce.append(e.bytes,e)}function g(e){if(Se===e.buffer){if(e.error||!L())return e.error.code===f["default"].QUOTA_EXCEEDED_ERROR_CODE&&(me=.8*se.getTotalBufferedTime(Se)),void(e.error.code!==f["default"].QUOTA_EXCEEDED_ERROR_CODE&&L()||(ie.trigger(E["default"].QUOTA_EXCEEDED,{sender:ge,criticalBufferLevel:me}),U(F())));isNaN(Re.index)||(ye=Math.max(Re.index,ye),R());var t=se.getAllRanges(Se);if(t&&t.length>0)for(var n=0,r=t.length;n<r;n++)re("Buffered Range for type:",Te,":",t.start(n)," - ",t.end(n));y(),be=!1,ie.trigger(E["default"].BYTES_APPENDED,{sender:ge,quality:Re.quality,startTime:Re.start,index:Re.index,bufferedRanges:t})}}function h(e){pe!==e.newQuality&&Te===e.mediaType&&Pe.getStreamInfo().id===e.streamInfo.id&&(k(Pe.getRepresentationInfoForQuality(e.newQuality).MSETimeOffset),pe=e.newQuality)}function m(){Ee=0,he=!1,y()}function y(){T(),I()}function T(){ve=se.getBufferLength(Se,Oe.getTime()),ie.trigger(E["default"].BUFFER_LEVEL_UPDATED,{sender:ge,bufferLevel:ve}),A()}function I(){i()&&(ae.addBufferState(Te,Ie,Ne.getBufferTarget()),ae.addBufferLevel(Te,new Date,1e3*ve))}function R(){var e=ye===Ee-1;e&&!he&&(he=!0,ie.trigger(E["default"].BUFFERING_COMPLETED,{sender:ge,streamInfo:Pe.getStreamInfo()}))}function A(){b(ve<P&&!he?O:D)}function b(e){Ie===e||"fragmentedText"===Te&&ce.getAllTracksAreDisabled()||(Ie=e,I(),ie.trigger(E["default"].BUFFER_LEVEL_STATE_CHANGED,{sender:ge,state:e,mediaType:Te,streamInfo:Pe.getStreamInfo()}),ie.trigger(e===D?E["default"].BUFFER_LOADED:E["default"].BUFFER_EMPTY,{mediaType:Te}),re(e===D?"Got enough buffer to start.":"Waiting for more buffer before starting playback."))}function w(e,t,n,r){var i=Math.max(isNaN(t.startTime)?0:t.startTime,0),a=[],o=[];De=!1;for(var s=n.concat(r),u=0,l=s.length;u<l;u++)a[s[u].schemeIdUri]=s[u];for(var f=(0,S["default"])(ne).getInstance().parse(e),d=f.getBoxes("emsg"),u=0,l=d.length;u<l;u++){var c=de.getEvent(d[u],a,i);c&&o.push(c)}return o}function N(e){if(!De)return e;for(var t=e.length,n=Math.pow(256,2),r=Math.pow(256,3),i=new Uint8Array(e.length),a=0,o=0;a<t;){var s=String.fromCharCode(e[a+4],e[a+5],e[a+6],e[a+7]),u=e[a]*r+e[a+1]*n+256*e[a+2]+1*e[a+3];if("emsg"!=s)for(var l=a;l<a+u;l++)i[o]=e[l],o++;a+=u}return i.subarray(0,o)}function L(){var e=se.getTotalBufferedTime(Se);return e<me}function x(){if("fragmentedText"!==Te){var e=Se.buffered.length?Se.buffered.start(0):0,t=Oe.getTime()-e-Le.getBufferToKeep();t>0&&(re("pruning buffer: "+t+" seconds."),Ce=!0,se.remove(Se,0,Math.round(e+t),_e))}}function F(){if(!Se)return null;var e=Oe.getTime(),t=Pe.getFragmentModel().getRequests({state:o["default"].FRAGMENT_MODEL_EXECUTED,time:e})[0],n=se.getBufferRange(Se,e),r=t&&!isNaN(t.startTime)?t.startTime:Math.floor(e);return null===n&&Se.buffered.length>0&&(r=Se.buffered.end(Se.buffered.length-1)),{start:Se.buffered.start(0),end:r}}function U(e){e&&Se&&se.remove(Se,e.start,e.end,_e)}function B(e){Se===e.buffer&&(Ce&&(Ce=!1),T(),ie.trigger(E["default"].BUFFER_CLEARED,{sender:ge,from:e.from,to:e.to,hasEnoughSpaceToAppend:L()}))}function k(e){Se&&Se.timestampOffset!==e&&!isNaN(e)&&(Se.timestampOffset=e)}function j(e){e.sender.getStreamProcessor()!==Pe||e.error||k(e.currentRepresentation.MSETimeOffset)}function K(e){e.fragmentModel===Pe.getFragmentModel()&&(Ee=e.request.index,R())}function H(e){Se&&e.newMediaInfo.type===Te&&e.newMediaInfo.streamInfo.id===Pe.getStreamInfo().id&&fe.getSwitchMode(Te)===v["default"].TRACK_SWITCH_MODE_ALWAYS_REPLACE&&U(F())}function q(){Ae++;var e=Ae*(Le.getWallclockTimeUpdateInterval()/1e3);e>=Le.getBufferPruningInterval()&&!be&&(Ae=0,x())}function Y(){A()}function G(){return Te}function V(){return Pe}function z(e){Pe=e}function W(){return Se}function Q(e){Se=e}function X(){return ve}function Z(){return me}function J(e){_e=e}function $(){return _e}function ee(){return he}function te(e){ie.off(E["default"].DATA_UPDATE_COMPLETED,j,this),ie.off(E["default"].QUALITY_CHANGE_REQUESTED,h,this),ie.off(E["default"].INIT_FRAGMENT_LOADED,a,this),ie.off(E["default"].MEDIA_FRAGMENT_LOADED,l,this),ie.off(E["default"].STREAM_COMPLETED,K,this),ie.off(E["default"].CURRENT_TRACK_CHANGED,H,this),ie.off(E["default"].PLAYBACK_PROGRESS,y,this),ie.off(E["default"].PLAYBACK_TIME_UPDATED,y,this),ie.off(E["default"].PLAYBACK_RATE_CHANGED,Y,this),ie.off(E["default"].PLAYBACK_SEEKING,m,this),ie.off(E["default"].WALLCLOCK_TIME_UPDATED,q,this),ie.off(E["default"].SOURCEBUFFER_APPEND_COMPLETED,g,this),ie.off(E["default"].SOURCEBUFFER_REMOVE_COMPLETED,B,this),me=Number.POSITIVE_INFINITY,Ie=O,pe=c["default"].QUALITY_DEFAULT,Ee=0,ye=0,Re=null,Me=!1,he=!1,be=!1,Ce=!1,Oe=null,Pe=null,we=null,Ne=null,e||(se.abort(_e,Se),se.removeSourceBuffer(_e,Se)),Se=null}var ne=this.context,re=(0,M["default"])(ne).getInstance().log,ie=(0,_["default"])(ne).getInstance(),ae=e.metricsModel,oe=e.manifestModel,se=e.sourceBufferController,ue=e.errHandler,le=e.streamController,fe=e.mediaController,de=e.adapter,ce=e.textSourceBuffer,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0;return ge={initialize:n,createBuffer:r,getType:G,getStreamProcessor:V,setStreamProcessor:z,getBuffer:W,setBuffer:Q,getBufferLevel:X,getCriticalBufferLevel:Z,setMediaSource:J,getMediaSource:$,getIsBufferingCompleted:ee,switchInitData:s,reset:te},t(),ge}Object.defineProperty(t,"__esModule",{value:!0});var a=n(30),o=r(a),s=n(5),u=r(s),l=n(28),f=r(l),d=n(10),c=r(d),g=n(9),p=r(g),h=n(13),v=r(h),m=n(3),_=r(m),y=n(2),E=r(y),T=n(49),S=r(T),I=n(1),R=r(I),A=n(4),M=r(A),b=n(68),C=r(b),D="bufferLoaded",O="bufferStalled",P=.5;i.__dashjs_factory_name="BufferController";var w=R["default"].getClassFactory(i);w.BUFFER_LOADED=D,w.BUFFER_EMPTY=O,t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){T=[]}function t(e){!_||_.readyState<2||(_.playbackRate=e)}function n(e){if(_.currentTime!=e)try{_.currentTime=e}catch(t){0===_.readyState&&t.code===t.INVALID_STATE_ERR&&setTimeout(function(){_.currentTime=e},400)}}function r(){return _}function i(e){_=e,_.preload="auto"}function a(e){e?_.src=e:(_.removeAttribute("src"),_.load())}function o(){return _.src}function s(){return E}function u(e){E=e}function l(){return y}function f(e){y=e,y.style.position="absolute",y.style.display="flex",y.style.overflow="hidden",y.style.pointerEvents="none",y.style.top=0,y.style.left=0}function d(e,t){h(e,t)}function c(){return T.length>0}function g(e){var n=void 0;null===e||_.seeking||T.indexOf(e)!==-1||(T.push(e),1===T.length&&(n=document.createEvent("Event"),n.initEvent("waiting",!0,!1),S=_.playbackRate,t(0),_.dispatchEvent(n)))}function p(e){var n=T.indexOf(e),r=void 0;null!==e&&(n!==-1&&T.splice(n,1),c()===!1&&0===_.playbackRate&&(r=document.createEvent("Event"),r.initEvent("playing",!0,!1),t(S||1),_.dispatchEvent(r)))}function h(e,t){t?g(e):p(e)}function v(){var e="webkitDroppedFrameCount"in _,t="getVideoPlaybackQuality"in _,n=null;return t?n=_.getVideoPlaybackQuality():e&&(n={droppedVideoFrames:_.webkitDroppedFrameCount,creationTime:new Date}),n}var m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0;return m={initialize:e,setCurrentTime:n,setStallState:d,getElement:r,setElement:i,setSource:a,getSource:o,getVideoContainer:s,setVideoContainer:u,getTTMLRenderingDiv:l,setTTMLRenderingDiv:f,getPlaybackQuality:v}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="VideoModel",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){pe=null,ce=[],Re=(0,E["default"])(z).getInstance(),ve=!0,me=!1,_e=!1,Ae=!1,Me=!0,be=null,ye=!1,Ee=!1}function t(e,t){ve=e,he=t,de.initialize(),le=(0,b["default"])(z).getInstance(),J=(0,f["default"])(z).getInstance(),J.setConfig({log:W,manifestModel:ee,dashManifestModel:te}),J.initialize($),Se=(0,_["default"])(z).getInstance(),Ie=(0,o["default"])(z).getInstance(),Ie.setConfig({streamController:X,timelineConverter:de,metricsModel:re,dashMetrics:ie,manifestModel:ee,dashManifestModel:te,adapter:ne,videoModel:Se}),Q.on(p["default"].TIME_SYNCHRONIZATION_COMPLETED,L,this),Q.on(p["default"].PLAYBACK_SEEKING,g,this),Q.on(p["default"].PLAYBACK_TIME_UPDATED,l,this),Q.on(p["default"].PLAYBACK_ENDED,d,this),Q.on(p["default"].PLAYBACK_ERROR,s,this),Q.on(p["default"].PLAYBACK_STARTED,h,this),Q.on(p["default"].PLAYBACK_PAUSED,m,this),Q.on(p["default"].MANIFEST_UPDATED,x,this),Q.on(p["default"].STREAM_BUFFERING_COMPLETED,y,this)}function n(e,t){t=t||new Date,be&&(ge&&ge.getProcessors().forEach(function(n){var r=n.getScheduleController();r&&r.finalisePlayList(t,e)}),re.addPlayList(be),be=null)}function r(e){be=new I.PlayList,be.start=new Date,be.mstart=1e3*Ie.getTime(),be.starttype=e,ge&&ge.getProcessors().forEach(function(e){var t=e.getScheduleController();t&&t.setPlayList(be)})}function i(e,t,n){Q.trigger(e,{fromStreamInfo:t?t.getStreamInfo():null,toStreamInfo:n.getStreamInfo()})}function a(){ge.isActivated()&&Me&&0===ge.getStreamInfo().index&&(ge.startEventController(),ve&&Ie.play())}function s(e){if(e.error){var t="";switch(e.error.code){case 1:t="MEDIA_ERR_ABORTED";break;case 2:t="MEDIA_ERR_NETWORK";break;case 3:t="MEDIA_ERR_DECODE";break;case 4:t="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:t="MEDIA_ERR_ENCRYPTED";break;default:t="UNKNOWN"}ye=!0,e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),W("Video Element Error: "+t),e.error&&W(e.error),fe.mediaSourceError(t),G()}}function l(e){if(F()){var t=Se.getPlaybackQuality();t&&re.addDroppedFrames("video",t)}Ie.isSeeking()||e.timeToEnd<V&&oe.signalEndOfStream(Te)}function d(){var e=T();e&&C(ge,e,NaN),n(e?I.PlayListTrace.END_OF_PERIOD_STOP_REASON:I.PlayListTrace.END_OF_CONTENT_STOP_REASON)}function g(e){var t=S(e.seekTime);t&&t!==ge?(n(I.PlayListTrace.END_OF_PERIOD_STOP_REASON),C(ge,t,e.seekTime)):n(I.PlayListTrace.USER_REQUEST_STOP_REASON),r(I.PlayList.SEEK_START_REASON)}function h(){Me?(Me=!1,r(I.PlayList.INITIAL_PLAYOUT_START_REASON)):Ae&&(Ae=!1,r(I.PlayList.RESUME_FROM_PAUSE_START_REASON))}function m(e){e.ended||(Ae=!0,n(I.PlayListTrace.USER_REQUEST_STOP_REASON))}function y(e){Te&&e.streamInfo.isLast&&oe.signalEndOfStream(Te)}function T(){var e=ge.getStreamInfo().start,t=ge.getStreamInfo().duration;return ce.filter(function(n){return n.getStreamInfo().start===e+t})[0]}function S(e){var t=0,n=null,r=ce.length;r>0&&(t+=ce[0].getStartTime());for(var i=0;i<r;i++)if(n=ce[i],t+=n.getDuration(),e<t)return n;return null}function R(e,t){for(var n=null,r=0,i=0,a=null,o=ce.length,s=0;s<o;s++){if(n=ce[s],i=n.getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null}function M(){var e=[];return ge.getProcessors().forEach(function(t){e.push(t.getIndexHandler().getEarliestTime())}),Math.min.apply(Math,e)}function C(e,t,n){function r(){isNaN(n)?!function(){var e=Ie.getStreamStartTime(!0);ge.getProcessors().forEach(function(t){ne.setIndexHandlerTime(t,e)}),Ie.seek(e)}():Ie.seek(n),Ie.play(),ge.startEventController(),me=!1,i(p["default"].PERIOD_SWITCH_COMPLETED,e,t)}!me&&e&&t&&e!==t&&(me=!0,i(p["default"].PERIOD_SWITCH_STARTED,e,t),e.deactivate(),ge=t,Ie.initialize(ge.getStreamInfo()),Ce=U(),D(r))}function D(e){function t(){W("MediaSource is open!"),window.URL.revokeObjectURL(n),Te.removeEventListener("sourceopen",t),Te.removeEventListener("webkitsourceopen",t),O(),ge.activate(Te),e&&e()}var n=void 0;Te?oe.detachMediaSource(Se):Te=oe.createMediaSource(),Te.addEventListener("sourceopen",t,!1),Te.addEventListener("webkitsourceopen",t,!1),n=oe.attachMediaSource(Te,Se),W("MediaSource attached to element. Waiting on open...")}function O(){var e,t;e=ge.getStreamInfo().manifestInfo.duration,t=oe.setDuration(Te,e),W("Duration successfully set to: "+t)}function P(){var e,t,n,r,a,o,s,l=ee.getValue(),f=re.getMetricsFor("stream"),d=ie.getCurrentManifestUpdate(f),c=[];if(l){o=ne.getStreamsInfo(l),pe&&(Q.trigger(p["default"].PROTECTION_CREATED,{controller:pe,manifest:l}),pe.setMediaElement(Se.getElement()),he&&pe.setProtectionData(he));try{if(0===o.length)throw new Error("There are no streams");for(re.updateManifestUpdateInfo(d,{currentTime:Ie.getTime(),buffered:Se.getElement().buffered,presentationStartTime:o[0].start,clientTimeOffset:de.getClientTimeOffset()}),_e=!0,r=0,t=o.length;r<t;r++){for(e=o[r],a=0,n=ce.length;a<n;a++)ce[a].getId()===e.id&&(s=ce[a],c.push(s),s.updateData(e));s||(s=(0,u["default"])(z).create({manifestModel:ee,manifestUpdater:J,adapter:ne,timelineConverter:de,capabilities:Z,errHandler:fe,baseURLController:ue}),s.initialize(e,pe),Q.on(p["default"].STREAM_INITIALIZED,N,this),c.push(s),ge&&s.updateData(e)),re.addManifestUpdateStreamInfo(d,e.id,e.index,e.start,e.duration),s=null}ce=c,ge||(ge=ce[0],i(p["default"].PERIOD_SWITCH_STARTED,null,ge),Ie.initialize(ge.getStreamInfo()),i(p["default"].PERIOD_SWITCH_COMPLETED,null,ge)),Te||D(),_e=!1,w()}catch(g){fe.manifestError(g.message,"nostreamscomposed",l),Ee=!0,G()}}}function w(){if(!_e){var e=ce.length,t=0;for(a(),t;t<e;t++)if(!ce[t].isInitialized())return;Q.trigger(p["default"].STREAMS_COMPOSED)}}function N(){w()}function L(){P()}function x(e){if(e.error)Ee=!0,G();else{var t,n,r=e.manifest,i=ne.getStreamsInfo(r)[0],a=ne.getMediaInfoForType(r,i,"video")||ne.getMediaInfoForType(r,i,"audio");a&&(t=ne.getDataForMedia(a),n=te.getRepresentationsForAdaptation(r,t)[0].useCalculatedLiveEdgeTime,n&&(W("SegmentTimeline detected using calculated Live Edge Time"),Re.setUseManifestDateHeaderTimeSource(!1)));var o=te.getUTCTimingSources(e.manifest),s=!te.getIsDynamic(r)||n?o:o.concat(Re.getUTCTimingSources()),u=(0,v["default"])(z).getInstance().isManifestHTTPS();s.forEach(function(e){e.value.replace(/.*?:\/\//g,"")===E["default"].DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\/\//g,"")&&(e.value=e.value.replace(u?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),u?"https://":"http://"),W("Matching default timing source protocol to manifest protocol: ",e.value))}),ue.initialize(r),se.setConfig({metricsModel:re,dashMetrics:ie}),se.initialize(s,Re.getUseManifestDateHeaderTimeSource())}}function F(){return void 0===Ce&&(Ce=U()),Ce}function U(){var e=!1;return ge.getProcessors().forEach(function(t){"video"===t.getMediaInfo().type&&(e=!0)}),e}function B(){return ve}function k(){return ge?ge.getStreamInfo():null}function j(e){return ge.getId()===e.id}function K(e){return ce.filter(function(t){return t.getId()===e})[0]}function H(e){$.load(e)}function q(e){J.setManifest(e)}function Y(e){e&&(e.capabilities&&(Z=e.capabilities),e.manifestLoader&&($=e.manifestLoader),e.manifestModel&&(ee=e.manifestModel),e.dashManifestModel&&(te=e.dashManifestModel),e.protectionController&&(pe=e.protectionController),e.adapter&&(ne=e.adapter),e.metricsModel&&(re=e.metricsModel),e.dashMetrics&&(ie=e.dashMetrics),e.liveEdgeFinder&&(ae=e.liveEdgeFinder),e.mediaSourceController&&(oe=e.mediaSourceController),e.timeSyncController&&(se=e.timeSyncController),e.baseURLController&&(ue=e.baseURLController),e.errHandler&&(fe=e.errHandler),e.timelineConverter&&(de=e.timelineConverter))}function G(){se.reset(),n(ye||Ee?I.PlayListTrace.FAILURE_STOP_REASON:I.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,t=ce.length;e<t;e++){var r=ce[e];Q.off(p["default"].STREAM_INITIALIZED,N,this),r.reset(ye)}ce=[],Q.off(p["default"].PLAYBACK_TIME_UPDATED,l,this),Q.off(p["default"].PLAYBACK_SEEKING,g,this),Q.off(p["default"].PLAYBACK_ERROR,s,this),Q.off(p["default"].PLAYBACK_STARTED,h,this),Q.off(p["default"].PLAYBACK_PAUSED,m,this),Q.off(p["default"].PLAYBACK_ENDED,d,this),Q.off(p["default"].MANIFEST_UPDATED,x,this),Q.off(p["default"].STREAM_BUFFERING_COMPLETED,y,this),ue.reset(),J.reset(),re.clearAllCurrentMetrics(),ee.setValue(null),$.reset(),de.reset(),ae.reset(),ne.reset(),le.reset(),me=!1,_e=!1,ge=null,ye=!1,Ee=!1,Ce=void 0,Me=!0,Ae=!1,Te&&(oe.detachMediaSource(Se),Te=null),Se=null,pe&&(pe.setMediaElement(null),pe=null,he=null,ee.getValue()&&Q.trigger(p["default"].PROTECTION_DESTROYED,{data:ee.getValue().url})),Q.trigger(p["default"].STREAM_TEARDOWN_COMPLETE)}var V=1,z=this.context,W=(0,A["default"])(z).getInstance().log,Q=(0,c["default"])(z).getInstance(),X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0;return X={initialize:t,getAutoPlay:B,getActiveStreamInfo:k,isStreamActive:j,isVideoTrackPresent:F,getStreamById:K,getTimeRelativeToStreamId:R,load:H,loadWithManifest:q,getActiveStreamCommonEarliestTime:M,setConfig:Y,reset:G},e(),X}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=r(a),s=n(101),u=r(s),l=n(99),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(40),v=r(h),m=n(19),_=r(m),y=n(5),E=r(y),T=n(1),S=r(T),I=n(70),R=n(4),A=r(R),M=n(68),b=r(M);i.__dashjs_factory_name="StreamController",t["default"]=S["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(34),s=r(o),u=function(){function e(){i(this,e)}return a(e,null,[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];"urn:mpeg:dash:mp4protection:2011"===r.schemeIdUri.toLowerCase()&&"cenc"===r.value.toLowerCase()&&(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e){return"pssh"in e?s["default"].decodeArray(e.pssh.__text).buffer:null}},{key:"parsePSSHList",value:function(e){if(null===e)return[];for(var t=new DataView(e),n=!1,r={},i=0;!n;){var a,o,s,u,l,f=i;if(i>=t.buffer.byteLength)break;if(a=t.getUint32(i),o=i+a,i+=4,1886614376===t.getUint32(i))if(i+=4,s=t.getUint8(i),0===s||1===s){i++,i+=3,u="";var d,c;for(d=0;d<4;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=4,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<6;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;i+=6,u=u.toLowerCase(),l=t.getUint32(i),i+=4,r[u]=t.buffer.slice(f,o),i=o}else i=o;else i=o}return r}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t="";return e.indexOf("/")!==-1&&(e.indexOf("?")!==-1&&(e=e.substring(0,e.indexOf("?"))),t=e.substring(0,e.lastIndexOf("/")+1)),t}function t(e){var t=e.match(u);return t?t[1]:""}function n(e){return!o.test(e)}function r(e){return o.test(e)&&"/"===e.charAt(0)}function i(e){return s.test(e)}var a=void 0,o=/^(?:(?:[a-z]+:)?\/)?\//i,s=/^https?:\/\//i,u=/^(https?:\/\/[^\/]+)\/?/i;return a={parseBaseUrl:e,parseOrigin:t,isRelative:n,isPathAbsolute:r,isHTTPURL:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="URLUtils",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.action=i.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer"};r.ACTION_DOWNLOAD="download",r.ACTION_COMPLETE="complete",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){n(this,e)}return r(e,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&e[i].indexOf("public_")===-1||(this[i]=e[i])}}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(;e.length<t;)e="0"+e;return e}function a(e,t){return e.representation.startNumber+t}function o(e,t,n){for(var r,a,o,s,u,l,f="%0",d=t.length,c=f.length;;){if(r=e.indexOf("$"+t),r<0)return e;if(a=e.indexOf("$",r+d),a<0)return e;if(o=e.indexOf(f,r+d),o>r&&o<a)switch(s=e.charAt(a-1),u=parseInt(e.substring(o+c,a-1),10),s){case"d":case"i":case"u":l=i(n.toString(),u);break;case"x":l=i(n.toString(16),u);break;case"X":l=i(n.toString(16),u).toUpperCase();break;case"o":l=i(n.toString(8),u);break;default:return e}else l=n;e=e.substring(0,r)+l+e.substring(a+1)}}function s(e,t,n,r){var i,o,s,u;return o=n.segmentDuration,isNaN(o)&&(o=n.adaptation.period.duration),s=n.adaptation.period.start+r*o,u=s+o,i=new g["default"],i.representation=n,i.duration=o,i.presentationStartTime=s,i.mediaStartTime=e.calcMediaTimeFromPresentationTime(i.presentationStartTime,n),i.availabilityStartTime=e.calcAvailabilityStartTimeFromPresentationTime(i.presentationStartTime,n.adaptation.period.mpd,t),i.availabilityEndTime=e.calcAvailabilityEndTimeFromPresentationTime(u,n.adaptation.period.mpd,t),i.wallStartTime=e.calcWallTimeForSegment(i,t),i.replacementNumber=a(i,r),i.availabilityIdx=r,i}function u(e,t,n,r,i,s,u,l,f){var d,c,p,h=r/s,v=Math.min(i/s,n.adaptation.period.mpd.maxSegmentDuration);return d=e.calcPresentationTimeFromMediaTime(h,n),c=d+v,p=new g["default"],p.representation=n,p.duration=v,p.mediaStartTime=h,p.presentationStartTime=d,p.availabilityStartTime=n.adaptation.period.mpd.manifest.loadedTime,p.availabilityEndTime=e.calcAvailabilityEndTimeFromPresentationTime(c,n.adaptation.period.mpd,t),p.wallStartTime=e.calcWallTimeForSegment(p,t),p.replacementTime=r,p.replacementNumber=a(p,f),u=o(u,"Number",p.replacementNumber),u=o(u,"Time",p.replacementTime),p.media=u,p.mediaRange=l,p.availabilityIdx=f,p}function l(e,t){if(!t||!t.segments)return null;var n,r,i=t.segments.length;if(e<i&&(n=t.segments[e],n&&n.availabilityIdx===e))return n;for(r=0;r<i;r++)if(n=t.segments[r],n&&n.availabilityIdx===e)return n;return null}function f(e,t,n,r,i){var a,o,s,u=2,l=i||10,f=0,d=Number.POSITIVE_INFINITY;return t&&!e.isTimeSyncCompleted()?s={start:f,end:d}:!t&&n||r<0?null:(a=Math.max(r-u,f),o=Math.min(r+l,d),s={start:a,end:o})}function d(e,t,n,r,i,a){var o,s,u,f=n.segmentDuration,d=n.adaptation.period.mpd.manifest.minBufferTime,c=n.segmentAvailabilityRange,g={start:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,c.start),end:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,c.end)},p=n.segments,h=2*f,v=a||Math.max(2*d,10*f),m=NaN,_=null;return g.start=Math.max(g.start,0),t&&!e.isTimeSyncCompleted()?(o=Math.floor(g.start/f),s=Math.floor(g.end/f),u={start:o,end:s}):(p&&p.length>0?(_=l(i,n),m=_?e.calcPeriodRelativeTimeFromMpdRelativeTime(n,_.presentationStartTime):i>0?i*f:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,r)):m=i>0?i*f:t?g.end:g.start,o=Math.floor(Math.max(m-h,g.start)/f),s=Math.floor(Math.min(o+v/f,g.end/f)),u={start:o,end:s})}Object.defineProperty(t,"__esModule",{value:!0}),t.replaceTokenForTemplate=o,t.getIndexBasedSegment=s,t.getTimeBasedSegment=u,t.getSegmentByIndex=l,t.decideSegmentListRangeForTimeline=f,t.decideSegmentListRangeForTemplate=d;var c=n(37),g=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){A=0,M=!1,b=NaN,I.on(u["default"].LIVE_EDGE_SEARCH_COMPLETED,_,this),I.on(u["default"].TIME_SYNCHRONIZATION_COMPLETED,y,this)}function t(){return M}function n(e){M=e}function r(){return A}function i(){return b}function a(e){b=e}function s(e,t,n,r){var i=NaN;return i=r?n&&t.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(t.availabilityStartTime.getTime()+1e3*(e+t.timeShiftBufferDepth)):t.availabilityEndTime:n?new Date(t.availabilityStartTime.getTime()+1e3*(e-A)):t.availabilityStartTime}function l(e,t,n){return s.call(this,e,t,n)}function f(e,t,n){return s.call(this,e,t,n,!0)}function d(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*A)/1e3}function c(e,t){var n=t.adaptation.period.start,r=t.presentationTimeOffset;return e+(n-r)}function g(e,t){var n=t.adaptation.period.start,r=t.presentationTimeOffset;return e-n+r}function p(e,t){var n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i}function h(e,t){var n,r,i=e.adaptation.period.start,a=i+e.adaptation.period.duration,o={start:i,end:a},s=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0);if(!t)return o;if(!M&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;n=e.adaptation.period.mpd.checkTime,r=d(new Date,e.adaptation.period),i=Math.max(r-e.adaptation.period.mpd.timeShiftBufferDepth,e.adaptation.period.start);
29
+ var u=isNaN(n)?r:Math.min(n,r),l=e.adaptation.period.start+e.adaptation.period.duration;return a=(u>=l&&u-s<l?l:u)-s,o={start:i,end:a}}function v(e,t){var n=e.adaptation.period.start;return t-n}function m(e,t){var n=e.adaptation.period.start;return t+n}function _(e){M||e.error||(A+=e.liveEdge-(b+e.searchTime),M=!0)}function y(e){M||e.error||(A=e.offset/1e3,M=!0)}function E(e){var t=e.presentationTimeOffset,n=e.adaptation.period.start;return n-t}function T(){I.off(u["default"].LIVE_EDGE_SEARCH_COMPLETED,_,this),I.off(u["default"].TIME_SYNCHRONIZATION_COMPLETED,y,this),A=0,M=!1,b=NaN}var S=this.context,I=(0,o["default"])(S).getInstance(),R=void 0,A=void 0,M=void 0,b=void 0;return R={initialize:e,isTimeSyncCompleted:t,setTimeSyncCompleted:n,getClientTimeOffset:r,getExpectedLiveEdge:i,setExpectedLiveEdge:a,calcAvailabilityStartTimeFromPresentationTime:l,calcAvailabilityEndTimeFromPresentationTime:f,calcPresentationTimeFromWallTime:d,calcPresentationTimeFromMediaTime:c,calcPeriodRelativeTimeFromMpdRelativeTime:v,calcMpdRelativeTimeFromPeriodRelativeTime:m,calcMediaTimeFromPresentationTime:g,calcSegmentAvailabilityRange:h,calcWallTimeForSegment:p,calcMSETimeOffset:E,reset:T}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="TimelineConverter",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){function t(){var e;h=[],v=[],m=[],e={},i(e,o.HTTPRequest.MPD_TYPE,c["default"].DOWNLOAD_ERROR_ID_MANIFEST),i(e,o.HTTPRequest.XLINK_EXPANSION_TYPE,c["default"].DOWNLOAD_ERROR_ID_XLINK),i(e,o.HTTPRequest.INIT_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_INITIALIZATION),i(e,o.HTTPRequest.MEDIA_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.INDEX_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.OTHER_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),_=e}function n(e,t){var r=e.request,i=new XMLHttpRequest,a=[],o=!0,s=!0,f=new Date,c=f,p=0,y=function(e){s=!1,r.requestStartDate=f,r.requestEndDate=new Date,r.firstByteDate=r.firstByteDate||f,r.checkExistenceOnly||d.addHttpRequest(r.mediaType,null,r.type,r.url,i.responseURL||null,r.serviceLocation||null,r.range||null,r.requestStartDate,r.firstByteDate,r.requestEndDate,i.status,r.duration,i.getAllResponseHeaders(),e?a:null)},E=function(){h.indexOf(i)!==-1&&(h.splice(h.indexOf(i),1),s&&(y(!1),t>0?(t--,m.push(setTimeout(function(){n(e,t)},u.getRetryIntervalForType(r.type)))):(l.downloadError(_[r.type],r.url,r),e.error&&e.error(r,"error",i.statusText),e.complete&&e.complete(r,i.statusText))))},T=function(t){var n=new Date;o&&(o=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(r.firstByteDate=n)),t.lengthComputable&&(r.bytesLoaded=t.loaded,r.bytesTotal=t.total),a.push({s:c,d:n.getTime()-c.getTime(),b:[t.loaded?t.loaded-p:0]}),c=n,p=t.loaded,e.progress&&e.progress()},S=function(){i.status>=200&&i.status<=299&&(y(!0),e.success&&e.success(i.response,i.statusText,i),e.complete&&e.complete(r,i.statusText))};try{var I=g.modifyRequestURL(r.url),R=r.checkExistenceOnly?"HEAD":"GET";i.open(R,I,!0),r.responseType&&(i.responseType=r.responseType),r.range&&i.setRequestHeader("Range","bytes="+r.range),r.requestStartDate||(r.requestStartDate=f),i=g.modifyRequestHeader(i),i.withCredentials=u.getXHRWithCredentials(),i.onload=S,i.onloadend=E,i.onerror=E,i.onprogress=T;var A=(new Date).getTime();isNaN(r.delayLoadingTime)||A>=r.delayLoadingTime?(h.push(i),i.send()):!function(){var e={xhr:i};v.push(e),e.delayTimeout=setTimeout(function(){if(v.indexOf(e)!==-1){v.splice(v.indexOf(e),1);try{h.push(e.xhr),e.xhr.send()}catch(t){e.xhr.onerror()}}},r.delayLoadingTime-A)}()}catch(M){i.onerror()}}function r(e){e.request&&n(e,u.getRetryAttemptsForType(e.request.type))}function a(){m.forEach(function(e){return clearTimeout(e)}),m=[],v.forEach(function(e){return clearTimeout(e.delayTimeout)}),v=[],h.forEach(function(e){e.onloadend=e.onerror=e.onprogress=void 0,e.abort()}),h=[]}var s=this.context,u=(0,f["default"])(s).getInstance(),l=e.errHandler,d=e.metricsModel,g=e.requestModifier,p=void 0,h=void 0,v=void 0,m=void 0,_=void 0;return p={load:r,abort:a},t(),p}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=n(1),u=r(s),l=n(5),f=r(l),d=n(11),c=r(d);a.__dashjs_factory_name="XHRLoader";var g=u["default"].getClassFactory(a);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=t.codec,r=null;try{if(n.match(/application\/mp4;\s*codecs="(stpp|wvtt)"/i))throw new R["default"]("not really supported");r=e.addSourceBuffer(n)}catch(i){if(!t.isText&&n.indexOf('codecs="stpp"')===-1&&n.indexOf('codecs="wvtt"')===-1)throw i;r=(0,o["default"])(y).getInstance(),r.setConfig({errHandler:(0,c["default"])(y).getInstance(),adapter:(0,f["default"])(y).getInstance(),dashManifestModel:A,mediaController:(0,u["default"])(y).getInstance(),videoModel:(0,S["default"])(y).getInstance(),streamController:(0,p["default"])(y).getInstance(),textTracks:(0,v["default"])(y).getInstance(),VTTParser:(0,_["default"])(y).getInstance(),TTMLParser:(0,E["default"])(y).getInstance()})}return r}function t(e,t){try{e.removeSourceBuffer(t)}catch(n){}}function n(e,t,n){var r,i,a=null,o=0,s=0,u=null,l=null,f=0,d=n||.15;try{a=e.buffered}catch(c){return null}if(null!==a&&void 0!==a){for(i=0,r=a.length;i<r;i++)if(o=a.start(i),s=a.end(i),null===u)f=Math.abs(o-t),t>=o&&t<s?(u=o,l=s):f<=d&&(u=o,l=s);else{if(f=o-l,!(f<=d))break;l=s}if(null!==u)return{start:u,end:l}}return null}function r(e){var t=null;try{return t=e.buffered}catch(n){return null}}function i(e){var t,n,i=r(e),a=0;if(!i)return a;for(n=0,t=i.length;n<t;n++)a+=i.end(n)-i.start(n);return a}function a(e,t,r){var i,a;return i=n(e,t,r),a=null===i?0:i.end-t}function s(e,t){if(!t)return null;var n,i,a,o,s,u,l,f,d,c=r(t);if(!c)return null;for(var g=0,p=c.length;g<p;g++){if(f=e.length>g,s=f?{start:e.start(g),end:e.end(g)}:null,n=c.start(g),i=c.end(g),!s)return d={start:n,end:i};if(a=s.start===n,o=s.end===i,!a||!o){if(a)d={start:s.end,end:i};else{if(!o)return d={start:n,end:i};d={start:n,end:s.start}}return u=e.length>g+1?{start:e.start(g+1),end:e.end(g+1)}:null,l=g+1<p?{start:c.start(g+1),end:c.end(g+1)}:null,!u||l&&l.start===u.start&&l.end===u.end||(d.end=u.start),d}}return null}function l(e,t){var n=t.bytes,r="append"in e?"append":"appendBuffer"in e?"appendBuffer":null,i="Object"===Object.prototype.toString.call(e).slice(8,-1);if(r)try{m(e,function(){i?e[r](n,t):e[r](n),m(e,function(){T.trigger(C["default"].SOURCEBUFFER_APPEND_COMPLETED,{buffer:e,bytes:n})})})}catch(a){T.trigger(C["default"].SOURCEBUFFER_APPEND_COMPLETED,{buffer:e,bytes:n,error:new R["default"](a.code,a.message,null)})}}function d(e,t,n,r){try{m(e,function(){t>=0&&n>t&&"ended"!==r.readyState&&e.remove(t,n),m(e,function(){T.trigger(C["default"].SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:t,to:n})})})}catch(i){T.trigger(C["default"].SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:t,to:n,error:new R["default"](i.code,i.message,null)})}}function g(e,t){try{"open"===e.readyState?t.abort():t.setTextTrack&&"ended"===e.readyState&&t.abort()}catch(n){}}function h(e){e&&e.dashManifestModel&&(A=e.dashManifestModel)}function m(e,t){var n,r=50,i=function(){e.updating||(clearInterval(n),t())},a=function s(){e.updating||(e.removeEventListener("updateend",s,!1),t())};if(!e.updating)return void t();if("function"==typeof e.addEventListener)try{e.addEventListener("updateend",a,!1)}catch(o){n=setInterval(i,r)}else n=setInterval(i,r)}var y=this.context,T=(0,M["default"])(y).getInstance(),I=void 0,A=void 0;return I={append:l,remove:d,abort:g,createSourceBuffer:e,removeSourceBuffer:t,getBufferRange:n,getAllRanges:r,getTotalBufferedTime:i,getBufferLength:a,getRangeDifference:s,setConfig:h}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),o=r(a),s=n(13),u=r(s),l=n(15),f=r(l),d=n(11),c=r(d),g=n(20),p=r(g),h=n(39),v=r(h),m=n(164),_=r(m),y=n(163),E=r(y),T=n(19),S=r(T),I=n(6),R=r(I),A=n(3),M=r(A),b=n(2),C=r(b),D=n(1),O=r(D),P=22;i.__dashjs_factory_name="SourceBufferController";var w=O["default"].getSingletonFactory(i);w.QUOTA_EXCEEDED_ERROR_CODE=P,t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){D=null,w=null,O=[],P=[],M.on(u["default"].LOADING_COMPLETED,S,C)}function n(e){w=e}function r(e){D=e}function i(){return D}function a(e){var t=function(e,t){return e.action===c["default"].ACTION_COMPLETE&&e.action===t.action},n=function(e,t){return!isNaN(e.index)&&e.startTime===t.startTime&&e.adaptationIndex===t.adaptationIndex},r=function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality},i=function(i){var a=!1;return i.some(function(i){if(n(e,i)||r(e,i)||t(e,i))return a=!0}),a};return i(O)}function s(e){var t=e.state instanceof Array?e.state:[e.state],n=[];return t.forEach(function(t){var r=E(t);n=n.concat(y(r,e))}),n}function l(e){O=O.filter(function(t){return isNaN(t.startTime)||t.startTime>=e})}function f(){w.abort(),P=[]}function d(e){switch(e.action){case c["default"].ACTION_COMPLETE:O.push(e),T(e,v),M.trigger(u["default"].STREAM_COMPLETED,{request:e,fragmentModel:this});break;case c["default"].ACTION_DOWNLOAD:T(e,h),P.push(e),g(e);break;default:A("Unknown request action.")}}function g(e){M.trigger(u["default"].FRAGMENT_LOADING_STARTED,{sender:C,request:e}),w.load(e)}function m(e,t,n){for(var r=e.length-1,i=r;i>=0;i--){var a=e[i],o=a.startTime,s=o+a.duration;if(n=void 0!==n?n:a.duration/2,!isNaN(o)&&!isNaN(s)&&t+n>=o&&t-n<s||isNaN(o)&&isNaN(t))return a}return null}function y(e,t){return t.hasOwnProperty("time")?[m(e,t.time,t.threshold)]:e.filter(function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0})}function E(e){var t=void 0;switch(e){case h:t=P;break;case v:t=O;break;default:t=[]}return t}function T(e,t){b.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t),b.addRequestsQueue(e.mediaType,P,O)}function S(e){e.sender===w&&(P.splice(P.indexOf(e.request),1),e.response&&!e.error&&O.push(e.request),T(e.request,e.error?_:v),M.trigger(u["default"].FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this}))}function I(){M.off(u["default"].LOADING_COMPLETED,S,this),w&&(w.reset(),w=null),O=[],P=[]}var R=this.context,A=(0,p["default"])(R).getInstance().log,M=(0,o["default"])(R).getInstance(),b=e.metricsModel,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0;return C={setLoader:n,setScheduleController:r,getScheduleController:i,getRequests:s,isFragmentLoaded:a,removeExecutedRequestsBeforeTime:l,abortRequests:f,executeRequest:d,reset:I},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(23),c=r(d),g=n(4),p=r(g),h="loading",v="executed",m="canceled",_="failed";i.__dashjs_factory_name="FragmentModel";var y=f["default"].getClassFactory(i);y.FRAGMENT_MODEL_LOADING=h,y.FRAGMENT_MODEL_EXECUTED=v,y.FRAGMENT_MODEL_CANCELED=m,y.FRAGMENT_MODEL_FAILED=_,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){return a}function t(e){a=e,e&&r.trigger(u["default"].MANIFEST_LOADED,{data:e})}var n=this.context,r=(0,o["default"])(n).getInstance(),i=void 0,a=void 0;return i={getValue:e,setValue:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="ManifestModel",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.log&&(y=e.log)}function t(){T=[];var e;e=(0,c["default"])(h).getInstance(),T.push(e),e=(0,f["default"])(h).getInstance(),T.push(e),e=(0,u["default"])(h).getInstance(),T.push(e),S=e}function n(){return T}function r(e){for(var t=0;t<T.length;t++)if(T[t].systemString===e)return T[t];return null}function i(e){return e===S}function a(e,t){if(e.byteLength===t.byteLength){for(var n=new Uint8Array(e),r=new Uint8Array(t),i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0}return!1}function s(e){var t,n,r,i,a=[];if(e)for(r=0;r<T.length;++r)for(n=T[r],i=0;i<e.length;++i)if(t=e[i],t.schemeIdUri.toLowerCase()===n.schemeIdURI){var o=n.getInitData(t);o&&a.push({ks:T[r],initData:o})}return a}function l(e,t){var n,r=[],i=o["default"].parsePSSHList(e);for(n=0;n<T.length;++n){var a=T[n].systemString,s=!t||a in t;T[n].uuid in i&&s&&r.push({ks:T[n],initData:i[T[n].uuid]})}return r}function d(e,t,n){if("license-release"===n||"individualization-request"===n)return null;var r=null;return t&&t.hasOwnProperty("drmtoday")?r=(0,p["default"])(h).getInstance():"com.widevine.alpha"===e.systemString?r=(0,_["default"])(h).getInstance():"com.microsoft.playready"===e.systemString?r=(0,v["default"])(h).getInstance():"org.w3.clearkey"===e.systemString&&(r=(0,E["default"])(h).getInstance()),r}function g(e,t){try{return S.getClearKeysFromProtectionData(e,t)}catch(n){return y("Failed to retrieve clearkeys from ProtectionData"),null}}var h=this.context,m=void 0,y=void 0,T=void 0,S=void 0;return m={initialize:t,isClearKey:i,initDataEquals:a,getKeySystems:n,getKeySystemBySystemString:r,getSupportedKeySystemsFromContentProtection:s,getSupportedKeySystems:l,getLicenseServer:d,processClearKeyLicenseRequest:g,setConfig:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(135),u=r(s),l=n(137),f=r(l),d=n(136),c=r(d),g=n(142),p=r(g),h=n(143),v=r(h),m=n(144),_=r(m),y=n(141),E=r(y),T=n(1),S=r(T);i.__dashjs_factory_name="ProtectionKeyController",t["default"]=S["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(e){return e}var n=void 0;return n={modifyRequestURL:e,modifyRequestHeader:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RequestModifier",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";var r={};r.encode=function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},r.decode=function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(r=(7&r)<<18,r|=(63&e[n++])<<12,r|=(63&e[n++])<<6,r|=63&e[n++])),t.push(String.fromCharCode(r))}return t.join("")};var i={};!function(e){var t=function(t){for(var n=0,r=[],i=0|t.length/3;0<i--;){var a=(t[n]<<16)+(t[n+1]<<8)+t[n+2];n+=3,r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push(e.charAt(63&a>>6)),r.push(e.charAt(63&a))}if(2==t.length-n){var a=(t[n]<<16)+(t[n+1]<<8);r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push(e.charAt(63&a>>6)),r.push("=")}else if(1==t.length-n){var a=t[n]<<16;r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push("==")}return r.join("")},n=function(){for(var t=[],n=0;n<e.length;++n)t[e.charCodeAt(n)]=n;return t["=".charCodeAt(0)]=0,t}(),o=function(e){for(var t=0,r=[],i=0|e.length/4;0<i--;){var a=(n[e.charCodeAt(t)]<<18)+(n[e.charCodeAt(t+1)]<<12)+(n[e.charCodeAt(t+2)]<<6)+n[e.charCodeAt(t+3)];r.push(255&a>>16),r.push(255&a>>8),r.push(255&a),t+=4}return r&&("="==e.charAt(t-2)?(r.pop(),r.pop()):"="==e.charAt(t-1)&&r.pop()),r},u={};u.encode=function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},u.decode=function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")},i.decodeArray=function(e){var t=o(e);return new Uint8Array(t)},i.encodeASCII=function(e){var n=u.encode(e);return t(n)},i.decodeASCII=function(e){var t=o(e);return u.decode(t)},i.encode=function(e){var n=r.encode(e);return t(n)},i.decode=function(e){var t=o(e);return r.decode(t)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),t.decode=i.decode,t.decodeArray=i.decodeArray},function(e,t){"use strict";function n(e,t,n){function r(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(e){return e.prefix}function a(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):e}function o(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/")}function s(a){if(a.nodeType==E.DOCUMENT_NODE){var u,l,f,d=a.firstChild;for(l=0,f=a.childNodes.length;l<f;l+=1)if(a.childNodes[l].nodeType!==E.COMMENT_NODE){d=a.childNodes[l];break}if(n)u=s(d);else{u={};var c=r(d);u[c]=s(d)}return u}if(a.nodeType==E.ELEMENT_NODE){var u=new Object;u.__cnt=0;for(var g=[],p=a.childNodes,h=0;h<p.length;h++){var d=p.item(h),c=r(d);if(u.__cnt++,null==u[c]){var v=s(d);if("#text"!=c||/[^\s]/.test(v)){var m={};m[c]=v,g.push(m)}u[c]=v,u[c+"_asArray"]=new Array(1),u[c+"_asArray"][0]=u[c]}else{if(null!=u[c]&&!(u[c]instanceof Array)){var _=u[c];u[c]=new Array,u[c][0]=_,u[c+"_asArray"]=u[c]}for(var T=0;null!=u[c][T];)T++;var v=s(d);if("#text"!=c||/[^\s]/.test(v)){var m={};m[c]=v,g.push(m)}u[c][T]=v}}u.__children=g;for(var S=0;S<a.attributes.length;S++){var I=a.attributes.item(S);u.__cnt++;for(var R=I.value,A=0,M=e.length;A<M;A++){var b=e[A];b.test(I)&&(R=b.converter(I.value))}u[t+I.name]=R}var C=i(a);return null!=C&&""!=C&&(u.__cnt++,u.__prefix=C),1==u.__cnt&&null!=u["#text"]&&(u=u["#text"]),null!=u["#text"]&&(u.__text=u["#text"],y&&(u.__text=o(u.__text)),delete u["#text"],delete u["#text_asArray"]),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],delete u["#cdata-section_asArray"]),null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}return a.nodeType==E.TEXT_NODE||a.nodeType==E.CDATA_SECTION_NODE?a.nodeValue:a.nodeType==E.COMMENT_NODE?null:void 0}function u(e,t,n,r){var i="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var a=0;a<n.length;a++){var o=n[a],s=e[o];i+=" "+o.substr(1)+"='"+s+"'"}return i+=r?"/>":">"}function l(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function f(e,t){return e.indexOf(t,e.length-t.length)!==-1}function d(e,t){return!!(f(t.toString(),"_asArray")||0==t.toString().indexOf("_")||e[t]instanceof Function)}function c(e){var t=0;if(e instanceof Object)for(var n in e)d(e,n)||t++;return t}function g(e){var t=[];if(e instanceof Object)for(var n in e)n.toString().indexOf("__")==-1&&0==n.toString().indexOf("_")&&t.push(n);return t}function p(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=y?a(e.__text):e.__text),t}function h(e){var t="";return e instanceof Object?t+=p(e):null!=e&&(t+=y?a(e):e),t}function v(e,t,n){var r="";if(0==e.length)r+=u(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=u(e[i],t,g(e[i]),!1),r+=m(e[i]),r+=l(e[i],t);return r}function m(e){var t="",n=c(e);if(n>0)for(var r in e)if(!d(e,r)){var i=e[r],a=g(i);if(null==i||void 0==i)t+=u(i,r,a,!0);else if(i instanceof Object)if(i instanceof Array)t+=v(i,r,a);else{var o=c(i);o>0||null!=i.__text||null!=i.__cdata?(t+=u(i,r,a,!1),t+=m(i),t+=l(i,r)):t+=u(i,r,a,!0)}else t+=u(i,r,a,!1),t+=h(i),t+=l(i,r)}return t+=h(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var _="1.0.11",y=!1,E={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){var t,n,r;if(window.DOMParser){n=new window.DOMParser;try{r=n.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(i){}try{t=n.parseFromString(e,"text/xml"),r&&t.getElementsByTagNameNS(r,"parsererror").length&&(t=void 0)}catch(i){}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},this.xml2json=function(e){return s(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return t?this.xml2json(t):void 0},this.json2xml_str=function(e){return m(e)},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return _},this.escapeMode=function(e){y=e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){n(this,e),this._test=t,this._converter=r}return r(e,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.BUFFER_EMPTY="bufferstalled",this.BUFFER_LOADED="bufferloaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.ERROR="error",this.LOG="log",this.MANIFEST_LOADED="manifestloaded",this.METRICS_CHANGED="metricschanged",this.METRIC_CHANGED="metricchanged",this.METRIC_ADDED="metricadded",this.METRIC_UPDATED="metricupdated",this.PERIOD_SWITCH_COMPLETED="streamswitchcompleted",this.PERIOD_SWITCH_STARTED="streamswitchstarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.STREAM_INITIALIZED="streaminitialized",this.TEXT_TRACKS_ADDED="alltexttracksadded",this.TEXT_TRACK_ADDED="texttrackadded",this.CAN_PLAY="canPlay",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){D=window.VTTCue||window.TextTrackCue,w=[],N=[],L=-1,x=0,F=0,U=0,B=0,k=null,j=null,q=!1,Y=2147483647,K=!!navigator.userAgent.match(/Chrome/)&&!navigator.userAgent.match(/Edge/),void 0!==document.fullscreenElement?H="fullscreenElement":void 0!==document.webkitIsFullScreen?H="webkitIsFullScreen":document.msFullscreenElement?H="msFullscreenElement":document.mozFullScreen&&(H="mozFullScreen")}function t(e){var t=w[e].kind,n=void 0!==w[e].label?w[e].label:w[e].lang,r=w[e].lang,i=K?document.createElement("track"):P.addTextTrack(t,n,r);return K&&(i.kind=t,i.label=n,i.srclang=r),i}function n(e){q=e,k&&!document[H]&&(k.style.zIndex=e?Y:null)}function r(e,n){if(w.length===n)return void b("Trying to add too many tracks.");if(w.push(e),void 0===P&&(P=e.video),w.length===n){w.sort(function(e,t){return e.index-t.index}),k=O.getTTMLRenderingDiv();for(var r=-1,i=0;i<w.length;i++){var a=t.call(this,i);N.push(a),w[i].defaultTrack&&(a["default"]=!0,r=i),K&&P.appendChild(a);var o=P.textTracks[i];o.nonAddedCues=[],k&&(w[i].isTTML||w[i].isEmbedded)?o.renderingType="html":o.renderingType="default",this.addCaptions(i,0,w[i].captionData),M.trigger(u["default"].TEXT_TRACK_ADDED)}v.call(this,r),r>=0&&(P.textTracks[r].mode="showing",this.addCaptions(r,0,null)),M.trigger(u["default"].TEXT_TRACKS_ADDED,{index:L,tracks:w})}}function i(e,t,n,r,i,a){var o=e/t,s=n/r,u=0,l=0;o>s?(l=t,u=l/r*n):(u=e,l=u/n*r);var f=0,d=0,c=0,g=0,p=u/l;return p>i?(g=l,c=l/(1/i),f=(e-c)/2,d=0):(c=u,g=u/i,f=0,d=(t-g)/2),a?{x:f+.1*c,y:d+.1*g,w:.8*c,h:.8*g}:{x:f,y:d,w:c,h:g}}function a(){var e=this.getCurrentTextTrack();if(e&&"html"===e.renderingType){var t=P.clientWidth/P.clientHeight,n=!1;e.isFromCEA608&&(t=3.5/3,n=!0);var r=i.call(this,P.clientWidth,P.clientHeight,P.videoWidth,P.videoHeight,t,n),a=r.w,o=r.h;if(a!=U||o!=B){x=r.x,F=r.y,U=a,B=o,k.style.left=x+"px",k.style.top=F+"px",k.style.width=U+"px",k.style.height=B+"px";for(var s=0;e.activeCues&&s<e.activeCues.length;++s){var u=e.activeCues[s];u.scaleCue(u)}H&&document[H]||q?k.style.zIndex=Y:k.style.zIndex=null}}}function s(e,t){var n=Math.round(.01*e*t).toString()+"px";return n}function l(e){var t=U,n=B;if(t*n!==0&&e.layout){var r=e.layout,i=s(r.left,t),a=s(r.top,n),o=s(r.width,t),u=s(r.height,n);k.style.left=i,k.style.top=a,k.style.width=o,k.style.height=u;var l=k.firstChild;l&&l.style&&(l.style.left="0px",l.style.top="0px",l.style.width=o,l.style.height=u)}}function f(e){var t,n,r,i=U,a=B,o=[i/e.cellResolution[0],a/e.cellResolution[1]];if(e.linePadding)for(t in e.linePadding)if(e.linePadding.hasOwnProperty(t)){var s=e.linePadding[t];n=(s*o[0]).toString();for(var u=document.getElementsByClassName("spanPadding"),l=0;l<u.length;l++)u[l].style.cssText=u[l].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n),u[l].style.cssText=u[l].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.fontSize)for(t in e.fontSize)if(e.fontSize.hasOwnProperty(t)){var f=e.fontSize[t]/100;n=(f*o[1]).toString(),r="defaultFontSize"!==t?document.getElementsByClassName(t):document.getElementsByClassName("paragraph");for(var d=0;d<r.length;d++)r[d].style.cssText=r[d].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.lineHeight)for(t in e.lineHeight)if(e.lineHeight.hasOwnProperty(t)){var c=e.lineHeight[t]/100;n=(c*o[1]).toString(),r=document.getElementsByClassName(t);for(var g=0;g<r.length;g++)r[g].style.cssText=r[g].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}}function d(e,t,n){var r=e>=0?P.textTracks[e]:null,i=this;if(r){if("showing"!==r.mode)return void(n&&n.length>0&&(r.nonAddedCues=r.nonAddedCues.concat(n)));if(n||(n=r.nonAddedCues,r.nonAddedCues=[]),n&&0!==n.length)for(var o in n){var s,u=n[o];r.cellResolution=u.cellResolution,r.isFromCEA608=u.isFromCEA608,j||"html"!==u.type&&"image"!==u.type||(j=setInterval(a.bind(this),500)),"image"===u.type?(s=new D(u.start-t,u.end-t,""),s.image=u.data,s.id=u.id,s.size=0,s.type="image",s.layout=u.layout,s.scaleCue=l.bind(i),s.onenter=function(){if(k&&"showing"===r.mode){var e=new Image;e.id="ttmlImage_"+this.id,e.src=this.image,e.style.cssText="z-index: 2147483648; pointer-events: none; display: block; visibility: visible !important; position: relative !important;",k.appendChild(e),l.call(i,this)}},s.onexit=function(){if(k)for(var e=k.childNodes,t=0;t<e.length;t++)e[t].id==="ttmlImage_"+this.id&&k.removeChild(e[t])}):"html"===u.type?(s=new D(u.start-t,u.end-t,""),s.cueHTMLElement=u.cueHTMLElement,s.regions=u.regions,s.regionID=u.regionID,s.cueID=u.cueID,s.videoWidth=u.videoWidth,s.videoHeight=u.videoHeight,s.cellResolution=u.cellResolution,s.fontSize=u.fontSize,s.lineHeight=u.lineHeight,s.linePadding=u.linePadding,s.scaleCue=f.bind(i),k.style.left=x+"px",k.style.top=F+"px",k.style.width=U+"px",k.style.height=B+"px",s.onenter=function(){"showing"===r.mode&&(b("Cue "+this.startTime+"-"+this.endTime+" : "+this.cueHTMLElement.id+" : "+this.cueHTMLElement.innerText),k.appendChild(this.cueHTMLElement),f.call(i,this))},s.onexit=function(){for(var e=k.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&k.removeChild(e[t])}):(s=new D(u.start-t,u.end-t,u.data),u.styles&&(void 0!==u.styles.align&&s.hasOwnProperty("align")&&(s.align=u.styles.align),void 0!==u.styles.line&&s.hasOwnProperty("line")&&(s.line=u.styles.line),void 0!==u.styles.position&&s.hasOwnProperty("position")&&(s.position=u.styles.position),void 0!==u.styles.size&&s.hasOwnProperty("size")&&(s.size=u.styles.size))),r.addCue(s)}}}function g(){return L>=0?P.textTracks[L]:null}function p(){return L}function h(e){for(var t=-1,n=0;n<P.textTracks.length;n++)if(P.textTracks[n].label===e){t=n;break}return t}function v(e){if(L=e,I.call(this),e>=0){var t=P.textTracks[e];"html"===t.renderingType?T.call(this):S.call(this)}else S.call(this)}function m(e){return P.textTracks[e]}function _(e){if(e.cues){for(var t=e.cues,n=t.length-1,r=n;r>=0;r--)e.removeCue(t[r]);
30
+ e.mode="disabled"}}function y(){for(var e=N.length,t=0;t<e;t++)if(K)P.removeChild(N[t]);else{var n=m.call(this,t);n.nonAddedCues=[],_.call(this,n)}N=[],w=[],j&&(clearInterval(j),j=null),I.call(this)}function E(e){P.removeChild(N[e]),N.splice(e,1)}function T(){if(K){var e=document.getElementById("native-cue-style");if(!e){e=document.createElement("style"),e.id="native-cue-style",document.head.appendChild(e);var t=e.sheet;P.id?t.insertRule("#"+P.id+"::cue {background: transparent}",0):0!==P.classList.length?t.insertRule("."+P.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0)}}}function S(){if(K){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}}function I(){if(k)for(;k.firstChild;)k.removeChild(k.firstChild)}function R(e){e&&e.videoModel&&(O=e.videoModel)}var A=this.context,M=(0,o["default"])(A).getInstance(),b=(0,c["default"])(A).getInstance().log,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0;return C={initialize:e,displayCConTop:n,addTextTrack:r,addCaptions:d,getTextTrack:m,getCurrentTextTrack:g,getCurrentTrackIdx:p,setCurrentTrackIdx:v,getTrackIdxForId:h,deleteTrackCues:_,deleteAllTextTracks:y,deleteTextTrack:E,setConfig:R}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="TextTracks",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){s=new o["default"],u=[],l=!1}function t(){return s}function n(){return u}function r(){return l}function i(e){function t(e,t,n,r){var i=r[0].split(/[=]/);return r.push({key:i[0],value:i[1]}),r.shift(),r}function n(e,t,n){return t>0&&(d&&0===u.length?u=n[t].split(/[&]/):c&&(i=n[t].split(/[&]/))),n}if(!e)return null;var r,i=[],a=new RegExp(/[?]/),o=new RegExp(/[#]/),f=new RegExp(/^(https:)?\/\//i),d=a.test(e),c=o.test(e);return l=f.test(e),r=e.split(/[?#]/).map(n),u.length>0&&(u=u.reduce(t,null)),i.length>0&&(i=i.reduce(t,null),i.forEach(function(e){s[e.key]=e.value})),e}var a=void 0,s=void 0,u=void 0,l=void 0;return a={initialize:e,parseURI:i,getURIFragmentData:t,getURIQueryData:n,isManifestHTTPS:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(175),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="URIQueryAndFragmentModel",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.sessionToken=e,this.error=t};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r,a){n(this,i),this.sessionToken=e,this.message=t,this.defaultURL=r,this.messageType=a?a:"license-request"};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.keySystem=e,this.ksConfiguration=t};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r,a,o){n(this,i),this.initDataTypes=["cenc"],this.audioCapabilities=e,this.videoCapabilities=t,this.distinctiveIdentifier=r,this.persistentState=a,this.sessionTypes=o};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.initData=e,this.initDataType=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){l={}}function t(e){e&&(e.abrRulesCollection&&(l[h]=e.abrRulesCollection),e.synchronizationRulesCollection&&(l[v]=e.synchronizationRulesCollection))}function n(e,t,n,r,a){var o,s,l={},f={},d=e.length,c=d,g=i(t,r),p=function(e){var t,i,o;if(e.value!==u["default"].NO_CHANGE){var s=a(l[e.priority],e.value);s!==l[e.priority]&&(l[e.priority]=s,f[e.priority]=e.reason)}--d||(l[u["default"].WEAK]!==u["default"].NO_CHANGE&&(o=u["default"].WEAK,t=l[u["default"].WEAK],i=f[u["default"].WEAK]),l[u["default"].DEFAULT]!==u["default"].NO_CHANGE&&(o=u["default"].DEFAULT,t=l[u["default"].DEFAULT],i=f[u["default"].DEFAULT]),l[u["default"].STRONG]!==u["default"].NO_CHANGE&&(o=u["default"].STRONG,t=l[u["default"].STRONG],i=f[u["default"].STRONG]),o!=u["default"].STRONG&&o!=u["default"].WEAK&&(o=u["default"].DEFAULT),n(void 0!==t?{value:t,confidence:o,reason:i}:{value:r,confidence:o,reason:{name:"NO_CHANGE"}}))};for(l[u["default"].STRONG]=u["default"].NO_CHANGE,l[u["default"].WEAK]=u["default"].NO_CHANGE,l[u["default"].DEFAULT]=u["default"].NO_CHANGE,s=0;s<c;s++)o=e[s],o.execute(g,p)}function r(){var e,t,n=l[h],r=l[v],i=(n.getRules(f["default"].QUALITY_SWITCH_RULES)||[]).concat(n.getRules(f["default"].ABANDON_FRAGMENT_RULES)||[]).concat(r.getRules(c["default"].TIME_SYNCHRONIZED_RULES)||[]).concat(r.getRules(c["default"].BEST_GUESS_RULES)||[]),a=i.length;for(t=0;t<a;t++)e=i[t],"function"==typeof e.reset&&e.reset();l={}}function i(e,t){return(0,o["default"])(a).create({streamProcessor:e,currentValue:t})}var a=this.context,s=void 0,l=void 0;return s={initialize:e,setConfig:t,applyRules:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(146),o=r(a),s=n(8),u=r(s),l=n(47),f=r(l),d=n(48),c=r(d),g=n(1),p=r(g),h=0,v=1;i.__dashjs_factory_name="RulesController";var m=p["default"].getSingletonFactory(i);m.ABR_RULE=h,m.SYNC_RULE=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){i=[],a=[];var e=(0,E["default"])(n).getInstance(),t=(0,S["default"])(n).getInstance(),r=(0,_["default"])(n).getInstance();r.getBufferOccupancyABREnabled()?(i.push((0,p["default"])(n).create({metricsModel:e,dashMetrics:(0,S["default"])(n).getInstance()})),a.push((0,v["default"])(n).create({metricsModel:e,dashMetrics:(0,S["default"])(n).getInstance()}))):(i.push((0,o["default"])(n).create({metricsModel:e,dashMetrics:t})),i.push((0,u["default"])(n).create({metricsModel:e,dashMetrics:t})),i.push((0,f["default"])(n).create({metricsModel:e})),a.push((0,c["default"])(n).create()))}function t(e){switch(e){case A:return i;case M:return a;default:return null}}var n=this.context,r=void 0,i=void 0,a=void 0;return r={initialize:e,getRules:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(151),o=r(a),s=n(149),u=r(s),l=n(150),f=r(l),d=n(147),c=r(d),g=n(66),p=r(g),h=n(148),v=r(h),m=n(5),_=r(m),y=n(14),E=r(y),T=n(16),S=r(T),I=n(1),R=r(I),A="qualitySwitchRules",M="abandonFragmentRules";i.__dashjs_factory_name="ABRRulesCollection";var b=R["default"].getSingletonFactory(i);b.QUALITY_SWITCH_RULES=A,b.ABANDON_FRAGMENT_RULES=M,t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){i=[],a=[],i.push((0,c["default"])(n).create({timelineConverter:(0,u["default"])(n).getInstance()})),a.push((0,f["default"])(n).create({timelineConverter:(0,u["default"])(n).getInstance(),adapter:(0,p["default"])(n).getInstance()}))}function t(e){switch(e){case h:return i;case v:return a;default:return null}}var n=this.context,r=void 0,i=void 0,a=void 0;return r={initialize:e,getRules:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(26),u=r(s),l=n(156),f=r(l),d=n(157),c=r(d),g=n(15),p=r(g),h="withAccurateTimeSourceRules",v="bestGuestRules";i.__dashjs_factory_name="SynchronizationRulesCollection";var m=o["default"].getSingletonFactory(i);m.TIME_SYNCHRONIZED_RULES=h,m.BEST_GUESS_RULES=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=f["default"].parseBuffer(e),r=(0,o["default"])(n).create();return r.setData(t),r}var t=void 0,n=this.context;return t={parse:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),o=r(a),s=n(1),u=r(s),l=n(71),f=r(l);i.__dashjs_factory_name="BoxParser",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){if(void 0!==y)return y;y=!1;var t,n="1",r="1";try{"undefined"!=typeof window&&(t=window[e])}catch(i){return m("Warning: DOMStorage access denied: "+i.message),y}if(!t||e!==p&&e!==h)return y;try{t.setItem(n,r),t.removeItem(n),y=!0}catch(i){m("Warning: DOMStorage is supported, but cannot be used: "+i.message)}return y}function t(){e(p)&&d.forEach(function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(n){m(n.message)}}})}function n(){E=(0,u["default"])(v).getInstance(),t()}function r(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function i(t,n){return e(t)&&E["get"+n+"CachingInfo"]().enabled}function a(e){if(!i(p,"LastMediaSettings"))return null;var t=g.replace(/\?/,e),n=JSON.parse(localStorage.getItem(t))||{},r=(new Date).getTime()-parseInt(n.timestamp,10)>=E.getLastMediaSettingsCachingInfo().ttl||!1,a=n.settings;return r&&(localStorage.removeItem(t),a=null),a}function o(e){var t=NaN;if(i(p,"LastBitrate")){var n=c.replace(/\?/,e),r=JSON.parse(localStorage.getItem(n))||{},a=(new Date).getTime()-parseInt(r.timestamp,10)>=E.getLastBitrateCachingInfo().ttl||!1,o=parseInt(r.bitrate,10);isNaN(o)||a?a&&localStorage.removeItem(n):(t=o,m("Last saved bitrate for "+e+" was "+o))}return t}function s(e,t){if(i(p,"LastMediaSettings")){var n=g.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:r()}))}catch(a){m(a.message)}}}function l(e,t){if(i(p,"LastBitrate")&&t){var n=c.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t/1e3,timestamp:r()}))}catch(a){m(a.message)}}}var v=this.context,m=(0,f["default"])(v).getInstance().log,_=void 0,y=void 0,E=void 0;return _={getSavedBitrateSettings:o,setSavedBitrateSettings:l,getSavedMediaSettings:a,setSavedMediaSettings:s,isSupported:e},n(),_}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(5),u=r(s),l=n(4),f=r(l),d=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],c="dashjs_?_bitrate",g="dashjs_?_settings",p="localStorage",h="sessionStorage";i.__dashjs_factory_name="DOMStorage";var v=o["default"].getSingletonFactory(i);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){g=e,h=t,_=!1,y=NaN,T=null,v=(0,p["default"])(s).getInstance(),S=o["default"].BEST_GUESS_RULES,l.on(c["default"].STREAM_INITIALIZED,a,this)}function t(){_=!1,y=NaN}function n(){return T}function r(){l.off(c["default"].STREAM_INITIALIZED,a,this),t(),T=null,g=null,h=null,_=!1,y=NaN,S=null,v=null}function i(e){var t=((new Date).getTime()-y)/1e3;T=e.value,l.trigger(c["default"].LIVE_EDGE_SEARCH_COMPLETED,{liveEdge:T,searchTime:t,error:null===T?new u["default"](m,"live edge has not been found",null):null})}function a(e){!h.isDynamic()||_||e.error||(S=g.isTimeSyncCompleted()?o["default"].TIME_SYNCHRONIZED_RULES:o["default"].BEST_GUESS_RULES,E=(0,o["default"])(s).getInstance().getRules(S),_=!0,y=(new Date).getTime(),v.applyRules(E,h,i,null,function(e,t){return t}))}var s=this.context,l=(0,f["default"])(s).getInstance(),d=void 0,g=void 0,h=void 0,v=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0;return d={initialize:e,abortSearch:t,getLiveEdge:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(48),o=r(a),s=n(6),u=r(s),l=n(3),f=r(l),d=n(2),c=r(d),g=n(46),p=r(g),h=n(1),v=r(h),m=1;i.__dashjs_factory_name="LiveEdgeFinder";var _=v["default"].getSingletonFactory(i);_.LIVE_EDGE_NOT_FOUND_ERROR_CODE=m,t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";!function(e){var t={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},n=function(e){var n=e;return t.hasOwnProperty(e)&&(n=t[e]),String.fromCharCode(n)},r=15,i=32,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},d=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},c=function(e,t,n,r,i){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1};c.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var g=function(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new c(t,n,r,i,a)};g.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var p=function(){this.chars=[];for(var e=0;e<i;e++)this.chars.push(new g);this.pos=0,this.currPenState=new c};p.prototype={equals:function(e){for(var t=!0,n=0;n<i;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<i;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<i;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(f.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>i&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=i)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=n(e);return this.pos>=i?void f.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<i;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,n=0;n<i;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)}};var h=function(){this.rows=[];for(var e=0;e<r;e++)this.rows.push(new p);this.currRow=r-1,this.nrRollUpRows=null,this.reset()};h.prototype={reset:function(){for(var e=0;e<r;e++)this.rows[e].clear();this.currRow=r-1},equals:function(e){for(var t=!0,n=0;n<r;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){var e=this.rows[this.currRow];e.backSpace()},clearToEndOfRow:function(){var e=this.rows[this.currRow];e.clearToEndOfRow()},insertChar:function(e){var t=this.rows[this.currRow];t.insertChar(e)},setPen:function(e){var t=this.rows[this.currRow];t.setPenStyles(e)},moveCursor:function(e){var t=this.rows[this.currRow];t.moveCursor(e)},setCursor:function(e){f.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)},setPAC:function(e){f.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var n=this.rows[this.currRow];if(null!==e.indent){var r=e.indent,i=Math.max(r-1,0);n.setCursor(e.indent),e.color=n.chars[i].penState.foreground}var a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},setBkgData:function(e){f.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null===this.nrRollUpRows)return void f.log("DEBUG","roll_up but nrRollUpRows not set yet");f.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),f.log("INFO","Rolling up")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<r;a++){var o=this.rows[a].getTextString();o&&(i=a+1,e?t.push("Row "+i+': "'+o+'"'):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var v=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new h,this.nonDisplayedMemory=new h,this.lastOutputScreen=new h,this.currRollUpRow=this.displayedMemory.rows[r-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};v.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[r-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,f.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";f.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(f.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){f.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){f.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){f.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){f.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){f.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){f.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){f.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){f.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){f.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){f.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){f.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(f.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,f.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){f.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}f.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=f.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var m=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new v(1,t),new v(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,"char":0,cmd:0,other:0}};m.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,r,i,a=!1;this.lastTime=e,f.setTime(e);for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(f.log("DATA","["+d([t[o],t[o+1]])+"] -> ("+d([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else f.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters["char"]+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+d([r,i])+" orig: "+d([t[o],t[o+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var n=null,r=(20===e||28===e)&&32<=t&&t<=47,i=(23===e||31===e)&&33<=t&&t<=35;if(!r&&!i)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+d([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var a=this.channels[n-1];return 20===e||28===e?32===t?a.cc_RCL():33===t?a.cc_BS():34===t?a.cc_AOF():35===t?a.cc_AON():36===t?a.cc_DER():37===t?a.cc_RU(2):38===t?a.cc_RU(3):39===t?a.cc_RU(4):40===t?a.cc_FON():41===t?a.cc_RDC():42===t?a.cc_TR():43===t?a.cc_RTD():44===t?a.cc_EDM():45===t?a.cc_CR():46===t?a.cc_ENM():47===t&&a.cc_EOC():a.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if(n=17===e?1:2,n!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.cc_MIDROW(t),f.log("DEBUG","MIDROW ("+d([e,t])+")"),!0}return!1},parsePAC:function(e,t){var n=null,r=null,i=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,l=(16===e||24===e)&&64<=t&&t<=95;if(!i&&!l)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=64<=t&&t<=95?1===n?a[e]:s[e]:1===n?o[e]:u[e];var f=this.interpretPAC(r,t),d=this.channels[n-1];return d.setPAC(f),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1===(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},parseChars:function(e,t){var r=null,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),17<=a&&a<=19){var o=t;o=17===a?t+80:18===a?t+112:t+144,f.log("INFO","Special char '"+n(o)+"' in channel "+r),i=[o]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var s=d(i);f.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},parseBackgroundAttributes:function(e,t){var n,r,i,a,o=(16===e||24===e)&&32<=t&&t<=47,s=(23===e||31===e)&&45<=t&&t<=47;return!(!o&&!s)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=l[r],t%2===1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,a=this.channels[i-1],a.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}};var _=function(e,t,n){for(var r=0,i=t,a=0,o=[],s=function(e,t,n,r){if(4!==e||t<8)return null;var i=n.getUint8(r),a=n.getUint16(r+1),o=n.getUint32(r+3),s=n.getUint8(r+7);return 181==i&&49==a&&1195456820==o&&3==s};i<t+n;){if(r=e.getUint32(i),a=31&e.getUint8(i+4),6===a)for(var u=i+5,l=-1;u<i+4+r-1;){l=0;for(var f=255;255===f;)f=e.getUint8(u),l+=f,u++;var d=0;for(f=255;255===f;)f=e.getUint8(u),d+=f,u++;s(l,d,e,u)&&o.push([u,d]),u+=d}i+=r+4}return o},y=function(e,t){var n=t[0],r=[[],[]];n+=8;var i=31&e.getUint8(n);n+=2;for(var a=0;a<i;a++){var o=e.getUint8(n),s=4&o,u=3&o;n++;var l=e.getUint8(n);n++;var f=e.getUint8(n);n++,s&&(127&l)+(127&f)!==0&&(0===u?(r[0].push(l),r[0].push(f)):1===u&&(r[1].push(l),r[1].push(f)))}return r};e.logger=f,e.PenState=c,e.CaptionScreen=h,e.Cea608Parser=m,e.findCea608Nalus=_,e.extractCea608DataFromRange=y}(t)},function(e,t){"use strict";function n(){return r}Object.defineProperty(t,"__esModule",{value:!0}),t.getVersionString=n;var r="2.3.0"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="TcpList";t.TCP_CONNECTION=n;var r="HttpList";t.HTTP_REQUEST=r;var i="RepSwitchList";t.TRACK_SWITCH=i;var a="BufferLevel";t.BUFFER_LEVEL=a;var o="BufferState";t.BUFFER_STATE=o;var s="DVRInfo";t.DVR_INFO=s;var u="DroppedFrames";t.DROPPED_FRAMES=u;var l="SchedulingInfo";t.SCHEDULING_INFO=l;var f="RequestsQueue";t.REQUESTS_QUEUE=f;var d="ManifestUpdate";t.MANIFEST_UPDATE=d;var c="ManifestUpdatePeriodInfo";t.MANIFEST_UPDATE_STREAM_INFO=c;var g="ManifestUpdateRepresentationInfo";t.MANIFEST_UPDATE_TRACK_INFO=g;var p="PlayList";t.PLAY_LIST=p;var h="DVBErrors";t.DVB_ERRORS=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(81),s=r(o),u=function(){function e(t,n,r,a,o){var u=this;i(this,e),this._name=t||"",this._properties=[],this._children=r||[],this._isRoot=a||!1,this._isArray=o||!0,Array.isArray(n)&&n.forEach(function(e){u._properties.push(new s["default"](e))})}return a(e,[{key:"name",get:function(){return this._name}},{key:"isRoot",get:function(){return this._isRoot}},{key:"isArray",get:function(){return this._isArray}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=1,i=1,a=function o(e,t,a,s){n(this,o),this.url=e||"",this.serviceLocation=t||e||"",this.dvb_priority=a||r,this.dvb_weight=s||i};a.DEFAULT_DVB_PRIORITY=r,a.DEFAULT_DVB_WEIGHT=i,t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.schemeIdUri="",this.value=""};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){$t=!1,en=!1,tn=!0,an=null,Jt=null,sn=null,ie["default"].extend(oe["default"]),ln=(0,L["default"])(Vt).getInstance()}function t(e,t,n){return dn=(0,E["default"])(Vt).getInstance(),fn=(0,_["default"])(Vt).getInstance(),dn.supportsMediaSource()?void($t||($t=!0,nn=(0,B["default"])(Vt).getInstance(),pn=(0,u["default"])(Vt).getInstance(),rn=(0,c["default"])(Vt).getInstance(),rn.initialize(),vn=(0,he["default"])(Vt).getInstance(),hn=(0,me["default"])(Vt).getInstance(),un=(0,F["default"])(Vt).getInstance(),un.setConfig({adapter:xt()}),rt(),pe(void 0===n||n),e&&At(e),t&&Dt(t),Qt("[dash.js "+q()+"] MediaPlayer has been initialized"))):void fn.capabilityError("mediasource")}function n(){return!!mn&&!!Zt}function r(){if(!en)throw Ht;(!tn||a()&&en)&&pn.play()}function i(){if(!en)throw Ht;pn.pause()}function a(){if(!en)throw Ht;return pn.isPaused()}function s(){if(!en)throw Ht;return pn.isSeeking()}function l(e){if(!mn)throw qt;Rt().muted=e}function d(){if(!mn)throw qt;return Rt().muted}function g(e){if(!mn)throw qt;Rt().volume=e}function h(){if(!mn)throw qt;return Rt().volume}function m(e){var t=["video","audio","fragmentedText"];
31
+ if(e){if(t.indexOf(e)!==-1){var n=Te().getCurrentBufferLevel(Se(e));return n?n:NaN}return Qt("Warning - getBufferLength requested for invalid type"),NaN}return t.map(function(e){return Fe(e).length>0?Te().getCurrentBufferLevel(Se(e)):Number.MAX_VALUE}).reduce(function(e,t){return Math.min(e,t)})}function y(){var e=Bt();return e?e.manifestInfo.DVRWindowSize:0}function T(e){var t=Bt();if(!t)return 0;var n=t.range.start+e;return n>t.range.end&&(n=t.range.end),n}function I(e){if(!en)throw Ht;var t=pn.getIsDynamic()?T(e):e;pn.seek(t)}function A(e){if(!en)throw Ht;var t=Rt().currentTime;if(void 0!==e)t=cn.getTimeRelativeToStreamId(t,e);else if(pn.getIsDynamic()){var n=Bt();t=null===n?0:b()-(n.range.end-n.time)}return t}function b(){if(!en)throw Ht;var e=Rt().duration;if(pn.getIsDynamic()){var t,n=Bt();if(!n)return 0;t=n.range.end-n.range.start,e=t<n.manifestInfo.DVRWindowSize?t:n.manifestInfo.DVRWindowSize}return e}function D(){if(!en)throw Ht;return A()<0?NaN:kt(A())}function P(){if(!en)throw Ht;return kt(b())}function N(e,t,n){var r=new Date(1e3*e),i=r.toLocaleDateString(t),a=r.toLocaleTimeString(t,{hour12:n});return a+" "+i}function x(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())}function U(e,t,n){ue["default"].extend(e,t,n,Vt)}function k(e,t,n){zt.on(e,t,n)}function K(e,t,n){zt.off(e,t,n)}function q(){return(0,le.getVersionString)()}function G(){return Wt}function z(){if(!mn)throw qt;return mn}function Q(e){ln.setLiveDelayFragmentCount(e)}function Z(e){ln.setLiveDelay(e)}function $(e){ln.setUseSuggestedPresentationDelay(e)}function te(e,t){ln.setLastBitrateCachingInfo(e,t)}function re(e,t){ln.setLastMediaSettingsCachingInfo(e,t)}function ae(e,t){nn.setMaxAllowedBitrateFor(e,t)}function se(e){return nn.getMaxAllowedBitrateFor(e)}function fe(e,t){nn.setMaxAllowedRepresentationRatioFor(e,t)}function ce(e){return nn.getMaxAllowedRepresentationRatioFor(e)}function pe(e){tn=e}function ve(){return tn}function _e(e){ln.setScheduleWhilePaused(e)}function Ee(){return ln.getScheduleWhilePaused()}function Te(){return hn}function Se(e){return un.getReadOnlyMetricsFor(e)}function Ie(e){if(!en)throw Ht;return nn.getQualityFor(e,cn.getActiveStreamInfo())}function Re(e,t){if(!en)throw Ht;nn.setPlaybackQuality(e,cn.getActiveStreamInfo(),t)}function Ae(){return nn.getLimitBitrateByPortal()}function Me(e){nn.setLimitBitrateByPortal(e)}function be(){return nn.getUsePixelRatioInLimitBitrateByPortal()}function Ce(e){nn.setUsePixelRatioInLimitBitrateByPortal(e)}function De(e){if(!en)throw Ht;void 0===_n&&(_n=(0,C["default"])(Vt).getInstance());for(var t=Rt().textTracks,n=t.length,r=0;r<n;r++){var i=t[r],a=e===r?"showing":"hidden";i.mode!==a&&(i.mode=a)}_n.setTextTrack()}function Oe(e){if(!en)throw Ht;var t=jt();return t?t.getBitrateListFor(e):[]}function Pe(e,t){nn.setInitialBitrateFor(e,t)}function we(e){if(!en)throw Ht;return nn.getInitialBitrateFor(e)}function Ne(e,t){nn.setInitialRepresentationRatioFor(e,t)}function Le(e){return nn.getInitialRepresentationRatioFor(e)}function xe(e){if(!en)throw Ht;return sn.getStreamsInfo(e)}function Fe(e){if(!en)throw Ht;var t=cn.getActiveStreamInfo();return t?rn.getTracksFor(e,t):[]}function Ue(e,t,n){if(!en)throw Ht;return n=n||sn.getStreamsInfo(t)[0],n?sn.getAllMediaInfoForType(t,n,e):[]}function Be(e){if(!en)throw Ht;var t=cn.getActiveStreamInfo();return t?rn.getCurrentTrackFor(e,t):null}function ke(e,t){rn.setInitialSettings(e,t)}function je(e){return rn.getInitialSettings(e)}function Ke(e){if(!en)throw Ht;rn.setTrack(e)}function He(e){return rn.getSwitchMode(e)}function qe(e,t){rn.setSwitchMode(e,t)}function Ye(e){rn.setSelectionModeForInitialTrack(e)}function Ge(){return rn.getSelectionModeForInitialTrack()}function Ve(){return nn.getAutoSwitchBitrateFor("video")||nn.getAutoSwitchBitrateFor("audio")}function ze(e){nn.setAutoSwitchBitrateFor("video",e),nn.setAutoSwitchBitrateFor("audio",e)}function We(e){return nn.getAutoSwitchBitrateFor(e)}function Qe(e,t){nn.setAutoSwitchBitrateFor(e,t)}function Xe(e){ln.setFastSwitchEnabled(e)}function Ze(){return ln.getFastSwitchEnabled()}function Je(e){ln.setBufferOccupancyABREnabled(e)}function $e(e,t){var n=Nt(),r=this,i=function o(e){e.error?t(null,e.error):t(e.manifest),zt.off(ie["default"].INTERNAL_MANIFEST_LOADED,o,r),n.reset()};zt.on(ie["default"].INTERNAL_MANIFEST_LOADED,i,r);var a=(0,O["default"])(Vt).getInstance();a.initialize(),n.load(a.parseURI(e))}function et(e,t){tt(e,t);var n=new o["default"];n.schemeIdUri=e,n.value=t,ln.getUTCTimingSources().push(n)}function tt(e,t){var n=ln.getUTCTimingSources();n.forEach(function(r,i){r.schemeIdUri===e&&r.value===t&&n.splice(i,1)})}function nt(){ln.setUTCTimingSources([])}function rt(){et(L["default"].DEFAULT_UTC_TIMING_SOURCE.scheme,L["default"].DEFAULT_UTC_TIMING_SOURCE.value)}function it(e){ln.setUseManifestDateHeaderTimeSource(e)}function at(e){ln.setBufferToKeep(e)}function ot(e){ln.setBufferPruningInterval(e)}function st(e){ln.setStableBufferTime(e)}function ut(e){ln.setBufferTimeAtTopQuality(e)}function lt(e){ln.setBufferTimeAtTopQualityLongForm(e)}function ft(e){ln.setLongFormContentDurationThreshold(e)}function dt(e){ln.setRichBufferThreshold(e)}function ct(e){ln.setBandwidthSafetyFactor(e)}function gt(){return ln.getBandwidthSafetyFactor()}function pt(e){ln.setAbandonLoadTimeout(e)}function ht(e){ln.setFragmentRetryAttempts(e)}function vt(e){ln.setFragmentRetryInterval(e)}function mt(e){ln.setXHRWithCredentials(e)}function _t(){return Ft()}function yt(e){an=e}function Et(e){Jt=e}function Tt(e){var t=(0,S["default"])(Vt).getInstance();t.setConfig({videoModel:mn}),t.initialize(),t.displayCConTop(e)}function St(){return mn?mn.getVideoContainer():null}function It(e){if(!mn)throw qt;mn.setVideoContainer(e)}function Rt(){if(!mn)throw qt;return mn.getElement()}function At(e){if(!$t)throw Gt;mn=null,e&&(mn=(0,Y["default"])(Vt).getInstance(),mn.initialize(),mn.setElement(e),Ft(),Ut()),Pt()}function Mt(){return mn?mn.getTTMLRenderingDiv():null}function bt(e){if(!mn)throw qt;mn.setTTMLRenderingDiv(e)}function Ct(){if(!Zt)throw Yt;return Zt}function Dt(e){if(!$t)throw Gt;if("string"==typeof e){var t=(0,O["default"])(Vt).getInstance();t.initialize(),Zt=t.parseURI(e)}else Zt=e;Pt()}function Ot(){Dt(null),At(null),Jt=null,an=null}function Pt(){en?(en=!1,sn.reset(),cn.reset(),pn.reset(),nn.reset(),gn.reset(),rn.reset(),cn=null,on=null,n()&&Kt()):n()&&Kt()}function wt(){var e=(0,W["default"])(Vt).getInstance();e.initialize();var t=(0,H["default"])(Vt).getInstance();t.initialize();var n=(0,R["default"])(Vt).getInstance();n.setConfig({dashManifestModel:vn}),rn.initialize(),rn.setConfig({errHandler:fn}),gn=(0,V["default"])(Vt).getInstance(),gn.initialize(),gn.setConfig({abrRulesCollection:t,synchronizationRulesCollection:e}),cn=(0,f["default"])(Vt).getInstance(),cn.setConfig({capabilities:dn,manifestLoader:Nt(),manifestModel:(0,w["default"])(Vt).getInstance(),dashManifestModel:vn,protectionController:an,adapter:sn,metricsModel:un,dashMetrics:hn,liveEdgeFinder:(0,v["default"])(Vt).getInstance(),mediaSourceController:(0,X["default"])(Vt).getInstance(),timeSyncController:(0,j["default"])(Vt).getInstance(),baseURLController:(0,J["default"])(Vt).getInstance(),errHandler:fn,timelineConverter:(0,ye["default"])(Vt).getInstance()}),cn.initialize(tn,Jt),nn.setConfig({abrRulesCollection:t,rulesController:gn,streamController:cn})}function Nt(){return(0,p["default"])(Vt).create({errHandler:fn,parser:Lt(),metricsModel:un,requestModifier:(0,M["default"])(Vt).getInstance()})}function Lt(){return(0,ge["default"])(Vt).create()}function xt(){return sn=(0,de["default"])(Vt).getInstance(),sn.initialize(),sn.setConfig({dashManifestModel:vn}),sn}function Ft(){if(an)return an;var e=dashjs.Protection;if("function"==typeof e){var t=e(Vt).create();return ie["default"].extend(e.events),oe["default"].extend(e.events,{publicOnly:!0}),an=t.createProtectionSystem({log:Qt,videoModel:mn,capabilities:dn,eventBus:zt,adapter:sn})}return null}function Ut(){if(on)return on;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(Vt).create();return on=t.createMetricsReporting({log:Qt,eventBus:zt,mediaElement:Rt(),dashManifestModel:vn,metricsModel:un})}return null}function Bt(){var e=un.getReadOnlyMetricsFor("video")||un.getReadOnlyMetricsFor("audio");return hn.getCurrentDVRInfo(e)}function kt(e){var t,n,r=Bt();return r?(t=r.manifestInfo.availableFrom.getTime()/1e3,n=e+(t+r.range.start)):0}function jt(){if(!en)throw Ht;var e=cn.getActiveStreamInfo();return e?cn.getStreamById(e.id):null}function Kt(){en||(en=!0,Qt("Playback Initialized"),wt(),"string"==typeof Zt?cn.load(Zt):cn.loadWithManifest(Zt))}var Ht="You must first call play() to init playback before calling this method",qt="You must first call attachView() to set the video element before calling this method",Yt="You must first call attachSource() with a valid source before calling this method",Gt="MediaPlayer not initialized!",Vt=this.context,zt=(0,ne["default"])(Vt).getInstance(),Wt=(0,ee["default"])(Vt).getInstance(),Qt=Wt.log,Xt=void 0,Zt=void 0,Jt=void 0,$t=void 0,en=void 0,tn=void 0,nn=void 0,rn=void 0,an=void 0,on=void 0,sn=void 0,un=void 0,ln=void 0,fn=void 0,dn=void 0,cn=void 0,gn=void 0,pn=void 0,hn=void 0,vn=void 0,mn=void 0,_n=void 0;return Xt={initialize:t,on:k,off:K,extend:U,attachView:At,attachSource:Dt,isReady:n,play:r,isPaused:a,pause:i,isSeeking:s,seek:I,setMute:l,isMuted:d,setVolume:g,getVolume:h,time:A,duration:b,timeAsUTC:D,durationAsUTC:P,getActiveStream:jt,getDVRWindowSize:y,getDVRSeekOffset:T,convertToTimeCode:x,formatUTC:N,getVersion:q,getDebug:G,getBufferLength:m,getVideoModel:z,getVideoContainer:St,getTTMLRenderingDiv:Mt,getVideoElement:Rt,getSource:Ct,setLiveDelayFragmentCount:Q,setLiveDelay:Z,useSuggestedPresentationDelay:$,enableLastBitrateCaching:te,enableLastMediaSettingsCaching:re,setMaxAllowedBitrateFor:ae,getMaxAllowedBitrateFor:se,setMaxAllowedRepresentationRatioFor:fe,getMaxAllowedRepresentationRatioFor:ce,setAutoPlay:pe,getAutoPlay:ve,setScheduleWhilePaused:_e,getScheduleWhilePaused:Ee,getDashMetrics:Te,getMetricsFor:Se,getQualityFor:Ie,setQualityFor:Re,getLimitBitrateByPortal:Ae,setLimitBitrateByPortal:Me,getUsePixelRatioInLimitBitrateByPortal:be,setUsePixelRatioInLimitBitrateByPortal:Ce,setTextTrack:De,getBitrateInfoListFor:Oe,setInitialBitrateFor:Pe,getInitialBitrateFor:we,setInitialRepresentationRatioFor:Ne,getInitialRepresentationRatioFor:Le,getStreamsFromManifest:xe,getTracksFor:Fe,getTracksForTypeFromManifest:Ue,getCurrentTrackFor:Be,setInitialMediaSettingsFor:ke,getInitialMediaSettingsFor:je,setCurrentTrack:Ke,getTrackSwitchModeFor:He,setTrackSwitchModeFor:qe,setSelectionModeForInitialTrack:Ye,getSelectionModeForInitialTrack:Ge,getAutoSwitchQuality:Ve,setAutoSwitchQuality:ze,setFastSwitchEnabled:Xe,getFastSwitchEnabled:Ze,getAutoSwitchQualityFor:We,setAutoSwitchQualityFor:Qe,enableBufferOccupancyABR:Je,setBandwidthSafetyFactor:ct,getBandwidthSafetyFactor:gt,setAbandonLoadTimeout:pt,retrieveManifest:$e,addUTCTimingSource:et,removeUTCTimingSource:tt,clearDefaultUTCTimingSources:nt,restoreDefaultUTCTimingSources:rt,setBufferToKeep:at,setBufferPruningInterval:ot,setStableBufferTime:st,setBufferTimeAtTopQuality:ut,setFragmentLoaderRetryAttempts:ht,setFragmentLoaderRetryInterval:vt,setXHRWithCredentials:mt,setBufferTimeAtTopQualityLongForm:lt,setLongFormContentDurationThreshold:ft,setRichBufferThreshold:dt,getProtectionController:_t,attachProtectionController:yt,setProtectionData:Et,enableManifestDateHeaderTimeSource:it,displayCaptionsOnTop:Tt,attachVideoContainer:It,attachTTMLRenderingDiv:bt,reset:Ot},e(),Xt}Object.defineProperty(t,"__esModule",{value:!0});var a=n(58),o=r(a),s=n(9),u=r(s),l=n(20),f=r(l),d=n(13),c=r(d),g=n(98),p=r(g),h=n(51),v=r(h),m=n(11),_=r(m),y=n(159),E=r(y),T=n(39),S=r(T),I=n(28),R=r(I),A=n(33),M=r(A),b=n(17),C=r(b),D=n(40),O=r(D),P=n(31),w=r(P),N=n(5),L=r(N),x=n(14),F=r(x),U=n(10),B=r(U),k=n(111),j=r(k),K=n(47),H=r(K),q=n(19),Y=r(q),G=n(46),V=r(G),z=n(48),W=r(z),Q=n(108),X=r(Q),Z=n(104),J=r(Z),$=n(4),ee=r($),te=n(3),ne=r(te),re=n(2),ie=r(re),ae=n(38),oe=r(ae),se=n(1),ue=r(se),le=n(53),fe=n(15),de=r(fe),ce=n(80),ge=r(ce),pe=n(12),he=r(pe),ve=n(16),me=r(ve),_e=n(26),ye=r(_e);i.__dashjs_factory_name="MediaPlayer";var Ee=ue["default"].getClassFactory(i);Ee.events=oe["default"],t["default"]=Ee,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t,n){var r,i=t.match(o);if(i){try{r=l[i[1]](s).create({eventBus:e.eventBus}),r.initialize(i[1],n,i[3],i[5])}catch(u){r=null,a("MetricsHandlerFactory: Could not create handler for type "+i[1]+" with args "+i[3]+", "+i[5]+" ("+u.message+")")}return r}}function n(e,t){l[e]=t}function r(e){delete l[e]}var i=void 0,a=e.log,o=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,s=this.context,l={BufferLevel:u["default"],DVBErrors:f["default"],HttpList:c["default"],PlayList:p["default"],RepSwitchList:p["default"],TcpList:p["default"]};return i={create:t,register:n,unregister:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(119),u=r(s),l=n(120),f=r(l),d=n(122),c=r(d),g=n(121),p=r(g);i.__dashjs_factory_name="MetricsHandlerFactory",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n;try{n=i[e.schemeIdUri](a).create(),n.initialize(e,t)}catch(r){n=null,o("ReportingFactory: could not create Reporting with schemeIdUri "+e.schemeIdUri+" ("+r.message+")")}return n}function n(e,t){i[e]=t}function r(e){delete i[e]}var i={"urn:dvb:dash:reporting:2014":u["default"]},a=this.context,o=e.log,s=void 0;return s={create:t,register:n,unregister:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(123),u=r(s);i.__dashjs_factory_name="ReportingFactory",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="HandlerHelpers",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var n=null,r=(0,u["default"])(i).getInstance();r.setConfig({log:e.log}),r.initialize();var a=t(e);return!n&&a&&(n=(0,o["default"])(i).create({protectionModel:a,protectionKeyController:r,adapter:e.adapter,eventBus:e.eventBus,log:e.log}),e.capabilities.setEncryptedMediaSupported(!0)),n}function t(e){var t=e.log,r=e.eventBus,a=e.videoModel.getElement();return void 0!==a.onencrypted&&void 0!==a.mediaKeys&&void 0!==navigator.requestMediaKeySystemAccess&&"function"==typeof navigator.requestMediaKeySystemAccess?(t("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,c["default"])(i).create({log:t,eventBus:r})):n(a,E)?(t("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,p["default"])(i).create({log:t,eventBus:r,api:n(a,E)})):n(a,y)?(t("EME detected on this user agent! (ProtectionModel_01b)"),(0,v["default"])(i).create({log:t,eventBus:r,api:n(a,y)})):(t("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null)}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("function"==typeof e[r[Object.keys(r)[0]]])return r}return null}var r=void 0,i=this.context;return r={createProtectionSystem:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(134),o=r(a),s=n(32),u=r(s),l=n(133),f=r(l),d=n(139),c=r(d),g=n(140),p=r(g),h=n(138),v=r(h),m=n(1),_=r(m),y=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],E=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];i.__dashjs_factory_name="Protection";var T=_["default"].getClassFactory(i);T.events=f["default"],t["default"]=T,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){if(n(this,e),r&&"persistent"!==r&&"temporary"!==r)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=r}return r(e,[{key:"toJWK",value:function(){var e,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(r)}this.type&&(n.type=this.type);var i=JSON.stringify(n),a=i.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=i.charCodeAt(e);return o}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.keyID=e,this.key=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){k={},j=[],K=(0,f["default"])(N).getInstance(),H=(0,c["default"])(N).getInstance(),q=(0,h["default"])(N).getInstance(),U.on(y["default"].BUFFER_EMPTY,v,B),U.on(y["default"].PLAYBACK_SEEKING,_,B),U.on(y["default"].PERIOD_SWITCH_STARTED,E,B)}function n(e){return e.map(function(e){return Math.log(e)})}function r(e,t,r,i){var a=NaN;if(i?(a=0,i.forEach(function(e,t){e>i[a]&&(a=t)})):(i=n(r),a=i.length-1),0===a)return null;var o=1-i[0]+(i[a]-i[0])/(t/e-1),s=e/(i[0]+o-1);return{utilities:i,gp:o,Vp:s}}function a(e){var t={},n=e.getMediaInfo(),i=e.getStreamProcessor(),a=e.getStreamInfo(),o=e.getTrackInfo(),s=i.isDynamic(),u=a.manifestInfo.duration,l=o.fragmentDuration,f=n.bitrateList.map(function(e){return e.bandwidth}),d=r(M,b,f,null);if(null===d)return t.state=S,t;if(t.state=I,t.bitrates=f,t.utilities=d.utilities,t.Vp=d.Vp,t.gp=d.gp,t.isDynamic=s,t.movieDuration=u,t.fragmentDuration=l,t.bandwidthSafetyFactor=K.getBandwidthSafetyFactor(),t.rebufferSafetyFactor=C,t.bufferTarget=K.getStableBufferTime(),t.lastQuality=0,t.virtualBuffer=0,t.throughputCount=s?P:w,A){for(var c="",g=0;g<f.length;++g){var p=d.utilities[g],h=f[g],v=0;if(g>0){var m=d.utilities[g-1],_=f[g-1];v=d.Vp*((m*h-p*_)/(h-_)+d.gp)}var y=d.Vp*(p+d.gp);c+="\n"+g+":"+(1e-6*f[g]).toFixed(3)+"Mbps "+v.toFixed(3)+"/"+y.toFixed(3)}L("BolaDebug "+n.type+" bitrates"+c)}return t}function s(e,t){for(var n=e.bitrates.length,r=NaN,i=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]+e.gp)-t)/e.bitrates[a];(isNaN(i)||o>=i)&&(i=o,r=a)}return r}function u(e,t){for(var n=x.getHttpRequests(e),r=[],i=n.length-1;i>=0&&r.length<t;--i){var a=n[i];a.type===g.HTTPRequest.MEDIA_SEGMENT_TYPE&&a._tfinish&&a.tresponse&&a.trace&&r.push(a)}return r}function l(e,t,n){var r=u(e,t);if(0===r.length)return 0;for(var i=0,a="",o=0;o<r.length;++o){var s=.001*(r[o]._tfinish.getTime()-r[o].trequest.getTime()),l=8*r[o].trace.reduce(function(e,t){return e+t.b[0]},0);A&&(a+=" "+(1e-6*l).toFixed(3)+"/"+s.toFixed(3)+"="+(1e-6*l/s).toFixed(3)+"Mbps"),i+=s/l}return A&&L("BolaDebug "+n+" BolaRule recent throughput = "+(r.length/(1e6*i)).toFixed(3)+"Mbps:"+a),r.length/i}function d(e,t){var n=0;return e.bitrates.some(function(e,r){return e>t||(n=r,!1)}),n}function p(e,t){var n=u(e,1);if(0===n.length)return 0;var r=n[0],i=Date.now(),a=r._tfinish.getTime();a>i&&(a=i);var o=k[t];k[t]=i;var s=0;return s=o&&o>a?i-o:i-a,s<=0?0:.001*s}function v(){A&&L("BolaDebug BUFFER_EMPTY"),j.forEach(function(e){var t=F.getReadOnlyMetricsFor(e);if(0!==t.BolaState.length){var n=t.BolaState[0]._s;n.state===R&&(n.virtualBuffer=0,F.updateBolaState(e,n))}})}function _(e){A&&L("BolaDebug PLAYBACK_SEEKING "+e.seekTime.toFixed(3)),j.forEach(function(e){var t=F.getReadOnlyMetricsFor(e);if(0!==t.BolaState.length){var n=t.BolaState[0]._s;n.state!==S&&(n.state=I),F.updateBolaState(e,n)}})}function E(){}function D(e,t){var n=e.getStreamProcessor();n.getScheduleController().setTimeToLoadDelay(0);var r=(0,o["default"])(N).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name}),u=e.getMediaInfo(),f=u.type,c=F.getReadOnlyMetricsFor(f);if(0===c.BolaState.length){A&&L("BolaDebug "+f+"\nBolaDebug "+f+" BolaRule for state=- fragmentStart="+q.getIndexHandlerTime(e.getStreamProcessor()).toFixed(3));var g=a(e);F.updateBolaState(f,g);var h=0;if(g.state!==S){j.push(f);var v=l(c,g.throughputCount,f);if(0===v)return A&&L("BolaDebug "+f+" BolaRule quality unchanged for INITIALIZE"),void t(r);h=d(g,v*g.bandwidthSafetyFactor),g.lastQuality=h,r.value=h,r.priority=o["default"].DEFAULT,r.reason.state=g.state,r.reason.throughput=v}return A&&L("BolaDebug "+f+" BolaRule quality "+h+" for INITIALIZE"),void t(r)}var m=c.BolaState[0]._s;if(m.state===S)return A&&L("BolaDebug "+f+" BolaRule quality 0 for ONE_BITRATE"),void t(r);var _=m.bitrates,y=m.utilities;A&&L("BolaDebug "+f+"\nBolaDebug "+f+" EXECUTE BolaRule for state="+m.state+" fragmentStart="+q.getIndexHandlerTime(e.getStreamProcessor()).toFixed(3));var E=x.getCurrentBufferLevel(c)?x.getCurrentBufferLevel(c):0,T=l(c,m.throughputCount,f);E<=.1&&(m.virtualBuffer=0);var M=p(c,f);M>0&&(m.virtualBuffer+=M),m.virtualBuffer<0&&(m.virtualBuffer=0);var b=E+m.virtualBuffer,D=s(m,b);if(A&&L("BolaDebug "+f+" BolaRule bufferLevel="+E.toFixed(3)+"(+"+m.virtualBuffer.toFixed(3)+"="+b.toFixed(3)+") recentThroughput="+(1e-6*T).toFixed(3)+" tentativeQuality="+D),m.state===I){var h=d(m,T*m.bandwidthSafetyFactor);if(E>m.fragmentDuration/C){m.state=R;for(var O=0,P=0;P<h;++P){var w=m.Vp*(m.gp+(_[h]*y[P]-_[P]*y[h])/(_[h]-_[P]));w>O&&(O=w)}O>E&&(m.virtualBuffer=O-E)}return A&&L("BolaDebug "+f+" BolaRule quality "+h+" for STARTUP"),m.lastQuality=h,F.updateBolaState(f,m),r.value=h,r.priority=o["default"].DEFAULT,r.reason.state=I,r.reason.throughput=T,void t(r)}if(D>m.lastQuality){var h=d(m,T);D>h&&(h<m.lastQuality&&(h=m.lastQuality),D=h)}if(T>0)for(var U=C*T*E/m.fragmentDuration;D>0&&_[D]>U;)--D;var B=0,k=m.Vp*(y[D]+m.gp);B=b-k,B>0&&(B>m.virtualBuffer?(B-=m.virtualBuffer,m.virtualBuffer=0):(m.virtualBuffer-=B,B=0)),B>0?D===_.length-1?B=0:n.getScheduleController().setTimeToLoadDelay(1e3*B):B=0,m.lastQuality=D,F.updateBolaState(f,m),r.value=D,r.priority=o["default"].DEFAULT,r.reason.state=m.state,r.reason.throughput=T,r.reason.bufferLevel=E,A&&L("BolaDebug "+f+" BolaRule quality "+D+" delay="+B.toFixed(3)+" for STEADY"),t(r)}function O(){U.off(y["default"].BUFFER_EMPTY,v,B),U.off(y["default"].PLAYBACK_SEEKING,_,B),U.off(y["default"].PERIOD_SWITCH_STARTED,E,B),t()}var P=2,w=3,N=this.context,L=(0,T["default"])(N).getInstance().log,x=e.dashMetrics,F=e.metricsModel,U=(0,m["default"])(N).getInstance(),B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0;return B={execute:D,reset:O},t(),B}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(1),u=r(s),l=n(5),f=r(l),d=n(9),c=r(d),g=n(7),p=n(15),h=r(p),v=n(3),m=r(v),_=n(2),y=r(_),E=n(4),T=r(E),S=0,I=1,R=2,A=!1,M=10,b=30,C=.5;i.__dashjs_factory_name="BolaRule";var D=u["default"].getClassFactory(i);D.BOLA_STATE_ONE_BITRATE=S,D.BOLA_STATE_STARTUP=I,D.BOLA_STATE_STEADY=R,D.BOLA_DEBUG=A,t["default"]=D,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=0;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length}function t(){this.customTimeRangeArray=[],this.length=0}function n(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length}function r(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)}function i(e){return this.customTimeRangeArray[e].start}function a(e){return this.customTimeRangeArray[e].end}var o=[],s=0;return{customTimeRangeArray:o,length:s,add:e,clear:t,remove:n,mergeRanges:r,start:i,end:a}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="CustomTimeRanges",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t=e.streamId,n=e.mediaInfo.type,i=e.quality;r[t]=r[t]||{},r[t][n]=r[t][n]||{},r[t][n][i]=e}function t(e,t,n){return r[e][t][n]}function n(){r={}}var r={},i={save:e,extract:t,reset:n};return i}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="InitCache",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(23),l=r(u),f=function(e){function t(e,n){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.url=e||null,this.type=n||null,this.mediaType="stream",this.responseType="text"}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function a(){n(this,a),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};r.INITIAL_PLAYOUT_START_REASON="initial_playout",r.SEEK_START_REASON="seek",r.RESUME_FROM_PAUSE_START_REASON="resume",r.METRICS_COLLECTION_START_REASON="metrics_collection_start";var i=function o(){n(this,o),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};i.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",i.REBUFFERING_REASON="rebuffering",i.USER_REQUEST_STOP_REASON="user_request",i.END_OF_PERIOD_STOP_REASON="end_of_period",i.END_OF_CONTENT_STOP_REASON="end_of_content",i.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",i.FAILURE_STOP_REASON="failure",t.PlayList=r,t.PlayListTrace=i},function(e,t,n){"use strict";var r={};r.parseBuffer=function(e){return new i(e).parse()},r.Utils={},r.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++))),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},t.parseBuffer=r.parseBuffer,t.Utils=r.Utils,r.Cursor=function(e){this.offset="undefined"==typeof e?0:e};var i=function(e){this._raw=new DataView(e),this._cursor=new r.Cursor,this.boxes=[]};i.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},i.prototype.fetchAll=function(e,t){var n=[];return i._sweep.call(this,e,n,t),n},i.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=a.parse(this);if("undefined"==typeof e.type)break;this.boxes.push(e)}return this},i._sweep=function(e,t,n){this.type&&this.type==e&&t.push(this);for(var r in this.boxes){if(t.length&&n)return;i._sweep.call(this.boxes[r],e,t,n)}};var a=function(){this._cursor=new r.Cursor};a.parse=function(e){var t=new a;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},a.prototype._readInt=function(e){var t=null;switch(e){case 8:t=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:t=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:var n=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset),r=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readUint=function(e){var t=null;switch(e){case 8:t=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:var n=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset),r=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2);t=(n<<8)+r;break;case 32:t=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:var n=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset),r=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);
32
+ t+=String.fromCharCode(r)}return t},a.prototype._readTerminatedString=function(){for(var e="";;){var t=this._readUint(8);if(0==t)break;e+=String.fromCharCode(t)}return e},a.prototype._readTemplate=function(e){var t=this._readUint(e/2),n=this._readUint(e/2);return t+n/Math.pow(2,e/2)},a.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);switch(this.size=this._readUint(32),this.type=this._readString(4),1==this.size&&(this.largesize=this._readUint(64)),"uuid"==this.type&&(this.usertype=this._readString(16)),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}!this._incomplete&&this._boxParsers[this.type]&&this._boxParsers[this.type].call(this)},a.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},a.prototype._boxParsers={},["moov","trak","tref","mdia","minf","stbl","edts","dinf","mvex","moof","traf","mfra","udta","meco","strk","vttc"].forEach(function(e){a.prototype._boxParsers[e]=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(a.parse(this))}}),a.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var e=1;e<=this.entry_count;e++){var t={};1==this.version?(t.segment_duration=this._readUint(64),t.media_time=this._readInt(64)):(t.segment_duration=this._readUint(32),t.media_time=this._readInt(32)),t.media_rate_integer=this._readInt(16),t.media_rate_fraction=this._readInt(16),this.entries.push(t)}},a.prototype._boxParsers.emsg=function(){this._parseFullBox(),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.message_data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.free=a.prototype._boxParsers.skip=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.ftyp=a.prototype._boxParsers.styp=function(){for(this.major_brand=this._readString(4),this.minor_versions=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))},a.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},a.prototype._boxParsers.mdat=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var e=this._readUint(16);this.pad=e>>15,this.language=String.fromCharCode((e>>10&31)+96,(e>>5&31)+96,(31&e)+96),this.pre_defined=this._readUint(16)},a.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},a.prototype._boxParsers.mvhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.pre_defined=[];for(var e=0;e<6;e++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},a.prototype._boxParsers.payl=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.cue_text=r.Utils.dataViewToString(e)},a.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0==this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var e=0;e<this.reference_count;e++){var t={},n=this._readUint(32);t.reference_type=n>>31&1,t.referenced_size=2147483647&n,t.subsegment_duration=this._readUint(32);var r=this._readUint(32);t.starts_with_SAP=r>>31&1,t.SAP_type=r>>28&7,t.SAP_delta_time=268435455&r,this.references.push(t)}},a.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var e=0;e<this.subsegment_count;e++){var t={};t.ranges_count=this._readUint(32),t.ranges=[];for(var n=0;n<t.ranges_count;n++){var r={};r.level=this._readUint(8),r.range_size=this._readUint(24),t.ranges.push(r)}this.subsegments.push(t)}},a.prototype._boxParsers.tfdt=function(){this._parseFullBox(),1==this.version?this.baseMediaDecodeTime=this._readUint(64):this.baseMediaDecodeTime=this._readUint(32)},a.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags&&(this.base_data_offset=this._readUint(64)),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},a.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.width=this._readUint(32),this.height=this._readUint(32)},a.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var e=0;e<this.sample_count;e++){var t={};256&this.flags&&(t.sample_duration=this._readUint(32)),512&this.flags&&(t.sample_size=this._readUint(32)),1024&this.flags&&(t.sample_flags=this._readUint(32)),2048&this.flags&&(0==this.version?t.sample_composition_time_offset=this._readUint(32):t.sample_composition_time_offset=this._readInt(32)),this.samples.push(t)}},a.prototype._boxParsers.vlab=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.source_label=r.Utils.dataViewToString(e)},a.prototype._boxParsers.vttC=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.config=r.Utils.dataViewToString(e)},a.prototype._boxParsers.vtte=function(){}},function(e,t,n){(function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){var r=function(e,t){var n,r="dash",i=window.MediaSource,a=t.common,o=t.extend,s=t.version,u=function(e,t,n){return"application/dash+xml"===e.toLowerCase()&&i.isTypeSupported(t+';codecs="'+n+'"')&&(n.indexOf("mp4a.40.5")<0||navigator.userAgent.indexOf("Android")<0)},l=function(i,l){var f,d,c,g,p=t.bean,h={engineName:r,pick:function(e){var t,r,i,o;for(t=0;t<e.length;t+=1)if(r=e[t],i=r.dashType||n.type,o=r.dashCodecs||n.codecs,u(r.type,i,o))return"string"==typeof r.src&&(r.src=a.createAbsoluteUrl(r.src)),r},load:function(s){var u=i.conf,c=o(n,u.dash,u.clip.dash),g={ended:"finish",loadeddata:"ready",pause:"pause",play:"resume",progress:"buffer",ratechange:"speed",seeked:"seek",timeupdate:"progress",volumechange:"volume"},h=e.MediaPlayer.events,v=!!s.autoplay||!!u.autoplay,m="is-poster",_=0;if(f)(i.video.src&&s.src!==i.video.src||s.index)&&f.setAutoPlay(!0),f.attachSource(s.src);else{if(a.removeNode(a.findDirect("video",l)[0]||a.find(".fp-player > video",l)[0]),d=a.createElement("video",{"class":"fp-engine "+r+"-engine",volume:i.volumeLevel,"x-webkit-airplay":"allow"}),Object.keys(g).forEach(function(e){var t,n=g[e],c=e+"."+r;p.on(d,c,function(e){if(u.debug&&n.indexOf("progress")<0&&console.log(c,"->",n,e.originalEvent),i.ready||!(n.indexOf("ready")<0)){var r,g,p=d.currentTime,h=0,v=0;switch(n){case"ready":t=o(i.video,{duration:f.duration(),seekable:d.seekable.end(null),width:d.videoWidth,height:d.videoHeight,url:i.video.src});break;case"resume":i.poster&&(a.removeClass(l,m),i.poster=!1);break;case"seek":t=f.time();break;case"progress":i.live&&!_&&p>0&&(_=p),t=i.live?_?p-_:0:p;break;case"speed":t=d.playbackRate;break;case"volume":t=d.volume;break;case"buffer":try{if(p)for(r=d.buffered,g=r.length-1;g>-1;g-=1)v=r.end(g),v>=p&&(h=v)}catch(y){}s.buffer=h,t=h}i.trigger(n,[i,t])}})}),u.poster){var y=function(e){"stop"!==e.type&&v||setTimeout(function(){i.poster||(a.addClass(l,m),i.poster=!0)})};i.one("ready."+r,y).on("stop."+r,y)}i.on("error."+r,function(){f&&(f.reset(),f=0)}),f=e.MediaPlayer().create(),i.engine[r]=f,f.enableBufferOccupancyABR(c.bufferOccupancyABR),f.enableLastBitrateCaching(!1),f.setScheduleWhilePaused(!0),f.getDebug().setLogToBrowserConsole(c.debug),Object.keys(h).forEach(function(e){var t=h[e],n=r+t.charAt(0).toUpperCase()+t.slice(1),a=c.listeners,u=a&&a.indexOf(t)>-1;f.on(t,function(t){var r,a,l=o({},t),f=i.video.src;switch(delete l.type,e){case"ERROR":switch(l.error){case"download":r=4;break;case"manifestError":r=5;break;case"mediasource":switch(t.event){case"MEDIA_ERR_DECODE":r=3;break;case"MEDIA_ERR_SRC_NOT_SUPPORTED":r=5;break;case"MEDIA_ERR_NETWORK":r=2;break;case"MEDIA_ERR_ABORTED":r=1}}if(r)return a={code:r},r>2&&(a.video=o(s,{src:f,url:l.event.url||f})),void i.trigger("error",[i,a])}u&&i.trigger(n,[i,l])})}),a.prepend(a.find(".fp-player",l)[0],d),f.initialize(d,s.src,v)}i.video=s,d.paused&&v&&(t.support.firstframe?f.play():(d.play(),d.pause(),f.play()))},resume:function(){f.play()},pause:function(){f.pause()},seek:function(e){f.seek(e)},volume:function(e){d&&(d.volume=e)},speed:function(e){d.playbackRate=e,i.trigger("speed",[i,e])},unload:function(){if(f){var e="."+r;f.reset(),f=0,i.off(e),p.off(l,e),p.off(d,e),a.removeNode(d),d=0}}};return!/^6\.0\.[0-3]$/.test(s)||i.conf.splash||i.conf.poster||i.conf.autoplay||(c=a.css(l,"backgroundColor"),g="none"!==a.css(l,"backgroundImage")||c&&"rgba(0, 0, 0, 0)"!==c&&"transparent"!==c,g&&(i.conf.poster=!0)),h};i&&"function"==typeof i.isTypeSupported&&0!==s.indexOf("5.")&&(l.engineName=r,l.canPlay=function(e,i){return n=o({type:"video/mp4",codecs:"avc1.42c01e,mp4a.40.2"},t.conf[r],i[r],i.clip[r]),u(e,n.type,n.codecs)},t.engines.unshift(l))};"object"===t(e)&&e.exports?e.exports=r.bind(void 0,n(74)):window.dashjs&&window.flowplayer&&r(window.dashjs,window.flowplayer)}()}).call(t,n(187)(e))},function(e,t){"use strict";function n(e){var t,n,i;for(t=[],i=0,n=e.length;i<n;i+=1)e[i].isRoot?t.push("root"):t.push(e[i].name);var a=function(e,t){var n;if(null!==e&&null!==t)for(n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=e[n]))},o=function(e,t,n){var i,o,s,u,l;if(null!==e&&0!==e.length)for(i=0,o=e.length;i<o;i+=1)s=e[i],t.hasOwnProperty(s.name)&&(n.hasOwnProperty(s.name)?s.merge&&(u=t[s.name],l=n[s.name],"object"===("undefined"==typeof u?"undefined":r(u))&&"object"===("undefined"==typeof l?"undefined":r(l))?a(u,l):null!=s.mergeFunction?n[s.name]=s.mergeFunction(u,l):n[s.name]=u+l):n[s.name]=t[s.name])},s=function l(e,t){var n,r,i,a,s,u,f,d=e;if(null!==d.children&&0!==d.children.length)for(n=0,r=d.children.length;n<r;n+=1)if(u=d.children[n],t.hasOwnProperty(u.name))if(u.isArray)for(s=t[u.name+"_asArray"],i=0,a=s.length;i<a;i+=1)f=s[i],o(d.properties,t,f),l(u,f);else f=t[u.name],o(d.properties,t,f),l(u,f)},u=function f(n){var i,a,o,u,l,d,c;if(null===n)return n;if("object"!==("undefined"==typeof n?"undefined":r(n)))return n;for(i=0,a=t.length;i<a;i+=1)"root"===t[i]&&(l=e[i],d=n,s(l,d));for(u in n)if(n.hasOwnProperty(u)&&"__children"!=u){if(o=t.indexOf(u),o!==-1)if(l=e[o],l.isArray)for(c=n[u+"_asArray"],i=0,a=c.length;i<a;i+=1)d=c[i],s(l,d);else d=n[u],s(l,d);f(n[u])}return n};return{run:u}}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(59),a=r(i),o=n(63),s=r(o),u=n(113),l=r(u),f=n(100),d=r(f),c=n(53),g=window||e,p=g.dashjs;p||(p=g.dashjs={}),p.MediaPlayer=a["default"],p.Protection=s["default"],p.MetricsReporting=l["default"],p.MediaPlayerFactory=d["default"],p.Version=(0,c.getVersionString)(),t["default"]=p,t.MediaPlayer=a["default"],t.Protection=s["default"],t.MetricsReporting=l["default"],t.MediaPlayerFactory=d["default"]}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astinfuture",this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CHUNK_APPENDED="chunkAppended",this.CURRENT_TRACK_CHANGED="currenttrackchanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.INITIALIZATION_LOADED="initializationLoaded",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_REQUESTED="initRequested",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_PROGRESS="loadingProgress",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATED="representationUpdated",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_APPEND_COMPLETED="sourceBufferAppendCompleted",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.STREAM_INITIALIZED="streaminitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TIMED_TEXT_REQUESTED="timedTextRequested",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ALL_ELEMENTS_LOADED="xlinkAllElementsLoaded",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){V=-1,X=0,Z=NaN,B.on(d["default"].INITIALIZATION_LOADED,L,G),B.on(d["default"].SEGMENTS_LOADED,x,G)}function n(t){J=t,Q=J.getType(),W=J.isDynamic(),$=(0,S["default"])(F).create(e,W)}function r(){return J}function i(e){X=e}function a(){return X}function s(){return V}function f(){return Z}function c(){$=null,X=0,Z=NaN,z=NaN,V=-1,W=null,Q=null,J=null,B.off(d["default"].INITIALIZATION_LOADED,L,G),B.off(d["default"].SEGMENTS_LOADED,x,G)}function p(e){return e.split("$$").join("$")}function h(e,t){if(null===t||e.indexOf("$RepresentationID$")===-1)return e;var n=t.toString();return e.split("$RepresentationID$").join(n)}function v(e,t,n){var r,i,a=Y.resolve(n.path);return a&&t!==a.url&&k.isRelative(t)?(r=a.url,i=a.serviceLocation,t&&(r+=t)):r=t,!k.isRelative(r)&&(e.url=r,e.serviceLocation=i,!0)}function _(e,t){var n,r,i=new o["default"];if(n=e.adaptation.period,i.mediaType=t,i.type=l.HTTPRequest.INIT_SEGMENT_TYPE,i.range=e.range,r=n.start,i.availabilityStartTime=K.calcAvailabilityStartTimeFromPresentationTime(r,e.adaptation.period.mpd,W),i.availabilityEndTime=K.calcAvailabilityEndTimeFromPresentationTime(r+n.duration,n.mpd,W),i.quality=e.index,i.mediaInfo=J.getMediaInfo(),v(i,e.initialization,e))return i}function T(e){var t;return e?t=_(e,Q):null}function R(e){var t,n,r,i=e.adaptation.period,a=e.segmentInfoType,o=!1;return V<0?o=!1:W||V<e.availableSegmentsNumber?(n=(0,E.getSegmentByIndex)(V,e),n&&(r=n.presentationStartTime-i.start,t=e.adaptation.period.duration,U(e.segmentInfoType+": "+r+" / "+t),o=("SegmentTimeline"!==a||!W)&&r>=t)):o=!0,o}function A(e){return $.getSegments(e,z,V,M)}function M(e,t){if(e.segments=t,t&&t.length>0&&(Z=isNaN(Z)?t[0].presentationStartTime:Math.min(t[0].presentationStartTime,Z)),W&&isNaN(K.getExpectedLiveEdge())){var n=t.length-1,r=t[n],i=r.presentationStartTime,a=q.getMetricsFor("stream");K.setExpectedLiveEdge(i),q.updateManifestUpdateInfo(H.getCurrentManifestUpdate(a),{presentationStartTime:i})}}function b(e){if(!e)throw new u["default"]("no representation");return e.segments=null,A(e),e}function C(e,t){var n,r=e.initialization,i="BaseURL"!==e.segmentInfoType&&"SegmentBase"!==e.segmentInfoType&&!e.indexRange;return e.segmentDuration||e.segments||b(e),e.segmentAvailabilityRange=null,e.segmentAvailabilityRange=K.calcSegmentAvailabilityRange(e,W),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start&&!e.useCalculatedLiveEdgeTime?(n=new u["default"](I,"no segments are available yet",{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end}),void B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:e,error:n})):(t||(V=-1),e.segmentDuration&&b(e),r||j.loadInitialization(e),i||j.loadSegments(e,Q,e.indexRange),void(r&&i&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:e})))}function D(e,t,n){var r,i,a,o,s,u=t.segments,l=u?u.length:null,f=-1;if(u&&l>0)for(s=0;s<l;s++)if(i=u[s],a=i.presentationStartTime,o=i.duration,r=void 0===n||null===n?o/2:n,e+r>=a&&e-r<a+o){f=i.availabilityIdx;break}return f}function O(e){if(null===e||void 0===e)return null;var t=new o["default"],n=e.representation,r=n.adaptation.period.mpd.manifest.Period_asArray[n.adaptation.period.index].AdaptationSet_asArray[n.adaptation.index].Representation_asArray[n.index].bandwidth,i=e.media;return i=(0,E.replaceTokenForTemplate)(i,"Number",e.replacementNumber),i=(0,E.replaceTokenForTemplate)(i,"Time",e.replacementTime),i=(0,E.replaceTokenForTemplate)(i,"Bandwidth",r),i=h(i,n.id),i=p(i),t.mediaType=Q,t.type=l.HTTPRequest.MEDIA_SEGMENT_TYPE,t.range=e.mediaRange,t.startTime=e.presentationStartTime,t.duration=e.duration,t.timescale=n.timescale,t.availabilityStartTime=e.availabilityStartTime,t.availabilityEndTime=e.availabilityEndTime,t.wallStartTime=e.wallStartTime,t.quality=n.index,t.index=e.availabilityIdx,t.mediaInfo=J.getMediaInfo(),t.adaptationIndex=n.adaptation.index,v(t,i,n)?t:void 0}function P(e,t,n){var r,i,a,s=V,u=!!n&&n.keepIdx,l=n?n.timeThreshold:null,f=!(!n||!n.ignoreIsFinished);return e?(z!==t&&(z=t,U("Getting the request for "+Q+" time : "+t)),V=D(t,e,l),A(e),V<0&&(V=D(t,e,l)),V>0&&U("Index for "+Q+" time "+t+" is "+V),a=!f&&R(e),a?(r=new o["default"],r.action=o["default"].ACTION_COMPLETE,r.index=V,r.mediaType=Q,r.mediaInfo=J.getMediaInfo(),U("Signal complete.",r)):(i=(0,E.getSegmentByIndex)(V,e),r=O(i)),u&&s>=0&&(V="SegmentTimeline"===e.segmentInfoType&&W?V:s),r):null}function w(e,t){var n=(e.segmentAvailabilityRange.end-e.segmentAvailabilityRange.start)/2;return e.segments=null,e.segmentAvailabilityRange={start:t-n,end:t+n},P(e,t,{keepIdx:!1,ignoreIsFinished:!0})}function N(e){var t,n,r;return e&&V!==-1?(z=null,V++,U("Getting the next request at index: "+V),r=R(e),r?(t=new o["default"],t.action=o["default"].ACTION_COMPLETE,t.index=V,t.mediaType=Q,t.mediaInfo=J.getMediaInfo(),U("Signal complete.")):(A(e),n=(0,E.getSegmentByIndex)(V,e),t=O(n),!n&&W&&V--),t):null}function L(e){var t=e.representation;t.segments&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:t})}function x(e){if(!e.error&&Q===e.mediaType){var t,n,r,i,a=e.segments,o=e.representation,s=[],u=0;for(t=0,n=a.length;t<n;t++)r=a[t],i=(0,E.getTimeBasedSegment)(K,W,o,r.startTime,r.duration,r.timescale,r.media,r.mediaRange,u),s.push(i),i=null,u++;o.segmentAvailabilityRange={start:s[0].presentationStartTime,end:s[n-1].presentationStartTime},o.availableSegmentsNumber=n,M(o,s),o.initialization&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:o})}}var F=this.context,U=(0,m["default"])(F).getInstance().log,B=(0,g["default"])(F).getInstance(),k=(0,y["default"])(F).getInstance(),j=e.segmentBaseLoader,K=e.timelineConverter,H=e.dashMetrics,q=e.metricsModel,Y=e.baseURLController,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0;return G={initialize:n,getStreamProcessor:r,getInitRequest:T,getSegmentRequestForTime:P,getNextSegmentRequest:N,generateSegmentRequestForTime:w,updateRepresentation:C,setCurrentTime:i,getCurrentTime:a,getCurrentIndex:s,getEarliestTime:f,reset:c},t(),G}Object.defineProperty(t,"__esModule",{value:!0});var a=n(23),o=r(a),s=n(6),u=r(s),l=n(7),f=n(2),d=r(f),c=n(3),g=r(c),p=n(1),h=r(p),v=n(4),m=r(v),_=n(22),y=r(_),E=n(25),T=n(89),S=r(T),I=1;i.__dashjs_factory_name="DashHandler";var R=h["default"].getClassFactory(i);R.SEGMENTS_UNAVAILABLE_ERROR_CODE=I,t["default"]=R,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){E=(0,c["default"])(g).getInstance(),T=(0,_["default"])(g).getInstance(),I=(0,o["default"])(g).getInstance()}function t(e){e.baseURLController&&(R=e.baseURLController)}function n(e,t){var r=!0,i=null,a=null,o=new XMLHttpRequest,u=R.resolve(e.path),f=t||{url:u?u.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,request:o};h("Start searching for initialization."),o.onload=function(){o.status<200||o.status>299||(r=!1,f.bytesLoaded=f.range.end,a=T.parse(o.response),i=s(a),i?(e.range=i,e.initialization=f.url,m.trigger(p["default"].INITIALIZATION_LOADED,{representation:e})):(f.range.end=f.bytesLoaded+f.bytesToLoad,n(e,f)))},o.onloadend=o.onerror=function(){r&&(r=!1,E.downloadError("initialization",f.url,o),m.trigger(p["default"].INITIALIZATION_LOADED,{representation:e}))},l(o,f),h("Perform init search: "+f.url)}function r(e,t,n,i,o){if(n&&(void 0===n.start||void 0===n.end)){var s=n?n.toString().split("-"):null;n=s?{start:parseFloat(s[0]),end:parseFloat(s[1])}:null}o=o?o:d;var u=!0,f=null,c=null,g=!!n,p=new XMLHttpRequest,v=R.resolve(e.path),m={url:v?v.url:void 0,range:g?n:{start:0,end:1500},searching:!g,bytesLoaded:i?i.bytesLoaded:0,bytesToLoad:1500,request:p};p.onload=function(){if(!(p.status<200||p.status>299)){var n=m.bytesToLoad,i=p.response.byteLength;if(u=!1,m.bytesLoaded=m.range.end-m.range.start,f=T.parse(p.response),c=f.getBox("sidx"),c&&c.isComplete){var s,l,d=c.references;if(null!==d&&void 0!==d&&d.length>0&&(s=1===d[0].reference_type),s){h("Initiate multiple SIDX load."),m.range.end=m.range.start+c.size;var g,v,_,y,E,S=[],I=0,R=(c.offset||m.range.start)+c.size,A=function(n){n?(S=S.concat(n),I++,I>=v&&o(S,e,t)):o(null,e,t)};for(g=0,v=d.length;g<v;g++)_=R,y=R+d[g].referenced_size-1,R+=d[g].referenced_size,E={start:_,end:y},r(e,null,E,m,A)}else h("Parsing segments from SIDX."),l=a(c,m),o(l,e,t)}else{if(c)m.range.start=c.offset||m.range.start,m.range.end=m.range.start+(c.size||n);else{if(i<m.bytesLoaded)return void o(null,e,t);var M=f.getLastBox();M&&M.size?(m.range.start=M.offset+M.size,m.range.end=m.range.start+n):m.range.end+=n}r(e,t,m.range,m,o)}}},p.onloadend=p.onerror=function(){u&&(u=!1,E.downloadError("SIDX",m.url,p),o(null,e,t))},l(p,m),h("Perform SIDX load: "+m.url)}function i(){E=null,T=null,I=null,h=null}function a(e,t){for(var n,r,i,a,o=e.references,s=o.length,l=e.timescale,f=e.earliest_presentation_time,d=t.range.start+e.offset+e.first_offset+e.size,c=[],g=0;g<s;g++)i=o[g].subsegment_duration,a=o[g].referenced_size,n=new u["default"],n.duration=i,n.media=t.url,n.startTime=f,n.timescale=l,r=d+a-1,n.mediaRange=d+"-"+r,c.push(n),f+=i,d+=a;return c}function s(e){var t,n,r=e.getBox("ftyp"),i=e.getBox("moov"),a=null;return h("Searching for initialization."),i&&i.isComplete&&(t=r?r.offset:i.offset,n=i.offset+i.size-1,a=t+"-"+n,h("Found the initialization. Range: "+a)),a}function l(e,t){t.url&&(e.open("GET",I.modifyRequestURL(t.url)),e.responseType="arraybuffer",e.setRequestHeader("Range","bytes="+t.range.start+"-"+t.range.end),e=I.modifyRequestHeader(e),e.send(null))}function d(e,t,n){e?m.trigger(p["default"].SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):m.trigger(p["default"].SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new f["default"](null,"error loading segments",null)})}var g=this.context,h=(0,S["default"])(g).getInstance().log,m=(0,v["default"])(g).getInstance(),y=void 0,E=void 0,T=void 0,I=void 0,R=void 0;return y={setConfig:t,initialize:e,loadInitialization:n,loadSegments:r,reset:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),o=r(a),s=n(37),u=r(s),l=n(6),f=r(l),d=n(11),c=r(d),g=n(2),p=r(g),h=n(3),v=r(h),m=n(49),_=r(m),y=n(1),E=r(y),T=n(4),S=r(T);i.__dashjs_factory_name="SegmentBaseLoader",t["default"]=E["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){R={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"},CueBlockNumber:{tag:21368}}}}},Void:{tag:236,required:!0}}}function t(){M=(0,v["default"])(h).getInstance(),b=(0,_["default"])(h).getInstance(),D=(0,A["default"])(h).create({errHandler:M,metricsModel:C,requestModifier:b})}function n(e){if(!e.baseURLController||!e.metricsModel)throw new Error("Missing config parameter(s)");O=e.baseURLController,C=e.metricsModel}function r(e){var t=[],n=void 0,r=void 0,i=void 0,a=(0,f["default"])(h).create({data:e}),o=void 0;for(a.consumeTag(R.Segment.Cues),r=a.getMatroskaCodedNum();a.moreData()&&a.consumeTagAndSize(R.Segment.Cues.CuePoint,!0);){for(n={},n.CueTime=a.parseTag(R.Segment.Cues.CuePoint.CueTime),n.CueTracks=[];a.moreData()&&a.consumeTagAndSize(R.Segment.Cues.CuePoint.CueTrackPositions,!0);){if(i={},i.Track=a.parseTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===i.Track)throw new Error("Cue track cannot be 0");i.ClusterPosition=a.parseTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),a.getPos()+4>r||!a.consumeTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueBlockNumber,!0)?n.CueTracks.push(i):(o=a.getMatroskaCodedNum(),i.BlockNumber=a.getMatroskaUint(o),n.CueTracks.push(i))}if(0===n.CueTracks.length)throw new Error("Mandatory cuetrack not found");t.push(n)}if(0===t.length)throw new Error("mandatory cuepoint not found");return t}function i(e,t,n,i,a){var o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,g=void 0;for(s=r(e),u=[],f=0,d=s.length;f<d;f+=1)l=new E["default"],o=0,o=f<s.length-1?s[f+1].CueTime-s[f].CueTime:a-s[f].CueTime,l.duration=o,l.media=t,l.startTime=s[f].CueTime,l.timescale=1e3,c=s[f].CueTracks[0].ClusterPosition+n,g=f<s.length-1?s[f+1].CueTracks[0].ClusterPosition+n-1:i-1,l.mediaRange=c+"-"+g,u.push(l);return m("Parsed cues: "+u.length+" cues."),u}function a(e,t,n,r){var a=(0,f["default"])(h).create({data:e}),o=void 0,s=void 0,u=n.split("-"),l=null,d={url:t,range:{start:parseFloat(u[0]),end:parseFloat(u[1])},request:l},g=void 0,p=void 0;for(m("Parse EBML header: "+d.url),a.skipOverElement(R.EBML),a.consumeTag(R.Segment),g=a.getMatroskaCodedNum(),g+=a.getPos(),p=a.getPos();a.moreData()&&!a.consumeTagAndSize(R.Segment.Info,!0);)if(!(a.skipOverElement(R.Segment.SeekHead,!0)||a.skipOverElement(R.Segment.Tracks,!0)||a.skipOverElement(R.Segment.Cues,!0)||a.skipOverElement(R.Void,!0)))throw new Error("no valid top level element found");for(;void 0===o;){var v=a.getMatroskaCodedNum(!0),_=a.getMatroskaCodedNum();switch(v){case R.Segment.Info.Duration.tag:o=a[R.Segment.Info.Duration.parse](_);break;default:a.setPos(a.getPos()+_)}}l=c(d);var y=function(e){s=i(e,d.url,p,g,o),r(s)},E=function(){m("Download Error: Cues "+d.url),r(null)};D.load({request:l,success:y,error:E}),m("Perform cues load: "+d.url+" bytes="+d.range.start+"-"+d.range.end)}function s(e,t){var n=null,r=O.resolve(e.path),i=r?r.url:void 0,a=e.range.split("-"),s=t||{range:{start:parseFloat(a[0]),end:parseFloat(a[1])},request:n,url:i,init:!0};m("Start loading initialization."),n=c(s);var u=function(){e.initialization=s.url,y.trigger(o["default"].INITIALIZATION_LOADED,{representation:e})},l=function(){y.trigger(o["default"].INITIALIZATION_LOADED,{
33
+ representation:e})};D.load({request:n,success:u,error:l}),m("Perform init load: "+s.url)}function l(e,t,n,r){var i=null,o=O.resolve(e.path),s=o?o.url:void 0,u=8192,l={bytesLoaded:0,bytesToLoad:u,range:{start:0,end:u},request:i,url:s,init:!1};r=r?r:d,i=c(l),m("Parsing ebml header");var f=function(i){a(i,s,n,function(n){r(n,e,t)})},g=function(){r(null,e,t)};D.load({request:i,success:f,error:g})}function d(e,t,n){e?y.trigger(o["default"].SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):y.trigger(o["default"].SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new Error(null,"error loading segments",null)})}function c(e){var t=new I["default"];return t.type=e.init?T.HTTPRequest.INIT_SEGMENT_TYPE:T.HTTPRequest.MEDIA_SEGMENT_TYPE,t.url=e.url,t.range=e.range.start+"-"+e.range.end,t}function g(){M=null,b=null,m=null}var h=this.context,m=(0,p["default"])(h).getInstance().log,y=(0,u["default"])(h).getInstance(),S=void 0,R=void 0,M=void 0,b=void 0,C=void 0,D=void 0,O=void 0;return S={setConfig:n,initialize:t,loadInitialization:s,loadSegments:l,reset:g},e(),S}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=r(a),s=n(3),u=r(s),l=n(160),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g),h=n(11),v=r(h),m=n(33),_=r(m),y=n(37),E=r(y),T=n(7),S=n(23),I=r(S),R=n(27),A=r(R);i.__dashjs_factory_name="WebmSegmentBaseLoader",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){K=null,H=-1,q=!0,Y=[],z=(0,c["default"])(B).getInstance(),Q=(0,v["default"])(B).getInstance(),X=(0,p["default"])(B).getInstance(),Z=(0,_["default"])(B).getInstance(),J=(0,E["default"])(B).getInstance(),$=(0,R["default"])(B).getInstance(),ee=(0,f["default"])(B).getInstance(),te=(0,o["default"])(B).getInstance(),ne=(0,u["default"])(B).getInstance(),re=(0,S["default"])(B).getInstance(),k.on(O["default"].QUALITY_CHANGE_REQUESTED,F,j),k.on(O["default"].REPRESENTATION_UPDATED,w,j),k.on(O["default"].WALLCLOCK_TIME_UPDATED,N,j),k.on(O["default"].BUFFER_LEVEL_UPDATED,x,j),k.on(O["default"].LIVE_EDGE_SEARCH_COMPLETED,L,j)}function t(e){e.abrController&&(z=e.abrController)}function n(e){V=e,W=V.getIndexHandler()}function r(){return V}function i(){return K}function a(){return H}function s(){return q}function l(){return G}function d(){k.off(O["default"].QUALITY_CHANGE_REQUESTED,F,j),k.off(O["default"].REPRESENTATION_UPDATED,w,j),k.off(O["default"].WALLCLOCK_TIME_UPDATED,N,j),k.off(O["default"].BUFFER_LEVEL_UPDATED,x,j),k.off(O["default"].LIVE_EDGE_SEARCH_COMPLETED,L,j),K=null,H=-1,q=!0,Y=[],z=null,Q=null,X=null,Z=null,J=null,$=null,ee=null,te=null,ne=null,re=null}function g(e,t,n){var r,i,a=null,o=V.getStreamInfo(),s=z.getTopQualityIndexFor(n,o.id);if(q=!0,k.trigger(O["default"].DATA_UPDATE_STARTED,{sender:this}),Y=A(t),null===K&&"fragmentedText"!==n?(i=z.getAverageThroughput(n),a=i||z.getInitialBitrateFor(n,o),r=z.getQualityForBitrate(V.getMediaInfo(),a)):r=z.getQualityFor(n,o),r>s&&(r=s),G=y(r),K=e,"video"!==n&&"audio"!==n&&"fragmentedText"!==n)return q=!1,void k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G});for(var u=0;u<Y.length;u++)W.updateRepresentation(Y[u],!0)}function h(){var e=new Date,t=l(),n=1e3*X.getTime();J.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function m(){var e=ee.calcSegmentAvailabilityRange(G,V.isDynamic());J.addDVRInfo(V.getType(),X.getTime(),V.getStreamInfo().manifestInfo,e)}function y(e){return Y[e]}function T(e){return Y.indexOf(e)}function I(){for(var e=0,t=Y.length;e<t;e++){var n=Y[e].segmentInfoType;if(null===Y[e].segmentAvailabilityRange||null===Y[e].initialization||("SegmentBase"===n||"BaseURL"===n)&&!Y[e].segments)return!1}return!0}function A(e){var t,n=Z.getValue();return H=te.getIndexForAdaptation(K,n,e.period.index),t=te.getRepresentationsForAdaptation(n,e)}function b(e){for(var t,n=0,r=Y.length;n<r;n++)t=Y[n],t.segmentAvailabilityRange=ee.calcSegmentAvailabilityRange(t,e)}function D(){Y.forEach(function(e){e.segmentAvailabilityRange=null})}function P(e){var t=e,n=function(){if(!s()){q=!0,k.trigger(O["default"].DATA_UPDATE_STARTED,{sender:j}),D();for(var e=0;e<Y.length;e++)W.updateRepresentation(Y[e],!0)}};q=!1,k.trigger(O["default"].AST_IN_FUTURE,{delay:t}),setTimeout(n,t)}function w(e){if(e.sender.getStreamProcessor()===V&&s()){var t,n,r,i=e.representation,a=J.getMetricsFor("stream"),o=J.getMetricsFor(l().adaptation.type),u=ne.getCurrentManifestUpdate(a),f=!1,d=0;if("dynamic"===i.adaptation.period.mpd.manifest.type){var c=i.segmentAvailabilityRange.end-i.segmentAvailabilityRange.start,g=X.computeLiveDelay(G.segmentDuration,V.getStreamInfo().manifestInfo.DVRWindowSize);d=1e3*(g-c)}if(d>0)return m(),P(d),n=new M["default"](U,"Segments update failed",null),void k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G,error:n});if(u){for(var p=0;p<u.trackInfo.length;p++)if(t=u.trackInfo[p],t.index===i.index&&t.mediaType===V.getType()){f=!0;break}f||J.addManifestUpdateRepresentationInfo(u,i.id,i.index,i.adaptation.period.index,V.getType(),i.presentationTimeOffset,i.startNumber,i.segmentInfoType)}I()&&(q=!1,z.setPlaybackQuality(V.getType(),V.getStreamInfo(),T(G)),J.updateManifestUpdateInfo(u,{latency:G.segmentAvailabilityRange.end-X.getTime()}),r=ne.getCurrentRepresentationSwitch(o),r||h(),k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G}))}}function N(e){e.isDynamic&&b(e.isDynamic)}function L(e){if(!e.error){b(!0),W.updateRepresentation(G,!1);var t=Z.getValue(),n=G.adaptation.period,r=Q.getActiveStreamInfo();r.isLast&&(n.mpd.checkTime=te.getCheckTime(t,n),n.duration=te.getEndTimeForLastPeriod(Z.getValue(),n)-n.start,r.duration=n.duration)}}function x(e){e.sender.getStreamProcessor()===V&&m()}function F(e){e.mediaType===V.getType()&&V.getStreamInfo().id===e.streamInfo.id&&e.oldQuality!==e.newQuality&&(G=y(e.newQuality),$.setSavedBitrateSettings(e.mediaType,G.bandwidth),h())}var U=1,B=this.context,k=(0,C["default"])(B).getInstance(),j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0;return j={initialize:n,setConfig:t,getData:i,getDataIndex:a,isUpdating:s,updateData:g,getStreamProcessor:r,getCurrentRepresentation:l,getRepresentationForQuality:y,reset:d},e(),j}Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),o=r(a),s=n(16),u=r(s),l=n(26),f=r(l),d=n(10),c=r(d),g=n(9),p=r(g),h=n(20),v=r(h),m=n(31),_=r(m),y=n(14),E=r(y),T=n(5),S=r(T),I=n(50),R=r(I),A=n(6),M=r(A),b=n(3),C=r(b),D=n(2),O=r(D),P=n(1),w=r(P);i.__dashjs_factory_name="RepresentationController",t["default"]=w["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){s=[new v["default"],new _["default"],new E["default"]],u=new p["default"](s,"",(!0)),l=new c["default"]([new S["default"],new R["default"]])}function t(e,t){var n;try{var a=window.performance.now();if(n=u.xml_str2json(e),!n)throw new Error("parser error");var o=window.performance.now();l.run(n);var f=window.performance.now();t.setMatchers(s),t.setIron(l),r("Parsing complete: ( xml2json: "+(o-a).toPrecision(3)+"ms, objectiron: "+(f-o).toPrecision(3)+"ms, total: "+((f-a)/1e3).toPrecision(3)+"s)")}catch(d){return i.manifestError("parsing the manifest failed","parse",e,d),null}return n}var n=this.context,r=(0,f["default"])(n).getInstance().log,i=(0,o["default"])(n).getInstance(),a=void 0,s=void 0,u=void 0,l=void 0;return a={parse:t},e(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),o=r(a),s=n(1),u=r(s),l=n(4),f=r(l),d=n(73),c=r(d),g=n(35),p=r(g),h=n(85),v=r(h),m=n(84),_=r(m),y=n(86),E=r(y),T=n(82),S=r(T),I=n(83),R=r(I);i.__dashjs_factory_name="DashParser",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){n(this,e);var i=function(e){return e&&e.length&&e.charAt(0)===e.charAt(0).toUpperCase()};this._name=t,this._merge=void 0!==r?r:i(t)}return r(e,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(55),l=r(u),f=function(e){function t(){i(this,t);var e=["profiles","width","height","sar","frameRate","audioSamplingRate","mimeType","segmentProfiles","codecs","maximumSAPPeriod","startWithSAP","maxPlayoutRate","codingDependency","scanType","FramePacking","AudioChannelConfiguration","ContentProtection","EssentialProperty","SupplementalProperty","InbandEventStream"];return s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,"AdaptationSet",e,[new l["default"]("Representation",e,[new l["default"]("SubRepresentation",e)])])}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(55),l=r(u),f=function(e){function t(){i(this,t);var e=["SegmentBase","SegmentTemplate","SegmentList"];return s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,"Period",e,[new l["default"]("AdaptationSet",e,[new l["default"]("Representation",e)])])}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(36),l=r(u),f=60,d=60,c=1e3,g=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,p=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){return g.test(e.value)},function(e){var t=g.exec(e),n=void 0;if(n=Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),t[6]&&parseInt(t[6],10)||0,t[7]&&parseFloat(t[7])*c||0),t[9]&&t[10]){var r=parseInt(t[9],10)*d+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*r*f*c}return new Date(n)})}return a(t,e),t}(l["default"]);t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(36),l=r(u),f=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,d=31536e3,c=2592e3,g=86400,p=3600,h=60,v=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){for(var t=["minBufferTime","mediaPresentationDuration","minimumUpdatePeriod","timeShiftBufferDepth","maxSegmentDuration","maxSubsegmentDuration","suggestedPresentationDelay","start","starttime","duration"],n=t.length,r=0;r<n;r++)if(e.nodeName===t[r])return f.test(e.value);return!1},function(e){var t=f.exec(e),n=parseFloat(t[2]||0)*d+parseFloat(t[4]||0)*c+parseFloat(t[6]||0)*g+parseFloat(t[8]||0)*p+parseFloat(t[10]||0)*h+parseFloat(t[12]||0);return void 0!==t[1]&&(n=-n),n})}return a(t,e),t}(l["default"]);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(36),l=r(u),f=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,d=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){return f.test(e.value)},function(e){return parseFloat(e)})}return a(t,e),t}(l["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.boxParser&&(i=e.boxParser)}function t(e){var t,n,r,a,o,s,u,l,f,d,c,g=i.parse(e),p=g.getBox("tfhd"),h=g.getBox("tfdt"),v=g.getBox("trun"),m=g.getBox("moof"),_=g.getBox("mfhd");for(d=_.sequence_number,r=v.sample_count,o=h.baseMediaDecodeTime,f=(p.base_data_offset||0)+(v.data_offset||0),s=[],l=0;l<r;l++)u=v.samples[l],t=void 0!==u.sample_duration?u.sample_duration:p.default_sample_duration,a=void 0!==u.sample_size?u.sample_size:p.default_sample_size,n=void 0!==u.sample_composition_time_offset?u.sample_composition_time_offset:0,s.push({dts:o,cts:o+n,duration:t,offset:m.offset+f,size:a}),f+=a,o+=t;return c=o-h.baseMediaDecodeTime,{sampleList:s,sequenceNumber:d,totalDuration:c}}function n(e){var t=i.parse(e),n=t.getBox("mdhd");return n?n.timescale:NaN}var r=void 0,i=void 0;return r={getSamplesInfo:t,getMediaTimescaleFromMoov:n,setConfig:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="FragmentedTextBoxParser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c,g,p=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,h=p.SegmentURL_asArray.length,v=[];for(g=e.startNumber,f=(0,s.decideSegmentListRangeForTemplate)(r,t,e,n,i,a),d=Math.max(f.start,0),c=Math.min(f.end,p.SegmentURL_asArray.length-1),o=d;o<=c;o++)l=p.SegmentURL_asArray[o],u=(0,s.getIndexBasedSegment)(r,t,e,o),u.replacementTime=(g+o-1)*e.segmentDuration,u.media=l.media?l.media:"",u.mediaRange=l.mediaRange,u.index=l.index,u.indexRange=l.indexRange,v.push(u),u=null;return e.availableSegmentsNumber=h,v}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="ListSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(){s=(0,u["default"])(a).create(e,t),l=(0,f["default"])(a).create(e,t),d=(0,c["default"])(a).create(e,t)}function r(e,t,n,r,a){var o,u=e.segmentInfoType;return"SegmentBase"!==u&&"BaseURL"!==u&&i(e,n)?("SegmentTimeline"===u?o=s.getSegments(e,t,n,a):"SegmentTemplate"===u?o=l.getSegments(e,t,n,a):"SegmentList"===u&&(o=d.getSegments(e,t,n,a)),r&&r(e,o)):o=e.segments,o}function i(e,t){var n,r,i=e.segments,a=!1;return i&&0!==i.length?(r=i[0].availabilityIdx,n=i[i.length-1].availabilityIdx,a=t<r||t>n):a=!0,a}var a=this.context,o=void 0,s=void 0,l=void 0,d=void 0;return o={getSegments:r},n(),o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(91),u=r(s),l=n(90),f=r(l),d=n(88),c=r(d);i.__dashjs_factory_name="SegmentsGetter";var g=o["default"].getClassFactory(i);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate,g=e.segmentDuration,p=e.segmentAvailabilityRange,h=[],v=null,m=null;for(d=e.startNumber,o=isNaN(g)&&!t?{start:d,end:d}:(0,s.decideSegmentListRangeForTemplate)(r,t,e,n,i,a),l=o.start,f=o.end,u=l;u<=f;u++)m=(0,s.getIndexBasedSegment)(r,t,e,u),m.replacementTime=(d+u-1)*e.segmentDuration,v=c.media,v=(0,s.replaceTokenForTemplate)(v,"Number",m.replacementNumber),v=(0,s.replaceTokenForTemplate)(v,"Time",m.replacementTime),m.media=v,h.push(m),m=null;return isNaN(g)?e.availableSegmentsNumber=1:e.availableSegmentsNumber=Math.ceil((p.end-p.start)/g),h}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="TemplateSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c,g,p,h,v,m,_,y,E,T=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,S=T.SegmentTimeline,I=T.SegmentURL_asArray,R=e.availableSegmentsNumber>0,A=10,M=0,b=0,C=-1,D=[],O=!1,P=function(n,i){var a=T.media,o=n.mediaRange;return I&&(a=I[i].media||"",o=I[i].mediaRange),(0,s.getTimeBasedSegment)(r,t,e,M,n.d,E,a,o,C)};for(E=e.timescale,o=S.S_asArray,h=(0,s.decideSegmentListRangeForTimeline)(r,t,n,i,a),h?(_=h.start,y=h.end):m=r.calcMediaTimeFromPresentationTime(n||0,e),l=0,f=o.length;l<f;l++){if(u=o[l],c=0,u.hasOwnProperty("r")&&(c=u.r),u.hasOwnProperty("t")&&(M=u.t,b=M/E),c<0){if(p=o[l+1],p&&p.hasOwnProperty("t"))g=p.t/E;else{var w=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:r.calcSegmentAvailabilityRange(e,t).end;g=r.calcMediaTimeFromPresentationTime(w,e),e.segmentDuration=u.d/E}c=Math.ceil((g-b)/(u.d/E))-1}if(v){if(R)break;C+=c+1}else for(d=0;d<=c;d++){if(C++,h){if(C>y){if(v=!0,R)break;continue}C>=_&&D.push(P(u,C))}else{if(D.length>A){if(v=!0,R)break;continue}O?D.push(P(u,C)):b>=m-u.d/E*1.5&&(O=!0,D.push(P(u,C)))}M+=u.d,b=M/E}}return R||(e.availableSegmentsNumber=C+1),D}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="TimelineSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.period=null,this.index=-1,this.type=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.checkTime=NaN,this.clientServerTimeShift=0,this.isClientServerTimeSyncCompleted=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};r.DEFAULT_ID="defaultId",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.maxPlayoutRate=NaN};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){g=(0,o["default"])(s).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){var t=function(t){l.trigger(p["default"].CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var n=new u["default"](e.url);g.load({request:n,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)}function r(e){var t=function(t,n){l.trigger(p["default"].LOADING_COMPLETED,{request:e,response:t||null,error:n||null,sender:d})};e?g.load({request:e,progress:function(){l.trigger(p["default"].LOADING_PROGRESS,{request:e})},success:function(e){t(e)},error:function(e,n,r){t(void 0,new f["default"](m,r,n))}}):t(void 0,new f["default"](_,y))}function i(){g&&g.abort()}function a(){g&&(g.abort(),g=null)}var s=this.context,l=(0,c["default"])(s).getInstance(),d=void 0,g=void 0;return d={checkForExistence:n,load:r,abort:i,reset:a},t(),d}Object.defineProperty(t,"__esModule",{value:!0});var a=n(27),o=r(a),s=n(167),u=r(s),l=n(6),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(1),v=r(h),m=1,_=2,y="request is null";i.__dashjs_factory_name="FragmentLoader";var E=v["default"].getClassFactory(i);E.FRAGMENT_LOADER_ERROR_LOADING_FAILURE=m,E.FRAGMENT_LOADER_ERROR_NULL_REQUEST=_,t["default"]=E,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){s.on(y["default"].XLINK_READY,n,g),v=(0,u["default"])(a).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier}),_=(0,o["default"])(a).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}function r(e){var t=new c["default"](e,h.HTTPRequest.MPD_TYPE);v.load({request:t,success:function(t,n,r){var i,a;r.responseURL&&r.responseURL!==e?(a=l.parseBaseUrl(r.responseURL),i=r.responseURL):(l.isRelative(e)&&(e=l.parseBaseUrl(window.location.href)+e),a=l.parseBaseUrl(e));var o=d.parse(t,_);o?(o.url=i||e,o.originalUrl||(o.originalUrl=o.url),o.baseUri=a,o.loadedTime=new Date,_.resolveManifestOnLoad(o)):s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:null,error:new p["default"](S,R)})},error:function(t,n,r){s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:null,error:new p["default"](I,"Failed loading manifest: "+e+", "+r)})}})}function i(){s.off(y["default"].XLINK_READY,n,g),_&&(_.reset(),_=null),v&&(v.abort(),v=null)}var a=this.context,s=(0,m["default"])(a).getInstance(),l=(0,f["default"])(a).getInstance(),d=e.parser,g=void 0,v=void 0,_=void 0;return g={load:r,reset:i},t(),g}Object.defineProperty(t,"__esModule",{value:!0});var a=n(112),o=r(a),s=n(27),u=r(s),l=n(22),f=r(l),d=n(69),c=r(d),g=n(6),p=r(g),h=n(7),v=n(3),m=r(v),_=n(2),y=r(_),E=n(1),T=r(E),S=1,I=2,R="parsing failed";i.__dashjs_factory_name="ManifestLoader";var A=T["default"].getClassFactory(i);A.MANIFEST_LOADER_ERROR_PARSING_FAILURE=S,A.MANIFEST_LOADER_ERROR_LOADING_FAILURE=I,t["default"]=A,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&(e.manifestModel&&(A=e.manifestModel),e.dashManifestModel&&(M=e.dashManifestModel))}function t(e){R=e,E=NaN,T=null,I=!1,S=!0,_.on(u["default"].STREAMS_COMPOSED,h,this),_.on(u["default"].PLAYBACK_STARTED,g,this),_.on(u["default"].PLAYBACK_PAUSED,p,this),_.on(u["default"].INTERNAL_MANIFEST_LOADED,d,this)}function n(e){l(e)}function r(){return R}function i(){_.off(u["default"].PLAYBACK_STARTED,g,this),_.off(u["default"].PLAYBACK_PAUSED,p,this),_.off(u["default"].STREAMS_COMPOSED,h,this),_.off(u["default"].INTERNAL_MANIFEST_LOADED,d,this),S=!0,I=!1,a(),E=NaN}function a(){null!==T&&(clearInterval(T),T=null)}function s(){a(),isNaN(E)||(m("Refresh manifest in "+E+" seconds."),T=setTimeout(f,Math.min(1e3*E,Math.pow(2,31)-1),this))}function l(e){var t,n,r=new Date;A.setValue(e),m("Manifest has been refreshed at "+r+"["+r.getTime()/1e3+"] "),t=M.getRefreshDelay(e),n=((new Date).getTime()-e.loadedTime.getTime())/1e3,E=Math.max(t-n,0),_.trigger(u["default"].MANIFEST_UPDATED,{manifest:e}),S||s()}function f(){var e,t;if(!S&&!I){I=!0,e=A.getValue(),t=e.url;var n=M.getLocation(e);n&&(t=n),R.load(t)}}function d(e){e.error||l(e.manifest)}function g(){S=!1,s()}function p(){S=!0,a()}function h(){I=!1}var v=this.context,m=(0,c["default"])(v).getInstance().log,_=(0,o["default"])(v).getInstance(),y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0;return y={initialize:t,setManifest:n,getManifestLoader:r,setConfig:e,reset:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="ManifestUpdater",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){if(!e||"VIDEO"!==e.nodeName)return null;if(e._dashjs_player)return e._dashjs_player;var i,a=e.id||e.name||"video element";if(t=t||[].slice.call(e.querySelectorAll("source")).filter(function(e){return e.type==r})[0],!t&&e.src)t=document.createElement("source"),t.src=e.src;else if(!t&&!e.src)return null;return n=n||{},i=(0,s["default"])(n).create(),i.initialize(e,t.src,e.autoplay),i.getDebug().log("Converted "+a+" to dash.js player and added content: "+t.src),e._dashjs_player=i,i}function t(t,i){var a=[];t=t||"[data-dashjs-player]",i=i||document;for(var o=i.querySelectorAll(t),s=0;s<o.length;s++){var u=e(o[s],null);a.push(u)}for(var l=i.querySelectorAll('source[type="'+r+'"]'),s=0;s<l.length;s++){var f=n(l[s]),u=e(f,null);a.push(u)}return a}function n(e){for(var t=!0;t;){var n=e;if(t=!1,"video"===n.nodeName.toLowerCase())return n;e=n.parentNode,t=!0}}var r="application/dash+xml";return{create:e,createAll:t}}function a(){window.removeEventListener("load",a),u.createAll()}Object.defineProperty(t,"__esModule",{value:!0});var o=n(59),s=r(o),u=i(),l=window&&window.dashjs&&window.dashjs.skipAutoCreate;!l&&window&&window.addEventListener&&("complete"===window.document.readyState?u.createAll():window.addEventListener("load",a)),t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){le=[],fe=!1,de=!1,ce=null,ge={},pe=!1,he=!1,me=(0,o["default"])(J).getInstance(),_e=(0,S["default"])(J).getInstance(),Se=(0,v["default"])(J).getInstance(),ye=(0,f["default"])(J).getInstance(),Ee=(0,p["default"])(J).create(),Ie=(0,j["default"])(J).getInstance(),ee.on(L["default"].BUFFERING_COMPLETED,V,ue),ee.on(L["default"].DATA_UPDATE_COMPLETED,z,ue)}function n(e,t){ce=e,ve=t,ve&&(ee.on(L["default"].KEY_ERROR,D,ue),ee.on(L["default"].SERVER_CERTIFICATE_UPDATED,D,ue),ee.on(L["default"].LICENSE_REQUEST_COMPLETE,D,ue),ee.on(L["default"].KEY_SYSTEM_SELECTED,D,ue),ee.on(L["default"].KEY_SESSION_CREATED,D,ue))}function r(e){fe?G():(ee.on(L["default"].CURRENT_TRACK_CHANGED,x,ue),H(e))}function i(){for(var e=le.length,t=0;t<e;t++)le[t].reset();
34
+ le=[],fe=!1,de=!1,I(),ee.off(L["default"].CURRENT_TRACK_CHANGED,x,ue)}function a(){_e&&(_e.pause(),_e=null),Ee&&(Ee.reset(),Ee=null),me.abortSearch(),i(),ye=null,Se=null,ne=null,te=null,re=null,ie=null,$=null,ae=null,pe=!1,he=!1,ge={},ee.off(L["default"].DATA_UPDATE_COMPLETED,z,ue),ee.off(L["default"].BUFFERING_COMPLETED,V,ue),ee.off(L["default"].KEY_ERROR,D,ue),ee.off(L["default"].SERVER_CERTIFICATE_UPDATED,D,ue),ee.off(L["default"].LICENSE_REQUEST_COMPLETE,D,ue),ee.off(L["default"].KEY_SYSTEM_SELECTED,D,ue),ee.off(L["default"].KEY_SESSION_CREATED,D,ue)}function s(){return ce.duration}function l(){return ce.start}function d(){return ce.index}function g(){return ce.id}function h(){return ce}function m(e){return null!==Y(e)}function y(e){var t=Y(e);return Se.getBitrateList(t)}function T(){Te&&Te.start()}function I(){Te&&Te.clear()}function A(){return fe}function b(){return he}function D(e){e.error&&(ae.mediaKeySessionError(e.error),$(e.error),a())}function P(e){return"text"===e.type?e.mimeType:e.type}function N(e,t,n){var r,i,a=e.type;if("muxed"===a&&e)return i="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",$(i),ae.manifestError(i,"multiplexedrep",te.getValue()),!1;if("text"===a||"fragmentedText"===a||"embeddedText"===a)return!0;if(r=e.codec,$(a+" codec: "+r),e.contentProtection&&!ie.supportsEncryptedMedia())ae.capabilityError("encryptedmedia");else if(!ie.supportsCodec((0,_["default"])(J).getInstance().getElement(),r))return i=a+"Codec ("+r+") is not supported.",ae.manifestError(i,"codec",n),$(i),!1;return!0}function x(e){if(e.newMediaInfo.streamInfo.id===ce.id){var t=W(e.oldMediaInfo);if(t){var n=_e.getTime(),r=t.getBuffer(),i=e.newMediaInfo,a=te.getValue(),o=le.indexOf(t),s=t.getMediaSource();"fragmentedText"!==i.type?(t.reset(!0),k(i,a,s,{buffer:r,replaceIdx:o,currentTime:n}),_e.seek(_e.getTime())):t.updateMediaInfo(a,i)}}}function U(e){var t=e.split("/")[1];return"webm"===t.toLowerCase()}function B(e){var t=U(e.mimeType)?(0,C["default"])(J).getInstance():(0,M["default"])(J).getInstance();t.setConfig({baseURLController:se,metricsModel:(0,E["default"])(J).getInstance()}),t.initialize();var n=(0,R["default"])(J).create({segmentBaseLoader:t,timelineConverter:oe,dashMetrics:(0,O["default"])(J).getInstance(),metricsModel:(0,E["default"])(J).getInstance(),baseURLController:se});return n}function k(e,t,n,r){var i=(0,u["default"])(J).create({indexHandler:B(e),timelineConverter:oe,adapter:re,manifestModel:te}),a=re.getAllMediaInfoForType(t,ce,e.type);if(i.initialize(P(e),Ee,n,ue,Te),Se.updateTopQualityIndex(e),r?(i.setBuffer(r.buffer),i.getIndexHandler().setCurrentTime(r.currentTime),le[r.replaceIdx]=i):le.push(i),"text"===e.type||"fragmentedText"===e.type){for(var o,s=0;s<a.length;s++)a[s].index===e.index&&(o=s),i.updateMediaInfo(t,a[s]);"fragmentedText"===e.type&&i.updateMediaInfo(t,a[o])}else i.updateMediaInfo(t,e);return i}function K(e,t){var n,r=te.getValue(),i=re.getAllMediaInfoForType(r,ce,e),a=null;if(!i||0===i.length)return void $("No "+e+" data.");for(var o=0,s=i.length;o<s;o++)if(a=i[o],"embeddedText"===e)Ie.addEmbeddedTrack(a);else{if(!N(a,t,r))continue;ye.isMultiTrackSupportedByType(a.type)&&ye.addTrack(a,ce)}"embeddedText"!==e&&0!==ye.getTracksFor(e,ce).length&&(ye.checkInitialMediaSettingsForType(e,ce),n=ye.getCurrentTrackFor(e,ce),k(n,r,t))}function H(e){var t,n=te.getValue();if(Te=(0,c["default"])(J).getInstance(),Te.initialize(),Te.setConfig({manifestModel:te,manifestUpdater:ne}),t=re.getEventsFor(n,ce),Te.addInlineEvents(t),pe=!0,K("video",e),K("audio",e),K("text",e),K("fragmentedText",e),K("embeddedText",e),K("muxed",e),G(),de=!0,pe=!1,0===le.length){var r="No streams to play.";ae.manifestError(r,"nostreams",n),$(r)}else me.initialize(oe,le[0]),q()}function q(){var e=le.length,t=!!ge.audio||!!ge.video,n=t?new Error(Z,"Data update failed",null):null,r=0;for(r;r<e;r++)if(le[r].isUpdating()||pe)return;he=!0,fe=!0,de&&(ve&&ve.initialize(te.getValue(),Y("audio"),Y("video")),ee.trigger(L["default"].STREAM_INITIALIZED,{streamInfo:ce,error:n}))}function Y(e){for(var t=le.length,n=null,r=0;r<t;r++)if(n=le[r],n.getType()===e)return n.getMediaInfo();return null}function G(){for(var e=0,t=le.length;e<t;e++)le[e].createBuffer()}function V(e){if(e.streamInfo===ce){var t=Q(),n=t.length,r=0;for(r;r<n;r++)if(!t[r].isBufferingCompleted())return;ee.trigger(L["default"].STREAM_BUFFERING_COMPLETED,{streamInfo:ce})}}function z(e){var t=e.sender.getStreamProcessor();t.getStreamInfo()===ce&&(ge[t.getType()]=e.error,q())}function W(e){if(!e)return!1;var t=Q();return t.filter(function(t){return t.getType()===e.type})[0]}function Q(){var e,t,n=le.length,r=[],i=0;for(i;i<n;i++)t=le[i],e=t.getType(),"audio"!==e&&"video"!==e&&"fragmentedText"!==e||r.push(t);return r}function X(e){$("Manifest updated... updating data system wide.");var t=te.getValue();if(fe=!1,pe=!0,he=!1,ce=e,Te){var n=re.getEventsFor(t,ce);Te.addInlineEvents(n)}for(var r=0,i=le.length;r<i;r++){var a=le[r],o=re.getMediaInfoForType(t,ce,a.getType());Se.updateTopQualityIndex(o),a.updateMediaInfo(t,o)}pe=!1,q()}var Z=1,J=this.context,$=(0,F["default"])(J).getInstance().log,ee=(0,w["default"])(J).getInstance(),te=e.manifestModel,ne=e.manifestUpdater,re=e.adapter,ie=e.capabilities,ae=e.errHandler,oe=e.timelineConverter,se=e.baseURLController,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0;return ue={initialize:n,activate:r,deactivate:i,getDuration:s,getStartTime:l,getStreamIndex:d,getId:g,getStreamInfo:h,hasMedia:m,getBitrateListFor:y,startEventController:T,isActivated:A,isInitialized:b,updateData:X,reset:a,getProcessors:Q},t(),ue}Object.defineProperty(t,"__esModule",{value:!0});var a=n(51),o=r(a),s=n(102),u=r(s),l=n(13),f=r(l),d=n(106),c=r(d),g=n(107),p=r(g),h=n(10),v=r(h),m=n(19),_=r(m),y=n(14),E=r(y),T=n(9),S=r(T),I=n(76),R=r(I),A=n(77),M=r(A),b=n(78),C=r(b),D=n(16),O=r(D),P=n(3),w=r(P),N=n(2),L=r(N),x=n(4),F=r(x),U=n(1),B=r(U),k=n(17),j=r(k);i.__dashjs_factory_name="Stream",t["default"]=B["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){ne=[]}function n(e,t,n,r,i){te=e,re=r,ie=i,le=t,$=re.getStreamInfo().manifestInfo.isDynamic,W.initialize(this),ae=(0,o["default"])(z).getInstance(),ae.initialize(te,this),oe=V(e),se=(0,v["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),manifestModel:Z,adapter:X,dashMetrics:(0,L["default"])(z).getInstance(),dashManifestModel:(0,w["default"])(z).getInstance(),timelineConverter:Q,rulesController:(0,_["default"])(z).getInstance(),mediaPlayerModel:(0,E["default"])(z).getInstance()}),oe.initialize(te,n,this),se.initialize(te,this),fe=(0,R["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),errHandler:(0,B["default"])(z).getInstance(),requestModifier:(0,M["default"])(z).getInstance()}),de=se.getFragmentModel(),de.setLoader(fe),ue=(0,F["default"])(z).create(),ue.initialize(this)}function r(e){W.reset(),oe&&(oe.reset(e),oe=null),se&&(se.reset(),se=null),ue&&(ue.reset(),ue=null),le=null,fe=null,ie=null,re=null,$=null,ee=null,ne=[],te=null}function i(){return ue.isUpdating()}function a(){return te}function s(){return ae}function l(){return ue}function d(){return fe}function g(){return W}function h(){return le}function m(){return oe.getBuffer()}function y(e){oe.setBuffer(e)}function T(){return oe}function I(){return de}function A(){return re.getStreamInfo()}function b(e,t){t===ee||t&&ee&&t.type!==ee.type||(ee=t),ne.indexOf(t)===-1&&ne.push(t),X.updateData(e,this)}function D(){return ne}function P(){return ee}function N(){return oe.getMediaSource()}function x(){return se}function U(){return ie}function k(){se.start()}function j(){se.stop()}function K(){return X.getCurrentRepresentationInfo(Z.getValue(),ue)}function H(e){return X.getRepresentationInfoForQuality(Z.getValue(),ue,e)}function q(){return oe.getIsBufferingCompleted()}function Y(){return oe.getBuffer()||oe.createBuffer(ee)}function G(){return $}function V(e){var t=null;return t="video"===e||"audio"===e||"fragmentedText"===e?(0,u["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),manifestModel:Z,sourceBufferController:(0,C["default"])(z).getInstance(),errHandler:(0,B["default"])(z).getInstance(),streamController:(0,f["default"])(z).getInstance(),mediaController:(0,c["default"])(z).getInstance(),adapter:X,textSourceBuffer:(0,O["default"])(z).getInstance()}):(0,p["default"])(z).create({errHandler:(0,B["default"])(z).getInstance(),sourceBufferController:(0,C["default"])(z).getInstance()})}var z=this.context,W=e.indexHandler,Q=e.timelineConverter,X=e.adapter,Z=e.manifestModel,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0;return J={initialize:n,isUpdating:i,getType:a,getBufferController:T,getABRController:s,getFragmentLoader:d,getFragmentModel:I,getScheduleController:x,getEventController:U,getFragmentController:h,getRepresentationController:l,getIndexHandler:g,getCurrentRepresentationInfo:K,getRepresentationInfoForQuality:H,isBufferingCompleted:q,createBuffer:Y,getStreamInfo:A,updateMediaInfo:b,getMediaInfoArr:D,getMediaInfo:P,getMediaSource:N,getBuffer:m,setBuffer:y,start:k,stop:j,isDynamic:G,reset:r},t(),J}Object.defineProperty(t,"__esModule",{value:!0});var a=n(10),o=r(a),s=n(18),u=r(s),l=n(20),f=r(l),d=n(13),c=r(d),g=n(110),p=r(g),h=n(109),v=r(h),m=n(46),_=r(m),y=n(5),E=r(y),T=n(14),S=r(T),I=n(97),R=r(I),A=n(33),M=r(A),b=n(28),C=r(b),D=n(17),O=r(D),P=n(12),w=r(P),N=n(16),L=r(N),x=n(79),F=r(x),U=n(11),B=r(U),k=n(1),j=r(k);i.__dashjs_factory_name="StreamProcessor",t["default"]=j["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t,n){var i=function(r,i){t.resolved=!0,t.resolvedContent=r?r:null,a.trigger(h["default"].XLINK_ELEMENT_LOADED,{element:t,resolveObject:n,error:r||i?null:new o["default"](_,"Failed loading Xlink element: "+e)})};if(e===r)i(null,!0);else{var u=new d["default"](e,l.HTTPRequest.XLINK_TYPE);s.load({request:u,success:function(e){i(e)},error:function(){i(null)}})}}function n(){s&&(s.abort(),s=null)}var r="urn:mpeg:dash:resolve-to-zero:2013",i=this.context,a=(0,g["default"])(i).getInstance(),s=(0,u["default"])(i).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier}),f=void 0;return f={load:t,reset:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=r(a),s=n(27),u=r(s),l=n(7),f=n(69),d=r(f),c=n(3),g=r(c),p=n(2),h=r(p),v=n(1),m=r(v),_=1;i.__dashjs_factory_name="XlinkLoader";var y=m["default"].getClassFactory(i);y.XLINK_LOADER_ERROR_LOADING_FAILURE=_,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){p.invalidateSelectedIndexes(e.entry)}function t(){p=(0,o["default"])(l).create(),h=(0,u["default"])(l).create(),d.on(_["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,e,s)}function n(e){p.update(e),h.chooseSelectorFromManifest(e)}function r(e){var t=p.getForPath(e),n=t.reduce(function(e,t){var n=h.select(t);return n&&(g.isRelative(n.url)?e.url+=n.url:g.isPathAbsolute(n.url)?e.url=g.parseOrigin(e.url)+n.url:(e.url=n.url,e.serviceLocation=n.serviceLocation)),e},new c["default"]);if(!g.isRelative(n.url))return n}function i(){p.reset(),h.reset()}function a(e){n(e)}var s=void 0,l=this.context,d=(0,v["default"])(l).getInstance(),g=(0,f["default"])(l).getInstance(),p=void 0,h=void 0;return s={reset:i,initialize:a,resolve:r},t(),s}Object.defineProperty(t,"__esModule",{value:!0});var a=n(132),o=r(a),s=n(158),u=r(s),l=n(22),f=r(l),d=n(56),c=r(d),g=n(1),p=r(g),h=n(3),v=r(h),m=n(2),_=r(m);i.__dashjs_factory_name="BaseURLController",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return!!(o.length&&e&&e.length)&&o.indexOf(e)!==-1}function n(e){o.indexOf(e)===-1&&(o.push(e),s.trigger(l,{entry:e}))}function r(e){e.error&&n(e.request.serviceLocation)}function i(){f&&s.on(f,r,this)}function a(){o=[]}var o=[],s=(0,u["default"])(this.context).getInstance(),l=e.updateEventName,f=e.loadFailedEventName;return i(),{add:n,contains:t,reset:a}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(3),u=r(s);i.__dashjs_factory_name="BlackListController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){D=!1,E={},T={},S={},I=null,R=100,A=R/1e3,C=(0,o["default"])(v).getInstance()}function t(){null!==I&&D&&(clearInterval(I),I=null,D=!1)}function n(){m("Start Event Controller"),D||isNaN(R)||(D=!0,I=setInterval(s,R))}function r(e){if(E={},e)for(var t=0;t<e.length;t++){var n=e[t];E[n.id]=n,m("Add inline event with id "+n.id)}m("Added "+e.length+" inline events")}function i(e){for(var t=0;t<e.length;t++){var n=e[t];n.id in T?m("Repeated event with id "+n.id):(T[n.id]=n,m("Add inband event with id "+n.id))}}function a(){if(S)for(var e=C.getTime(),t=Object.keys(S),n=0;n<t.length;n++){var r=t[n],i=S[r];null!==i&&(i.duration+i.presentationTime)/i.eventStream.timescale<e&&(m("Remove Event "+r+" at time "+e),i=null,delete S[r])}}function s(){l(T),l(E),a()}function u(){var e=M.getValue(),t=e.url;e.hasOwnProperty("Location")&&(t=e.Location),m("Refresh manifest @ "+t),b.getManifestLoader().load(t)}function l(e){var t,n=C.getTime();if(e)for(var r=Object.keys(e),i=0;i<r.length;i++){var a=r[i],o=e[a];void 0!==o&&(t=o.presentationTime/o.eventStream.timescale,(0===t||t<=n&&t+A>n)&&(m("Start Event "+a+" at "+n),o.duration>0&&(S[a]=o),o.eventStream.schemeIdUri==p&&o.eventStream.value==h?u():_.trigger(o.eventStream.schemeIdUri,{event:o}),delete e[a]))}}function d(e){e&&(e.manifestModel&&(M=e.manifestModel),e.manifestUpdater&&(b=e.manifestUpdater))}function g(){t(),E=null,T=null,S=null,C=null}var p="urn:mpeg:dash:event:2012",h=1,v=this.context,m=(0,f["default"])(v).getInstance().log,_=(0,c["default"])(v).getInstance(),y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0,b=void 0,C=void 0,D=void 0;return y={initialize:e,addInlineEvents:r,addInbandEvents:i,clear:t,start:n,setConfig:d,reset:g}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=r(a),s=n(1),u=r(s),l=n(4),f=r(l),d=n(3),c=r(d);i.__dashjs_factory_name="EventController",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){m={},p.on(h["default"].FRAGMENT_LOADING_COMPLETED,u,v)}function t(e){var t=null;return null!==e&&void 0!==e&&e.byteLength>0&&(t=new Uint8Array(e)),t}function n(e){var t=m[e];return t||(t=(0,l["default"])(f).create({metricsModel:(0,d["default"])(f).getInstance()}),m[e]=t),t}function r(e){return e&&e.type&&e.type===a.HTTPRequest.INIT_SEGMENT_TYPE}function i(){p.off(h["default"].FRAGMENT_LOADING_COMPLETED,u,this);for(var e in m)m[e].reset();m={}}function o(e,t,n){var r=new s["default"];return r.streamId=n,r.mediaInfo=t.mediaInfo,r.segmentType=t.type,r.start=t.startTime,r.duration=t.duration,r.end=r.start+r.duration,r.bytes=e,r.index=t.index,r.quality=t.quality,r}function u(e){if(m[e.request.mediaType]===e.sender){var t=e.sender.getScheduleController(),n=e.request,i=e.response,a=r(n),s=t.getStreamProcessor().getStreamInfo().id;if(!i)return void c("No "+n.mediaType+" bytes to push.");var u=o(i,n,s);p.trigger(a?h["default"].INIT_FRAGMENT_LOADED:h["default"].MEDIA_FRAGMENT_LOADED,{chunk:u,fragmentModel:e.sender})}}var f=this.context,c=(0,y["default"])(f).getInstance().log,p=(0,g["default"])(f).getInstance(),v=void 0,m=void 0;return v={process:t,getModel:n,isInitializationRequest:r,reset:i},e(),v}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=n(166),s=r(o),u=n(30),l=r(u),f=n(14),d=r(f),c=n(3),g=r(c),p=n(2),h=r(p),v=n(1),m=r(v),_=n(4),y=r(_);i.__dashjs_factory_name="FragmentController",t["default"]=m["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return t?new MediaSource:e?new WebKitMediaSource:null}function t(e,t){var n=window.URL.createObjectURL(e);return t.setSource(n),n}function n(e){e.setSource(null)}function r(e,t){return e.duration!=t&&(e.duration=t),e.duration}function i(e){var t=e.sourceBuffers,n=t.length,r=0;if("open"===e.readyState){for(r;r<n;r++){if(t[r].updating)return;if(0===t[r].buffered.length)return}e.endOfStream()}}var a=void 0;return a={createMediaSource:e,attachMediaSource:t,detachMediaSource:n,setDuration:r,signalEndOfStream:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="MediaSourceController",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){Se=!0,qe=NaN,He=NaN,Ye=[],Ie=!1,Re=null,Ae=null,Me=!0,be=!1,Ce=0,Oe=NaN}function n(e,t){me=e,Le=t,Ue=(0,P["default"])(oe).getInstance(),Pe=(0,s["default"])(oe).getInstance(),we=(0,g["default"])(oe).getInstance(),Ne=(0,l["default"])(oe).getInstance(),xe=(0,k["default"])(oe).getInstance(),Fe=Le.getFragmentController(),Be=Le.getBufferController(),ye=Fe.getModel(me),ye.setScheduleController(this),Ee=Le.isDynamic(),Ke=he.getScheduleWhilePaused(),ke=(0,h["default"])(oe).create({dashMetrics:(0,A["default"])(oe).getInstance(),metricsModel:(0,T["default"])(oe).getInstance(),textSourceBuffer:(0,y["default"])(oe).getInstance()}),je=(0,m["default"])(oe).create({adapter:(0,b["default"])(oe).getInstance(),sourceBufferController:(0,D["default"])(oe).getInstance(),textSourceBuffer:(0,y["default"])(oe).getInstance()}),ge.getIsTextTrack(me)&&ue.on(x["default"].TIMED_TEXT_REQUESTED,q,this),ue.on(x["default"].LIVE_EDGE_SEARCH_COMPLETED,z,this),ue.on(x["default"].QUALITY_CHANGE_REQUESTED,_,this),ue.on(x["default"].DATA_UPDATE_STARTED,F,this),ue.on(x["default"].DATA_UPDATE_COMPLETED,S,this),ue.on(x["default"].FRAGMENT_LOADING_COMPLETED,C,this),ue.on(x["default"].STREAM_COMPLETED,M,this),ue.on(x["default"].STREAM_INITIALIZED,R,this),ue.on(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.on(x["default"].BUFFER_CLEARED,U,this),ue.on(x["default"].BYTES_APPENDED,w,this),ue.on(x["default"].INIT_REQUESTED,c,this),ue.on(x["default"].QUOTA_EXCEEDED,j,this),ue.on(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.on(x["default"].PLAYBACK_STARTED,Y,this),ue.on(x["default"].PLAYBACK_SEEKING,G,this),ue.on(x["default"].PLAYBACK_RATE_CHANGED,V,this),ue.on(x["default"].PLAYBACK_TIME_UPDATED,O,this),ue.on(x["default"].URL_RESOLUTION_FAILED,H,this),ue.on(x["default"].FRAGMENT_LOADING_ABANDONED,L,this)}function r(){_e&&(ie(),Ie=!1,Se?p(Te.quality):f(0),Se&&(Se=!1),se("Schedule controller starting for "+me))}function i(){Ie||(Ie=!0,clearTimeout(De),se("Schedule controller stopping for "+me))}function o(){if(!(Ie||be||!Be||Pe.isPaused()&&!Ke)){u();var e=Ye.length>0,t=ke.execute(Le,me,xe.isVideoTrackPresent());if(t||e){var n=function(){if(Te.quality!==qe)qe=Te.quality,Be.switchInitData(Le.getStreamInfo().id,Te.quality);else{var e=je.execute(Le,Ye.shift());e?ye.executeRequest(e):(be=!1,f(250))}};be=!0,e?n():Ne.getPlaybackQuality(Le,n)}else f(500)}}function u(){var e=1.5*Te.fragmentDuration,t=ye.getRequests({state:I["default"].FRAGMENT_MODEL_EXECUTED,time:Pe.getTime()+e,threshold:0})[0];t&&Ye.indexOf(t)===-1&&!ge.getIsTextTrack(me)&&(!we.isCurrentTrack(t.mediaInfo)||he.getFastSwitchEnabled()&&t.quality<Te.quality&&Be.getBufferLevel()>=e&&Ne.getAbandonmentStateFor(me)!==l["default"].ABANDON_LOAD?(v(t),se("Reloading outdated fragment at index: ",t.index)):t.quality>Te.quality&&Q(Pe.getTime()+Be.getBufferLevel()))}function f(e){clearTimeout(De),De=setTimeout(o,e)}function c(e){e.sender.getStreamProcessor()===Le&&p(Te.quality)}function p(e){qe=e;var t=de.getInitRequest(Le,e);t&&(be=!0,ye.executeRequest(t))}function v(e){Ye.push(e)}function _(e){if(me===e.mediaType&&Le.getStreamInfo().id===e.streamInfo.id){if(Te=Le.getRepresentationInfoForQuality(e.newQuality),null===Te||void 0===Te)throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");re(new Date,a.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),ie()}}function E(e){var t=ye.getRequests({state:I["default"].FRAGMENT_MODEL_EXECUTED,time:Pe.getTime(),threshold:0})[0];t&&Pe.getTime()>=t.startTime&&(t.quality!==He&&e&&ue.trigger(x["default"].QUALITY_CHANGE_RENDERED,{mediaType:me,oldQuality:He,newQuality:t.quality}),He=t.quality)}function S(e){e.error||e.sender.getStreamProcessor()!==Le||(Te=de.convertDataToTrack(fe.getValue(),e.currentRepresentation))}function R(e){e.error||Le.getStreamInfo().id!==e.streamInfo.id||(Te=Le.getCurrentRepresentationInfo(),Ee&&null===Ue.getLiveEdge()||(_e=!0),Ie&&r())}function M(e){e.fragmentModel===ye&&(i(),be=!1,se("Stream is complete"))}function C(e){e.sender===ye&&(ge.getIsTextTrack(me)&&(be=!1),e.error&&e.serviceLocation&&!Ie&&v(e.request))}function O(){E(!0)}function w(e){e.sender.getStreamProcessor()===Le&&(be=!1,f(0))}function L(e){e.streamProcessor===Le&&(v(e.request),be=!1,f(0))}function F(e){e.sender.getStreamProcessor()===Le&&i()}function U(e){e.sender.getStreamProcessor()===Le&&(ye.removeExecutedRequestsBeforeTime(e.to),e.hasEnoughSpaceToAppend&&!Be.getIsBufferingCompleted()&&Ie&&r())}function B(e){e.sender.getStreamProcessor()!==Le||e.state!==d["default"].BUFFER_EMPTY||Pe.isSeeking()||(se("Buffer is empty! Stalling!"),re(new Date,a.PlayListTrace.REBUFFERING_REASON))}function j(e){e.sender.getStreamProcessor()===Le&&i()}function H(){ye.abortRequests(),i()}function q(e){e.sender.getStreamProcessor()===Le&&p(e.index)}function Y(){Ie&&r()}function G(e){Oe=e.seekTime,Z(0),Ie&&r();var t=ce.getCurrentManifestUpdate(le.getMetricsFor("stream")),n=Te.DVRWindow?Te.DVRWindow.end-Pe.getTime():NaN;le.updateManifestUpdateInfo(t,{latency:n})}function V(e){Ae&&(Ae.playbackspeed=e.playbackRate.toString())}function z(e){if(!e.error){var t=Te.mediaInfo.streamInfo.manifestInfo.DVRWindowSize/2,n=e.liveEdge-Pe.computeLiveDelay(Te.fragmentDuration,t),i=ce.getCurrentManifestUpdate(le.getMetricsFor("stream")),a=Pe.getLiveStartTime(),o=de.getFragmentRequestForTime(Le,Te,n,{ignoreIsFinished:!0});Oe=a,(isNaN(a)||o.startTime>a)&&(Pe.setLiveStartTime(o.startTime),Oe=o.startTime),le.updateManifestUpdateInfo(i,{currentTime:Oe,presentationStartTime:e.liveEdge,latency:e.liveEdge-Oe,clientTimeOffset:pe.getClientTimeOffset()}),_e=!0,Ie&&r()}}function W(){return Oe}function Q(e){Oe=e}function X(){return ye}function Z(e){Ce=e}function J(){return Ce}function $(){return Le}function ee(){return ke.getBufferTarget(Le,me,xe.isVideoTrackPresent())}function te(e){Re=e}function ne(e,t){re(e,t),Re=null}function re(e,t){if(Re&&Me===!1){var n=Ae.start,r=e.getTime()-n.getTime();Ae.duration=r,Ae.stopreason=t,Re.trace.push(Ae),Me=!0}}function ie(){Re&&Me===!0&&Te&&(Me=!1,Ae=new a.PlayListTrace,Ae.representationid=Te.id,Ae.start=new Date,Ae.mstart=1e3*Pe.getTime(),Ae.playbackspeed=Pe.getPlaybackRate().toString())}function ae(){ue.off(x["default"].LIVE_EDGE_SEARCH_COMPLETED,z,this),ue.off(x["default"].DATA_UPDATE_STARTED,F,this),ue.off(x["default"].DATA_UPDATE_COMPLETED,S,this),ue.off(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.off(x["default"].QUALITY_CHANGE_REQUESTED,_,this),ue.off(x["default"].FRAGMENT_LOADING_COMPLETED,C,this),ue.off(x["default"].STREAM_COMPLETED,M,this),ue.off(x["default"].STREAM_INITIALIZED,R,this),ue.off(x["default"].QUOTA_EXCEEDED,j,this),ue.off(x["default"].BYTES_APPENDED,w,this),ue.off(x["default"].BUFFER_CLEARED,U,this),ue.off(x["default"].INIT_REQUESTED,c,this),ue.off(x["default"].PLAYBACK_RATE_CHANGED,V,this),ue.off(x["default"].PLAYBACK_SEEKING,G,this),ue.off(x["default"].PLAYBACK_STARTED,Y,this),ue.off(x["default"].PLAYBACK_TIME_UPDATED,O,this),ue.off(x["default"].URL_RESOLUTION_FAILED,H,this),ue.off(x["default"].FRAGMENT_LOADING_ABANDONED,L,this),ge.getIsTextTrack(me)&&ue.off(x["default"].TIMED_TEXT_REQUESTED,q,this),i(),E(!1),be=!1,Ce=0,Oe=NaN,Pe=null,Re=null}var oe=this.context,se=(0,K["default"])(oe).getInstance().log,ue=(0,N["default"])(oe).getInstance(),le=e.metricsModel,fe=e.manifestModel,de=e.adapter,ce=e.dashMetrics,ge=e.dashManifestModel,pe=e.timelineConverter,he=e.mediaPlayerModel,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0,Fe=void 0,Ue=void 0,Be=void 0,ke=void 0,je=void 0,Ke=void 0,He=void 0,qe=void 0,Ye=void 0;return ve={initialize:n,getStreamProcessor:$,getSeekTarget:W,setSeekTarget:Q,getFragmentModel:X,setTimeToLoadDelay:Z,getTimeToLoadDelay:J,replaceRequest:v,start:r,stop:i,reset:ae,setPlayList:te,getBufferTarget:ee,finalisePlayList:ne},t(),ve}Object.defineProperty(t,"__esModule",{value:!0});var a=n(70),o=n(9),s=r(o),u=n(10),l=r(u),f=n(18),d=r(f),c=n(13),g=r(c),p=n(154),h=r(p),v=n(155),m=r(v),_=n(17),y=r(_),E=n(14),T=r(E),S=n(30),I=r(S),R=n(16),A=r(R),M=n(15),b=r(M),C=n(28),D=r(C),O=n(51),P=r(O),w=n(3),N=r(w),L=n(2),x=r(L),F=n(1),U=r(F),B=n(20),k=r(B),j=n(4),K=r(j);i.__dashjs_factory_name="ScheduleController",t["default"]=U["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){_=!1,y=null,E=null,T=null,S=null,I=null,p.on(u["default"].DATA_UPDATE_COMPLETED,d,this),p.on(u["default"].INIT_FRAGMENT_LOADED,c,this)}function n(e,t,n){T=e,s(t),S=n,I=S.getRepresentationController()}function r(e){try{E=h.createSourceBuffer(y,e),_||(E.hasOwnProperty("initialize")&&E.initialize(T,this),_=!0)}catch(t){v.mediaSourceError("Error creating "+T+" source buffer.")}return E}function i(){return E}function a(e){E=e}function s(e){y=e}function l(){return S}function f(e){p.off(u["default"].DATA_UPDATE_COMPLETED,d,this),p.off(u["default"].INIT_FRAGMENT_LOADED,c,this),e||(h.abort(y,E),h.removeSourceBuffer(y,E))}function d(e){e.sender.getStreamProcessor()===S&&p.trigger(u["default"].TIMED_TEXT_REQUESTED,{index:0,sender:e.sender})}function c(e){e.fragmentModel===S.getFragmentModel()&&e.chunk.bytes&&h.append(E,e.chunk)}var g=this.context,p=(0,o["default"])(g).getInstance(),h=e.sourceBufferController,v=e.errHandler,m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0,I=void 0;return m={initialize:n,createBuffer:r,getBuffer:i,setBuffer:a,getStreamProcessor:l,setMediaSource:s,reset:f},t(),m}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="TextController",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){N=t,O=0,P=!1,w=!1,L={"urn:mpeg:dash:utc:http-head:2014":T,"urn:mpeg:dash:utc:http-xsdate:2014":E.bind(null,c),"urn:mpeg:dash:utc:http-iso:2014":E.bind(null,g),"urn:mpeg:dash:utc:direct:2014":y,"urn:mpeg:dash:utc:http-head:2012":T,"urn:mpeg:dash:utc:http-xsdate:2012":E.bind(null,c),"urn:mpeg:dash:utc:http-iso:2012":E.bind(null,g),"urn:mpeg:dash:utc:direct:2012":y,"urn:mpeg:dash:utc:http-ntp:2014":_,"urn:mpeg:dash:utc:ntp:2014":_,"urn:mpeg:dash:utc:sntp:2014":_},i()||(R(e),a(!0))}function t(e){e&&(e.metricsModel&&(x=e.metricsModel),e.dashMetrics&&(F=e.dashMetrics))}function n(){return l()}function r(e){P=e}function i(){return P}function a(e){w=e}function s(e){O=e}function l(){return O}function d(e){var t,n,r=60,i=60,a=1e3,o=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/,s=o.exec(e);return t=Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10),s[6]&&(parseInt(s[6],10)||0),s[7]&&parseFloat(s[7])*a||0),s[9]&&s[10]&&(n=parseInt(s[9],10)*i+parseInt(s[10],10),t+=("+"===s[8]?-1:1)*n*r*a),new Date(t).getTime()}function c(e){var t=Date.parse(e);return isNaN(t)&&(t=d(e)),t}function g(e){return Date.parse(e)}function m(e){return Date.parse(e)}function _(e,t,n){n()}function y(e,t,n){var r=c(e);return isNaN(r)?void n():void t(r)}function E(e,t,n,r,i){var a,o,s=!1,u=new XMLHttpRequest,l=i?"HEAD":"GET",f=t.match(/\S+/g);t=f.shift(),a=function(){s||(s=!0,f.length?E(e,f.join(" "),n,r,i):r())},o=function(){var t,r;200===u.status&&(t=i?u.getResponseHeader("Date"):u.response,r=e(t),isNaN(r)||(n(r),s=!0))},u.open(l,t),u.timeout=v||0,u.onload=o,u.onloadend=a,u.send()}function T(e,t,n){E(m,e,t,n,!0)}function S(){var e=x.getReadOnlyMetricsFor("stream"),t=F.getLatestMPDRequestHeaderValueByID(e,"Date"),n=null!==t?new Date(t).getTime():Number.NaN;isNaN(n)?I(!0):(s(n-(new Date).getTime()),I(!1,n/1e3,O))}function I(e,t,n){r(!1),C.trigger(f["default"].TIME_SYNCHRONIZATION_COMPLETED,{time:t,offset:n,error:e?new o["default"](h):null})}function R(e,t){var n=t||0,i=e[n],a=function(e,t){var n=!e||!t;n&&N?S():I(n,e,t)};r(!0),i?L.hasOwnProperty(i.schemeIdUri)?L[i.schemeIdUri](i.value,function(e){var t=(new Date).getTime(),n=e-t;s(n),b("Local time: "+new Date(t)),b("Server time: "+new Date(e)),b("Difference (ms): "+n),a(e,n)},function(){R(e,n+1)}):R(e,n+1):(s(0),a())}function A(){a(!1),r(!1)}var M=this.context,b=(0,p["default"])(M).getInstance().log,C=(0,u["default"])(M).getInstance(),D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0;return D={initialize:e,getOffsetToDeviceTimeMs:n,setConfig:t,reset:A}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g),h=1,v=5e3;i.__dashjs_factory_name="TimeSyncController";var m=c["default"].getSingletonFactory(i);m.TIME_SYNC_FAILED_ERROR_CODE=h,m.HTTP_TIMEOUT_MS=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){M.on(f["default"].XLINK_ELEMENT_LOADED,l,C),N=(0,o["default"])(A).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){D=e}function r(e){O=e}function i(e){var t;w=new p["default"](D,"",(!0)),P=e,t=c(P.Period_asArray,P,y,m),s(t,y,m)}function a(){M.off(f["default"].XLINK_ELEMENT_LOADED,l,C),N&&(N.reset(),N=null)}function s(e,t,n){var r,i,a,o={};for(o.elements=e,o.type=t,o.resolveType=n,0===o.elements.length&&d(o),a=0;a<o.elements.length;a++)r=o.elements[a],i=b.isHTTPURL(r.url)?r.url:r.originalContent.BaseURL+r.url,N.load(i,r,o)}function l(e){var t,n,r,i="<response>",a="</response>",o="";t=e.element,n=e.resolveObject,t.resolvedContent&&(r=t.resolvedContent.indexOf(">")+1,o=t.resolvedContent.substr(0,r)+i+t.resolvedContent.substr(r)+a,t.resolvedContent=w.xml_str2json(o)),I(n)&&d(n)}function d(e){var t,n,r=[];if(g(e),e.resolveType===_&&M.trigger(f["default"].XLINK_READY,{manifest:P}),e.resolveType===m)switch(e.type){case y:for(t=0;t<P[y+"_asArray"].length;t++)n=P[y+"_asArray"][t],n.hasOwnProperty(E+"_asArray")&&(r=r.concat(c(n[E+"_asArray"],n,E,m))),n.hasOwnProperty(T+"_asArray")&&(r=r.concat(c(n[T+"_asArray"],n,T,m)));s(r,E,m);break;case E:M.trigger(f["default"].XLINK_READY,{manifest:P})}}function c(e,t,n,r){var i,a,o,s=[];for(a=e.length-1;a>=0;a--)i=e[a],i.hasOwnProperty("xlink:href")&&i["xlink:href"]===S&&e.splice(a,1);for(a=0;a<e.length;a++)i=e[a],i.hasOwnProperty("xlink:href")&&i.hasOwnProperty("xlink:actuate")&&i["xlink:actuate"]===r&&(o=h(i["xlink:href"],t,n,a,r,i),s.push(o));return s}function g(e){var t,n,r,i,a,o,s=[];for(i=e.elements.length-1;i>=0;i--){if(t=e.elements[i],n=t.type+"_asArray",!t.resolvedContent||R())delete t.originalContent["xlink:actuate"],
35
+ delete t.originalContent["xlink:href"],s.push(t.originalContent);else if(t.resolvedContent)for(a=0;a<t.resolvedContent[n].length;a++)r=t.resolvedContent[n][a],s.push(r);for(t.parentElement[n].splice(t.index,1),o=0;o<s.length;o++)t.parentElement[n].splice(t.index+o,0,s[o]);s=[]}e.elements.length>0&&O.run(P)}function h(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}function I(e){var t,n;for(t=0;t<e.elements.length;t++)if(n=e.elements[t],n.resolved===!1)return!1;return!0}function R(){return!1}var A=this.context,M=(0,u["default"])(A).getInstance(),b=(0,v["default"])(A).getInstance(),C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0;return C={resolveManifestOnLoad:i,setMatchers:n,setIron:r,reset:a},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(103),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=n(35),p=r(g),h=n(22),v=r(h),m="onLoad",_="onActuate",y="Period",E="AdaptationSet",T="EventStream",S="urn:mpeg:dash:resolve-to-zero:2013";i.__dashjs_factory_name="XlinkController",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return a=(0,o["default"])(r).getInstance({eventBus:e.eventBus,metricsModel:e.metricsModel}),(0,f["default"])(r).create(e)}function t(){return(0,p["default"])(r).getInstance()}function n(){return(0,c["default"])(r).getInstance()}var r=this.context,i=void 0,a=void 0;return i={createMetricsReporting:e,getReportingFactory:t,getMetricsHandlerFactory:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(124),o=r(a),s=n(29),u=r(s),l=n(114),f=r(l),d=n(60),c=r(d),g=n(61),p=r(g),h=n(1),v=r(h);i.__dashjs_factory_name="MetricsReporting";var m=v["default"].getClassFactory(i);m.events=u["default"],t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t){if(!t.error){var n=Object.keys(i),r=(0,u["default"])(a).getInstance({dashManifestModel:e.dashManifestModel}).getMetrics(t.manifest);r.forEach(function(t){var r=JSON.stringify(t);if(i.hasOwnProperty(r))n.splice(r,1);else try{var s=(0,o["default"])(a).create(e);s.initialize(t),i[r]=s}catch(u){}}),n.forEach(function(e){i[e].reset(),delete i[e]}),s.trigger(c["default"].METRICS_INITIALISATION_COMPLETE)}}function n(){Object.keys(i).forEach(function(e){i[e].reset()}),i={}}function r(){s.on(p["default"].MANIFEST_UPDATED,t),s.on(p["default"].STREAM_TEARDOWN_COMPLETE,n)}var i={},a=this.context,s=e.eventBus;return r(),{}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(115),o=r(a),s=n(125),u=r(s),l=n(1),f=r(l),d=n(29),c=r(d),g=n(2),p=r(g);i.__dashjs_factory_name="MetricsCollectionController",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t){try{a=(0,u["default"])(s).create({mediaElement:e.mediaElement}),a.initialize(t.Range),i=(0,f["default"])(s).create({log:e.log}),i.initialize(t.Reporting,a),r=(0,c["default"])(s).create({log:e.log,eventBus:e.eventBus}),r.initialize(t.metrics,i)}catch(o){throw n(),o}}function n(){r&&r.reset(),i&&i.reset(),a&&a.reset()}var r=void 0,i=void 0,a=void 0,o=void 0,s=this.context;return o={initialize:t,reset:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(117),u=r(s),l=n(118),f=r(l),d=n(116),c=r(d);i.__dashjs_factory_name="MetricsController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){i.forEach(function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)})}function n(e,n){e.split(",").forEach(function(e,t,r){var a;if(e.indexOf("(")!==-1&&e.indexOf(")")===-1){var o=r[t+1];o&&o.indexOf("(")===-1&&o.indexOf(")")!==-1&&(e+=","+o,delete r[t+1])}a=l.create(e,n),a&&i.push(a)}),u.on(f["default"].METRIC_ADDED,t,a),u.on(f["default"].METRIC_UPDATED,t,a)}function r(){u.off(f["default"].METRIC_ADDED,t,a),u.off(f["default"].METRIC_UPDATED,t,a),i.forEach(function(e){return e.reset()}),i=[]}var i=[],a=void 0,s=this.context,u=e.eventBus,l=(0,o["default"])(s).getInstance({log:e.log,eventBus:e.eventBus});return a={initialize:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(60),o=r(a),s=n(1),u=r(s),l=n(38),f=r(l);i.__dashjs_factory_name="MetricsHandlersController",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){e&&e.length&&(e.forEach(function(e){var t=e.starttime,n=t+e.duration;l.add(t,n)}),a=!!e[0]._useWallClockTime)}function n(){l.clear()}function r(){l=(0,u["default"])(o).create()}function i(){var e,t=l.length;if(!t)return!0;e=a?(new Date).getTime()/1e3:f.currentTime;for(var n=0;n<t;n+=1){var r=l.start(n),i=l.end(n);if(r<=e&&e<i)return!0}return!1}var a=!1,o=this.context,s=void 0,l=void 0,f=e.mediaElement;return s={initialize:t,reset:n,isEnabled:i},r(),s}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(67),u=r(s);i.__dashjs_factory_name="RangeController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){e.some(function(e){var n=o.create(e,t);if(n)return i.push(n),!0})}function n(){i.forEach(function(e){return e.reset()}),i=[]}function r(e,t){i.forEach(function(n){return n.report(e,t)})}var i=[],a=void 0,o=(0,u["default"])(this.context).getInstance({log:e.log});return a={initialize:t,reset:n,report:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(61),u=r(s);i.__dashjs_factory_name="ReportingController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){try{return Object.keys(p).map(function(e){return p[e]}).reduce(function(e,t){return e.level<t.level?e:t})}catch(e){return}}function t(){var t=e();t&&d!==t.t&&(d=t.t,o.report(l,t))}function n(e,n,r){n&&(s=g.validateN(r),o=n,l=g.reconstructFullMetricName(e,r),f=setInterval(t,s))}function r(){clearInterval(f),f=null,s=0,o=null,d=null}function i(e,t,n){"BufferLevel"===e&&(p[n]=t)}var a=void 0,o=void 0,s=void 0,l=void 0,f=void 0,d=void 0,c=this.context,g=(0,u["default"])(c).getInstance(),p=[];return a={initialize:n,reset:r,handleNewMetric:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(62),u=r(s);i.__dashjs_factory_name="BufferLevelHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){s.off(u["default"].METRICS_INITIALISATION_COMPLETE,t,this),s.trigger(u["default"].BECAME_REPORTING_PLAYER)}function n(e,n){n&&(o=n,s.on(u["default"].METRICS_INITIALISATION_COMPLETE,t,this))}function r(){o=null}function i(e,t){"DVBErrors"===e&&o&&o.report(e,t)}var a=void 0,o=void 0,s=e.eventBus;return a={initialize:n,reset:r,handleNewMetric:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(29),u=r(s);t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){i=e,a=t}function t(){a=null,i=void 0}function n(e,t){e===i&&a&&a.report(i,t)}var r=void 0,i=void 0,a=void 0;return r={initialize:e,reset:t,handleNewMetric:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="GenericMetricHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){var e=d;e.length&&a&&a.report(l,e),d=[]}function t(t,n,r,i){n&&(o=c.validateN(r),a=n,i&&i.length&&(s=i),l=c.reconstructFullMetricName(t,r,i),f=setInterval(e,o))}function n(){clearInterval(f),f=null,o=null,s=null,d=[],a=null}function r(e,t){"HttpList"===e&&(s&&s!==t.type||d.push(t))}var i=void 0,a=void 0,o=void 0,s=void 0,l=void 0,f=void 0,d=[],c=(0,u["default"])(this.context).getInstance();return i={initialize:t,reset:n,handleNewMetric:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(62),u=r(s);i.__dashjs_factory_name="HttpListHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){var r=new XMLHttpRequest,i=function(){var e=v.indexOf(r);e!==-1&&(v.splice(e,1),r.status>=200&&r.status<300?t&&t():n&&n())};v.push(r);try{r.open("GET",e),r.onloadend=i,r.onerror=i,r.send()}catch(a){r.onerror()}}function t(t,n){Array.isArray(n)||(n=[n]),d&&p.isEnabled()&&n.forEach(function(n){var r=o.serialise(n);l&&"DVBErrors"!==t&&(r="metricname="+t+"&"+r),r=g+"?"+r,e(r,null,function(){d=!1})})}function n(e,t){var n;if(p=t,g=e["dvb:reportingUrl"],!g)throw new Error("required parameter missing (dvb:reportingUrl)");c||(n=e["dvb:probability"]||e["dvb:priority"]||0,n&&(1e3===n||n/1e3>=s.random())&&(d=!0),c=!0)}function r(){h||(v.forEach(function(e){return e.abort()}),v=[]),c=!1,d=!1,g=null,p=null}var i=void 0,a=this.context,o=(0,u["default"])(a).getInstance(),s=(0,f["default"])(a).getInstance(),l=!0,d=!1,c=!1,g=null,p=null,h=!0,v=[];return i={report:t,initialize:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(126),u=r(s),l=n(127),f=r(l);i.__dashjs_factory_name="DVBReporting",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t=new o["default"];if(m){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.mpdurl||(t.mpdurl=m.originalUrl||m.url),t.terror||(t.terror=new Date),v.addDVBErrors(t)}}function n(e){e.error||(m=e.manifest)}function r(e){t({errorcode:o["default"].BASE_URL_CHANGED,servicelocation:e.entry})}function i(){t({errorcode:o["default"].BECAME_REPORTER})}function a(e){(0===e.responsecode||e.responsecode>=400||e.responsecode<100||e.responsecode>=600)&&t({errorcode:e.responsecode||o["default"].CONNECTION_ERROR,url:e.url,terror:e.tresponse,servicelocation:e._serviceLocation})}function s(e){switch(e.metric){case"HttpList":a(e.value)}}function l(e){var n,r=e.error?e.error.code:0;switch(r){case MediaError.MEDIA_ERR_NETWORK:n=o["default"].CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:n=o["default"].CORRUPT_MEDIA_OTHER;break;default:return}t({errorcode:n})}function d(){h.on(u["default"].MANIFEST_UPDATED,n,p),h.on(u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,r,p),h.on(f["default"].METRIC_ADDED,s,p),h.on(f["default"].METRIC_UPDATED,s,p),h.on(f["default"].PLAYBACK_ERROR,l,p),h.on(c["default"].BECAME_REPORTING_PLAYER,i,p)}function g(){h.off(u["default"].MANIFEST_UPDATED,n,p),h.off(u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,r,p),h.off(f["default"].METRIC_ADDED,s,p),h.off(f["default"].METRIC_UPDATED,s,p),h.off(f["default"].PLAYBACK_ERROR,l,p),h.off(c["default"].BECAME_REPORTING_PLAYER,i,p)}var p=void 0,h=e.eventBus,v=e.metricsModel,m=void 0;return p={initialise:d,reset:g},d(),p}Object.defineProperty(t,"__esModule",{value:!0});var a=n(128),o=r(a),s=n(2),u=r(s),l=n(38),f=r(l),d=n(29),c=r(d),g=n(1),p=r(g);i.__dashjs_factory_name="DVBErrorsTranslator",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t,n){var r,a,o=i.getMpd(e),s=0;return t?s=o.availabilityStartTime.getTime()/1e3:(r=this.getRegularPeriods(e,o),r.length&&(s=r[0].start)),a=s,n&&n.hasOwnProperty("starttime")&&(a+=n.starttime),a}function n(e){var n=[];return e.Metrics_asArray&&e.Metrics_asArray.forEach(function(r){var a=new o["default"],s=i.getIsDynamic(e);r.hasOwnProperty("metrics")&&(a.metrics=r.metrics,r.Range_asArray&&r.Range_asArray.forEach(function(n){var r=new u["default"];r.starttime=t(e,s,n),n.hasOwnProperty("duration")?r.duration=n.duration:r.duration=i.getDuration(e),r._useWallClockTime=s,a.Range.push(r)}),r.Reporting_asArray&&(r.Reporting_asArray.forEach(function(e){var t=new f["default"];if(e.hasOwnProperty("schemeIdUri")){t.schemeIdUri=e.schemeIdUri;for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);a.Reporting.push(t)}}),n.push(a)))}),n}var r=void 0,i=e.dashManifestModel;return r={getMetrics:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(129),o=r(a),s=n(130),u=r(s),l=n(131),f=r(l),d=n(1),c=r(d);i.__dashjs_factory_name="ManifestParsing",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(t){var n,r,i=[],a=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(r=t[n],void 0!==r&&null!==r||(r=""),Array.isArray(r)){if(!r.length)continue;a=[],r.forEach(function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);a.push(n?t:e(t))}),r=encodeURIComponent(a.join(","))}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));i.push(n+"="+r)}return i.join("&")}return{serialise:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="MetricSerialiser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){n&&(o||(o=new r(a)),n.getRandomValues(o),s=0)}function t(t,r){var a;return t||(t=0),r||(r=1),n?(s===o.length&&e(),a=o[s]/i,s+=1):a=Math.random(),a*(r-t)+t}var n=window.crypto||window.msCrypto,r=Uint32Array,i=Math.pow(2,8*r.BYTES_PER_ELEMENT)-1,a=10,o=void 0,s=void 0,u=void 0;return u={random:t},e(),u}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RNG",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.metrics="",this.Range=[],this.Reporting=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.schemeIdUri="",this.value=""};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){function e(){d=new g}function t(e,t,n){var r=h.getBaseURLsFromElement(n);e[t]?v.areSimpleEquivalent(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=c):e[t]=new g(r)}function n(e){var n=h.getBaseURLsFromElement(e);v.areSimpleEquivalent(n,d.data.baseUrls)||(d.data.baseUrls=n,d.data.selectedIdx=c),e.Period_asArray&&e.Period_asArray.forEach(function(e,n){t(d.children,n,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach(function(e,r){t(d.children[n].children,r,e),e.Representation_asArray&&e.Representation_asArray.sort(h.getRepresentationSortFunction()).forEach(function(e,i){t(d.children[n].children[r].children,i,e)})})})}function r(e,t){var n=t||d;e(n.data),n.children&&n.children.forEach(function(t){return r(e,t)})}function i(e){r(function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=c)})}function a(e){n(e)}function o(){d=new g}function u(e){var t=d,n=[t.data];return e.forEach(function(e){t=t.children[e],t&&n.push(t.data)}),n.filter(function(e){return e.baseUrls.length})}var f=void 0,d=void 0,p=this.context,h=(0,s["default"])(p).getInstance(),v=(0,l["default"])(p).getInstance();return f={reset:o,update:a,getForPath:u,invalidateSelectedIndexes:i},e(),f}Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),s=r(o),u=n(162),l=r(u),f=n(1),d=r(f),c=NaN,g=function p(e,t){i(this,p),this.data={baseUrls:e||null,selectedIdx:t||c},this.children=[]};a.__dashjs_factory_name="BaseURLTreeModel",t["default"]=d["default"].getClassFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_SYSTEM_ACCESS_COMPLETE="keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){O=R.getKeySystems(),P=[],x=!1,F="temporary",U="",l["default"].extend(m["default"].events)}function n(e,t,n){if(!x){var r;t||n||(r=M.getStreamsInfo(e)[0]),w=t||(r?M.getMediaInfoForType(e,r,"audio"):null),N=n||(r?M.getMediaInfoForType(e,r,"video"):null);var i=N?N:w,a=R.getSupportedKeySystemsFromContentProtection(i.contentProtection);a&&a.length>0&&E(a,!0),x=!0}}function r(e){var t=s["default"].getPSSHForKeySystem(B,e);if(t){for(var n=A.getAllInitData(),r=0;r<n.length;r++)if(R.initDataEquals(t,n[r]))return void C("DRM: Ignoring initData because we have already seen it!");try{A.createKeySession(t,F)}catch(i){b.trigger(l["default"].KEY_SESSION_CREATED,{data:null,error:"Error creating key session! "+i.message})}}else b.trigger(l["default"].KEY_SESSION_CREATED,{data:null,error:"Selected key system is "+B.systemString+". needkey/encrypted event contains no initData corresponding to that key system!"})}function i(e){A.loadKeySession(e)}function o(e){A.removeKeySession(e)}function u(e){A.closeKeySession(e)}function f(e){A.setServerCertificate(e)}function c(e){e?(A.setMediaElement(e),b.on(l["default"].NEED_KEY,I,this),b.on(l["default"].INTERNAL_KEY_MESSAGE,S,this)):null===e&&(A.setMediaElement(e),b.off(l["default"].NEED_KEY,I,this),b.off(l["default"].INTERNAL_KEY_MESSAGE,S,this))}function p(e){F=e}function h(e){U=e}function v(e){L=e}function _(){c(null),B=void 0,A&&(A.reset(),A=null)}function y(e){var t=null,n=e.systemString;return L&&(t=n in L?L[n]:null),t}function E(e,t){var n=this,i=[],a=[];N&&a.push(new d["default"](N.codec,U)),w&&i.push(new d["default"](w.codec,U));var o,s=new g["default"](i,a,"optional","temporary"===F?"optional":"required",[F]),u=[];if(B){for(o=0;o<e.length;o++)if(B===e[o].ks){var f=function(){u.push({ks:e[o].ks,configs:[s]});var i=function a(i){b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,a,n),i.error?t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{error:"DRM: KeySystem Access Denied! -- "+i.error}):(C("DRM: KeySystem Access Granted"),b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:i.data}),r(e[o].initData))};return b.on(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,i,n),A.requestKeySystemAccess(u),"break"}();if("break"===f)break}}else if(void 0===B){B=null,P.push(e);for(var c=0;c<e.length;c++)u.push({ks:e[c].ks,configs:[s]});var p,h=function m(e){b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,m,n),e.error?(B=void 0,b.off(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,v,n),t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:null,error:"DRM: KeySystem Access Denied! -- "+e.error})):(p=e.data,C("DRM: KeySystem Access Granted ("+p.keySystem.systemString+")! Selecting key system..."),A.selectKeySystem(p))},v=function _(e){if(b.off(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,_,n),b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,h,n),e.error)B=void 0,t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:null,error:"DRM: Error selecting key system! -- "+e.error});else{B=A.getKeySystem(),b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:p});for(var i=0;i<P.length;i++)for(o=0;o<P[i].length;o++)if(B===P[i][o].ks){r(P[i][o].initData);break}}};b.on(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,v,n),b.on(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,h,n),A.requestKeySystemAccess(u)}else P.push(e)}function T(e,t){b.trigger(l["default"].LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function S(e){if(C("DRM: onKeyMessage"),e.error)return void C(e.error);var t=e.data;b.trigger(l["default"].KEY_MESSAGE,{data:t});var n=t.messageType?t.messageType:"license-request",r=t.message,i=t.sessionToken,o=y(B),u=B.systemString,f=R.getLicenseServer(B,o,n),d={sessionToken:i,messageType:n};if(!f)return C("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+i.getSessionID()),void T(d);if(R.isClearKey(B)){var c=R.processClearKeyLicenseRequest(o,r);if(c)return C("DRM: ClearKey license request handled by application!"),T(d),void A.updateKeySession(i,c)}var g=new XMLHttpRequest,p=null;if(o)if(o.serverURL){var h=o.serverURL;"string"==typeof h&&""!==h?p=h:"object"===("undefined"==typeof h?"undefined":a(h))&&h.hasOwnProperty(n)&&(p=h[n])}else o.laURL&&""!==o.laURL&&(p=o.laURL);else p=B.getLicenseServerURLFromInitData(s["default"].getPSSHData(i.initData)),p||(p=e.data.laURL);if(p=f.getServerURLFromMessage(p,r,n),!p)return void T(d,"DRM: No license server URL specified!");g.open(f.getHTTPMethod(n),p,!0),g.responseType=f.getResponseType(u,n),g.onload=function(){200==this.status?(T(d),A.updateKeySession(i,f.getLicenseMessage(this.response,u,n))):T(d,"DRM: "+u+' update, XHR status is "'+this.statusText+'" ('+this.status+"), expected to be 200. readyState is "+this.readyState+". Response is "+(this.response?f.getErrorResponse(this.response,u,n):"NONE"))},g.onabort=function(){T(d,"DRM: "+u+' update, XHR aborted. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)},g.onerror=function(){T(d,"DRM: "+u+' update, XHR error. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)};var v=function(e){var t;if(e)for(t in e)"authorization"===t.toLowerCase()&&(g.withCredentials=!0),g.setRequestHeader(t,e[t])};o&&v(o.httpRequestHeaders),v(B.getRequestHeadersFromMessage(r)),o&&o.withCredentials&&(g.withCredentials=!0),g.send(B.getLicenseRequestFromMessage(r))}function I(e){if(C("DRM: onNeedKey"),"cenc"!==e.key.initDataType)return void C("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType);var t=e.key.initData;ArrayBuffer.isView(t)&&(t=t.buffer),C("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(t)));var n=R.getSupportedKeySystems(t,L);return 0===n.length?void C("DRM: Received needkey event with initData, but we don't support any of the key systems!"):void E(n,!1)}var R=e.protectionKeyController,A=e.protectionModel,M=e.adapter,b=e.eventBus,C=e.log,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0;return D={initialize:n,createKeySession:r,loadKeySession:i,removeKeySession:o,closeKeySession:u,setServerCertificate:f,setMediaElement:c,setSessionType:p,setRobustnessLevel:h,setProtectionData:v,reset:_},t(),D}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),s=r(o),u=n(2),l=r(u),f=n(145),d=r(f),c=n(44),g=r(c),p=n(1),h=r(p),v=n(63),m=r(v);i.__dashjs_factory_name="ProtectionController",t["default"]=h["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=null;if(e){for(var r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[],a=0;a<r.kids.length;a++){var s=r.kids[a],l=e.clearkeys.hasOwnProperty(s)?e.clearkeys[s]:null;if(!l)throw new Error("DRM: ClearKey keyID ("+s+") is not known!");i.push(new o["default"](s,l))}n=new u["default"](i)}return n}function t(e){return f["default"].parseInitDataFromContentProtection(e)}function n(){return null}function r(e){return new Uint8Array(e)}function i(){return null}var a=void 0;return a={uuid:g,schemeIdURI:h,systemString:p,getInitData:t,getRequestHeadersFromMessage:n,getLicenseRequestFromMessage:r,getLicenseServerURLFromInitData:i,getClearKeysFromProtectionData:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),o=r(a),s=n(64),u=r(s),l=n(21),f=r(l),d=n(1),c=r(d),g="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",p="org.w3.clearkey",h="urn:uuid:"+g;i.__dashjs_factory_name="KeySystemClearKey",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t,n,r={},i=new DOMParser,a="utf16"===s?new Uint16Array(e):new Uint8Array(e);t=String.fromCharCode.apply(null,a),n=i.parseFromString(t,"application/xml");for(var o=n.getElementsByTagName("name"),u=n.getElementsByTagName("value"),l=0;l<o.length;l++)r[o[l].childNodes[0].nodeValue]=u[l].childNodes[0].nodeValue;return r.hasOwnProperty("Content")&&(r["Content-Type"]=r.Content,delete r.Content),r}function t(e){var t,n,r=null,i=new DOMParser,a="utf16"===s?new Uint16Array(e):new Uint8Array(e);if(t=String.fromCharCode.apply(null,a),n=i.parseFromString(t,"application/xml"),n.getElementsByTagName("Challenge")[0]){var o=n.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;o&&(r=c["default"].decode(o))}return r}function n(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),r=6,i=new DOMParser,a=0;a<n;a++){var o=t.getUint16(r,!0);r+=2;var s=t.getUint16(r,!0);if(r+=2,1===o){var u=e.slice(r,r+s),l=String.fromCharCode.apply(null,new Uint16Array(u)),f=i.parseFromString(l,"application/xml");if(f.getElementsByTagName("LA_URL")[0]){var d=f.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(d)return d}if(f.getElementsByTagName("LUI_URL")[0]){var c=f.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(c)return c}}else r+=s}return null}function r(e){var t,n,r,i,a,s=new Uint8Array([112,115,115,104,0,0,0,0]),u=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=0,f=null;if("pssh"in e)return o["default"].parseInitDataFromContentProtection(e);if("pro"in e)f=c["default"].decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;f=c["default"].decodeArray(e.prheader.__text)}return t=f.length,n=4+s.length+u.length+4+t,r=new ArrayBuffer(n),i=new Uint8Array(r),a=new DataView(r),a.setUint32(l,n),l+=4,i.set(s,l),l+=s.length,i.set(u,l),l+=u.length,a.setUint32(l,t),l+=4,i.set(f,l),l+=t,i.buffer}function i(e){if("utf8"!==e&&"utf16"!==e)throw new u["default"]("Illegal PlayReady message format! -- "+e);s=e}var a=void 0,s="utf16";return a={uuid:g,schemeIdURI:h,systemString:p,getInitData:r,getRequestHeadersFromMessage:e,getLicenseRequestFromMessage:t,getLicenseServerURLFromInitData:n,setPlayReadyMessageFormat:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(6),u=r(s),l=n(1),f=r(l),d=n(34),c=r(d),g="9a04f079-9840-4286-ab92-e65be0885f95",p="com.microsoft.playready",h="urn:uuid:"+g;i.__dashjs_factory_name="KeySystemPlayReady",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return o["default"].parseInitDataFromContentProtection(e)}function t(){return null}function n(e){return new Uint8Array(e)}function r(){return null}var i=void 0;return i={uuid:l,schemeIdURI:d,systemString:f,getInitData:e,getRequestHeadersFromMessage:t,getLicenseRequestFromMessage:n,getLicenseServerURLFromInitData:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(1),u=r(s),l="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",f="com.widevine.alpha",d="urn:uuid:"+l;i.__dashjs_factory_name="KeySystemWidevine",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){O=null,P=null,L=[],x=[],w=(0,o["default"])(A).getInstance(),N=(0,E["default"])(A).getInstance(),U=S()}function n(){O&&R();for(var e=0;e<x.length;e++)h(x[e]);M.trigger(_["default"].TEARDOWN_COMPLETE)}function r(){return P}function i(){for(var e=[],t=0;t<L.length;t++)e.push(L[t].initData);for(var t=0;t<x.length;t++)e.push(x[t].initData);return e}function a(e){var t=O;t||(t=document.createElement("video"));for(var n=!1,r=0;r<e.length;r++)for(var i=e[r].ks.systemString,a=e[r].configs,o=null,s=null,u=0;u<a.length;u++){var l=a[u].videoCapabilities;if(l&&0!==l.length){s=[];for(var f=0;f<l.length;f++)""!==t.canPlayType(l[f].contentType,i)&&s.push(l[f])}if(!(!o&&!s||o&&0===o.length||s&&0===s.length)){n=!0;var d=new p["default"](o,s),c=w.getKeySystemBySystemString(i);M.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:new v["default"](c,d)});break}}n||M.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function s(e){P=e.keySystem,M.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED)}function l(e){O!==e&&(O&&R(),O=e,O&&(O.addEventListener(C.keyerror,U),O.addEventListener(C.needkey,U),O.addEventListener(C.keymessage,U),
36
+ O.addEventListener(C.keyadded,U),M.trigger(_["default"].VIDEO_ELEMENT_SELECTED)))}function d(e){if(!P)throw new Error("Can not create sessions until you have selected a key system");if(F||0===x.length){var t={sessionID:null,initData:e,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return L.push(t),O[C.generateKeyRequest](P.systemString,new Uint8Array(e)),t}throw new Error("Multiple sessions not allowed!")}function g(e,t){var n=e.sessionID;if(w.isClearKey(P))for(var r=0;r<t.keyPairs.length;r++)O[C.addKey](P.systemString,t.keyPairs[r].key,t.keyPairs[r].keyID,n);else O[C.addKey](P.systemString,new Uint8Array(t),e.initData,n)}function h(e){O[C.cancelKeyRequest](P.systemString,e.sessionID)}function m(){}function y(){}function T(){}function S(){return{handleEvent:function(e){var t=null;switch(e.type){case C.needkey:var n=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;M.trigger(_["default"].NEED_KEY,{key:new u["default"](n,"cenc")});break;case C.keyerror:if(t=I(x,e.sessionId),t||(t=I(L,e.sessionId)),t){var r="";switch(e.errorCode.code){case 1:r+="MEDIA_KEYERR_UNKNOWN - An unspecified error occurred. This value is used for errors that don't match any of the other codes.";break;case 2:r+="MEDIA_KEYERR_CLIENT - The Key System could not be installed or updated.";break;case 3:r+="MEDIA_KEYERR_SERVICE - The message passed into update indicated an error from the license service.";break;case 4:r+="MEDIA_KEYERR_OUTPUT - There is no available output device with the required characteristics for the content protection system.";break;case 5:r+="MEDIA_KEYERR_HARDWARECHANGE - A hardware configuration change caused a content protection error.";break;case 6:r+="MEDIA_KEYERR_DOMAIN - An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain."}r+=" System Code = "+e.systemCode,M.trigger(_["default"].KEY_ERROR,{data:new f["default"](t,r)})}else b("No session token found for key error");break;case C.keyadded:t=I(x,e.sessionId),t||(t=I(L,e.sessionId)),t?(b("DRM: Key added."),M.trigger(_["default"].KEY_ADDED,{data:t})):b("No session token found for key added");break;case C.keymessage:if(F=null!==e.sessionId&&void 0!==e.sessionId,F?(t=I(x,e.sessionId),!t&&L.length>0&&(t=L.shift(),x.push(t),t.sessionID=e.sessionId)):L.length>0&&(t=L.shift(),x.push(t),0!==L.length&&N.mediaKeyMessageError("Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!")),t){var i=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=i,M.trigger(_["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](t,i,e.defaultURL)})}else b("No session token found for key message")}}}}function I(e,t){if(t&&e){for(var n=e.length,r=0;r<n;r++)if(e[r].sessionID==t)return e[r];return null}return null}function R(){O.removeEventListener(C.keyerror,U),O.removeEventListener(C.needkey,U),O.removeEventListener(C.keymessage,U),O.removeEventListener(C.keyadded,U)}var A=this.context,M=e.eventBus,b=e.log,C=e.api,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0;return D={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,createKeySession:d,updateKeySession:g,closeKeySession:h,setServerCertificate:m,loadKeySession:y,removeKeySession:T,reset:n},t(),D}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(44),p=r(g),h=n(43),v=r(h),m=n(2),_=r(m),y=n(11),E=r(y),T=n(1),S=r(T);i.__dashjs_factory_name="ProtectionModel_01b",t["default"]=S["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){M=null,b=null,C=null,D=[],P=(0,o["default"])(w).getInstance(),O=S()}function n(){var e,t=D.length;if(0!==t)for(var n=function(e){I(e),0===D.length&&(b?(b.removeEventListener("encrypted",O),b.setMediaKeys(null).then(function(){N.trigger(v["default"].TEARDOWN_COMPLETE)})):N.trigger(v["default"].TEARDOWN_COMPLETE))},r=0;r<t;r++)e=D[r],function(t){e.session.closed.then(function(){n(t)}),T(e)["catch"](function(){n(t)})}(e);else N.trigger(v["default"].TEARDOWN_COMPLETE)}function r(){return M}function i(){for(var e=[],t=0;t<D.length;t++)e.push(D[t].initData);return e}function a(e){E(e,0)}function s(e){e.mksa.createMediaKeys().then(function(t){M=e.keySystem,C=t,b&&b.setMediaKeys(C),N.trigger(v["default"].INTERNAL_KEY_SYSTEM_SELECTED)})["catch"](function(){N.trigger(v["default"].INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})}function l(e){b!==e&&(b&&(b.removeEventListener("encrypted",O),b.setMediaKeys(null)),b=e,b&&(b.addEventListener("encrypted",O),C&&b.setMediaKeys(C)))}function d(e){if(!M||!C)throw new Error("Can not set server certificate until you have selected a key system");C.setServerCertificate(e).then(function(){L("DRM: License server certificate successfully updated."),N.trigger(v["default"].SERVER_CERTIFICATE_UPDATED)})["catch"](function(e){N.trigger(v["default"].SERVER_CERTIFICATE_UPDATED,{error:"Error updating server certificate -- "+e.name})})}function g(e,t){if(!M||!C)throw new Error("Can not create sessions until you have selected a key system");var n=C.createSession(t),r=R(n,e,t);n.generateRequest("cenc",e).then(function(){L("DRM: Session created. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CREATED,{data:r})})["catch"](function(e){I(r),N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Error generating key request -- "+e.name})})}function h(e,t){var n=e.session;P.isClearKey(M)&&(t=t.toJWK()),n.update(t)["catch"](function(t){N.trigger(v["default"].KEY_ERROR,{data:new f["default"](e,"Error sending update() message! "+t.name)})})}function m(e){if(!M||!C)throw new Error("Can not load sessions until you have selected a key system");var t=C.createSession();t.load(e).then(function(n){if(n){var r=R(t);L("DRM: Session created. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CREATED,{data:r})}else N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Could not load session! Invalid Session ID ("+e+")"})})["catch"](function(t){N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Could not load session ("+e+")! "+t.name})})}function _(e){var t=e.session;t.remove().then(function(){L("DRM: Session removed. SessionID = "+e.getSessionID()),N.trigger(v["default"].KEY_SESSION_REMOVED,{data:e.getSessionID()})},function(t){N.trigger(v["default"].KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionID()+"). "+t.name})})}function y(e){T(e)["catch"](function(t){I(e),N.trigger(v["default"].KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionID()+") "+t.name})})}function E(e,t){!function(t){var n=e[t].ks,r=e[t].configs;navigator.requestMediaKeySystemAccess(n.systemString,r).then(function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,r=new p["default"](n,t);r.mksa=e,N.trigger(v["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:r})})["catch"](function(){++t<e.length?E(e,t):N.trigger(v["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied!"})})}(t)}function T(e){var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function S(){return{handleEvent:function(e){switch(e.type){case"encrypted":if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;N.trigger(v["default"].NEED_KEY,{key:new u["default"](t,e.initDataType)})}}}}}function I(e){for(var t=0;t<D.length;t++)if(D[t]===e){D.splice(t,1);break}}function R(e,t,n){var r={session:e,initData:t,handleEvent:function(e){switch(e.type){case"keystatuseschange":N.trigger(v["default"].KEY_STATUSES_CHANGED,{data:this});break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;N.trigger(v["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](this,t,(void 0),e.messageType)})}},getSessionID:function(){return e.sessionId},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getSessionType:function(){return n}};return e.addEventListener("keystatuseschange",r),e.addEventListener("message",r),e.closed.then(function(){I(r),L("DRM: Session closed. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CLOSED,{data:r.getSessionID()})}),D.push(r),r}var A,M,b,C,D,O,P,w=this.context,N=e.eventBus,L=e.log;return A={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,setServerCertificate:d,createKeySession:g,updateKeySession:h,loadKeySession:m,removeKeySession:_,closeKeySession:y,reset:n},t(),A}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(43),p=r(g),h=n(2),v=r(h),m=n(1),_=r(m);i.__dashjs_factory_name="ProtectionModel_21Jan2015",t["default"]=_["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){D=null,O=null,P=null,w=null,N=[],x=(0,o["default"])(R).getInstance(),L=T()}function n(){try{for(var e=0;e<N.length;e++)h(N[e]);D&&D.removeEventListener(b.needkey,L),A.trigger(_["default"].TEARDOWN_COMPLETE)}catch(t){A.trigger(_["default"].TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+t.message})}}function r(){return O}function i(){for(var e=[],t=0;t<N.length;t++)e.push(N[t].initData);return e}function a(e){for(var t=!1,n=0;n<e.length;n++)for(var r=e[n].ks.systemString,i=e[n].configs,a=null,o=null,s=0;s<i.length;s++){var u=i[s].audioCapabilities,l=i[s].videoCapabilities;if(u&&0!==u.length){a=[];for(var f=0;f<u.length;f++)window[b.MediaKeys].isTypeSupported(r,u[f].contentType)&&a.push(u[f])}if(l&&0!==l.length){o=[];for(var d=0;d<l.length;d++)window[b.MediaKeys].isTypeSupported(r,l[d].contentType)&&o.push(l[d])}if(!(!a&&!o||a&&0===a.length||o&&0===o.length)){t=!0;var c=new p["default"](a,o),g=x.getKeySystemBySystemString(r);A.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:new v["default"](g,c)});break}}t||A.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function s(e){try{P=e.mediaKeys=new window[b.MediaKeys](e.keySystem.systemString),O=e.keySystem,w=e,D&&S(),A.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED)}catch(t){A.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+O.systemString+")! Could not create MediaKeys -- TODO"})}}function l(e){D!==e&&(D&&D.removeEventListener(b.needkey,L),D=e,D&&(D.addEventListener(b.needkey,L),P&&S()))}function d(e){if(!O||!P||!w)throw new Error("Can not create sessions until you have selected a key system");var t=null;if(null!==w.ksConfiguration.videoCapabilities&&w.ksConfiguration.videoCapabilities.length>0&&(t=w.ksConfiguration.videoCapabilities[0]),null===t&&null!==w.ksConfiguration.audioCapabilities&&w.ksConfiguration.audioCapabilities.length>0&&(t=w.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");var n=t.contentType,r=P.createSession(n,new Uint8Array(e)),i=I(r,e);r.addEventListener(b.error,i),r.addEventListener(b.message,i),r.addEventListener(b.ready,i),r.addEventListener(b.close,i),N.push(i),M("DRM: Session created. SessionID = "+i.getSessionID()),A.trigger(_["default"].KEY_SESSION_CREATED,{data:i})}function g(e,t){var n=e.session;x.isClearKey(O)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t))}function h(e){var t=e.session;t.removeEventListener(b.error,e),t.removeEventListener(b.message,e),t.removeEventListener(b.ready,e),t.removeEventListener(b.close,e);for(var n=0;n<N.length;n++)if(N[n]===e){N.splice(n,1);break}t[b.release]()}function m(){}function y(){}function E(){}function T(){return{handleEvent:function(e){switch(e.type){case b.needkey:if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;A.trigger(_["default"].NEED_KEY,{key:new u["default"](t,"cenc")})}}}}}function S(){var e=null,t=function(){D.removeEventListener("loadedmetadata",e),D[b.setMediaKeys](P),A.trigger(_["default"].VIDEO_ELEMENT_SELECTED)};D.readyState>=1?t():(e=t.bind(this),D.addEventListener("loadedmetadata",e))}function I(e,t){return{session:e,initData:t,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case b.error:var t="KeyError";A.trigger(_["default"].KEY_ERROR,{data:new f["default"](this,t)});break;case b.message:var n=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;A.trigger(_["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](this,n,e.destinationURL)});break;case b.ready:M("DRM: Key added."),A.trigger(_["default"].KEY_ADDED);break;case b.close:M("DRM: Session closed. SessionID = "+this.getSessionID()),A.trigger(_["default"].KEY_SESSION_CLOSED,{data:this.getSessionID()})}}}}var R=this.context,A=e.eventBus,M=e.log,b=e.api,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0;return C={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,createKeySession:d,updateKeySession:g,closeKeySession:h,setServerCertificate:m,loadKeySession:y,removeKeySession:E,reset:n},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(44),p=r(g),h=n(43),v=r(h),m=n(2),_=r(m),y=n(1),E=r(y);i.__dashjs_factory_name="ProtectionModel_3Feb2014",t["default"]=E["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t)));e+="/?";for(var r=0;r<n.kids.length;r++)e+=n.kids[r]+"&";return e=e.substring(0,e.length-1)}function t(){return"GET"}function n(){return"json"}function r(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<e.keys.length;n++){var r=e.keys[n],i=r.kid.replace(/=/g,""),a=r.k.replace(/=/g,"");t.push(new o["default"](i,a))}return new u["default"](t)}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),o=r(a),s=n(64),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="ClearKey",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(e){return a[e].responseType}function r(e,t){return a[t].getLicenseMessage(e)}function i(e,t){return a[t].getErrorResponse(e)}var a={"com.widevine.alpha":{responseType:"json",getLicenseMessage:function(e){return u["default"].decodeArray(e.license)},getErrorResponse:function(e){return e}},"com.microsoft.playready":{responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}},o=void 0;return o={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(34),u=r(s);i.__dashjs_factory_name="DRMToday",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(){return"arraybuffer"}function r(e){return e}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="PlayReady",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(){return"arraybuffer"}function r(e){return e}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="Widevine",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.contentType=e,this.robustness=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){return u.mediaInfo.streamInfo}function n(){return u.mediaInfo}function r(){return u}function i(){return f}function a(){return u.mediaInfo.streamInfo.manifestInfo}function o(){return l}var s=void 0,u=e.streamProcessor.getCurrentRepresentationInfo(),l=e.streamProcessor,f=e.currentValue;return s={getStreamInfo:t,getMediaInfo:n,getTrackInfo:r,getCurrentValue:i,getManifestInfo:a,getStreamProcessor:o}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RulesContext",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){p={},h={},v=[],m=(0,u["default"])(d).getInstance()}function t(e,t){p[e]=p[e]||{},p[e][t]=p[e][t]||{}}function n(e,t){v[e]=v[e]||[],v[e].push(t)}function r(e,r){var a=e.getMediaInfo(),u=a.type,c=e.getCurrentValue().request,_=(0,o["default"])(d).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(!isNaN(c.index)){t(u,c.index);var y=p[u][c.index];if(null===y||null===c.firstByteDate||h.hasOwnProperty(y.id))return void r(_);if(void 0===y.firstByteTime&&(v[u]=[],y.firstByteTime=c.firstByteDate.getTime(),y.segmentDuration=c.duration,y.bytesTotal=c.bytesTotal,y.id=c.index),y.bytesLoaded=c.bytesLoaded,y.elapsedTime=(new Date).getTime()-y.firstByteTime,y.bytesLoaded>0&&y.elapsedTime>0&&n(u,Math.round(8*y.bytesLoaded/y.elapsedTime)),v[u].length>=f&&y.elapsedTime>l&&y.bytesLoaded<y.bytesTotal){var E=v[u].reduce(function(e,t){return e+t},0);if(y.measuredBandwidthInKbps=Math.round(E/v[u].length),y.estimatedTimeOfDownload=(8*y.bytesTotal/y.measuredBandwidthInKbps/1e3).toFixed(2),y.estimatedTimeOfDownload<y.segmentDuration*s||0===e.getTrackInfo().quality)return void r(_);if(!h.hasOwnProperty(y.id)){var T=e.getStreamProcessor().getABRController(),S=y.bytesTotal-y.bytesLoaded,I=T.getBitrateList(a),R=T.getQualityForBitrate(a,y.measuredBandwidthInKbps*m.getBandwidthSafetyFactor()),A=y.bytesTotal*I[R].bitrate/I[T.getQualityFor(u,a.streamInfo)].bitrate;S>A&&(_.value=R,_.priority=o["default"].STRONG,_.reason.throughput=y.measuredBandwidthInKbps,h[y.id]=y,g("AbandonRequestsRule ( ",u,"frag id",y.id,") is asking to abandon and switch to quality to ",R," measured bandwidth was",y.measuredBandwidthInKbps),delete p[u][y.id])}}else y.bytesLoaded===y.bytesTotal&&delete p[u][y.id]}r(_)}function a(){e()}var s=1.8,l=500,f=5,d=this.context,g=(0,c["default"])(d).getInstance().log,p=void 0,h=void 0,v=void 0,m=void 0,_={execute:r,reset:a};return e(),_}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="AbandonRequestsRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){_={},y=(0,u["default"])(d).getInstance()}function n(e,t,n){_[e]={index:t,quality:n}}function r(e,t,n){var r=_[e];return!r||(t!==r.index||n<r.quality)}function a(e,t){var a=e.getMediaInfo(),s=a.type,u=v.getReadOnlyMetricsFor(s),c=e.getCurrentValue(),m=c.request,y=(0,o["default"])(d).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(0===u.BolaState.length)return g("WARNING: executing BolaAbandonRule before initializing BolaRule"),_[s]=null,void t(y);var E=u.BolaState[0]._s,T=m.index,S=m.quality;if(isNaN(T)||0===S||!r(s,T,S)||!m.firstByteDate)return void t(y);var I=Date.now(),R=I-m.firstByteDate.getTime(),A=m.bytesLoaded,M=m.bytesTotal,b=M-A,C=m.duration,D=h.getCurrentBufferLevel(u)?h.getCurrentBufferLevel(u):0,O=D+E.virtualBuffer,P=8*A/(.001*R),w=E.bandwidthSafetyFactor*P,N=.001*(m.firstByteDate.getTime()-m.requestStartDate.getTime());N<.001*f&&(N=.001*f);var L=N+8*M/w,x="";p["default"].BOLA_DEBUG&&(x="index="+T+" quality="+S+" bytesLoaded/bytesTotal="+A+"/"+M+" bufferLevel="+D+" timeSince1stByte="+(R/1e3).toFixed(3)+" estThroughput="+(w/1e6).toFixed(3)+" latency="+N.toFixed(3));var F=M*E.bitrates[0]/E.bitrates[S],U=b-N*w/8;if(U<1&&(U=1),R<l||b<=F||D>E.bufferTarget||U<=F||L<=C)return void t(y);var B=O-N;B<0&&(B=0);for(var k=0;k+1<S&&M*E.bitrates[k+1]/E.bitrates[S]<U;)++k;var j=S;if(E.state===p["default"].BOLA_STATE_STARTUP){j=0;for(var K=0;K<=k&&(F=M*E.bitrates[K]/E.bitrates[S],!(8*F/C>w));++K)j=K}else for(var H=(E.Vp*(E.utilities[S]+E.gp)-B)/U,K=0;K<=k;++K){F=M*E.bitrates[K]/E.bitrates[S];var q=(E.Vp*(E.utilities[K]+E.gp)-B)/F;q>H&&(j=K,H=q)}var Y=E.rebufferSafetyFactor*P*(D-N)/8;if(j===S&&U>Y&&(j=k),j===S)return void t(y);for(;j>0&&(F=M*E.bitrates[j]/E.bitrates[S],!(F<=Y));)--j;E.lastQuality=j,v.updateBolaState(s,E),p["default"].BOLA_DEBUG&&g("BolaDebug "+s+" BolaAbandonRule abandon to "+j+" - "+x),n(s,T,S),y.value=j,y.priority=o["default"].STRONG,y.reason.state=E.state,y.reason.throughput=P,y.reason.bufferLevel=D,y.reason.bytesLoaded=m.bytesLoaded,y.reason.bytesTotal=m.bytesTotal,y.reason.elapsedTimeMs=R,t(y)}function s(){_={}}var l=500,f=200,d=this.context,g=(0,c["default"])(d).getInstance().log,h=e.dashMetrics,v=e.metricsModel,m=void 0,_=void 0,y=void 0;return m={execute:a,reset:s},t(),m}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d),g=n(66),p=r(g);i.__dashjs_factory_name="BolaAbandonRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){g=0,h=(0,u["default"])(s).getInstance()}function n(e,t){var n=(new Date).getTime()/1e3,r=e.getMediaInfo(),a=e.getTrackInfo(),u=r.type,p=isNaN(a.fragmentDuration)?2:a.fragmentDuration/2,v=e.getCurrentValue(),m=e.getStreamProcessor(),_=m.getABRController(),y=d.getReadOnlyMetricsFor(u),E=c.getCurrentBufferLevel(y),T=y.BufferState.length>0?y.BufferState[y.BufferState.length-1]:null,S=!1,I=r.representationCount-1,R=(0,o["default"])(s).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});return n-g<p||_.getAbandonmentStateFor(u)===f["default"].ABANDON_LOAD?void t(R):(null!==T&&E>T.target&&(S=E-T.target>h.getRichBufferThreshold(),S&&r.representationCount>1&&(R.value=I,R.priority=o["default"].STRONG,R.reason.bufferLevel=E,R.reason.bufferTarget=T.target)),R.value!==o["default"].NO_CHANGE&&R.value!==v&&l("BufferOccupancyRule requesting switch to index: ",R.value,"type: ",u," Priority: ",R.priority===o["default"].DEFAULT?"Default":R.priority===o["default"].STRONG?"Strong":"Weak"),void t(R))}function r(){g=0}var a=void 0,s=this.context,l=(0,p["default"])(s).getInstance().log,d=e.metricsModel,c=e.dashMetrics,g=void 0,h=void 0;return a={execute:n,reset:r},t(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(10),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g);i.__dashjs_factory_name="BufferOccupancyRule",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){m={},_=0,y=1e3,g.on(c["default"].PLAYBACK_SEEKING,a,h)}function n(e,t){var n=(new Date).getTime(),a=e.getMediaInfo().type,s=e.getCurrentValue(),f=p.getReadOnlyMetricsFor(a),c=f.BufferState.length>0?f.BufferState[f.BufferState.length-1]:null,g=(0,o["default"])(l).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});return n-_<y||null===c?void t(g):(r(a,c.state),c.state===u["default"].BUFFER_EMPTY&&void 0!==m[a].firstBufferLoadedEvent&&(g.value=0,g.priority=o["default"].STRONG,g.reason.bufferState=c.state,g=(0,o["default"])(l).create(0,o["default"].STRONG)),g.value!==o["default"].NO_CHANGE&&g.value!==s&&d("InsufficientBufferRule requesting switch to index: ",g.value,"type: ",a," Priority: ",g.priority===o["default"].DEFAULT?"Default":g.priority===o["default"].STRONG?"Strong":"Weak"),_=n,void t(g))}function r(e,t){m[e]=m[e]||{},m[e].state=t,t!==u["default"].BUFFER_LOADED||m[e].firstBufferLoadedEvent||(m[e].firstBufferLoadedEvent=!0)}function a(){m={}}function s(){g.off(c["default"].PLAYBACK_SEEKING,a,h),m={},_=0}var l=this.context,d=(0,v["default"])(l).getInstance().log,g=(0,f["default"])(l).getInstance(),p=e.metricsModel,h=void 0,m=void 0,_=void 0,y=void 0;return h={execute:n,reset:s},t(),h}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(18),u=r(s),l=n(3),f=r(l),d=n(2),c=r(d),g=n(1),p=r(g),h=n(4),v=r(h);i.__dashjs_factory_name="InsufficientBufferRule",t["default"]=p["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){A=[],M={audio:{threshold:_,value:NaN},video:{threshold:v,value:NaN}},b=(0,c["default"])(T).getInstance()}function n(e,t){A[e]=A[e]||[],A[e].push(t)}function r(e,t){var n=Math.min(A[e].length,t?p:h),r=A[e].slice(n*-1,A[e].length);return r.length>1&&r.reduce(function(e,t){return(e*E<=t||e>=t*y)&&n++,t}),n=Math.min(A[e].length,n),A[e].slice(n*-1,A[e].length)}function a(e,t){var n=r(e,t),i=0;if(n.length>0){var a=n.reduce(function(e,t){return e+t},0);i=a/n.length}return A[e].length>=d&&A[e].shift(),i/1e3*b.getBandwidthSafetyFactor()}function s(e,t){var r=e.getMediaInfo(),s=r.type,l=e.getCurrentValue(),d=R.getReadOnlyMetricsFor(s),c=e.getStreamProcessor(),p=c.getABRController(),h=c.isDynamic(),v=I.getCurrentHttpRequest(d),m=d.BufferState.length>0?d.BufferState[d.BufferState.length-1]:null,_=(0,o["default"])(T).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(!d||!v||v.type!==g.HTTPRequest.MEDIA_SEGMENT_TYPE||!m)return void t(_);var y=void 0;if(v.trace&&v.trace.length){y=v._tfinish.getTime()-v.tresponse.getTime()+1;var E=v.trace.reduce(function(e,t){return e+t.b[0]},0),A=Math.round(8*E/(y/1e3));y<=M[s].threshold?M[s].value=A/1e3:(M[s].value=NaN,n(s,A))}var b=Math.round(isNaN(M[s].value)?a(s,h):M[s].value);if(p.setAverageThroughput(s,b),p.getAbandonmentStateFor(s)!==f["default"].ABANDON_LOAD){if(m.state===u["default"].BUFFER_LOADED||h){var C=p.getQualityForBitrate(r,b);c.getScheduleController().setTimeToLoadDelay(0),_.value=C,_.priority=o["default"].DEFAULT,_.reason.throughput=b}_.value!==o["default"].NO_CHANGE&&_.value!==l&&S("ThroughputRule requesting switch to index: ",_.value,"type: ",s," Priority: ",_.priority===o["default"].DEFAULT?"Default":_.priority===o["default"].STRONG?"Strong":"Weak","Average throughput",Math.round(b),"kbps")}t(_)}function l(){t()}var d=20,p=3,h=4,v=50,_=5,y=1.3,E=1.3,T=this.context,S=(0,m["default"])(T).getInstance().log,I=e.dashMetrics,R=e.metricsModel,A=void 0,M=void 0,b=void 0,C={execute:s,reset:l};return t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(18),u=r(s),l=n(10),f=r(l),d=n(5),c=r(d),g=n(7),p=n(1),h=r(p),v=n(4),m=r(v);i.__dashjs_factory_name="ThroughputRule",t["default"]=h["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t,n=0;return e&&e.some(function(e,t){return n=t,!r.contains(e.serviceLocation)})&&(t=e[n]),t}var n=void 0,r=e.blacklistController;return n={select:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="BasicSelector",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t=[],n=function(e){return!t.length||!e.dvb_priority||t.indexOf(e.dvb_priority)===-1},r=function(e){return!a.contains(e.serviceLocation)||(e.dvb_priority&&t.push(e.dvb_priority),!1)};return e.filter(r).filter(n)}function n(e){var t,n,r=function(e,t){var n=e.dvb_priority-t.dvb_priority;return isNaN(n)?0:n},i=function(e,t,n){return!t||n[0].dvb_priority&&e.dvb_priority&&n[0].dvb_priority===e.dvb_priority},a=0,o=[],s=0;if(n=e.sort(r).filter(i),n.length)return n.length>1&&(n.forEach(function(e){a+=e.dvb_weight,o.push(a)}),t=Math.floor(Math.random()*(a-1)),o.every(function(e,n){return s=n,!(t<e)})),n[s]}function r(e){return e&&n(t(e))}var i=void 0,a=e.blacklistController;return i={select:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="DVBSelector",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){f=(0,o["default"])(i).getInstance(),d=(0,u["default"])(i).getInstance()}function n(e,t,n){var i=a.getCurrentBufferLevel(s.getReadOnlyMetricsFor(t));return i<r(e,t,n)}function r(e,t,n){var r=NaN,i=e.getCurrentRepresentationInfo();if("fragmentedText"===t)r=l.getAllTracksAreDisabled()?0:i.fragmentDuration;else if("audio"===t&&n){var o=a.getCurrentBufferLevel(s.getReadOnlyMetricsFor("video"));r=Math.floor(Math.max(o,i.fragmentDuration))}else{var u=i.mediaInfo.streamInfo,d=e.getABRController();if(d.isPlayingAtTopQuality(u)){var c=u.manifestInfo.duration>=f.getLongFormContentDurationThreshold();r=c?f.getBufferTimeAtTopQualityLongForm():f.getBufferTimeAtTopQuality()}else r=f.getStableBufferTime()}return r}var i=this.context,a=e.dashMetrics,s=e.metricsModel,l=e.textSourceBuffer,f=void 0,d=void 0,c={execute:n,getBufferTarget:r};return t(),c}Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),o=r(a),s=n(9),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="BufferLevelRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n=e.getCurrentRepresentationInfo(),o=n.mediaInfo,u=o.type,l=e.getScheduleController(),f=l.getSeekTarget(),d=!isNaN(f),c=e.getBuffer(),g=d?f:i.getIndexHandlerTime(e);if(isNaN(g)||"fragmentedText"===u&&s.getAllTracksAreDisabled())return null;if(d&&l.setSeekTarget(NaN),c){var p=a.getBufferRange(e.getBuffer(),g);null!==p&&(r("Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end.",g," was changed to ",p.end),g=p.end)}var h=void 0;return t?(g=t.startTime+t.duration/2,h=i.getFragmentRequestForTime(e,n,g,{timeThreshold:0,ignoreIsFinished:!0})):(h=i.getFragmentRequestForTime(e,n,g,{keepIdx:!d}),h&&e.getFragmentModel().isFragmentLoaded(h)&&(h=i.getNextFragmentRequest(e,n)),h&&(i.setIndexHandlerTime(e,h.startTime+h.duration),h.delayLoadingTime=(new Date).getTime()+l.getTimeToLoadDelay(),l.setTimeToLoadDelay(0))),h}var n=this.context,r=(0,o["default"])(n).getInstance().log,i=e.adapter,a=e.sourceBufferController,s=e.textSourceBuffer,u={execute:t};return u}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="NextFragmentRequestRule",
37
+ t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){m=NaN,_=null,y=NaN,E=null,T=!1,S=NaN,I=o["default"].DEFAULT}function n(e,t){var n,r;if(R=t,M=e.getStreamProcessor(),A=M.getFragmentLoader(),E=e.getTrackInfo(),S=E.fragmentDuration,r=E.DVRWindow,m=r.end,E.useCalculatedLiveEdgeTime){var u=h.getExpectedLiveEdge();return h.setExpectedLiveEdge(m),void R((0,o["default"])(d).create(u,I))}_={start:Math.max(0,m-g),end:m+g},y=Math.floor((r.end-r.start)/2),n=p.getFragmentRequestForTime(M,E,m,{ignoreIsFinished:!0}),i(m,s,a,n)}function r(){m=NaN,_=null,y=NaN,E=null,T=!1,S=NaN,M=null,A=null}function i(e,t,n,r){var a;if(null===r)a=p.generateFragmentRequestForTime(M,E,e),i(e,t,n,a);else{var o=function s(r){c.off(f["default"].CHECK_FOR_EXISTENCE_COMPLETED,s,this),r.exists?t(r.request,e):n(r.request,e)};c.on(f["default"].CHECK_FOR_EXISTENCE_COMPLETED,o,this),A.checkForExistence(r)}}function a(e,t){var n,r,u;return T?void l(!1,t):(u=t-m,n=u>0?m-u:m+Math.abs(u)+y,void(n<_.start&&n>_.end?R((0,o["default"])(d).create(null,I)):(r=p.getFragmentRequestForTime(M,E,n,{ignoreIsFinished:!0}),i(n,s,a,r))))}function s(e,t){var n,r,a=e.startTime;if(!T){if(!E.fragmentDuration)return void R((0,o["default"])(d).create(a,I));if(T=!0,_.end=a+2*y,t===m)return r=t+S,n=p.getFragmentRequestForTime(M,E,r,{ignoreIsFinished:!0}),void i(r,function(){l(!0,r)},function(){R((0,o["default"])(d).create(r,I))},n)}l(!0,t)}function l(e,t){var n,r,u;e?_.start=t:_.end=t,n=Math.floor(_.end-_.start)<=S,n?R((0,o["default"])(d).create(e?t:t-S,I)):(u=(_.start+_.end)/2,r=p.getFragmentRequestForTime(M,E,u,{ignoreIsFinished:!0}),i(u,s,a,r))}var d=this.context,c=(0,u["default"])(d).getInstance(),p=e.adapter,h=e.timelineConverter,v=void 0,m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0;return v={execute:n,reset:r},t(),v}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=43200;i.__dashjs_factory_name="LiveEdgeBinarySearchRule",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n=e.getTrackInfo(),a=n.DVRWindow.end,s=o["default"].DEFAULT;if(n.useCalculatedLiveEdgeTime){var u=i.getExpectedLiveEdge();i.setExpectedLiveEdge(a),t((0,o["default"])(r).create(u,s))}else t((0,o["default"])(r).create(a,s))}var n=void 0,r=this.context,i=e.timelineConverter;return n={execute:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="LiveEdgeWithTimeSynchronizationRule",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){d=(0,c["default"])(i).create({updateEventName:u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,loadFailedEventName:u["default"].FRAGMENT_LOADING_COMPLETED}),g=(0,v["default"])(i).create({blacklistController:d}),h=(0,p["default"])(i).create({blacklistController:d}),m=g}function t(e){m=s.getIsDVB(e)?h:g}function n(e){var t=e.baseUrls,n=e.selectedIdx;if(!isNaN(n))return t[n];var r=m.select(t);return r?(e.selectedIdx=t.indexOf(r),r):void a.trigger(u["default"].URL_RESOLUTION_FAILED,{error:new Error(y,E)})}function r(){d.reset()}var i=this.context,a=(0,o["default"])(i).getInstance(),s=(0,f["default"])(i).getInstance(),l=void 0,d=void 0,g=void 0,h=void 0,m=void 0;return l={chooseSelectorFromManifest:t,select:n,reset:r},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(12),f=r(l),d=n(105),c=r(d),g=n(153),p=r(g),h=n(152),v=r(h),m=n(1),_=r(m),y=1,E="Failed to resolve a valid URL";i.__dashjs_factory_name="BaseURLSelector";var T=_["default"].getClassFactory(i);T.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=y,T.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE=E,t["default"]=T,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){o=!1}function t(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return e||t}function n(){return o}function r(e){o=e}function i(e,t){var n=e.canPlayType(t);return"probably"===n||"maybe"===n}var a=void 0,o=void 0;return a={supportsMediaSource:t,supportsEncryptedMedia:n,supportsCodec:i,setEncryptedMediaSupported:r},e(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="Capabilities",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){return p}function n(e){p=e}function r(e,t){var n=!0,r=0,i=void 0,a=void 0;if(void 0===t&&(t=!1),e.tag>16777215?(g.getUint32(p)!==e.tag&&(n=!1),r=4):e.tag>65535?(i=g.getUint16(p),a=g.getUint8(p+2),256*i+a!==e.tag&&(n=!1),r=3):e.tag>255?(g.getUint16(p)!==e.tag&&(n=!1),r=2):(g.getUint8(p)!==e.tag&&(n=!1),r=1),!n&&e.required&&!t)throw new u["default"]("required tag not found");return n&&(p+=r),n}function i(e,t){var n=r(e,t);return n&&s(),n}function a(e){var t=void 0;return r(e),t=s(),c[e.parse](t)}function o(e,t){var n=r(e,t),i=void 0;return n&&(i=s(),p+=i),n}function s(e){var t=1,n=128,r=8,i=-1,a=0,o=g.getUint8(p),s=void 0;for(s=0;s<r;s+=1){if((o&n)===n){a=void 0===e?o&~n:o,i=s;break}n>>=1}for(s=0;s<i;s+=1,t+=1)a=a<<8|255&g.getUint8(p+t);return p+=t,a}function l(e){var t=void 0;switch(e){case 4:t=g.getFloat32(p),p+=4;break;case 8:t=g.getFloat64(p),p+=8}return t}function f(e){var t=0,n=void 0;for(n=0;n<e;n+=1)t<<=8,t|=255&g.getUint8(p+n);return p+=e,t}function d(){return p<g.byteLength}var c=void 0,g=new DataView(e.data),p=0;return c={getPos:t,setPos:n,consumeTag:r,consumeTagAndSize:i,parseTag:a,skipOverElement:o,getMatroskaCodedNum:s,getMatroskaFloat:l,getMatroskaUint:f,moreData:d}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(6),u=r(s);i.__dashjs_factory_name="EBMLParser",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e&&f&&f.boxes&&0!==f.boxes.length?u(f.fetch(e)):null}function t(e){for(var t,n=f.fetchAll(e),r=[],i=0,a=n.length;i<a;i++)t=u(n[i]),t&&r.push(t);return r}function n(e){f=e}function r(){if(!f||!f.boxes||!f.boxes.length)return null;var e=f.boxes[f.boxes.length-1].type,n=t(e);return n[n.length-1]}function i(){return f._cursor.offset}function a(){d={offset:"_offset",size:"size",type:"type"},c={references:"references",timescale:"timescale",earliest_presentation_time:"earliest_presentation_time",first_offset:"first_offset"},g={reference_type:"reference_type",referenced_size:"referenced_size",subsegment_duration:"subsegment_duration"},p={id:"id",value:"value",timescale:"timescale",scheme_id_uri:"scheme_id_uri",presentation_time_delta:"presentation_time_delta",event_duration:"event_duration",message_data:"message_data"},h={timescale:"timescale"},v={sequence_number:"sequence_number"},m={base_data_offset:"base_data_offset",sample_description_index:"sample_description_index",default_sample_duration:"default_sample_duration",default_sample_size:"default_sample_size",default_sample_flags:"default_sample_flags",flags:"flags"},_={version:"version",baseMediaDecodeTime:"baseMediaDecodeTime",flags:"flags"},y={sample_count:"sample_count",first_sample_flags:"first_sample_flags",data_offset:"data_offset",flags:"flags",samples:"samples"},E={sample_size:"sample_size",sample_duration:"sample_duration",sample_composition_time_offset:"sample_composition_time_offset"}}function s(e,t,n){for(var r in n)t[r]=e[n[r]]}function u(e){if(!e)return null;var t,n,r=new o["default"];switch(s(e,r,d),e.hasOwnProperty("_incomplete")&&(r.isComplete=!e._incomplete),r.type){case"sidx":if(s(e,r,c),r.references)for(t=0,n=r.references.length;t<n;t++)s(e.references[t],r.references[t],g);break;case"emsg":s(e,r,p);break;case"mdhd":s(e,r,h);break;case"mfhd":s(e,r,v);break;case"tfhd":s(e,r,m);break;case"tfdt":s(e,r,_);break;case"trun":if(s(e,r,y),r.samples)for(t=0,n=r.samples.length;t<n;t++)s(e.samples[t],r.samples[t],E)}return r}var l=void 0,f=void 0,d=void 0,c=void 0,g=void 0,p=void 0,h=void 0,v=void 0,m=void 0,_=void 0,y=void 0,E=void 0;return l={getBox:e,getBoxes:t,setData:n,getLastBox:r,getOffset:i},a(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(168),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="IsoFile",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}var t=void 0;return t={areSimpleEquivalent:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="ObjectUtils",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.videoModel&&(ne=e.videoModel)}function t(e){if(e.hasOwnProperty("begin")&&e.hasOwnProperty("end")){var t=h(e.begin),n=h(e.end);return[t,n]}return null}function n(){var e="cue_TTML_"+re;return re++,e}function r(e,t,n){function r(e,t){if(e.hasOwnProperty(t)){var n=e[t];a.indexOf(n)<0&&a.push(n)}}for(var i=[],a=[],o=[],s=0;s<e.length;s++){var u=e[s];r(u,"begin"),r(u,"end")}if(0===a.length)return o;if("undefined"!=typeof t&&"undefined"!=typeof n){for(var s=0;s<a.length;s++){var l=h(a[s]);t<l&&l<n&&i.push(l)}i.push(t),i.push(n)}else for(var s=0;s<a.length;s++)i.push(h(a[s]));i.sort(function(e,t){return e-t});for(var s=0;s<i.length-1;s++)o.push([i[s],i[s+1]]);return o}function i(e,t){return"undefined"!=typeof startInterval&&e<t&&(e=t),e}function o(e,t){return"undefined"!=typeof t&&e>t&&(e=t),e}function s(e,t,n){var r=h(e.begin),a=h(e.end);return r=i(r,t),a=o(a,n),"undefined"!=typeof t&&"undefined"!=typeof n&&(a<t||r>n)?(B("TTML: Cue "+r+"-"+a+" outside interval "+t+"-"+n),null):[r,a]}function u(e,n){var r=!0;if(e.hasOwnProperty("span")){var i=t(e.span);null!==i&&(r=i[0]<n[1]&&i[1]>n[0])}return r}function f(e,i,a){var o=void 0,f=void 0,d=void 0,c=void 0,g=void 0,p="",h=new l["default"]([],"",(!1));if(K=h.xml_str2json(e),!K)throw new Error("TTML document could not be parsed");if(ne.getTTMLRenderingDiv()&&(g="html"),o=K.tt,!o)throw new Error("TTML document lacks tt element");var _=v(o,"http://www.w3.org/ns/ttml");if(_&&m(o,_),c=o["tts:extent"],f=o.head,!f)throw new Error("TTML document lacks head element");if(f.layout&&(q=f.layout.region_asArray),f.styling&&(H=f.styling.style_asArray),d=o.body,!d)throw new Error("TTML document lacks body element");var y=P(),I=ne.getElement().clientWidth,R=ne.getElement().clientHeight,A=[I/y[0],R/y[1]];W["font-size"]=A[1]+"px;";var M=[];if(q)for(var O=0;O<q.length;O++)M.push(C(JSON.parse(JSON.stringify(q[O])),A));var F=v(K.tt,"http://www.w3.org/ns/ttml#parameter");o.hasOwnProperty(F+":frameRate")&&(o.frameRate=parseInt(o[F+":frameRate"],10));for(var U=[],k=o.body_asArray[0].__children,j=0;j<k.length;j++){var z=k[j].div,Q=null;if(null===(Q=t(z))){var X=z.p_asArray;if(null===Q&&(!X||0===X.length))return p="TTML has div that contains no timing and no paragraphs.",B(p),U;for(var Z=0;Z<X.length;Z++){var J=X[Z],$=J.span_asArray,ee=[];if(J.hasOwnProperty("begin")&&J.hasOwnProperty("end")){var te=s(J,i,a);null!==te&&ee.push(te)}else ee=r($,i,a);if(0!==ee.length)for(var re=J.__children,ie=0;ie<ee.length;ie++){for(var ae=ee[ie],oe=[],se=0;se<re.length;se++){var ue=re[se];u(ue,ae)&&oe.push(ue)}if(0!==oe.length)if("html"===g){G={},V={},Y={};var le=L(J,z,A),fe=x(J,A),de=fe[1];fe=fe[0];var ce=document.createElement("div");ce.className=de;var ge=N(oe,A);ge.className="cueDirUniWrapper",E("unicode-bidi",fe)&&(ge.style.cssText+=T("unicode-bidi",fe),S("unicode-bidi",fe)),E("direction",fe)&&(ge.style.cssText+=T("direction",fe),S("direction",fe)),E("padding-left",fe)&&E("padding-right",fe)&&(ge.innerHTML=w(ge,fe)),E("padding-left",fe)&&E("padding-right",fe)&&(S("padding-left",fe),S("padding-right",fe));var pe="";if(E("regionID",le)){var he=T("regionID",le);pe=he.slice(he.indexOf(":")+1,he.length-1)}fe&&(ce.style.cssText=fe.join(" ")+"display:flex;"),le&&(le=le.join(" ")),ce.appendChild(ge);var ve=document.createElement("div");ve.appendChild(ce),ve.id=n(),ve.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+le,0===Object.keys(Y).length&&(Y.defaultFontSize="100"),U.push({start:ae[0],end:ae[1],type:"html",cueHTMLElement:ve,regions:M,regionID:pe,cueID:ve.id,videoHeight:R,videoWidth:I,cellResolution:y,fontSize:Y||{defaultFontSize:"100"},lineHeight:G,linePadding:V})}else{var me="",_e=oe;_e.length&&_e.forEach(function(e){if(e.hasOwnProperty("span")){var t=e.span.__children;t.forEach(function(e){t.hasOwnProperty("metadata")||(e.hasOwnProperty("#text")?me+=e["#text"].replace(/[\r\n]+/gm," ").trim():"br"in e&&(me+="\n"))})}else me+=e.hasOwnProperty("br")?"\n":e["#text"].replace(/[\r\n]+/gm," ").trim()}),U.push({start:ae[0],end:ae[1],data:me,type:"text"})}}else p="TTML: Empty paragraph"}}else{var ye=void 0;if(z.region){var Ee=D(q,z.region);ye=b(Ee,c)}ye||(ye=b(z,c));var Te=o.head.metadata.image_asArray;if(void 0!==z["smpte:backgroundImage"])for(var Se=0;Se<Te.length;Se++)"#"+Te[Se]["xml:id"]===z["smpte:backgroundImage"]&&U.push({start:Q[0],end:Q[1],id:n(),data:"data:image/"+Te[Se].imagetype.toLowerCase()+";base64, "+Te[Se].__text,type:"image",layout:ye})}}if(""!==p&&B(p),U.length>0)return U;throw new Error(p)}function p(){j=/^([0-9][0-9]+):([0-5][0-9]):([0-5][0-9])|(60)(\.([0-9])+)?$/,Y={},G={},V={},z={top:"auto;",left:"auto;",width:"90%;",height:"10%;","align-items":"flex-start;",overflow:"visible;","-ms-writing-mode":"lr-tb, horizontal-tb;","-webkit-writing-mode":"horizontal-tb;","-moz-writing-mode":"horizontal-tb;","writing-mode":"horizontal-tb;"},W={color:"rgb(255,255,255);",direction:"ltr;","font-family":"monospace, sans-serif;","font-style":"normal;","line-height":"normal;","font-weight":"normal;","text-align":"start;","justify-content":"flex-start;","text-decoration":"none;","unicode-bidi":"normal;","white-space":"normal;",width:"100%;"},Q={monospace:"font-family: monospace;",sansSerif:"font-family: sans-serif;",serif:"font-family: serif;",monospaceSansSerif:"font-family: monospace, sans-serif;",monospaceSerif:"font-family: monospace, serif;",proportionalSansSerif:"font-family: Arial;",proportionalSerif:"font-family: Times New Roman;","default":"font-family: monospace, sans-serif;"},X={right:["justify-content: flex-end;","text-align: right;"],start:["justify-content: flex-start;","text-align: start;"],center:["justify-content: center;","text-align: center;"],end:["justify-content: flex-end;","text-align: end;"],left:["justify-content: flex-start;","text-align: left;"]},Z={start:"text-align: start;",center:"text-align: center;",end:"text-align: end;",auto:""},J={wrap:"white-space: normal;",noWrap:"white-space: nowrap;"},$={normal:"unicode-bidi: normal;",embed:"unicode-bidi: embed;",bidiOverride:"unicode-bidi: bidi-override;"},ee={before:"align-items: flex-start;",center:"align-items: center;",after:"align-items: flex-end;"},te={lrtb:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;",rltb:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;direction: rtl;unicode-bidi: bidi-override;",tbrl:"-webkit-writing-mode: vertical-rl;writing-mode: vertical-rl;-webkit-text-orientation: upright;text-orientation: upright;",tblr:"-webkit-writing-mode: vertical-lr;writing-mode: vertical-lr;-webkit-text-orientation: upright;text-orientation: upright;",lr:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;",rl:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;direction: rtl;",tb:"-webkit-writing-mode: vertical-rl;writing-mode: vertical-rl;-webkit-text-orientation: upright;text-orientation: upright;"}}function h(e){var t,n,r,i=j.test(e);if(!i)return NaN;if(t=e.split(":"),n=parseFloat(t[0])*c+parseFloat(t[1])*g+parseFloat(t[2]),t[3]){if(r=K.tt.frameRate,!r||isNaN(r))return NaN;n+=parseFloat(t[3])/r}return n}function v(e,t){var n=Object.keys(e).filter(function(n){return("xmlns"===n.split(":")[0]||"xmlns"===n.split(":")[1])&&e[n]===t}).map(function(e){return e.split(":")[2]||e.split(":")[1]});return 1!=n.length?null:n[0]}function m(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(("object"===a(e[n])||e[n]instanceof Object)&&!Array.isArray(e[n]))m(e[n],t);else if(Array.isArray(e[n]))for(var r=0;r<e[n].length;r++)m(e[n][r],t);var i=n.slice(n.indexOf(t)+t.length+1);e[i]=e[n],delete e[n]}}function _(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function y(e){var t=e.slice(1),n=t.match(/.{2}/g),r=parseFloat(parseInt(parseInt(n[3],16)/255*1e3,10)/1e3),i=n.slice(0,3).map(function(e){return parseInt(e,16)});return"rgba("+i.join(",")+","+r+");"}function E(e,t){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>-1)return!0;return!1}function T(e,t){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>-1)return t[n];return null}function S(e,t){t.splice(t.indexOf(T(e,t)),1)}function I(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++)e[n]&&e[n].split(":")[0].indexOf(t[r].split(":")[0])>-1&&e.splice(n,1);return e.concat(t)}function R(e,t,n){var r=[];for(var i in e)if(e.hasOwnProperty(i)){var a=i.replace("ebutts:","");a=a.replace("xml:",""),a=a.replace("tts:",""),a=_(a),e[a]=e[i],delete e[i]}if("line-padding"in e){var o=parseFloat(e["line-padding"].slice(e["line-padding"].indexOf(":")+1,e["line-padding"].indexOf("c")));"id"in e&&(V[e.id]=o);var s=o*t[0]+"px;";r.push("padding-left:"+s),r.push("padding-right:"+s)}if("font-size"in e){var u=parseFloat(e["font-size"].slice(e["font-size"].indexOf(":")+1,e["font-size"].indexOf("%")));"id"in e&&(Y[e.id]=u);var l=u/100*t[1]+"px;";r.push("font-size:"+l)}if("line-height"in e)if("normal"===e["line-height"])r.push("line-height: normal;");else{var f=parseFloat(e["line-height"].slice(e["line-height"].indexOf(":")+1,e["line-height"].indexOf("%")));"id"in e&&(G[e.id]=f);var d=f/100*t[1]+"px;";r.push("line-height:"+d)}"font-family"in e&&(e["font-family"]in Q?r.push(Q[e["font-family"]]):r.push("font-family:"+e["font-family"]+";")),"text-align"in e&&e["text-align"]in X&&(r.push(X[e["text-align"]][0]),r.push(X[e["text-align"]][1])),"multi-row-align"in e&&(E("text-align",r)&&"auto"!=e["multi-row-align"]&&S("text-align",r),e["multi-row-align"]in Z&&r.push(Z[e["multi-row-align"]]));var c;return"background-color"in e&&(e["background-color"].indexOf("#")>-1&&e["background-color"].length-1===8?(c=y(e["background-color"]),r.push("background-color: "+c)):r.push("background-color:"+e["background-color"]+";")),"color"in e&&(e.color.indexOf("#")>-1&&e.color.length-1===8?(c=y(e.color),r.push("color: "+c)):r.push("color:"+e.color+";")),"wrap-option"in e&&(e["wrap-option"]in J?r.push(J[e["wrap-option"]]):r.push("white-space:"+e["wrap-option"])),"unicode-bidi"in e&&(e["unicode-bidi"]in $?r.push($[e["unicode-bidi"]]):r.push("unicode-bidi:"+e["unicode-bidi"])),"font-style"in e&&r.push("font-style:"+e["font-style"]+";"),"font-weight"in e&&r.push("font-weight:"+e["font-weight"]+";"),"direction"in e&&r.push("direction:"+e.direction+";"),"text-decoration"in e&&r.push("text-decoration:"+e["text-decoration"]+";"),n&&(r=r.concat(C(e,t))),K.tt.hasOwnProperty("xml:space")&&"preserve"===K.tt["xml:space"]&&r.push("white-space: pre;"),r}function A(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r["xml:id"]===t||r.id===t)return r}return null}function M(e,t,n){var r=[],i=e.match(/\S+/g);return i.forEach(function(e){var i=A(H,e);if(i){var a=R(JSON.parse(JSON.stringify(i)),t,n);r=r.concat(a)}}),r}function b(e,t){var n=/([\d\.]+)(%|px)\s+([\d\.]+)(%|px)/;if("tts:extent"in e&&"tts:origin"in e){var r=n.exec(e["tts:extent"]),i=n.exec(e["tts:origin"]);if(null===r||null===i)return B("Bad extent or origin: "+e["tts:extent"]+" "+e["tts:origin"]),null;var a=parseFloat(r[1]),o=parseFloat(r[3]),s=parseFloat(i[1]),u=parseFloat(i[3]);if(t){var l=n.exec(t);if(null===l||"px"!==l[2]||"px"!==l[4])return B("Bad tt.extent: "+t),null;var f=parseFloat(l[1]),d=parseFloat(l[3]);"px"===r[2]&&(a=a/f*100),"px"===r[4]&&(o=o/d*100),"px"===i[2]&&(s=s/f*100),"px"===i[4]&&(u=u/d*100)}return{left:s,top:u,width:a,height:o}}return null}function C(e,t){var n=[];for(var r in e){var i=r.replace("tts:","");i=i.replace("xml:",""),i=_(i),e[i]=e[r],i!==r&&delete e[r]}if("extent"in e){var a=e.extent.split(/\s/);n.push("width: "+a[0]+";"),n.push("height: "+a[1]+";")}if("origin"in e){var o=e.origin.split(/\s/);n.push("left: "+o[0]+";"),n.push("top: "+o[1]+";")}if("display-align"in e&&n.push(ee[e["display-align"]]),"writing-mode"in e&&n.push(te[e["writing-mode"]]),"style"in e){var s=M(e.style,t,!0);n=n.concat(s)}return"padding"in e&&n.push("padding:"+e.padding+";"),"overflow"in e&&n.push("overflow:"+e.overflow+";"),"show-background"in e&&n.push("show-background:"+e["show-background"]+";"),"id"in e&&n.push("regionID:"+e.id+";"),n}function D(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r["xml:id"]===t||r.id===t)return r}return null}function O(e,t){var n=[],r=e.match(/\S+/g);return r.forEach(function(e){var r=D(q,e);if(r){var i=C(JSON.parse(JSON.stringify(r)),t);n=n.concat(i)}}),n}function P(){var e=[32,15];return K.tt.hasOwnProperty("ttp:cellResolution")?K.tt["ttp:cellResolution"].split(" ").map(parseFloat):e}function w(e,t){for(var n=T("padding-left",t),r=T("padding-right",t),i=n.concat(" "+r+" "),a="",o="",s="",u=Array.prototype.slice.call(e.children),l=e.getElementsByClassName("lineBreak")[0],f=u.indexOf(l),d=[];f!=-1;)d.push(f),f=u.indexOf(l,f+1);var c="</span>",g="<br>",p='<span class="spanPadding" style="-webkit-box-decoration-break: clone; box-decoration-break: clone; ';if(d.length)d.forEach(function(e,t){if(0===t){for(var n="",r=0;r<e;r++)a+=u[r].outerHTML,0===r&&(n=i.concat(u[r].style.cssText));a=p+n+'">'+a}for(var l="",f=e+1;f<u.length;f++)o+=u[f].outerHTML,f===u.length-1&&(l+=i.concat(u[f].style.cssText));o=p+l+'">'+o,a&&o&&t===d.length-1?s+=a+c+g+o+c:a&&o&&t!==d.length-1?s+=a+c+g+o+c+g:a&&!o?s+=a+c:!a&&o&&t===d.length-1?s+=o+c:!a&&o&&t!==d.length-1&&(s+=o+c+g)});else{for(var h="",v=0;v<u.length;v++)h+=u[v].style.cssText;s=p+i+h+'">'+e.innerHTML+c}return s}function N(e,t){var n=document.createElement("div");return e.forEach(function(e){if(!e.hasOwnProperty("metadata"))if(e.hasOwnProperty("span")){var r=e.span.__children,i=document.createElement("span");if(e.span.hasOwnProperty("style")){var a=M(e.span.style,t);i.className="spanPadding "+e.span.style,i.style.cssText=a.join(" ")}r.forEach(function(e){if(!r.hasOwnProperty("metadata"))if(e.hasOwnProperty("#text")){var t=document.createTextNode(e["#text"]);i.appendChild(t)}else if("br"in e){i.hasChildNodes()&&n.appendChild(i);var a=document.createElement("br");a.className="lineBreak",n.appendChild(a);var o=document.createElement("span");o.className=i.className,o.style.cssText=i.style.cssText,i=o}}),n.appendChild(i)}else if(e.hasOwnProperty("br")){var o=document.createElement("br");o.className="lineBreak",n.appendChild(o)}else if(e.hasOwnProperty("#text")){var s=document.createElement("span");s.textContent=e["#text"],n.appendChild(s)}}),n}function L(e,t,n){var r,i,a=[],o=e.region,s=t.region;return s&&(r=O(s,n)),o?(i=a.concat(O(o,n)),a=r?I(r,i):i):r&&(a=r),F(a,z),a}function x(e,t){var n,r,i,a=[],o=e.style,s=K.tt.body.style,u=K.tt.body.div.style,l="";return s&&(n=M(s,t),l="paragraph "+s),u&&(r=M(u,t),n?(r=I(n,r),l+=" "+u):l="paragraph "+u),o?(i=M(o,t),n&&r?(a=I(r,i),l+=" "+o):n?(a=I(n,i),l+=" "+o):r?(a=I(r,i),l+=" "+o):(a=i,l="paragraph "+o)):n&&!r?a=n:!n&&r&&(a=r),F(a,W),[a,l]}function F(e,t){for(var n in t)t.hasOwnProperty(n)&&(E(n,e)||e.push(n+":"+t[n]))}var U=this.context,B=(0,d["default"])(U).getInstance().log,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=0;return k={parse:f,setConfig:e},p(),k}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=r(o),u=n(35),l=r(u),f=n(4),d=r(f),c=3600,g=60;i.__dashjs_factory_name="TTMLParser",t["default"]=s["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){f=/(?:\r\n|\r|\n)/gm,d=/-->/,c=/(^[\s]+|[\s]+$)/g,g=/\s\b/g}function t(e){var t,i,o=[];e=e.split(f),t=e.length,i=-1;for(var u=0;u<t;u++){var l=e[u];if(l.length>0&&"WEBVTT"!==l&&l.match(d)){var g=r(l),p=g.cuePoints,h=g.styles,v=a(e,u+1),m=n(p[0].replace(c,"")),_=n(p[1].replace(c,""));!isNaN(m)&&!isNaN(_)&&m>=i&&_>m?""!==v?(i=m,o.push({start:m,end:_,data:v,styles:h})):s("Skipping cue due to empty/malformed cue text"):s("Skipping cue due to incorrect cue timing")}}return o}function n(e){var t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2===n&&(e+=3600*parseInt(t[0],10)),e}function r(e){var t=e.split(d),n=t[1].split(g);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:i(n)}}function i(e){var t={};return e.forEach(function(e){if(e.split(/:/).length>1){var n=e.split(/:/)[1];n&&n.search(/%/)!=-1&&(n=parseInt(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line=n),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}}),t}function a(e,t){for(var n,r=t,i="",a="";""!==e[r]&&r<e.length;)r++;if(n=r-t,n>1)for(var o=0;o<n;o++){if(a=e[t+o],a.match(d)){i="";break}i+=a,o!==n-1&&(i+="\n")}else a=e[t],a.match(d)||(i=a);return decodeURI(i)}var o=this.context,s=(0,u["default"])(o).getInstance().log,l=void 0,f=void 0,d=void 0,c=void 0,g=void 0;return l={parse:t},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(4),u=r(s);i.__dashjs_factory_name="VTTParser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.qualityIndex=NaN};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(23),l=r(u),f=function(e){function t(e){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.url=e||null,this.checkForExistenceOnly=!0}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.offset=NaN,this.type=null,this.size=NaN,this.isComplete=!0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[],this.BolaState=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0,this.isFirst=!0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.video=null,this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this._s=void 0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.level=null};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";
38
+ function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),o=r(a),s=function u(){i(this,u),this.target=null,this.state=o["default"].BUFFER_EMPTY};t["default"]=s,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.time=null,this.range=null,this.manifestInfo=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.time=null,this.droppedFrames=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function o(){n(this,o),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.trackInfo=[]},i=function s(){n(this,s),this.id=null,this.index=null,this.start=null,this.duration=null},a=function u(){n(this,u),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};t.ManifestUpdate=r,t.ManifestUpdateStreamInfo=i,t.ManifestUpdateTrackInfo=a},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.mt=null,this.to=null,this.lto=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.loadingRequests=[],this.executedRequests=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.tcpid=null,this.dest=null,this.topen=null,this.tclose=null,this.tconnect=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";var n=t.decimalAdjust=function(e,t,n){return"undefined"==typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!==0?NaN:(t=t.toString().split("e"),t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+n:n))))};e.exports={round10:function(e,t){return n("round",e,t)},floor10:function(e,t){return n("floor",e,t)},ceil10:function(e,t){return n("ceil",e,t)}},e.exports.polyfill=function(){Math.round10||(Math.round10=e.exports.round10),Math.floor10||(Math.floor10=e.exports.floor10),Math.ceil10||(Math.ceil10=e.exports.ceil10)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r=n(72);r(flowplayer)}]);
39
+ /*@
40
+ @end
41
+ @*/
flowplayer/flowplayer.hlsjs.min.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+
3
+ hlsjs engine plugin for Flowplayer HTML5
4
+
5
+ Copyright (c) 2015-2016, Flowplayer Oy
6
+
7
+ Released under the MIT License:
8
+ http://www.opensource.org/licenses/mit-license.php
9
+
10
+ Includes hls.js
11
+ Copyright (c) 2015 Dailymotion (http://www.dailymotion.com)
12
+ https://github.com/dailymotion/hls.js/blob/master/LICENSE
13
+
14
+ Requires Flowplayer HTML5 version 6.x
15
+ v1.0.2-14-g2d7302f
16
+
17
+ */
18
+ /*@cc_on @*/
19
+ /*@
20
+ @if (@_jscript_version > 10)
21
+ @*/
22
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Hls=e()}}(function(){var e;return function e(t,r,i){function a(s,o){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(n)return n(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var d=r[s]={exports:{}};t[s][0].call(d.exports,function(e){var r=t[s][1][e];return a(r?r:e)},d,d.exports,e,t,r,i)}return r[s].exports}for(var n="function"==typeof require&&require,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(e,t,r){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function a(e){return"function"==typeof e}function n(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!n(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,r,i,n,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(r=this._events[e],o(r))return!1;if(a(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:n=Array.prototype.slice.call(arguments,1),r.apply(this,n)}else if(s(r))for(n=Array.prototype.slice.call(arguments,1),u=r.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,n);return!0},i.prototype.addListener=function(e,t){var r;if(!a(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,a(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,"function"==typeof console.trace)),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!a(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},i.prototype.removeListener=function(e,t){var r,i,n,o;if(!a(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],n=r.length,i=-1,r===t||a(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(o=n;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){i=o;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],a(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?a(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(a(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],2:[function(t,r,i){!function(t){var a={buildAbsoluteURL:function(e,t){if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var r=null,i=null,n=/^([^#]*)(.*)$/.exec(t);n&&(i=n[2],t=n[1]);var s=/^([^\?]*)(.*)$/.exec(t);s&&(r=s[2],t=s[1]);var o=/^([^#]*)(.*)$/.exec(e);o&&(e=o[1]);var l=/^([^\?]*)(.*)$/.exec(e);l&&(e=l[1]);var u=/^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(e);if(!u)throw new Error("Error trying to parse base URL.");var d=u[2]||"",h=u[1]||"",f=u[4],c=null;return c=/^\/\//.test(t)?d+"//"+a.buildAbsolutePath("",t.substring(2)):/^\//.test(t)?h+"/"+a.buildAbsolutePath("",t.substring(1)):a.buildAbsolutePath(h+f,t),r&&(c+=r),i&&(c+=i),c},buildAbsolutePath:function(e,t){for(var r,i,a=t,n="",s=e.replace(/[^\/]*$/,a.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),o=0;i=s.indexOf("/../",o),i>-1;o=i+r)r=/^\/(?:\.\.\/)*/.exec(s.slice(i))[0].length,n=(n+s.substring(o,i)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(r-1)/3+"}$"),"/");return n+s.substr(o)}};"object"==typeof i&&"object"==typeof r?r.exports=a:"function"==typeof e&&e.amd?e([],function(){return a}):"object"==typeof i?i.URLToolkit=a:t.URLToolkit=a}(this)},{}],3:[function(e,t,r){var i=arguments[3],a=arguments[4],n=arguments[5],s=JSON.stringify;t.exports=function(e,t){function r(e){p[e]=!0;for(var t in a[e][1]){var i=a[e][1][t];p[i]||r(i)}}for(var o,l=Object.keys(n),u=0,d=l.length;u<d;u++){var h=l[u],f=n[h].exports;if(f===e||f&&f.default===e){o=h;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var c={},u=0,d=l.length;u<d;u++){var h=l[u];c[h]=h}a[o]=[Function(["require","module","exports"],"("+e+")(self)"),c]}var v=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[o]=o,a[v]=[Function(["require"],"var f = require("+s(o)+");(f.default ? f.default : f)(self);"),g];var p={};r(v);var y="("+i+")({"+Object.keys(p).map(function(e){return s(e)+":["+a[e][0]+","+s(a[e][1])+"]"}).join(",")+"},{},["+s(v)+"])",m=window.URL||window.webkitURL||window.mozURL||window.msURL,E=new Blob([y],{type:"text/javascript"});if(t&&t.bare)return E;var b=m.createObjectURL(E),_=new Worker(b);return _.objectURL=b,_}},{}],4:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(30),c=i(f),v=e(26),g=e(45),p=e(9),y=i(p),m=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR));return r.lastLoadedFragLevel=0,r._autoLevelCapping=-1,r._nextAutoLevel=-1,r.hls=e,r.onCheck=r.abandonRulesCheck.bind(r),r}return s(t,e),o(t,[{key:"destroy",value:function(){this.clearTimer(),h.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag;if("main"===t.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this.bwEstimator){var r=this.hls,i=e.frag.level,a=r.levels[i].details.live,n=r.config,s=void 0,o=void 0;a?(s=n.abrEwmaFastLive,o=n.abrEwmaSlowLive):(s=n.abrEwmaFastVoD,o=n.abrEwmaSlowVoD),this.bwEstimator=new y.default(r,o,s,n.abrEwmaDefaultEstimate)}this.fragCurrent=t}}},{key:"abandonRulesCheck",value:function(){var e=this.hls,t=e.media,r=this.fragCurrent,i=r.loader,a=this.minAutoLevel;if(!i||i.stats&&i.stats.aborted)return g.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var n=i.stats;if(t&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&r.autoLevel&&r.level){var s=performance.now()-n.trequest,o=Math.abs(t.playbackRate);if(s>500*r.duration/o){var l=e.levels,d=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),h=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*l[r.level].bitrate/8)),f=t.currentTime,v=(h-n.loaded)/d,p=(c.default.bufferInfo(t,f,e.config.maxBufferHole).end-f)/o;if(p<2*r.duration/o&&v>p){var y=void 0,m=void 0;for(m=r.level-1;m>a&&(y=r.duration*l[m].bitrate/(6.4*d),!(y<p));m--);y<v&&(g.logger.warn("loading too slow, abort fragment loading and switch to level "+m+":fragLoadedDelay["+m+"]<fragLoadedDelay["+(r.level-1)+"];bufferStarvationDelay:"+y.toFixed(1)+"<"+v.toFixed(1)+":"+p.toFixed(1)),e.nextLoadLevel=m,this.bwEstimator.sample(s,n.loaded),i.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,stats:n}))}}}}},{key:"onFragLoaded",value:function(e){var t=e.frag;if("main"===t.type&&(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,e.frag.bitrateTest)){var r=e.stats;r.tparsed=r.tbuffered=r.tload,this.onFragBuffered(e)}}},{key:"onFragBuffered",value:function(e){var t=e.stats,r=e.frag;if(t.aborted!==!0&&1===r.loadCounter&&"main"===r.type&&(!r.bitrateTest||t.tload===t.tbuffered)){var i=t.tbuffered-t.trequest;g.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this.bwEstimator.sample(i,t.loaded),r.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}}},{key:"onError",value:function(e){switch(e.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"findBestLevel",value:function(e,t,r,i,a,n,s,o,l){for(var u=a;u>=i;u--){var d=l[u],h=d.details,f=h?h.totalduration/h.fragments.length:t,c=!!h&&h.live,v=void 0;v=u<=e?s*r:o*r;var p=l[u].bitrate,y=p*f/v;if(g.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(v)+"/"+p+"/"+f+"/"+n+"/"+y),v>p&&(!y||c||y<n))return u}return-1}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping=e}},{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator,r=this.hls,i=r.levels,a=r.config.minAutoBitrate;if(!(e===-1||t&&t.canEstimate()))return Math.min(e,this.maxAutoLevel);var n=this.nextABRAutoLevel;if(e!==-1&&(n=Math.min(e,n)),void 0!==a)for(;i[n].bitrate<a;)n++;return n},set:function(e){this._nextAutoLevel=e}},{key:"minAutoLevel",get:function(){for(var e=this.hls,t=e.levels,r=e.config.minAutoBitrate,i=0;i<t.length;i++)if(t[i].bitrate>r)return i;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.hls.levels,r=this._autoLevelCapping;return e=r===-1&&t&&t.length?t.length-1:r}},{key:"nextABRAutoLevel",get:function(){var e=this.hls,t=this.maxAutoLevel,r=e.levels,i=e.config,a=this.minAutoLevel,n=e.media,s=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,l=n?n.currentTime:0,u=n&&0!==n.playbackRate?Math.abs(n.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,h=(c.default.bufferInfo(n,l,i.maxBufferHole).end-l)/u,f=this.findBestLevel(s,o,d,a,t,h,i.abrBandWidthFactor,i.abrBandWidthUpFactor,r);if(f>=0)return f;g.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var v=i.maxStarvationDelay,p=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(0===h){var m=this.bitrateTestDelay;m&&(v=i.maxLoadingDelay-m,g.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*v)+" ms"),p=y=1)}return f=this.findBestLevel(s,o,d,a,t,h+v,p,y,r),Math.max(f,0)}}]),t}(h.default);r.default=m},{26:26,27:27,28:28,30:30,45:45,9:9}],5:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(41),u=i(l),d=e(30),h=i(d),f=e(22),c=i(f),v=e(28),g=i(v),p=e(27),y=i(p),m=e(31),E=i(m),b=e(47),_=i(b),R=e(26),k=e(45),T={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR"},A=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.AUDIO_TRACKS_UPDATED,g.default.AUDIO_TRACK_SWITCH,g.default.AUDIO_TRACK_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED));return r.config=e.config,r.audioCodecSwap=!1,r.ticks=0,r.ontick=r.tick.bind(r),r}return s(t,e),o(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),y.default.prototype.destroy.call(this),this.state=T.STOPPED}},{key:"startLoad",value:function(e){if(this.tracks){var t=this.media,r=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,t&&r?(k.logger.log("configure startPosition @"+r),this.state=T.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=T.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=T.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var e,t,r,i=this.hls,a=i.config;switch(this.state){case T.ERROR:case T.PAUSED:break;case T.STARTING:this.state=T.WAITING_TRACK,this.loadedmetadata=!1;break;case T.IDLE:if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;e=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition;var n=this.mediaBuffer?this.mediaBuffer:this.media,s=h.default.bufferInfo(n,e,a.maxBufferHole),o=s.len,l=s.end,d=this.fragPrevious,f=a.maxMaxBufferLength;if(o<f&&this.trackId<this.tracks.length){if(r=this.tracks[this.trackId].details,"undefined"==typeof r){this.state=T.WAITING_TRACK;break}if(!r.live&&d&&d.sn===r.endSN&&(!this.media.seeking||this.media.duration-l<d.duration/2)){this.hls.trigger(g.default.BUFFER_EOS,{type:"audio"}),this.state=T.ENDED;break}var c=r.fragments,v=c.length,p=c[0].start,y=c[v-1].start+c[v-1].duration,m=void 0;if(l<p?m=c[0]:!function(){var e=void 0,t=a.maxFragLookUpTolerance;l<y?(l>y-t&&(t=0),e=u.default.search(c,function(e){return e.start+e.duration-t<=l?1:e.start-t>l?-1:0})):e=c[v-1],e&&(m=e,p=e.start,d&&m.level===d.level&&m.sn===d.sn&&(m.sn<r.endSN?(m=c[m.sn+1-r.startSN],k.logger.log("SN just loaded, load next one: "+m.sn)):m=null))}(),m)if(null!=m.decryptdata.uri&&null==m.decryptdata.key)k.logger.log("Loading key for "+m.sn+" of ["+r.startSN+" ,"+r.endSN+"],track "+this.trackId),this.state=T.KEY_LOADING,i.trigger(g.default.KEY_LOADING,{frag:m});else{if(k.logger.log("Loading "+m.sn+" of ["+r.startSN+" ,"+r.endSN+"],track "+this.trackId+", currentTime:"+e+",bufferEnd:"+l.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,m.loadCounter){m.loadCounter++;var E=a.fragLoadingLoopThreshold;if(m.loadCounter>E&&Math.abs(this.fragLoadIdx-m.loadIdx)<E)return void i.trigger(g.default.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:m})}else m.loadCounter=1;m.loadIdx=this.fragLoadIdx,this.fragCurrent=m,this.startFragRequested=!0,i.trigger(g.default.FRAG_LOADING,{frag:m}),this.state=T.FRAG_LOADING}}break;case T.WAITING_TRACK:t=this.tracks[this.trackId],t&&t.details&&(this.state=T.IDLE);break;case T.FRAG_LOADING_WAITING_RETRY:var b=performance.now(),_=this.retryDate;n=this.media;var A=n&&n.seeking;(!_||b>=_||A)&&(k.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=T.IDLE);break;case T.STOPPED:case T.FRAG_LOADING:case T.PARSING:case T.PARSED:case T.ENDED:}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(k.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.tracks;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===T.ENDED&&(this.state=T.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onAudioTracksUpdated",value:function(e){k.logger.log("audio tracks updated"),this.tracks=e.audioTracks}},{key:"onAudioTrackSwitch",value:function(e){var t=!!e.url;this.trackId=e.id,this.state=T.IDLE,this.fragCurrent=null,this.state=T.PAUSED,t?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),this.tick()}},{key:"onAudioTrackLoaded",value:function(e){var t=e.details,r=e.id,i=this.tracks[r],a=t.totalduration;if(k.logger.log("track "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.PTSKnown=!1,i.details=t,!this.startFragRequested){if(this.startPosition===-1){var n=t.startTimeOffset;isNaN(n)?this.startPosition=0:(k.logger.log("start time offset found in playlist, adjust startPosition to "+n),this.startPosition=n)}this.nextLoadPosition=this.startPosition}this.state===T.WAITING_TRACK&&(this.state=T.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===T.KEY_LOADING&&(this.state=T.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent;if(this.state===T.FRAG_LOADING&&t&&"audio"===e.frag.type&&e.frag.level===t.level&&e.frag.sn===t.sn){this.state=T.PARSING,this.stats=e.stats;var r=this.tracks[this.trackId],i=r.details,a=i.totalduration,n=t.start,s=t.level,o=t.sn,l=this.config.defaultAudioCodec||r.audioCodec;this.pendingAppending=0,this.demuxer||(this.demuxer=new c.default(this.hls,"audio")),k.logger.log("Demuxing "+o+" of ["+i.startSN+" ,"+i.endSN+"],track "+s);var u=i.PTSKnown||!i.live;this.demuxer.push(e.payload,l,null,n,t.cc,s,o,a,t.decryptdata,u)}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent;if(t&&"audio"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===T.PARSING){var r=e.tracks,i=void 0;if(i=r.audio){i.levelCodec="mp4a.40.2",i.id=e.id,this.hls.trigger(g.default.BUFFER_CODECS,r),k.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;a&&(this.pendingAppending++,this.hls.trigger(g.default.BUFFER_APPENDING,{type:"audio",data:a,parent:"audio",content:"initSegment"})),this.tick()}}}},{key:"onFragParsingData",value:function(e){var t=this,r=this.fragCurrent;if(r&&"audio"===e.id&&e.sn===r.sn&&e.level===r.level&&this.state===T.PARSING){var i=this.tracks[this.trackId],a=this.fragCurrent;k.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),E.default.updateFragPTSDTS(i.details,a.sn,e.startPTS,e.endPTS),[e.data1,e.data2].forEach(function(r){r&&(t.pendingAppending++,t.hls.trigger(g.default.BUFFER_APPENDING,{type:e.type,data:r,parent:"audio",content:"data"}))}),this.nextLoadPosition=e.endPTS,this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent;t&&"audio"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===T.PARSING&&(this.stats.tparsed=performance.now(),this.state=T.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(e){if("audio"===e.parent)switch(this.state){case T.PARSING:case T.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===T.PARSED&&0===this.pendingAppending){var e=this.fragCurrent,t=this.stats;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;k.logger.log("audio buffered : "+_.default.toString(r.buffered)),this.state=T.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case R.ErrorDetails.FRAG_LOAD_ERROR:case R.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!e.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r,t.loadCounter=0;var a=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);k.logger.warn("audioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.state=T.FRAG_LOADING_WAITING_RETRY}else k.logger.error("audioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=T.ERROR}break;case R.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case R.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case R.ErrorDetails.KEY_LOAD_ERROR:case R.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==T.ERROR&&(this.state=e.fatal?T.ERROR:T.IDLE,k.logger.warn("audioStreamController: "+e.details+" while loading frag,switch to "+this.state+" state ..."))}}},{key:"onBufferFlushed",value:function(){this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=T.IDLE,this.fragPrevious=null,this.tick()}}]),t}(y.default);r.default=A},{22:22,26:26,27:27,28:28,30:30,31:31,41:41,45:45,47:47}],6:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(45),c=function(e){function t(e){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.AUDIO_TRACK_LOADED))}return s(t,e),o(t,[{key:"destroy",value:function(){h.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(e){var t=this,r=e.audioTracks||[],i=!1;this.tracks=r,this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:r});var a=0;r.forEach(function(e){return e.default?(t.audioTrack=a,void(i=!0)):void a++}),i===!1&&r.length&&(f.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(e){e.id<this.tracks.length&&(f.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*e.details.targetduration)),!e.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{key:"setAudioTrackInternal",value:function(e){if(e>=0&&e<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=e,f.logger.log("switching to audioTrack "+e);var t=this.tracks[e],r=t.type,i=t.url;this.hls.trigger(u.default.AUDIO_TRACK_SWITCH,{id:e,type:r,url:i});var a=t.details;!i||void 0!==a&&a.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+e),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:i,id:e}))}}},{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.trackId===e&&void 0!==this.tracks[e].details||this.setAudioTrackInternal(e)}}]),t}(h.default);r.default=c},{27:27,28:28,45:45}],7:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(45),c=e(26),v=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED));return r._msDuration=null,r._levelDuration=null,r.onsbue=r.onSBUpdateEnd.bind(r),r.onsbe=r.onSBUpdateError.bind(r),r.pendingTracks={},r.tracks={},r}return s(t,e),o(t,[{key:"destroy",value:function(){h.default.prototype.destroy.call(this)}},{key:"onLevelPtsUpdated",value:function(e){var t=e.type,r=this.tracks.audio;if("audio"===t&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio,a=Math.abs(i.timestampOffset-e.start);if(a>.1){var n=i.updating;try{i.abort()}catch(e){n=!0,f.logger.warn("can not abort audio buffer: "+e)}n?this.audioTimestampOffset=e.start:(f.logger.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}}},{key:"onManifestParsed",value:function(e){var t=e.audio,r=e.video,i=0;e.altAudio&&(t||r)&&(i=(t?1:0)+(r?1:0),f.logger.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i}},{key:"onMediaAttaching",value:function(e){var t=this.media=e.media;if(t){var r=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),t.src=URL.createObjectURL(r)}}},{key:"onMediaDetaching",value:function(){f.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){f.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(u.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){f.logger.log("media source opened"),this.hls.trigger(u.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var e=this.pendingTracks,t=Object.keys(e).length;t&&(this.sourceBufferNb<=t||0===this.sourceBufferNb)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){f.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){f.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;f.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1,this.hls.trigger(u.default.BUFFER_APPENDED,{parent:this.parent}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(e){f.logger.error("sourceBuffer error:"+e),this.hls.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var e=this.sourceBuffer;for(var t in e){var r=e[t];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(e){if(0===Object.keys(this.sourceBuffer).length){for(var t in e)this.pendingTracks[t]=e[t];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}}},{key:"createSourceBuffers",value:function(e){var t=this.sourceBuffer,r=this.mediaSource;for(var i in e)if(!t[i]){
23
+ var a=e[i],n=a.levelCodec||a.codec,s=a.container+";codecs="+n;f.logger.log("creating sourceBuffer("+s+")");try{var o=t[i]=r.addSourceBuffer(s);o.addEventListener("updateend",this.onsbue),o.addEventListener("error",this.onsbe),this.tracks[i]={codec:n,container:a.container},a.buffer=o}catch(e){f.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:s})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:e})}},{key:"onBufferAppending",value:function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())}},{key:"onBufferAppendFail",value:function(e){f.logger.error("sourceBuffer error:"+e.event),this.hls.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"onBufferEos",value:function(e){var t=this.sourceBuffer,r=e.type;for(var i in t)r&&i!==r||t[i].ended||(t[i].ended=!0,f.logger.log(i+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var e=this.sourceBuffer,t=this.mediaSource;if(!t||"open"!==t.readyState)return void(this._needsEos=!1);for(var r in e){if(!e[r].ended)return;if(e[r].updating)return void(this._needsEos=!0)}f.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment"),t.endOfStream(),this._needsEos=!1}},{key:"onBufferFlushing",value:function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(e){var t=e.details;0!==t.fragments.length&&(this._levelDuration=t.totalduration+t.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var e=this.media,t=this.mediaSource,r=this.sourceBuffer,i=this._levelDuration;if(null!==i&&e&&t&&r&&0!==e.readyState&&"open"===t.readyState){for(var a in r)if(r[a].updating)return;null===this._msDuration&&(this._msDuration=t.duration),i>this._msDuration&&i>e.duration&&(f.logger.log("Updating mediasource duration to "+i.toFixed(3)),this._msDuration=t.duration=i)}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;for(var i in r)t+=r[i].buffered.length;this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var e=this.hls,t=this.sourceBuffer,r=this.segments;if(Object.keys(t).length){if(this.media.error)return this.segments=[],void f.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var i=r.shift();try{var a=i.type;t[a]?(t[a].ended=!1,this.parent=i.parent,t[a].appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(t){f.logger.error("error while trying to append buffer:"+t.message),r.unshift(i);var n={type:c.ErrorTypes.MEDIA_ERROR};if(22===t.code)return this.segments=[],n.details=c.ErrorDetails.BUFFER_FULL_ERROR,void e.trigger(u.default.ERROR,n);if(this.appendError?this.appendError++:this.appendError=1,n.details=c.ErrorDetails.BUFFER_APPEND_ERROR,n.frag=this.fragCurrent,this.appendError>e.config.appendErrorMaxRetry)return f.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],n.fatal=!0,void e.trigger(u.default.ERROR,n);n.fatal=!1,e.trigger(u.default.ERROR,n)}}}}},{key:"flushBuffer",value:function(e,t,r){var i,a,n,s,o,l,u=this.sourceBuffer;if(Object.keys(u).length){if(f.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime+"/"+e+"/"+t),this.flushBufferCounter<this.appended){for(var d in u)if(!r||d===r){if(i=u[d],i.ended=!1,i.updating)return f.logger.warn("cannot flush, sb updating in progress"),!1;for(a=0;a<i.buffered.length;a++)if(n=i.buffered.start(a),s=i.buffered.end(a),navigator.userAgent.toLowerCase().indexOf("firefox")!==-1&&t===Number.POSITIVE_INFINITY?(o=e,l=t):(o=Math.max(n,e),l=Math.min(s,t)),Math.min(l,s)-o>.5)return this.flushBufferCounter++,f.logger.log("flush "+d+" ["+o+","+l+"], of ["+n+","+s+"], pos:"+this.media.currentTime),i.remove(o,l),!1}}else f.logger.warn("abort flushing too many retries");f.logger.log("buffer flushed")}return!0}}]),t}(h.default);r.default=v},{26:26,27:27,28:28,45:45}],8:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=function(e){function t(e){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED))}return s(t,e),o(t,[{key:"destroy",value:function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))}},{key:"onFpsDropLevelCapping",value:function(e){this.restrictedLevels||(this.restrictedLevels=[]),this.isLevelRestricted(e.droppedLevel)||this.restrictedLevels.push(e.droppedLevel)}},{key:"onMediaAttaching",value:function(e){this.media=e.media instanceof HTMLVideoElement?e.media:null}},{key:"onManifestParsed",value:function(e){this.hls.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=e.levels,this.hls.firstLevel=this.getMaxLevel(e.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"detectPlayerSize",value:function(){if(this.media){var e=this.levels?this.levels.length:0;e&&(this.hls.autoLevelCapping=this.getMaxLevel(e-1),this.hls.autoLevelCapping>this.autoLevelCapping&&this.hls.streamController.nextLevelSwitch(),this.autoLevelCapping=this.hls.autoLevelCapping)}}},{key:"getMaxLevel",value:function(e){var t=0,r=void 0,i=void 0,a=this.mediaWidth,n=this.mediaHeight,s=0,o=0;for(r=0;r<=e&&(i=this.levels[r],!this.isLevelRestricted(r))&&(t=r,s=i.width,o=i.height,!(a<=s||n<=o));r++);return t}},{key:"isLevelRestricted",value:function(e){return!(!this.restrictedLevels||this.restrictedLevels.indexOf(e)===-1)}},{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}},{key:"mediaWidth",get:function(){var e=void 0;return this.media&&(e=this.media.width||this.media.clientWidth||this.media.offsetWidth,e*=this.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0;return this.media&&(e=this.media.height||this.media.clientHeight||this.media.offsetHeight,e*=this.contentScaleFactor),e}}]),t}(h.default);r.default=f},{27:27,28:28}],9:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(44),o=i(s),l=function(){function e(t,r,i,n){a(this,e),this.hls=t,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o.default(r),this.fast_=new o.default(i)}return n(e,[{key:"sample",value:function(e,t){e=Math.max(e,this.minDelayMs_);var r=8e3*t/e,i=e/1e3;this.fast_.sample(i,r),this.slow_.sample(i,r)}},{key:"canEstimate",value:function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),e}();r.default=l},{44:44}],10:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(45),c=function(e){function t(e){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING))}return s(t,e),o(t,[{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1}},{key:"onMediaAttaching",value:function(e){this.hls.config.capLevelOnFPSDrop&&(this.video=e.media instanceof HTMLVideoElement?e.media:null,"function"==typeof this.video.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),this.hls.config.fpsDroppedMonitoringPeriod))}},{key:"checkFPS",value:function(e,t,r){var i=performance.now();if(t){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=t-this.lastDecodedFrames,o=1e3*n/a;if(this.hls.trigger(u.default.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),o>0&&n>this.hls.config.fpsDroppedMonitoringThreshold*s){var l=this.hls.currentLevel;f.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(this.hls.autoLevelCapping===-1||this.hls.autoLevelCapping>=l)&&(l-=1,this.hls.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:this.hls.currentLevel}),this.hls.autoLevelCapping=l,this.hls.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){if(this.video)if(this.isVideoPlaybackQualityAvailable){var e=this.video.getVideoPlaybackQuality();this.checkFPS(this.video,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(this.video,this.video.webkitDecodedFrameCount,this.video.webkitDroppedFrameCount)}}]),t}(h.default);r.default=c},{27:27,28:28,45:45}],11:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(45),c=e(26),v=e(30),g=i(v),p=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.ERROR));return r.ontick=r.tick.bind(r),r._manualLevel=r._autoLevelCapping=-1,r}return s(t,e),o(t,[{key:"destroy",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this._manualLevel=-1}},{key:"startLoad",value:function(){this.canload=!0,this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",value:function(e){var t,r,i=[],a=[],n={},s=!1,o=!1,l=this.hls;if(e.levels.forEach(function(e){e.videoCodec&&(s=!0),(e.audioCodec||e.attrs&&e.attrs.AUDIO)&&(o=!0);var t=n[e.bitrate];void 0===t?(n[e.bitrate]=i.length,e.url=[e.url],e.urlId=0,i.push(e)):i[t].url.push(e.url)}),s&&o?i.forEach(function(e){e.videoCodec&&a.push(e)}):a=i,a=a.filter(function(e){var t=function(e){return MediaSource.isTypeSupported("audio/mp4;codecs="+e)},r=function(e){return MediaSource.isTypeSupported("video/mp4;codecs="+e)},i=e.audioCodec,a=e.videoCodec;return(!i||t(i))&&(!a||r(a))}),a.length){for(t=a[0].bitrate,a.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=a,r=0;r<a.length;r++)if(a[r].bitrate===t){this._firstLevel=r,f.logger.log("manifest loaded,"+a.length+" level(s) found, first bitrate:"+t);break}l.trigger(u.default.MANIFEST_PARSED,{levels:this._levels,firstLevel:this._firstLevel,stats:e.stats,audio:o,video:s,altAudio:e.audioTracks.length>0})}else l.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:l.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(e){var t=this._levels;if(e>=0&&e<t.length){this.timer&&(clearTimeout(this.timer),this.timer=null),this._level!==e&&(f.logger.log("switching to level "+e),this._level=e,this.hls.trigger(u.default.LEVEL_SWITCH,{level:e}));var r=t[e],i=r.details;if(!i||i.live===!0){var a=r.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:r.url[a],level:e,id:a})}}else this.hls.trigger(u.default.ERROR,{type:c.ErrorTypes.OTHER_ERROR,details:c.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})}},{key:"onError",value:function(e){if(!e.fatal){var t=e.details,r=this.hls,i=void 0,a=void 0,n=!1,s=r.abrController,o=s.minAutoLevel;switch(t){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:i=e.frag.level;break;case c.ErrorDetails.LEVEL_LOAD_ERROR:case c.ErrorDetails.LEVEL_LOAD_TIMEOUT:i=e.context.level,n=!0}if(void 0!==i)if(a=this._levels[i],a.urlId<a.url.length-1)a.urlId++,a.details=void 0,f.logger.warn("level controller,"+t+" for level "+i+": switching to redundant stream id "+a.urlId);else{var l=this._manualLevel===-1&&i;if(l)f.logger.warn("level controller,"+t+": emergency switch-down for next fragment"),s.nextAutoLevel=o;else if(a&&a.details&&a.details.live)f.logger.warn("level controller,"+t+" on live stream, discard"),n&&(this._level=void 0);else if(t===c.ErrorDetails.LEVEL_LOAD_ERROR||t===c.ErrorDetails.LEVEL_LOAD_TIMEOUT){var d=r.media,h=d&&g.default.isBuffered(d,d.currentTime)&&g.default.isBuffered(d,d.currentTime+.5);if(h){var v=r.config.levelLoadingRetryDelay;f.logger.warn("level controller,"+t+", but media buffered, retry in "+v+"ms"),this.timer=setTimeout(this.ontick,v)}else f.logger.error("cannot recover "+t+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),e.fatal=!0,r.trigger(u.default.ERROR,e)}}}}},{key:"onLevelLoaded",value:function(e){if(e.level===this._level){var t=e.details;if(t.live){var r=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),i=this._levels[e.level],a=i.details;a&&t.endSN===a.endSN&&(r/=2,f.logger.log("same live playlist, reload twice faster")),r-=performance.now()-e.stats.trequest,r=Math.max(1e3,Math.round(r)),f.logger.log("live playlist, reload in "+r+" ms"),this.timer=setTimeout(this.ontick,r)}else this.timer=null}}},{key:"tick",value:function(){var e=this._level;if(void 0!==e&&this.canload){var t=this._levels[e],r=t.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:t.url[r],level:e,id:r})}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(e){var t=this._levels;t&&t.length>e&&(this._level===e&&void 0!==t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(e){this._manualLevel=e,void 0===this._startLevel&&(this._startLevel=e),e!==-1&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=Math.max(e,this.hls.abrController.minAutoLevel)}},{key:"nextLoadLevel",get:function(){return this._manualLevel!==-1?this._manualLevel:this.hls.abrController.nextAutoLevel},set:function(e){this.level=e,this._manualLevel===-1&&(this.hls.abrController.nextAutoLevel=e)}}]),t}(h.default);r.default=p},{26:26,27:27,28:28,30:30,45:45}],12:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(41),u=i(l),d=e(30),h=i(d),f=e(22),c=i(f),v=e(28),g=i(v),p=e(27),y=i(p),m=e(31),E=i(m),b=e(47),_=i(b),R=e(26),k=e(45),T={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},A=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.MANIFEST_LOADING,g.default.MANIFEST_PARSED,g.default.LEVEL_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_LOAD_EMERGENCY_ABORTED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.AUDIO_TRACK_SWITCH,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED));return r.config=e.config,r.audioCodecSwap=!1,r.ticks=0,r.ontick=r.tick.bind(r),r}return s(t,e),o(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),y.default.prototype.destroy.call(this),this.state=T.STOPPED}},{key:"startLoad",value:function(e){if(this.levels){var t=this.media,r=this.lastCurrentTime,i=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,t&&r>0?(k.logger.log("configure startPosition @"+r.toFixed(3)),this.lastPaused||(k.logger.log("resuming video"),t.play())):this.lastCurrentTime=this.startPosition?this.startPosition:e,!this.startFragRequested){var a=i.startLevel;a===-1&&(a=0,this.bitrateTest=!0),this.level=i.nextLoadLevel=a,this.loadedmetadata=!1}this.state=T.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else k.logger.warn("cannot start loading as manifest not parsed yet"),this.state=T.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case T.ERROR:break;case T.BUFFER_FLUSHING:this.fragLoadError=0;break;case T.IDLE:if(!this._doTickIdle())return;break;case T.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=T.IDLE);break;case T.FRAG_LOADING_WAITING_RETRY:var t=performance.now(),r=this.retryDate;(!r||t>=r||this.media&&this.media.seeking)&&(k.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=T.IDLE);break;case T.ERROR:case T.PAUSED:case T.STOPPED:case T.FRAG_LOADING:case T.PARSING:case T.PARSED:case T.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var e=this.hls,t=e.config,r=this.media;if(void 0!==this.levelLastLoaded&&!r&&(this.startFragRequested||!t.startFragPrefetch))return!0;var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=e.nextLoadLevel,n=this.levels[a],s=n.bitrate,o=void 0;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=h.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,t.maxBufferHole),u=l.len;if(u>=o)return!0;k.logger.trace("buffer length of "+u.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=a;var d=n.details;if("undefined"==typeof d||d.live&&this.levelLastLoaded!==a)return this.state=T.WAITING_LEVEL,!0;var f=this.fragPrevious;if(!d.live&&f&&f.sn===d.endSN&&(!r.seeking&&l.len||r.duration-l.end<=f.duration/2)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(g.default.BUFFER_EOS,c),this.state=T.ENDED,!0}return this._fetchPayloadOrEos({pos:i,bufferInfo:l,levelDetails:d})}},{key:"_fetchPayloadOrEos",value:function(e){var t=e.pos,r=e.bufferInfo,i=e.levelDetails,a=this.fragPrevious,n=this.level,s=i.fragments,o=s.length;if(0===o)return!1;var l=s[0].start,u=s[o-1].start+s[o-1].duration,d=r.end,h=void 0;if(i.live){var f=this.config.initialLiveManifestSize;if(o<f)return k.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+f),!1;if(h=this._ensureFragmentAtLivePoint({levelDetails:i,bufferEnd:d,start:l,end:u,fragPrevious:a,fragments:s,fragLen:o}),null===h)return!1}else d<l&&(h=s[0]);return h||(h=this._findFragment({start:l,fragPrevious:a,fragLen:o,fragments:s,bufferEnd:d,end:u,levelDetails:i})),!h||this._loadFragmentOrKey({frag:h,level:n,levelDetails:i,pos:t,bufferEnd:d})}},{key:"_ensureFragmentAtLivePoint",value:function(e){var t=e.levelDetails,r=e.bufferEnd,i=e.start,a=e.end,n=e.fragPrevious,s=e.fragments,o=e.fragLen,l=this.hls.config,u=this.media,d=void 0,h=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*t.targetduration;if(r<Math.max(i,a-h)){var f=this.liveSyncPosition=this.computeLivePosition(i,t);k.logger.log("buffer end: "+r.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),r=f,u&&u.readyState&&u.duration>f&&(u.currentTime=f)}if(t.PTSKnown&&r>a&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(n){var c=n.sn+1;c>=t.startSN&&c<=t.endSN&&(d=s[c-t.startSN],k.logger.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=s[Math.min(o-1,Math.round(o/2))],k.logger.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d}},{key:"_findFragment",value:function(e){var t=e.start,r=e.fragPrevious,i=e.fragLen,a=e.fragments,n=e.bufferEnd,s=e.end,o=e.levelDetails,l=this.hls.config,d=void 0,h=void 0,f=l.maxFragLookUpTolerance;if(n<s?(n>s-f&&(f=0),h=u.default.search(a,function(e){return e.start+e.duration-f<=n?1:e.start-f>n&&e.start?-1:0})):h=a[i-1],h&&(d=h,t=h.start,r&&d.level===r.level&&d.sn===r.sn))if(d.sn<o.endSN){var c=r.deltaPTS,v=d.sn-o.startSN;c&&c>l.maxBufferHole&&r.dropped&&v?(d=a[v-1],k.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),r.loadCounter--):(d=a[v+1],k.logger.log("SN just loaded, load next one: "+d.sn))}else d=null;return d}},{key:"_loadFragmentOrKey",value:function(e){var t=e.frag,r=e.level,i=e.levelDetails,a=e.pos,n=e.bufferEnd,s=this.hls,o=s.config;if(null==t.decryptdata.uri||null!=t.decryptdata.key){if(k.logger.log("Loading "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+r+", currentTime:"+a.toFixed(3)+",bufferEnd:"+n.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var l=o.fragLoadingLoopThreshold;if(t.loadCounter>l&&Math.abs(this.fragLoadIdx-t.loadIdx)<l)return s.trigger(g.default.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:t}),!1}else t.loadCounter=1;return t.loadIdx=this.fragLoadIdx,this.fragCurrent=t,this.startFragRequested=!0,t.autoLevel=s.autoLevelEnabled,t.bitrateTest=this.bitrateTest,s.trigger(g.default.FRAG_LOADING,{frag:t}),this.state=T.FRAG_LOADING,!0}k.logger.log("Loading key for "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+r),this.state=T.KEY_LOADING,s.trigger(g.default.KEY_LOADING,{frag:t})}},{key:"getBufferRange",value:function(e){var t,r,i=this.bufferRange;if(i)for(t=i.length-1;t>=0;t--)if(r=i[t],e>=r.start&&e<=r.end)return r;return null}},{key:"followingBufferRange",value:function(e){return e?this.getBufferRange(e.end+.5):null}},{key:"_checkFragmentChanged",value:function(){var e,t,r=this.media;if(r&&r.readyState&&r.seeking===!1&&(t=r.currentTime,t>r.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=t),h.default.isBuffered(r,t)?e=this.getBufferRange(t):h.default.isBuffered(r,t+.1)&&(e=this.getBufferRange(t+.1)),e)){var i=e.frag;i!==this.fragPlaying&&(this.fragPlaying=i,this.hls.trigger(g.default.FRAG_CHANGED,{frag:i}))}}},{key:"immediateLevelSwitch",value:function(){if(k.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=T.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY})}},{key:"immediateLevelSwitchEnd",value:function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,h.default.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())}},{key:"nextLevelSwitch",value:function(){var e=this.media;if(e&&e.readyState){var t=void 0,r=void 0,i=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,r=this.getBufferRange(e.currentTime),r&&r.start>1&&(this.state=T.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:r.start-1})),e.paused)t=0;else{var a=this.hls.nextLoadLevel,n=this.levels[a],s=this.fragLastKbps;t=s&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*s)+1:0}if(i=this.getBufferRange(e.currentTime+t),i&&(i=this.followingBufferRange(i))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.state=T.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:i.start,endOffset:Number.POSITIVE_INFINITY})}}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(k.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var e=this.media,t=e?e.currentTime:void 0,r=this.config;if(k.logger.log("media seeking to "+t.toFixed(3)),this.state===T.FRAG_LOADING){var i=h.default.bufferInfo(e,t,this.config.maxBufferHole),a=this.fragCurrent;if(0===i.len&&a){var n=r.maxFragLookUpTolerance,s=a.start-n,o=a.start+a.duration+n;t<s||t>o?(a.loader&&(k.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=T.IDLE):k.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===T.ENDED&&(this.state=T.IDLE);e&&(this.lastCurrentTime=t),this.state!==T.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*r.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaSeeked",value:function(){k.logger.log("media seeked to "+this.media.currentTime.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){k.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){k.logger.log("trigger BUFFER_RESET"),this.hls.trigger(g.default.BUFFER_RESET),this.bufferRange=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(e){var t,r=!1,i=!1;e.levels.forEach(function(e){t=e.audioCodec,t&&(t.indexOf("mp4a.40.2")!==-1&&(r=!0),t.indexOf("mp4a.40.5")!==-1&&(i=!0))}),this.audioCodecSwitch=r&&i,this.audioCodecSwitch&&k.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;var a=this.config;a.autoStartLoad&&this.hls.startLoad(a.startPosition)}},{key:"onLevelLoaded",value:function(e){var t=e.details,r=e.level,i=this.levels[r],a=t.totalduration,n=0;if(k.logger.log("level "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),this.levelLastLoaded=r,t.live){var s=i.details;s&&t.fragments.length>0?(E.default.mergeDetails(s,t),n=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(n,s),t.PTSKnown?k.logger.log("live playlist sliding:"+n.toFixed(3)):k.logger.log("live playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,k.logger.log("live playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,this.hls.trigger(g.default.LEVEL_UPDATED,{details:t,level:r}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var o=t.startTimeOffset;isNaN(o)?t.live?(this.startPosition=this.computeLivePosition(n,t),k.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(o<0&&(k.logger.log("negative start time offset "+o+", count from end of last fragment"),o=n+a+o),k.logger.log("start time offset found in playlist, adjust startPosition to "+o),
24
+ this.startPosition=o)}this.nextLoadPosition=this.startPosition}this.state===T.WAITING_LEVEL&&(this.state=T.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===T.KEY_LOADING&&(this.state=T.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,r=e.frag;if(this.state===T.FRAG_LOADING&&t&&"main"===r.type&&r.level===t.level&&r.sn===t.sn){var i=e.stats,a=this.levels[t.level],n=a.details;if(k.logger.log("Loaded "+t.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+t.level),this.bitrateTest=!1,r.bitrateTest===!0&&this.hls.nextLoadLevel)this.state=T.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.tick();else{this.state=T.PARSING,this.stats=i;var s=n.totalduration,o=isNaN(t.startDTS)?t.start:t.startDTS,l=t.level,u=t.sn,d=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(k.logger.log("swapping playlist audio codec"),void 0===d&&(d=this.lastAudioCodec),d&&(d=d.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5")),this.pendingAppending=0,k.logger.log("Parsing "+u+" of ["+n.startSN+" ,"+n.endSN+"],level "+l+", cc "+t.cc);var h=this.demuxer;h||(h=this.demuxer=new c.default(this.hls,"main"));var f=n.PTSKnown||!n.live;h.push(e.payload,d,a.videoCodec,o,t.cc,l,u,s,t.decryptdata,f)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent;if(t&&"main"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===T.PARSING){var r,i,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,i=a.audio){var n=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();n&&this.audioCodecSwap&&(k.logger.log("swapping playlist audio codec"),n=n.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&s.indexOf("firefox")===-1&&(n="mp4a.40.5"),s.indexOf("android")!==-1&&"audio/mpeg"!==i.container&&(n="mp4a.40.2",k.logger.log("Android: force audio codec to"+n)),i.levelCodec=n,i.id=e.id}if(i=a.video,i&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),e.unique){var o={codec:"",levelCodec:""};for(r in e.tracks)i=a[r],o.container=i.container,o.codec&&(o.codec+=",",o.levelCodec+=","),i.codec&&(o.codec+=i.codec),i.levelCodec&&(o.levelCodec+=i.levelCodec);a={audiovideo:o}}this.hls.trigger(g.default.BUFFER_CODECS,a);for(r in a){i=a[r],k.logger.log("main track:"+r+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.pendingAppending++,this.hls.trigger(g.default.BUFFER_APPENDING,{type:r,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(e){var t=this,r=this.fragCurrent;if(r&&"main"===e.id&&e.sn===r.sn&&e.level===r.level&&("audio"!==e.type||!this.altAudio)&&this.state===T.PARSING){var i=this.levels[this.level],a=this.fragCurrent;k.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0));var n=E.default.updateFragPTSDTS(i.details,a.sn,e.startPTS,e.endPTS,e.startDTS,e.endDTS),s=this.hls;s.trigger(g.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:n,type:e.type,start:e.startPTS,end:e.endPTS}),"video"===e.type&&(a.dropped=e.dropped),[e.data1,e.data2].forEach(function(r){r&&(t.pendingAppending++,s.trigger(g.default.BUFFER_APPENDING,{type:e.type,data:r,parent:"main",content:"data"}))}),this.nextLoadPosition=e.endPTS,this.bufferRange.push({type:e.type,start:e.startPTS,end:e.endPTS,frag:a}),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent;t&&"main"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===T.PARSING&&(this.stats.tparsed=performance.now(),this.state=T.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitch",value:function(e){var t=!!e.url;if(t)this.videoBuffer&&this.mediaBuffer!==this.videoBuffer&&(k.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=this.videoBuffer);else if(this.mediaBuffer!==this.media){k.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(k.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.IDLE}this.altAudio=t}},{key:"onBufferCreated",value:function(e){var t=e.tracks,r=void 0,i=void 0,a=!1;for(var n in t){var s=t[n];"main"===s.id?(i=n,r=s,"video"===n&&(this.videoBuffer=t[n].buffer)):a=!0}a&&r?(k.logger.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(e){if("main"===e.parent)switch(this.state){case T.PARSING:case T.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===T.PARSED&&0===this.pendingAppending){var e=this.fragCurrent,t=this.stats;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*t.total/(t.tbuffered-t.tfirst)),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"main"});var r=this.mediaBuffer?this.mediaBuffer:this.media;k.logger.log("main buffered : "+_.default.toString(r.buffered)),this.state=T.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var r=this.media,i=r&&h.default.isBuffered(r,r.currentTime)&&h.default.isBuffered(r,r.currentTime+.5);switch(e.details){case R.ErrorDetails.FRAG_LOAD_ERROR:case R.ErrorDetails.FRAG_LOAD_TIMEOUT:case R.ErrorDetails.KEY_LOAD_ERROR:case R.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal){var a=this.fragLoadError;a?a++:a=1;var n=this.config;if(a<=n.fragLoadingMaxRetry||i||t.autoLevel&&t.level){this.fragLoadError=a,t.loadCounter=0;var s=Math.min(Math.pow(2,a-1)*n.fragLoadingRetryDelay,n.fragLoadingMaxRetryTimeout);k.logger.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=performance.now()+s,this.state=T.FRAG_LOADING_WAITING_RETRY}else k.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=T.ERROR}break;case R.ErrorDetails.FRAG_LOOP_LOADING_ERROR:e.fatal||(i?(this._reduceMaxBufferLength(t.duration),this.state=T.IDLE):t.autoLevel&&0!==t.level||(e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=T.ERROR));break;case R.ErrorDetails.LEVEL_LOAD_ERROR:case R.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==T.ERROR&&(e.fatal?(this.state=T.ERROR,k.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):this.state===T.WAITING_LEVEL&&(this.state=T.IDLE));break;case R.ErrorDetails.BUFFER_FULL_ERROR:this.state!==T.PARSING&&this.state!==T.PARSED||(i?(this._reduceMaxBufferLength(t.duration),this.state=T.IDLE):(k.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.state=T.PAUSED,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY})))}}}},{key:"_reduceMaxBufferLength",value:function(e){var t=this.config;t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,k.logger.warn("reduce max buffer length to "+t.maxMaxBufferLength+"s and switch to IDLE state"),this.fragLoadIdx+=2*t.fragLoadingLoopThreshold)}},{key:"_checkBuffer",value:function(){var e=this.media;if(e&&e.readyState){var t=e.currentTime,r=e.buffered;if(!this.loadedmetadata&&r.length){this.loadedmetadata=!0;var i=this.startPosition,a=h.default.isBuffered(e,i);t===i&&a||(k.logger.log("target start position:"+i),a||(i=r.start(0),k.logger.log("target start position not buffered, seek to buffered.start(0) "+i)),k.logger.log("adjust currentTime from "+t+" to "+i),e.currentTime=i)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var n=h.default.bufferInfo(e,t,0),s=!(e.paused||e.ended||0===e.buffered.length),o=.5,l=t>e.playbackRate*this.lastCurrentTime,u=this.config;if(this.stalled&&l&&(this.stalled=!1,k.logger.log("playback not stuck anymore @"+t)),s&&n.len<=o&&(l?(o=0,this.seekHoleNudgeDuration=0):this.stalled?this.seekHoleNudgeDuration+=u.seekHoleNudgeDuration:(this.seekHoleNudgeDuration=0,k.logger.log("playback seems stuck @"+t),this.hls.trigger(g.default.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1}),this.stalled=!0),n.len<=o)){var d=n.nextStart,f=d-t;if(d&&f<u.maxSeekHole&&f>0){k.logger.log("adjust currentTime from "+e.currentTime+" to next buffered @ "+d+" + nudge "+this.seekHoleNudgeDuration);var c=d+this.seekHoleNudgeDuration-e.currentTime;e.currentTime=d+this.seekHoleNudgeDuration,this.hls.trigger(g.default.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:c})}}}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=T.IDLE,this.loadedmetadata||(this.startFragRequested=!1),this.tick()}},{key:"onBufferFlushed",value:function(){var e=this.mediaBuffer?this.mediaBuffer:this.media,t=this.bufferRange,r=[],i=void 0,a=void 0;for(a=0;a<t.length;a++)i=t[a],h.default.isBuffered(e,(i.start+i.end)/2)&&r.push(i);this.bufferRange=r,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=T.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",value:function(e,t){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-r)}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,k.logger.log("engine state transition from "+t+" to "+e),this.hls.trigger(g.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferRange(e.currentTime);if(t)return t.frag.level}return-1}},{key:"nextBufferRange",get:function(){var e=this.media;return e?this.followingBufferRange(this.getBufferRange(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferRange;return e?e.frag.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(y.default);r.default=A},{22:22,26:26,27:27,28:28,30:30,31:31,41:41,45:45,47:47}],13:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(42),c=i(f),v=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.MANIFEST_LOADING,u.default.FRAG_LOADED,u.default.LEVEL_SWITCH));if(r.hls=e,r.config=e.config,r.enabled=!0,r.Cues=e.config.cueHandler,r.config.enableCEA708Captions){var i=r,s={newCue:function(e,t,r){if(!i.textTrack1){var a=i.getExistingTrack("1");if(a){i.textTrack1=a,i.clearCurrentCues(i.textTrack1);var n=new window.Event("addtrack");n.track=i.textTrack1,i.media.dispatchEvent(n)}else i.textTrack1=i.createTextTrack("captions","English","en"),i.textTrack1.textTrack1=!0}i.Cues.newCue(i.textTrack1,e,t,r)}},o={newCue:function(e,t,r){if(!i.textTrack2){var a=i.getExistingTrack("2");if(a){i.textTrack2=a,i.clearCurrentCues(i.textTrack2);var n=new window.Event("addtrack");n.track=i.textTrack2,i.media.dispatchEvent(n)}else i.textTrack2=i.createTextTrack("captions","Spanish","es"),i.textTrack2.textTrack2=!0}i.Cues.newCue(i.textTrack2,e,t,r)}};r.cea608Parser=new c.default(0,s,o)}return r}return s(t,e),o(t,[{key:"clearCurrentCues",value:function(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}},{key:"getExistingTrack",value:function(e){var t=this.media;if(t)for(var r=0;r<t.textTracks.length;r++){var i=t.textTracks[r],a="textTrack"+e;if(i[a]===!0)return i}return null}},{key:"createTextTrack",value:function(e,t,r){if(this.media)return this.media.addTextTrack(e,t,r)}},{key:"destroy",value:function(){h.default.prototype.destroy.call(this)}},{key:"onMediaAttaching",value:function(e){this.media=e.media}},{key:"onMediaDetaching",value:function(){}},{key:"onManifestLoading",value:function(){this.lastPts=Number.NEGATIVE_INFINITY}},{key:"onLevelSwitch",value:function(){"NONE"===this.hls.currentLevel.closedCaptions?this.enabled=!1:this.enabled=!0}},{key:"onFragLoaded",value:function(e){if("main"===e.frag.type){var t=e.frag.start;t<=this.lastPts&&(this.clearCurrentCues(this.textTrack1),this.clearCurrentCues(this.textTrack2)),this.lastPts=t}}},{key:"onFragParsingUserdata",value:function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var r=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,r)}}},{key:"extractCea608Data",value:function(e){for(var t,r,i,a,n,s=31&e[0],o=2,l=[],u=0;u<s;u++)t=e[o++],r=127&e[o++],i=127&e[o++],a=0!==(4&t),n=3&t,0===r&&0===i||a&&0===n&&(l.push(r),l.push(i));return l}}]),t}(h.default);r.default=v},{27:27,28:28,42:42}],14:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(t){i(this,e),this.aesIV=t}return a(e,[{key:"decrypt",value:function(e,t){return window.crypto.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}]),e}();r.default=n},{}],15:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(){i(this,e),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[],this.subMix[0]=new Uint32Array(256),this.subMix[1]=new Uint32Array(256),this.subMix[2]=new Uint32Array(256),this.subMix[3]=new Uint32Array(256),this.invSubMix=[],this.invSubMix[0]=new Uint32Array(256),this.invSubMix[1]=new Uint32Array(256),this.invSubMix[2]=new Uint32Array(256),this.invSubMix[3]=new Uint32Array(256),this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return a(e,[{key:"uint8ArrayToUint32Array_",value:function(e){for(var t=new DataView(e),r=new Uint32Array(4),i=0;i<r.length;i++)r[i]=t.getUint32(4*i);return r}},{key:"initTable",value:function(){var e=this.sBox,t=this.invSBox,r=this.subMix[0],i=this.subMix[1],a=this.subMix[2],n=this.subMix[3],s=this.invSubMix[0],o=this.invSubMix[1],l=this.invSubMix[2],u=this.invSubMix[3],d=new Uint32Array(256),h=0,f=0,c=0;for(c=0;c<256;c++)c<128?d[c]=c<<1:d[c]=c<<1^283;for(c=0;c<256;c++){var v=f^f<<1^f<<2^f<<3^f<<4;v=v>>>8^255&v^99,e[h]=v,t[v]=h;var g=d[h],p=d[g],y=d[p],m=257*d[v]^16843008*v;r[h]=m<<24|m>>>8,i[h]=m<<16|m>>>16,a[h]=m<<8|m>>>24,n[h]=m,m=16843009*y^65537*p^257*g^16843008*h,s[v]=m<<24|m>>>8,o[v]=m<<16|m>>>16,l[v]=m<<8|m>>>24,u[v]=m,h?(h=g^d[d[d[y^g]]],f^=d[d[f]]):h=f=1}}},{key:"expandKey",value:function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,i=0;i<t.length&&r;)r=t[i]===this.key[i],i++;if(!r){this.key=t;var a=this.keySize=t.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n=this.ksRows=4*(a+6+1),s=void 0,o=void 0,l=this.keySchedule=new Uint32Array(this.ksRows),u=this.invKeySchedule=new Uint32Array(this.ksRows),d=this.sBox,h=this.rcon,f=this.invSubMix[0],c=this.invSubMix[1],v=this.invSubMix[2],g=this.invSubMix[3],p=void 0,y=void 0;for(s=0;s<n;s++)s<a?p=l[s]=t[s]:(y=p,s%a===0?(y=y<<8|y>>>24,y=d[y>>>24]<<24|d[y>>>16&255]<<16|d[y>>>8&255]<<8|d[255&y],y^=h[s/a|0]<<24):a>6&&s%a===4&&(y=d[y>>>24]<<24|d[y>>>16&255]<<16|d[y>>>8&255]<<8|d[255&y]),l[s]=p=(l[s-a]^y)>>>0);for(o=0;o<n;o++)s=n-o,y=3&o?l[s]:l[s-4],o<4||s<=4?u[o]=y:u[o]=f[d[y>>>24]]^c[d[y>>>16&255]]^v[d[y>>>8&255]]^g[d[255&y]],u[o]=u[o]>>>0}}},{key:"networkToHostOrderSwap",value:function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}},{key:"decrypt",value:function(e,t,r){for(var i,a,n=this.keySize+6,s=this.invKeySchedule,o=this.invSBox,l=this.invSubMix[0],u=this.invSubMix[1],d=this.invSubMix[2],h=this.invSubMix[3],f=this.uint8ArrayToUint32Array_(r),c=f[0],v=f[1],g=f[2],p=f[3],y=new Int32Array(e),m=new Int32Array(y.length),E=void 0,b=void 0,_=void 0,R=void 0,k=void 0,T=void 0,A=void 0,S=void 0,L=void 0,D=void 0,w=void 0,O=void 0;t<y.length;){for(L=this.networkToHostOrderSwap(y[t]),D=this.networkToHostOrderSwap(y[t+1]),w=this.networkToHostOrderSwap(y[t+2]),O=this.networkToHostOrderSwap(y[t+3]),k=L^s[0],T=O^s[1],A=w^s[2],S=D^s[3],i=4,a=1;a<n;a++)E=l[k>>>24]^u[T>>16&255]^d[A>>8&255]^h[255&S]^s[i],b=l[T>>>24]^u[A>>16&255]^d[S>>8&255]^h[255&k]^s[i+1],_=l[A>>>24]^u[S>>16&255]^d[k>>8&255]^h[255&T]^s[i+2],R=l[S>>>24]^u[k>>16&255]^d[T>>8&255]^h[255&A]^s[i+3],k=E,T=b,A=_,S=R,i+=4;E=o[k>>>24]<<24^o[T>>16&255]<<16^o[A>>8&255]<<8^o[255&S]^s[i],b=o[T>>>24]<<24^o[A>>16&255]<<16^o[S>>8&255]<<8^o[255&k]^s[i+1],_=o[A>>>24]<<24^o[S>>16&255]<<16^o[k>>8&255]<<8^o[255&T]^s[i+2],R=o[S>>>24]<<24^o[k>>16&255]<<16^o[T>>8&255]<<8^o[255&A]^s[i+3],i+=3,m[t]=this.networkToHostOrderSwap(E^c),m[t+1]=this.networkToHostOrderSwap(R^v),m[t+2]=this.networkToHostOrderSwap(_^g),m[t+3]=this.networkToHostOrderSwap(b^p),c=L,v=D,g=w,p=O,t+=4}return m.buffer}},{key:"destroy",value:function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0}}]),e}();r.default=n},{}],16:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(14),o=i(s),l=e(17),u=i(l),d=e(15),h=i(d),f=e(26),c=e(45),v=function(){function e(t){a(this,e),this.hls=t;try{var r=window?window.crypto:crypto;this.subtle=r.subtle||r.webkitSubtle}catch(e){}this.disableWebCrypto=!this.supportsWebCrypto()}return n(e,[{key:"supportsWebCrypto",value:function(){return this.subtle&&"https:"===window.location.protocol}},{key:"decrypt",value:function(e,t,r,i){var a=this;this.disableWebCrypto&&this.hls.config.enableSoftwareAES?(c.logger.log("decrypting by JavaScript Implementation"),this.decryptor||(this.decryptor=new h.default),this.decryptor.expandKey(t),i(this.decryptor.decrypt(e,0,r))):(c.logger.log("decrypting by WebCrypto API"),this.key!==t&&(this.key=t,this.fastAesKey=new u.default(t)),this.fastAesKey.expandKey().then(function(t){var a=new o.default(r);a.decrypt(e,t).then(function(e){i(e)})}).catch(function(n){a.onWebCryptoError(n,e,t,r,i)}))}},{key:"onWebCryptoError",value:function(e,t,r,i,a){this.hls.config.enableSoftwareAES?(c.logger.log("disabling to use WebCrypto API"),this.disableWebCrypto=!0,this.decrypt(t,r,i,a)):(c.logger.error("decrypting error : "+e.message),this.hls.trigger(Event.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))}},{key:"destroy",value:function(){this.decryptor&&(this.decryptor.destroy(),this.decryptor=void 0)}}]),e}();r.default=v},{14:14,15:15,17:17,26:26,45:45}],17:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(t){i(this,e),this.key=t}return a(e,[{key:"expandKey",value:function(){return window.crypto.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}]),e}();r.default=n},{}],18:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(19),o=i(s),l=e(45),u=e(24),d=i(u),h=function(){function e(t,r,i,n){a(this,e),this.observer=t,this.id=r,this.remuxerClass=i,this.config=n,this.remuxer=new this.remuxerClass(t,r,n),this.insertDiscontinuity()}return n(e,[{key:"insertDiscontinuity",value:function(){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0}}},{key:"push",value:function(e,t,r,i,a,n,s,u,h){var f,c,v,g,p,y,m,E,b,_,R=new d.default(e),k=90*R.timeStamp,T=!1;for(a!==this.lastCC?(l.logger.log(this.id+" discontinuity detected"),this.lastCC=a,this.insertDiscontinuity(),this.remuxer.switchLevel(),this.remuxer.insertDiscontinuity()):n!==this.lastLevel?(l.logger.log("audio track switch detected"),this.lastLevel=n,this.remuxer.switchLevel(),this.insertDiscontinuity()):s===this.lastSN+1&&(T=!0),f=this._aacTrack,this.lastSN=s,this.lastLevel=n,y=R.length,b=e.length;y<b-1&&(255!==e[y]||240!==(240&e[y+1]));y++);for(f.audiosamplerate||(c=o.default.getAudioConfig(this.observer,e,y,t),f.config=c.config,f.audiosamplerate=c.samplerate,f.channelCount=c.channelCount,f.codec=c.codec,f.duration=u,l.logger.log("parsed codec:"+f.codec+",rate:"+c.samplerate+",nb channel:"+c.channelCount)),p=0,g=9216e4/f.audiosamplerate;y+5<b&&(m=1&e[y+1]?7:9,v=(3&e[y+3])<<11|e[y+4]<<3|(224&e[y+5])>>>5,v-=m,v>0&&y+m+v<=b);)for(E=k+p*g,_={unit:e.subarray(y+m,y+m+v),pts:E,dts:E},f.samples.push(_),f.len+=v,y+=v+m,p++;y<b-1&&(255!==e[y]||240!==(240&e[y+1]));y++);this.remuxer.remux(n,s,this._aacTrack,{samples:[]},{samples:[{pts:k,dts:k,unit:R.payload}]},{samples:[]},i,T,h)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(e){var t,r,i=new d.default(e);if(i.hasTimeStamp)for(t=i.length,r=e.length;t<r-1;t++)if(255===e[t]&&240===(240&e[t+1]))return!0;return!1}}]),e}();r.default=h},{19:19,24:24,45:45}],19:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=e(45),s=e(26),o=function(){function e(){i(this,e)}return a(e,null,[{key:"getAudioConfig",value:function(e,t,r,i){var a,o,l,u,d,h=navigator.userAgent.toLowerCase(),f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=((192&t[r+2])>>>6)+1,o=(60&t[r+2])>>>2,o>f.length-1?void e.trigger(Event.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o}):(u=(1&t[r+2])<<2,u|=(192&t[r+3])>>>6,n.logger.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+o+"["+f[o]+"Hz],channelConfig:"+u),/firefox|OPR/i.test(h)?o>=6?(a=5,d=new Array(4),l=o-3):(a=2,d=new Array(2),l=o):h.indexOf("android")!==-1?(a=2,d=new Array(2),l=o):(a=5,d=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&o>=6?l=o-3:((i&&i.indexOf("mp4a.40.2")!==-1&&o>=6&&1===u||!i&&1===u)&&(a=2,d=new Array(2)),l=o)),d[0]=a<<3,d[0]|=(14&o)>>1,d[1]|=(1&o)<<7,d[1]|=u<<3,5===a&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:f[o],channelCount:u,codec:"mp4a.40."+a})}}]),e}();r.default=o},{26:26,45:45}],20:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(28),o=i(s),l=e(26),u=e(18),d=i(u),h=e(25),f=i(h),c=e(38),v=i(c),g=e(39),p=i(g),y=function(){function e(t,r,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;a(this,e),this.hls=t,this.id=r,this.config=this.hls.config||n,this.typeSupported=i}return n(e,[{key:"destroy",value:function(){var e=this.demuxer;e&&e.destroy()}},{key:"push",value:function(e,t,r,i,a,n,s,u,h){var c=this.demuxer;if(!c){var g=this.hls,y=this.id;if(f.default.probe(e))c=this.typeSupported.mp2t===!0?new f.default(g,y,p.default,this.config,this.typeSupported):new f.default(g,y,v.default,this.config,this.typeSupported);else{if(!d.default.probe(e))return void g.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,id:y,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});c=new d.default(g,y,v.default,this.config)}this.demuxer=c}c.push(e,t,r,i,a,n,s,u,h)}}]),e}();r.default=y},{18:18,25:25,26:26,28:28,38:38,39:39}],21:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var a=e(20),n=i(a),s=e(28),o=i(s),l=e(45),u=e(1),d=i(u),h=function(e){var t=new d.default;t.trigger=function(e){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.removeListener.apply(t,[e].concat(i))};var r=function(t,r){e.postMessage({event:t,data:r})};e.addEventListener("message",function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.demuxer=new n.default(t,a.id,a.typeSupported,s);try{(0,l.enableLogs)(s.debug)}catch(e){}r("init",null);break;case"demux":e.demuxer.push(new Uint8Array(a.data),a.audioCodec,a.videoCodec,a.timeOffset,a.cc,a.level,a.sn,a.duration,a.accurateTimeOffset)}}),t.on(o.default.FRAG_PARSING_INIT_SEGMENT,r),t.on(o.default.FRAG_PARSED,r),t.on(o.default.ERROR,r),t.on(o.default.FRAG_PARSING_METADATA,r),t.on(o.default.FRAG_PARSING_USERDATA,r),t.on(o.default.FRAG_PARSING_DATA,function(t,r){var i=r.data1.buffer,a=r.data2.buffer;delete r.data1,delete r.data2,e.postMessage({event:t,data:r,data1:i,data2:a},[i,a])})};r.default=h},{1:1,20:20,28:28,45:45}],22:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(28),o=i(s),l=e(20),u=i(l),d=e(21),h=i(d),f=e(45),c=e(16),v=i(c),g=e(26),p=function(){function t(r,i){a(this,t),this.hls=r,this.id=i;var n={mp4:MediaSource.isTypeSupported("video/mp4"),mp2t:r.config.enableMP2TPassThrough&&MediaSource.isTypeSupported("video/mp2t"),mpeg:MediaSource.isTypeSupported("audio/mpeg"),mp3:MediaSource.isTypeSupported('audio/mp4; codecs="mp3"')};if(r.config.enableWorker&&"undefined"!=typeof Worker){f.logger.log("demuxing in webworker");var s=void 0;try{var l=e(3);s=this.w=l(h.default),this.onwmsg=this.onWorkerMessage.bind(this),s.addEventListener("message",this.onwmsg),s.onerror=function(e){r.trigger(o.default.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},s.postMessage({cmd:"init",typeSupported:n,id:i,config:JSON.stringify(r.config)})}catch(e){f.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),s&&URL.revokeObjectURL(s.objectURL),this.demuxer=new u.default(r,i,n)}}else this.demuxer=new u.default(r,i,n);this.demuxInitialized=!0}return n(t,[{key:"destroy",value:function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var r=this.decrypter;r&&(r.destroy(),this.decrypter=null)}},{key:"pushDecrypted",value:function(e,t,r,i,a,n,s,o,l){var u=this.w;if(u)u.postMessage({cmd:"demux",data:e,audioCodec:t,videoCodec:r,timeOffset:i,cc:a,level:n,sn:s,duration:o,accurateTimeOffset:l},[e]);else{var d=this.demuxer;d&&d.push(new Uint8Array(e),t,r,i,a,n,s,o,l)}}},{key:"push",value:function(e,t,r,i,a,n,s,l,u,d){if(e.byteLength>0&&null!=u&&null!=u.key&&"AES-128"===u.method){null==this.decrypter&&(this.decrypter=new v.default(this.hls));var h=this,f=performance.now();this.decrypter.decrypt(e,u.key.buffer,u.iv.buffer,function(e){h.hls.trigger(o.default.FRAG_DECRYPTED,{level:n,sn:s,stats:{tstart:f,tdecrypt:performance.now()}}),h.pushDecrypted(e,t,r,i,a,n,s,l,d)})}else this.pushDecrypted(e,t,r,i,a,n,s,l,d)}},{key:"onWorkerMessage",value:function(e){var t=e.data,r=this.hls;switch(t.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case o.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data.data2=new Uint8Array(t.data2);default:r.trigger(t.event,t.data)}}}]),t}();r.default=p},{16:16,20:20,21:21,26:26,28:28,3:3,45:45}],23:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=e(45),s=function(){function e(t){i(this,e),this.data=t,this.bytesAvailable=this.data.byteLength,this.word=0,this.bitsAvailable=0}return a(e,[{key:"loadWord",value:function(){var e=this.data.byteLength-this.bytesAvailable,t=new Uint8Array(4),r=Math.min(4,this.bytesAvailable);if(0===r)throw new Error("no bytes available");t.set(this.data.subarray(e,e+r)),this.word=new DataView(t.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}},{key:"skipBits",value:function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,
25
+ this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),t=e-t,t>0&&this.bitsAvailable?r<<t|this.readBits(t):r}},{key:"skipLZ",value:function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!==(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,r,i=8,a=8;for(t=0;t<e;t++)0!==a&&(r=this.readEG(),a=(i+r+256)%256),i=0===a?i:a}},{key:"readSPS",value:function(){var e,t,r,i,a,n,s,o,l,u=0,d=0,h=0,f=0,c=1;if(this.readUByte(),e=this.readUByte(),t=this.readBits(5),this.skipBits(3),r=this.readUByte(),this.skipUEG(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var v=this.readUEG();if(3===v&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(o=3!==v?8:12,l=0;l<o;l++)this.readBoolean()&&(l<6?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var g=this.readUEG();if(0===g)this.readUEG();else if(1===g)for(this.skipBits(1),this.skipEG(),this.skipEG(),i=this.readUEG(),l=0;l<i;l++)this.skipEG();if(this.skipUEG(),this.skipBits(1),a=this.readUEG(),n=this.readUEG(),s=this.readBits(1),0===s&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(u=this.readUEG(),d=this.readUEG(),h=this.readUEG(),f=this.readUEG()),this.readBoolean()&&this.readBoolean()){var p=void 0,y=this.readUByte();switch(y){case 1:p=[1,1];break;case 2:p=[12,11];break;case 3:p=[10,11];break;case 4:p=[16,11];break;case 5:p=[40,33];break;case 6:p=[24,11];break;case 7:p=[20,11];break;case 8:p=[32,11];break;case 9:p=[80,33];break;case 10:p=[18,11];break;case 11:p=[15,11];break;case 12:p=[64,33];break;case 13:p=[160,99];break;case 14:p=[4,3];break;case 15:p=[3,2];break;case 16:p=[2,1];break;case 255:p=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}p&&(c=p[0]/p[1])}return{width:Math.ceil((16*(a+1)-2*u-2*d)*c),height:(2-s)*(n+1)*16-(s?2:4)*(h+f)}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();r.default=s},{45:45}],24:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=e(45),s=function(){function e(t){i(this,e),this._hasTimeStamp=!1;for(var r,a,s,o,l,u,d,h,f=0;;)if(d=this.readUTF(t,f,3),f+=3,"ID3"===d)f+=3,r=127&t[f++],a=127&t[f++],s=127&t[f++],o=127&t[f++],l=(r<<21)+(a<<14)+(s<<7)+o,u=f+l,this._parseID3Frames(t,f,u),f=u;else{if("3DI"!==d)return f-=3,h=f,void(h&&(this.hasTimeStamp||n.logger.warn("ID3 tag found, but no timestamp"),this._length=h,this._payload=t.subarray(0,h)));f+=7,n.logger.log("3DI footer found, end: "+f)}}return a(e,[{key:"readUTF",value:function(e,t,r){var i="",a=t,n=t+r;do i+=String.fromCharCode(e[a++]);while(a<n);return i}},{key:"_parseID3Frames",value:function(e,t,r){for(var i,a,s,o,l;t+8<=r;)switch(i=this.readUTF(e,t,4),t+=4,a=e[t++]<<24+e[t++]<<16+e[t++]<<8+e[t++],o=e[t++]<<8+e[t++],s=t,i){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(e,t,44)){t+=44,t+=4;var u=1&e[t++];this._hasTimeStamp=!0,l=((e[t++]<<23)+(e[t++]<<15)+(e[t++]<<7)+e[t++])/45,u&&(l+=47721858.84),l=Math.round(l),n.logger.trace("ID3 timestamp found: "+l),this._timeStamp=l}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),e}();r.default=s},{45:45}],25:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(19),o=i(s),l=e(28),u=i(l),d=e(23),h=i(d),f=e(45),c=e(26),v=function(){function e(t,r,i,n,s){a(this,e),this.observer=t,this.id=r,this.remuxerClass=i,this.config=n,this.typeSupported=s,this.lastCC=0,this.remuxer=new this.remuxerClass(t,r,n,s)}return n(e,[{key:"switchLevel",value:function(){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,sequenceNumber:0,samples:[],len:0,dropped:0},this._audioTrack={container:"video/mp2t",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0,isAAC:!0},this._id3Track={type:"id3",id:-1,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.remuxer.switchLevel()}},{key:"insertDiscontinuity",value:function(){this.switchLevel(),this.remuxer.insertDiscontinuity()}},{key:"push",value:function(e,t,r,i,a,n,s,o,l){var d,h,v,g,p,y,m=e.length,E=this.remuxer.passthrough,b=!1;this.audioCodec=t,this.videoCodec=r,this._duration=o,this.contiguous=!1,this.accurateTimeOffset=l,a!==this.lastCC&&(f.logger.log("discontinuity detected"),this.insertDiscontinuity(),this.lastCC=a),n!==this.lastLevel?(f.logger.log("level switch detected"),this.switchLevel(),this.lastLevel=n):s===this.lastSN+1&&(this.contiguous=!0),this.lastSN=s;var _=this.pmtParsed,R=this._avcTrack,k=this._audioTrack,T=this._id3Track,A=R.id,S=k.id,L=T.id,D=this._pmtId,w=R.pesData,O=k.pesData,P=T.pesData,C=this._parsePAT,I=this._parsePMT,M=this._parsePES,x=this._parseAVCPES.bind(this),F=this._parseAACPES.bind(this),N=this._parseMPEGPES.bind(this),U=this._parseID3PES.bind(this);for(m-=m%188,d=0;d<m;d+=188)if(71===e[d]){if(h=!!(64&e[d+1]),v=((31&e[d+1])<<8)+e[d+2],g=(48&e[d+3])>>4,g>1){if(p=d+5+e[d+4],p===d+188)continue}else p=d+4;switch(v){case A:if(h){if(w&&(y=M(w))&&(x(y,!1),E&&R.codec&&(S===-1||k.codec)))return void this.remux(n,s,e,i);w={data:[],size:0}}w&&(w.data.push(e.subarray(p,d+188)),w.size+=d+188-p);break;case S:if(h){if(O&&(y=M(O))&&(k.isAAC?F(y):N(y),E&&k.codec&&(A===-1||R.codec)))return void this.remux(n,s,e,i);O={data:[],size:0}}O&&(O.data.push(e.subarray(p,d+188)),O.size+=d+188-p);break;case L:h&&(P&&(y=M(P))&&U(y),P={data:[],size:0}),P&&(P.data.push(e.subarray(p,d+188)),P.size+=d+188-p);break;case 0:h&&(p+=e[p]+1),D=this._pmtId=C(e,p);break;case D:h&&(p+=e[p]+1);var G=I(e,p,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0);A=G.avc,A>0&&(R.id=A),S=G.audio,S>0&&(k.id=S,k.isAAC=G.isAAC),L=G.id3,L>0&&(T.id=L),b&&!_&&(f.logger.log("reparse from beginning"),b=!1,d=-188),_=this.pmtParsed=!0;break;case 17:case 8191:break;default:b=!0}}else this.observer.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,id:this.id,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});w&&(y=M(w))?(x(y,!0),R.pesData=null):R.pesData=w,O&&(y=M(O))?(k.isAAC?F(y):N(y),k.pesData=null):(O&&O.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),k.pesData=O),P&&(y=M(P))?(U(y),T.pesData=null):T.pesData=P,this.remux(n,s,null,i)}},{key:"remux",value:function(e,t,r,i){for(var a=this._avcTrack,n=a.samples,s=0,o=0,l=0;l<n.length;l++){for(var u=n[l],d=u.units.units,h=d.length,f=0,c=0;c<h;c++)f+=d[c].data.length;o+=f,s+=h,u.length=f}a.len=o,a.nbNalu=s,this.remuxer.remux(e,t,this._audioTrack,this._avcTrack,this._id3Track,this._txtTrack,i,this.contiguous,this.accurateTimeOffset,r)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){return(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(e,t,r){var i,a,n,s,o={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=(15&e[t+1])<<8|e[t+2],a=t+3+i-4,n=(15&e[t+10])<<8|e[t+11],t+=12+n;t<a;){switch(s=(31&e[t+1])<<8|e[t+2],e[t]){case 15:o.audio===-1&&(o.audio=s);break;case 21:o.id3===-1&&(o.id3=s);break;case 27:o.avc===-1&&(o.avc=s);break;case 3:case 4:r?o.audio===-1&&(o.audio=s,o.isAAC=!1):f.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:f.logger.warn("HEVC stream type found, not supported for now");break;default:f.logger.log("unkown stream type:"+e[t])}t+=((15&e[t+3])<<8|e[t+4])+5}return o}},{key:"_parsePES",value:function(e){var t,r,i,a,n,s,o,l,u,d=0,h=e.data;if(!e||0===e.size)return null;for(;h[0].length<19&&h.length>1;){var f=new Uint8Array(h[0].length+h[1].length);f.set(h[0]),f.set(h[1],h[0].length),h[0]=f,h.splice(1,1)}if(t=h[0],i=(t[0]<<16)+(t[1]<<8)+t[2],1===i){if(a=(t[4]<<8)+t[5],a&&a>e.size-6)return null;for(r=t[7],192&r&&(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,o>4294967295&&(o-=8589934592),64&r?(l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,l>4294967295&&(l-=8589934592)):l=o),n=t[8],u=n+9,e.size-=u,s=new Uint8Array(e.size);h.length;){t=h.shift();var c=t.byteLength;if(u){if(u>c){u-=c;continue}t=t.subarray(u),c-=u,u=0}s.set(t,d),d+=c}return a&&(a-=n+3),{data:s,pts:o,dts:l,len:a}}return null}},{key:"pushAccesUnit",value:function(e,t){e.units.units.length&&e.frame&&(!this.config.forceKeyFrameOnDiscontinuity||e.key===!0||t.sps&&(t.samples.length||this.contiguous)?t.samples.push(e):t.dropped++),e.debug.length&&f.logger.log(e.pts+"/"+e.dts+":"+e.debug+","+e.units.length)}},{key:"_parseAVCPES",value:function(e,t){var r,i,a,n=this,s=this._avcTrack,o=this._parseAVCNALu(e.data),l=!1,u=this.avcSample;e.data=null,o.forEach(function(t){switch(t.type){case 1:i=!0,l&&u&&(u.debug+="NDR "),u.frame=!0;break;case 5:i=!0,u||(u=n.avcSample=n._createAVCSample(!0,e.pts,e.dts,"")),l&&(u.debug+="IDR "),u.key=!0,u.frame=!0;break;case 6:i=!0,l&&u&&(u.debug+="SEI "),r=new h.default(n.discardEPB(t.data)),r.readUByte();for(var o=0,d=0,f=!1,c=0;!f&&r.bytesAvailable>1;){o=0;do c=r.readUByte(),o+=c;while(255===c);d=0;do c=r.readUByte(),d+=c;while(255===c);if(4===o&&0!==r.bytesAvailable){f=!0;var v=r.readUByte();if(181===v){var g=r.readUShort();if(49===g){var p=r.readUInt();if(1195456820===p){var y=r.readUByte();if(3===y){var m=r.readUByte(),E=r.readUByte(),b=31&m,_=[m,E];for(a=0;a<b;a++)_.push(r.readUByte()),_.push(r.readUByte()),_.push(r.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:e.pts,bytes:_})}}}}}else if(d<r.bytesAvailable)for(a=0;a<d;a++)r.readUByte()}break;case 7:if(i=!0,l&&u&&(u.debug+="SPS "),!s.sps){r=new h.default(t.data);var R=r.readSPS();s.width=R.width,s.height=R.height,s.sps=[t.data],s.duration=n._duration;var k=t.data.subarray(1,4),T="avc1.";for(a=0;a<3;a++){var A=k[a].toString(16);A.length<2&&(A="0"+A),T+=A}s.codec=T}break;case 8:i=!0,l&&u&&(u.debug+="PPS "),s.pps||(s.pps=[t.data]);break;case 9:i=!1,u&&n.pushAccesUnit(u,s),u=n.avcSample=n._createAVCSample(!1,e.pts,e.dts,l?"AUD ":"");break;case 12:i=!1;break;default:i=!1,u&&(u.debug+="unknown NAL "+t.type+" ")}if(u&&i){var S=u.units;S.units.push(t)}}),t&&u&&(this.pushAccesUnit(u,s),this.avcSample=null)}},{key:"_createAVCSample",value:function(e,t,r,i){return{key:e,pts:t,dts:r,units:{units:[],length:0},debug:i}}},{key:"_insertSampleInOrder",value:function(e,t){var r=e.length;if(r>0){if(t.pts>=e[r-1].pts)e.push(t);else for(var i=r-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)}},{key:"_getLastNalUnit",value:function(){var e=this.avcSample,t=void 0;if(!e||0===e.units.units.length){var r=this._avcTrack,i=r.samples;e=i[i.length-1]}if(e){var a=e.units.units;t=a[a.length-1]}return t}},{key:"_parseAVCNALu",value:function(e){for(var t,r,i,a,n,s=0,o=e.byteLength,l=this._avcTrack,u=l.naluState||0,d=u,h=[],f=-1;s<o;)switch(t=e[s++],u){case 0:0===t&&(u=1);break;case 1:u=0===t?2:0;break;case 2:case 3:if(0===t)u=3;else if(1===t){if(f>=0)i={data:e.subarray(f,s-u-1),type:n},h.push(i);else{var c=this._getLastNalUnit();if(c&&(d&&s<=4-d&&c.state&&(c.data=c.data.subarray(0,c.data.byteLength-d)),r=s-u-1,r>0)){var v=new Uint8Array(c.data.byteLength+r);v.set(c.data,0),v.set(e.subarray(0,r),c.data.byteLength),c.data=v}}s<o?(a=31&e[s],f=s,n=a,u=0):u=-1}else u=0;break;case-1:f=0,n=31&t,u=0}if(f>=0&&u>=0&&(i={data:e.subarray(f,o),type:n,state:u},h.push(i)),0===h.length){var g=this._getLastNalUnit();if(g){var p=new Uint8Array(g.data.byteLength+e.byteLength);p.set(g.data,0),p.set(e,g.data.byteLength),g.data=p}}return l.naluState=u,h}},{key:"discardEPB",value:function(e){for(var t,r,i=e.byteLength,a=[],n=1;n<i-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(a.push(n+2),n+=2):n++;if(0===a.length)return e;t=i-a.length,r=new Uint8Array(t);var s=0;for(n=0;n<t;s++,n++)s===a[0]&&(s++,a.shift()),r[n]=e[s];return r}},{key:"_parseAACPES",value:function(e){var t,r,i,a,n,s,l,d,h,v=this._audioTrack,g=e.data,p=e.pts,y=0,m=this.aacOverFlow,E=this.aacLastPTS;if(m){var b=new Uint8Array(m.byteLength+g.byteLength);b.set(m,0),b.set(g,m.byteLength),g=b}for(n=y,d=g.length;n<d-1&&(255!==g[n]||240!==(240&g[n+1]));n++);if(n){var _,R;if(n<d-1?(_="AAC PES did not start with ADTS header,offset:"+n,R=!1):(_="no ADTS header found in AAC PES",R=!0),f.logger.warn("parsing error:"+_),this.observer.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,id:this.id,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:R,reason:_}),R)return}if(v.audiosamplerate||(t=o.default.getAudioConfig(this.observer,g,n,this.audioCodec),v.config=t.config,v.audiosamplerate=t.samplerate,v.channelCount=t.channelCount,v.codec=t.codec,v.duration=this._duration,f.logger.log("parsed codec:"+v.codec+",rate:"+t.samplerate+",nb channel:"+t.channelCount)),a=0,i=9216e4/v.audiosamplerate,m&&E){var k=E+i;Math.abs(k-p)>1&&(f.logger.log("AAC: align PTS for overlapping frames by "+Math.round((k-p)/90)),p=k)}for(;n+5<d&&(s=1&g[n+1]?7:9,r=(3&g[n+3])<<11|g[n+4]<<3|(224&g[n+5])>>>5,r-=s,r>0&&n+s+r<=d);)for(l=p+a*i,h={unit:g.subarray(n+s,n+s+r),pts:l,dts:l},v.samples.push(h),v.len+=r,n+=r+s,a++;n<d-1&&(255!==g[n]||240!==(240&g[n+1]));n++);m=n<d?g.subarray(n,d):null,this.aacOverFlow=m,this.aacLastPTS=l}},{key:"_parseMPEGPES",value:function(e){for(var t,r=e.data,i=e.pts,a=r.length,n=0,s=0;s<a&&(t=this._parseMpeg(r,s,a,n++,i))>0;)s+=t}},{key:"_onMpegFrame",value:function(e,t,r,i,a,n){var s=1152/r*1e3,o=n+a*s,l=this._audioTrack;l.config=[],l.channelCount=i,l.audiosamplerate=r,l.duration=this._duration,l.samples.push({unit:e,pts:o,dts:o}),l.len+=e.length}},{key:"_onMpegNoise",value:function(e){f.logger.warn("mpeg audio has noise: "+e.length+" bytes")}},{key:"_parseMpeg",value:function(e,t,r,i,a){var n=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3];if(t+2>r)return-1;if(255===e[t]||224===(224&e[t+1])){if(t+24>r)return-1;var o=e[t+1]>>3&3,l=e[t+1]>>1&3,u=e[t+2]>>4&15,d=e[t+2]>>2&3,h=!!(2&e[t+2]);if(1!==o&&0!==u&&15!==u&&3!==d){var f=3===o?3-l:3===l?3:4,c=1e3*n[14*f+u-1],v=3===o?0:2===o?1:2,g=s[3*v+d],p=h?1:0,y=e[t+3]>>6===3?1:2,m=3===l?(3===o?12:6)*c/g+p<<2:(3===o?144:72)*c/g+p|0;return t+m>r?-1:(this._onMpegFrame&&this._onMpegFrame(e.subarray(t,t+m),c,g,y,i,a),m)}}for(var E=t+2;E<r;){if(255===e[E-1]&&224===(224&e[E]))return this._onMpegNoise&&this._onMpegNoise(e.subarray(t,E-1)),E-t-1;E++}return-1}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e)}}],[{key:"probe",value:function(e){return e.length>=564&&71===e[0]&&71===e[188]&&71===e[376]}}]),e}();r.default=v},{19:19,23:23,26:26,28:28,45:45}],26:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",OTHER_ERROR:"otherError"},r.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",INTERNAL_EXCEPTION:"internalException"}},{}],27:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n="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},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e(45),l=e(26),u=e(28),d=i(u),h=function(){function e(t){a(this,e),this.hls=t,this.onEvent=this.onEvent.bind(this);for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];this.handledEvents=i,this.useGenericHandler=!0,this.registerListeners()}return s(e,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"===n(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if("hlsEventGeneric"===e)throw new Error("Forbidden event name: "+e);this.hls.on(e,this.onEvent)}.bind(this))}},{key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(e,t){this.onEventGeneric(e,t)}},{key:"onEventGeneric",value:function(e,t){var r=function(e,t){var r="on"+e.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,t)};try{r.call(this,e,t).call()}catch(t){o.logger.error("internal error happened while processing "+e+":"+t.message),this.hls.trigger(d.default.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}}}]),e}();r.default=h},{26:26,28:28,45:45}],28:[function(e,t,r){"use strict";t.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},{}],29:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(){i(this,e)}return a(e,null,[{key:"getSilentFrame",value:function(e){return 1===e?new Uint8Array([0,200,0,128,35,128]):2===e?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null}}]),e}();r.default=n},{}],30:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(){i(this,e)}return a(e,null,[{key:"isBuffered",value:function(e,t){if(e)for(var r=e.buffered,i=0;i<r.length;i++)if(t>=r.start(i)&&t<=r.end(i))return!0;return!1}},{key:"bufferInfo",value:function(e,t,r){if(e){var i,a=e.buffered,n=[];for(i=0;i<a.length;i++)n.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(n,t,r)}return{len:0,start:0,end:0,nextStart:void 0}}},{key:"bufferedInfo",value:function(e,t,r){var i,a,n,s,o,l=[];for(e.sort(function(e,t){var r=e.start-t.start;return r?r:t.end-e.end}),o=0;o<e.length;o++){var u=l.length;if(u){var d=l[u-1].end;e[o].start-d<r?e[o].end>d&&(l[u-1].end=e[o].end):l.push(e[o])}else l.push(e[o])}for(o=0,i=0,a=n=t;o<l.length;o++){var h=l[o].start,f=l[o].end;if(t+r>=h&&t<f)a=h,n=f,i=n-t;else if(t+r<h){s=h;break}}return{len:i,start:a,end:n,nextStart:s}}}]),e}();r.default=n},{}],31:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=e(45),s=function(){function e(){i(this,e)}return a(e,null,[{key:"mergeDetails",value:function(t,r){var i,a=Math.max(t.startSN,r.startSN)-r.startSN,s=Math.min(t.endSN,r.endSN)-r.startSN,o=r.startSN-t.startSN,l=t.fragments,u=r.fragments,d=0;if(s<a)return void(r.PTSKnown=!1);for(var h=a;h<=s;h++){var f=l[o+h],c=u[h];c&&f&&(d=f.cc-c.cc,isNaN(f.startPTS)||(c.start=c.startPTS=f.startPTS,c.endPTS=f.endPTS,c.duration=f.duration,i=c))}if(d)for(n.logger.log("discontinuity sliding from playlist, take drift into account"),h=0;h<u.length;h++)u[h].cc+=d;if(i)e.updateFragPTSDTS(r,i.sn,i.startPTS,i.endPTS,i.startDTS,i.endDTS);else if(o>=0&&o<l.length){var v=l[o].start;for(h=0;h<u.length;h++)u[h].start+=v}r.PTSKnown=t.PTSKnown}},{key:"updateFragPTSDTS",value:function(t,r,i,a,n,s){var o,l,u,d;if(r<t.startSN||r>t.endSN)return 0;if(o=r-t.startSN,l=t.fragments,u=l[o],!isNaN(u.startPTS)){var h=Math.abs(u.startPTS-i);isNaN(u.deltaPTS)?u.deltaPTS=h:u.deltaPTS=Math.max(h,u.deltaPTS),i=Math.min(i,u.startPTS),a=Math.max(a,u.endPTS),n=Math.min(n,u.startDTS),s=Math.max(s,u.endDTS)}var f=i-u.start;for(u.start=u.startPTS=i,u.endPTS=a,u.startDTS=n,u.endDTS=s,u.duration=a-i,d=o;d>0;d--)e.updatePTS(l,d,d-1);for(d=o;d<l.length-1;d++)e.updatePTS(l,d,d+1);return t.PTSKnown=!0,f}},{key:"updatePTS",value:function(e,t,r){var i=e[t],a=e[r],s=a.startPTS;isNaN(s)?r>t?a.start=i.start+i.duration:a.start=i.start-a.duration:r>t?(i.duration=s-i.start,i.duration<0&&n.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-s,a.duration<0&&n.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}}]),e}();r.default=s},{45:45}],32:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(28),o=i(s),l=e(26),u=e(36),d=i(u),h=e(34),f=i(h),c=e(4),v=i(c),g=e(7),p=i(g),y=e(8),m=i(y),E=e(5),b=i(E),_=e(12),R=i(_),k=e(11),T=i(k),A=e(13),S=i(A),L=e(10),D=i(L),w=e(6),O=i(w),P=e(45),C=e(48),I=i(C),M=e(1),x=i(M),F=e(35),N=i(F),U=e(43),G=i(U),B=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e);var r=e.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in r)i in t||(t[i]=r[i]);if(void 0!==t.liveMaxLatencyDurationCount&&t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(t.liveMaxLatencyDuration<=t.liveSyncDuration||void 0===t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,P.enableLogs)(t.debug),this.config=t;var n=this.observer=new x.default;n.trigger=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n.emit.apply(n,[e,e].concat(r))},n.off=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n.removeListener.apply(n,[e].concat(r))},this.on=n.on.bind(n),this.off=n.off.bind(n),this.trigger=n.trigger.bind(n),this.playlistLoader=new d.default(this),this.fragmentLoader=new f.default(this),this.levelController=new T.default(this),this.abrController=new t.abrController(this),this.bufferController=new t.bufferController(this),this.capLevelController=new t.capLevelController(this),this.fpsController=new t.fpsController(this),this.streamController=new t.streamController(this),this.audioStreamController=new t.audioStreamController(this),this.timelineController=new t.timelineController(this),this.audioTrackController=new O.default(this),this.keyLoader=new N.default(this)}return n(e,null,[{key:"isSupported",value:function(){return window.MediaSource=window.MediaSource||window.WebKitMediaSource,window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.6.11"}},{key:"Events",get:function(){return o.default}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig||(e.defaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,seekHoleNudgeDuration:.01,stalledInBufferedNudgeThreshold:10,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:I.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:v.default,bufferController:p.default,capLevelController:m.default,fpsController:D.default,streamController:R.default,audioStreamController:b.default,timelineController:S.default,cueHandler:G.default,enableCEA708Captions:!0,enableMP2TPassThrough:!1,stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0}),e.defaultConfig},set:function(t){e.defaultConfig=t}}]),n(e,[{key:"destroy",value:function(){P.logger.log("destroy"),this.trigger(o.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.abrController.destroy(),this.bufferController.destroy(),this.capLevelController.destroy(),this.fpsController.destroy(),this.streamController.destroy(),this.audioStreamController.destroy(),this.timelineController.destroy(),this.audioTrackController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(e){P.logger.log("attachMedia"),this.media=e,this.trigger(o.default.MEDIA_ATTACHING,{media:e})}},{key:"detachMedia",value:function(){P.logger.log("detachMedia"),this.trigger(o.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(e){P.logger.log("loadSource:"+e),this.url=e,this.trigger(o.default.MANIFEST_LOADING,{url:e})}},{key:"startLoad",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;P.logger.log("startLoad"),this.levelController.startLoad(),this.streamController.startLoad(e),this.audioStreamController.startLoad(e)}},{key:"stopLoad",value:function(){P.logger.log("stopLoad"),this.levelController.stopLoad(),this.streamController.stopLoad(),this.audioStreamController.stopLoad()}},{key:"swapAudioCodec",value:function(){P.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec();
26
+ }},{key:"recoverMediaError",value:function(){P.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){P.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){P.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){P.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.abrController.minAutoLevel)},set:function(e){P.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){P.logger.log("set startLevel:"+e);var t=this.abrController.minAutoLevel;this.levelController.startLevel=Math.max(e,t)}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(e){P.logger.log("set autoLevelCapping:"+e),this.abrController.autoLevelCapping=e}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"audioTracks",get:function(){return this.audioTrackController.audioTracks}},{key:"audioTrack",get:function(){return this.audioTrackController.audioTrack},set:function(e){this.audioTrackController.audioTrack=e}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}}]),e}();r.default=B},{1:1,10:10,11:11,12:12,13:13,26:26,28:28,34:34,35:35,36:36,4:4,43:43,45:45,48:48,5:5,6:6,7:7,8:8}],33:[function(e,t,r){"use strict";t.exports=e(32).default},{32:32}],34:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(26),c=e(45),v=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FRAG_LOADING));return r.loaders={},r}return s(t,e),o(t,[{key:"destroy",value:function(){var e=this.loaders;for(var t in e){var r=e[t];r&&r.destroy()}this.loaders={},h.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag,r=t.type,i=this.loaders[r],a=this.hls.config;t.loaded=0,i&&(c.logger.warn("abort previous fragment loader for type:"+r),i.abort()),i=this.loaders[r]=t.loader="undefined"!=typeof a.fLoader?new a.fLoader(a):new a.loader(a);var n=void 0,s=void 0,o=void 0;n={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var l=t.byteRangeStartOffset,u=t.byteRangeEndOffset;isNaN(l)||isNaN(u)||(n.rangeStart=l,n.rangeEnd=u),s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},o={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(n,s,o)}},{key:"loadsuccess",value:function(e,t,r){var i=e.data,a=r.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:i,frag:a,stats:t})}},{key:"loaderror",value:function(e,t){var r=t.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e})}},{key:"loadtimeout",value:function(e,t){var r=t.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag})}},{key:"loadprogress",value:function(e,t,r){var i=t.frag;i.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e})}}]),t}(h.default);r.default=v},{26:26,27:27,28:28,45:45}],35:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(28),u=i(l),d=e(27),h=i(d),f=e(26),c=e(45),v=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.KEY_LOADING));return r.loaders={},r.decryptkey=null,r.decrypturl=null,r}return s(t,e),o(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},h.default.prototype.destroy.call(this)}},{key:"onKeyLoading",value:function(e){var t=e.frag,r=t.type,i=this.loaders[r],a=t.decryptdata,n=a.uri;if(n!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(c.logger.warn("abort previous key loader for type:"+r),i.abort()),t.loader=this.loaders[r]=new s.loader(s),this.decrypturl=n,this.decryptkey=null;var o=void 0,l=void 0,d=void 0;o={url:n,frag:t,responseType:"arraybuffer"},l={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(o,l,d)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}},{key:"loadsuccess",value:function(e,t,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(u.default.KEY_LOADED,{frag:i})}},{key:"loaderror",value:function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})}},{key:"loadtimeout",value:function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})}}]),t}(h.default);r.default=v},{26:26,27:27,28:28,45:45}],36:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),l=e(2),u=i(l),d=e(28),h=i(d),f=e(27),c=i(f),v=e(26),g=e(40),p=i(g),y=e(45),m=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,E=/#EXT-X-MEDIA:(.*)/g,b=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF): *(\d+(?:\.\d+)?)(?:,(.*))?)|(?:(?!#)()(\S.+))|(?:#EXT-X-(BYTERANGE): *(\d+(?:@\d+(?:\.\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\r?\n?/g,_=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,h.default.MANIFEST_LOADING,h.default.LEVEL_LOADING,h.default.AUDIO_TRACK_LOADING));return r.loaders={},r}return s(t,e),o(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},c.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(e){this.load(e.url,{type:"manifest"})}},{key:"onLevelLoading",value:function(e){this.load(e.url,{type:"level",level:e.level,id:e.id})}},{key:"onAudioTrackLoading",value:function(e){this.load(e.url,{type:"audioTrack",id:e.id})}},{key:"load",value:function(e,t){var r=this.loaders[t.type];if(r){var i=r.context;if(i&&i.url===e)return void y.logger.trace("playlist request ongoing");y.logger.warn("abort previous loader for type:"+t.type),r.abort()}var a=this.hls.config,n=void 0,s=void 0,o=void 0,l=void 0;"manifest"===t.type?(n=a.manifestLoadingMaxRetry,s=a.manifestLoadingTimeOut,o=a.manifestLoadingRetryDelay,l=a.manifestLoadingMaxRetryTimeout):(n=a.levelLoadingMaxRetry,s=a.levelLoadingTimeOut,o=a.levelLoadingRetryDelay,l=a.levelLoadingMaxRetryTimeout,y.logger.log("loading playlist for level "+t.level)),r=this.loaders[t.type]=t.loader="undefined"!=typeof a.pLoader?new a.pLoader(a):new a.loader(a),t.url=e,t.responseType="";var u=void 0,d=void 0;u={timeout:s,maxRetry:n,retryDelay:o,maxRetryDelay:l},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},r.load(t,u,d)}},{key:"resolve",value:function(e,t){return u.default.buildAbsoluteURL(t,e)}},{key:"parseMasterPlaylist",value:function(e,t){var r=[],i=void 0;for(m.lastIndex=0;null!=(i=m.exec(e));){var a={},n=a.attrs=new p.default(i[1]);a.url=this.resolve(i[2],t);var s=n.decimalResolution("RESOLUTION");s&&(a.width=s.width,a.height=s.height),a.bitrate=n.decimalInteger("AVERAGE-BANDWIDTH")||n.decimalInteger("BANDWIDTH"),a.name=n.NAME;var o=n.CODECS;if(o){o=o.split(/[ ,]+/);for(var l=0;l<o.length;l++){var u=o[l];u.indexOf("avc1")!==-1?a.videoCodec=this.avc1toavcoti(u):a.audioCodec=u}}r.push(a)}return r}},{key:"parseMasterPlaylistMedia",value:function(e,t,r){var i=void 0,a=[];for(E.lastIndex=0;null!=(i=E.exec(e));){var n={},s=new p.default(i[1]);s.TYPE===r&&(n.groupId=s["GROUP-ID"],n.name=s.NAME,n.type=r,n.default="YES"===s.DEFAULT,n.autoselect="YES"===s.AUTOSELECT,n.forced="YES"===s.FORCED,s.URI&&(n.url=this.resolve(s.URI,t)),n.lang=s.LANGUAGE,n.name||(n.name=n.lang),a.push(n))}return a}},{key:"createInitializationVector",value:function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t}},{key:"fragmentDecryptdataFromLevelkey",value:function(e,t){var r=e;return e&&e.method&&e.uri&&!e.iv&&(r=this.cloneObj(e),r.iv=this.createInitializationVector(t)),r}},{key:"avc1toavcoti",value:function(e){var t,r=e.split(".");return r.length>2?(t=r.shift()+".",t+=parseInt(r.shift()).toString(16),t+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):t=e,t}},{key:"cloneObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"parseLevelPlaylist",value:function(e,t,r,i){var a,n,s=0,o=0,l={type:null,version:null,url:t,fragments:[],live:!0,startSN:0},u={method:null,key:null,iv:null,uri:null},d=0,h=null,f=null,c=null,v=null,g=null,m=null,E=[];for(b.lastIndex=0;null!==(n=b.exec(e));)switch(n.shift(),n=n.filter(function(e){return void 0!==e}),n[0]){case"PLAYLIST-TYPE":l.type=n[1].toUpperCase();break;case"MEDIA-SEQUENCE":s=l.startSN=parseInt(n[1]);break;case"TARGETDURATION":l.targetduration=parseFloat(n[1]);break;case"VERSION":l.version=parseInt(n[1]);break;case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"DIS":d++,E.push(n);break;case"DISCONTINUITY-SEQ":d=parseInt(n[1]);break;case"BYTERANGE":var _=n[1].split("@");m=1===_.length?g:parseInt(_[1]),g=parseInt(_[0])+m;break;case"INF":c=parseFloat(n[1]),v=n[2]?n[2]:null,E.push(n);break;case"":if(!isNaN(c)){var R=s++;a=this.fragmentDecryptdataFromLevelkey(u,R);var k=n[1]?this.resolve(n[1],t):null;f={url:k,type:i,duration:c,title:v,start:o,sn:R,level:r,cc:d,decryptdata:a,programDateTime:h,tagList:E},null!==m&&(f.byteRangeStartOffset=m,f.byteRangeEndOffset=g),l.fragments.push(f),o+=c,c=null,v=null,m=null,h=null,E=[]}break;case"KEY":var T=n[1],A=new p.default(T),S=A.enumeratedString("METHOD"),L=A.URI,D=A.hexadecimalInteger("IV");S&&(u={method:null,key:null,iv:null,uri:null},L&&"AES-128"===S&&(u.method=S,u.uri=this.resolve(L,t),u.key=null,u.iv=D));break;case"START":var w=n[1],O=new p.default(w),P=O.decimalFloatingPoint("TIME-OFFSET");isNaN(P)||(l.startTimeOffset=P);break;case"PROGRAM-DATE-TIME":h=new Date(Date.parse(n[1])),E.push(n);break;case"#":n.shift(),E.push(n);break;default:y.logger.warn("line parsed but not handled: "+n)}return f&&!f.url&&(l.fragments.pop(),o-=f.duration),l.totalduration=o,l.averagetargetduration=o/l.fragments.length,l.endSN=s-1,l}},{key:"loadsuccess",value:function(e,t,r){var i=e.data,a=e.url,n=r.type,s=r.id,o=r.level,l=this.hls;if(this.loaders[n]=void 0,void 0!==a&&0!==a.indexOf("data:")||(a=r.url),t.tload=performance.now(),0===i.indexOf("#EXTM3U"))if(i.indexOf("#EXTINF:")>0){var u="audioTrack"!==n,d=this.parseLevelPlaylist(i,a,(u?o:s)||0,u?"main":"audio");"manifest"===n&&l.trigger(h.default.MANIFEST_LOADED,{levels:[{url:a,details:d}],audioTracks:[],url:a,stats:t}),t.tparsed=performance.now(),d.targetduration?u?l.trigger(h.default.LEVEL_LOADED,{details:d,level:o||0,id:s||0,stats:t}):l.trigger(h.default.AUDIO_TRACK_LOADED,{details:d,id:s,stats:t}):l.trigger(h.default.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"invalid targetduration"})}else{var f=this.parseMasterPlaylist(i,a);if(f.length){var c=this.parseMasterPlaylistMedia(i,a,"AUDIO");if(c.length){var g=!1;c.forEach(function(e){e.url||(g=!0)}),g===!1&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(y.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),c.unshift({type:"main",name:"main"}))}l.trigger(h.default.MANIFEST_LOADED,{levels:f,audioTracks:c,url:a,stats:t})}else l.trigger(h.default.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"no level found in manifest"})}else l.trigger(h.default.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(e,t){var r,i,a=t.loader;switch(t.type){case"manifest":r=v.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case"level":r=v.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":r=v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1}a&&(a.abort(),this.loaders[t.type]=void 0),this.hls.trigger(h.default.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:r,fatal:i,url:a.url,loader:a,response:e,context:t})}},{key:"loadtimeout",value:function(e,t){var r,i,a=t.loader;switch(t.type){case"manifest":r=v.ErrorDetails.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":r=v.ErrorDetails.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":r=v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}a&&(a.abort(),this.loaders[t.type]=void 0),this.hls.trigger(h.default.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:r,fatal:i,url:a.url,loader:a,context:t})}}]),t}(c.default);r.default=_},{2:2,26:26,27:27,28:28,40:40,45:45}],37:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(){i(this,e)}return a(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var t;for(t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=n,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,s,l,s,o),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,a))}},{key:"box",value:function(e){for(var t,r=Array.prototype.slice.call(arguments,1),i=8,a=r.length,n=a;a--;)i+=r[a].byteLength;for(t=new Uint8Array(i),t[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),a=0,i=8;a<n;a++)t.set(r[a],i),i+=r[a].byteLength;return t}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}},{key:"mdhd",value:function(t,r){return r*=t,e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))}},{key:"moov",value:function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))}},{key:"mvex",value:function(t){for(var r=t.length,i=[];r--;)i[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(i))}},{key:"mvhd",value:function(t,r){r*=t;var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,i)}},{key:"sdtp",value:function(t){var r,i,a=t.samples||[],n=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)r=a[i].flags,n[i+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,n)}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))}},{key:"avc1",value:function(t){var r,i,a,n=[],s=[];for(r=0;r<t.sps.length;r++)i=t.sps[r],a=i.byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<t.pps.length;r++)i=t.pps[r],a=i.byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|t.sps.length].concat(n).concat([t.pps.length]).concat(s))),l=t.width,u=t.height;return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))}},{key:"esds",value:function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var r=t.audiosamplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"mp3",value:function(t){var r=t.audiosamplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))}},{key:"stsd",value:function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",value:function(t){var r=t.id,i=t.duration*t.timescale,a=t.width,n=t.height;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))}},{key:"traf",value:function(t,r){var i=e.sdtp(t),a=t.id;return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),e.trun(t,i.length+16+16+8+16+8+8),i)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(t){var r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(t,r){var i,a,n,s,o,l,u=t.samples||[],d=u.length,h=12+16*d,f=new Uint8Array(h);for(r+=8+h,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<d;i++)a=u[i],n=a.duration,s=a.size,o=a.flags,l=a.cts,f.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,f)}},{key:"initSegment",value:function(t){e.types||e.init();var r,i=e.moov(t);return r=new Uint8Array(e.FTYP.byteLength+i.byteLength),r.set(e.FTYP),r.set(i,e.FTYP.byteLength),r}}]),e}();r.default=n},{}],38:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(29),o=i(s),l=e(28),u=i(l),d=e(45),h=e(37),f=i(h),c=e(26);e(46);var v=function(){function e(t,r,i,n){a(this,e),this.observer=t,this.id=r,this.config=i,this.typeSupported=n,this.ISGenerated=!1,this.PES2MP4SCALEFACTOR=4,this.PES_TIMESCALE=9e4,this.MP4_TIMESCALE=this.PES_TIMESCALE/this.PES2MP4SCALEFACTOR}return n(e,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){this._initPTS=this._initDTS=void 0}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(e,t,r,i,a,n,s,o,l){if(this.level=e,this.sn=t,this.ISGenerated||this.generateIS(r,i,s),this.ISGenerated)if(r.samples.length){var d=this.remuxAudio(r,s,o,l);if(i.samples.length){var h=void 0;d&&(h=d.endPTS-d.startPTS),this.remuxVideo(i,s,o,h)}}else{var f=void 0;i.samples.length&&(f=this.remuxVideo(i,s,o)),f&&r.codec&&this.remuxEmptyAudio(r,s,o,f)}a.samples.length&&this.remuxID3(a,s),n.samples.length&&this.remuxText(n,s),this.observer.trigger(u.default.FRAG_PARSED,{id:this.id,level:this.level,sn:this.sn})}},{key:"generateIS",value:function(e,t,r){var i,a,n=this.observer,s=e.samples,o=t.samples,l=this.PES_TIMESCALE,h=this.typeSupported,v="audio/mp4",g={},p={id:this.id,level:this.level,sn:this.sn,tracks:g,unique:!1},y=void 0===this._initPTS;y&&(i=a=1/0),e.config&&s.length&&(e.timescale=e.audiosamplerate,e.timescale*e.duration>Math.pow(2,32)&&!function(){var t=function e(t,r){return r?e(r,t%r):t};e.timescale=e.audiosamplerate/t(e.audiosamplerate,e.isAAC?1024:1152)}(),d.logger.log("audio mp4 timescale :"+e.timescale),e.isAAC||(h.mpeg===!0?(v="audio/mpeg",e.codec=""):h.mp3===!0&&(e.codec="mp3")),g.audio={container:v,codec:e.codec,initSegment:f.default.initSegment([e]),metadata:{channelCount:e.channelCount}},y&&(i=a=s[0].pts-l*r)),t.sps&&t.pps&&o.length&&(t.timescale=this.MP4_TIMESCALE,g.video={container:"video/mp4",codec:t.codec,initSegment:f.default.initSegment([t]),metadata:{width:t.width,height:t.height}},y&&(i=Math.min(i,o[0].pts-l*r),a=Math.min(a,o[0].dts-l*r))),Object.keys(g).length?(n.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,y&&(this._initPTS=i,this._initDTS=a)):n.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,id:this.id,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(e,t,r,i){var a,n,s,o,l,h,c,v,g=8,p=this.PES_TIMESCALE,y=this.PES2MP4SCALEFACTOR,m=e.samples,E=[];m.sort(function(e,t){return e.dts-t.dts});var b=m.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)},0);if(b<0){d.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(b/90)+" ms to overcome this issue");for(var _=0;_<m.length;_++)m[_].dts+=b}var R=void 0;R=r?this.nextAvcDts:t*p;var k=m[0];l=Math.max(this._PTSNormalize(k.dts-this._initDTS,R),0),o=Math.max(this._PTSNormalize(k.pts-this._initDTS,R),0);var T=Math.round((l-R)/90);r&&T&&(T>1?d.logger.log("AVC:"+T+" ms hole between fragments detected,filling it"):T<-1&&d.logger.log("AVC:"+-T+" ms overlapping between fragments detected"),l=R,m[0].dts=l+this._initDTS,o=Math.max(o-T,R),m[0].pts=o+this._initDTS,d.logger.log("Video/PTS/DTS adjusted: "+Math.round(o/90)+"/"+Math.round(l/90)+",delta:"+T+" ms")),h=l,k=m[m.length-1],v=Math.max(this._PTSNormalize(k.dts-this._initDTS,R),0),c=Math.max(this._PTSNormalize(k.pts-this._initDTS,R),0),c=Math.max(c,v);var A=navigator.vendor,S=navigator.userAgent,L=A&&A.indexOf("Apple")>-1&&S&&!S.match("CriOS");L&&(a=Math.round((v-l)/(y*(m.length-1))));for(var D=0;D<m.length;D++){var w=m[D];L?w.dts=l+D*y*a:(w.dts=Math.max(this._PTSNormalize(w.dts-this._initDTS,R),l),w.dts=Math.round(w.dts/y)*y),w.pts=Math.max(this._PTSNormalize(w.pts-this._initDTS,R),w.dts),w.pts=Math.round(w.pts/y)*y}n=new Uint8Array(e.len+4*e.nbNalu+8);var O=new DataView(n.buffer);O.setUint32(0,n.byteLength),n.set(f.default.types.mdat,4);for(var P=0;P<m.length;P++){for(var C=m[P],I=0,M=void 0;C.units.units.length;){var x=C.units.units.shift();O.setUint32(g,x.data.byteLength),g+=4,n.set(x.data,g),g+=x.data.byteLength,I+=4+x.data.byteLength}if(L)M=Math.max(0,a*Math.round((C.pts-C.dts)/(y*a)));else{if(P<m.length-1)a=m[P+1].dts-C.dts;else{var F=this.config,N=C.dts-m[P>0?P-1:P].dts;if(F.stretchShortVideoTrack){var U=F.maxBufferHole,G=F.maxSeekHole,B=Math.floor(Math.min(U,G)*p),j=(i?o+i*p:this.nextAacPts)-C.pts;j>B?(a=j-N,a<0&&(a=N),d.logger.log("It is approximately "+j/90+" ms to the next segment; using duration "+a/90+" ms for the last video frame.")):a=N}else a=N}a/=y,M=Math.round((C.pts-C.dts)/y)}E.push({size:I,duration:a,cts:M,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:C.key?2:1,isNonSync:C.key?0:1}})}this.nextAvcDts=v+a*y;var H=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,E.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var K=E[0].flags;K.dependsOn=2,K.isNonSync=0}e.samples=E,s=f.default.moof(e.sequenceNumber++,l/y,e),e.samples=[];var V={id:this.id,level:this.level,sn:this.sn,data1:s,data2:n,startPTS:o/p,endPTS:(c+y*a)/p,startDTS:l/p,endDTS:this.nextAvcDts/p,type:"video",nb:E.length,dropped:H};return this.observer.trigger(u.default.FRAG_PARSING_DATA,V),V}},{key:"remuxAudio",value:function(e,t,r,i){var a,n,s,l,h,c,v,g,p,y,m,E,b,_,R,k,T=this.PES_TIMESCALE,A=e.timescale,S=T/A,L=e.timescale*(e.isAAC?1024:1152)/e.audiosamplerate,D=L*S,w=8,O=[],P=[];if(e.samples.sort(function(e,t){return e.pts-t.pts}),P=e.samples,k=this.nextAacPts,r|=P.length&&k&&(Math.abs(t-k/T)<.1||Math.abs(P[0].pts-k-this._initDTS)<20*D),r||(k=t*T),i&&e.isAAC)for(var C=0,I=k;C<P.length;){var M=P[C],x=this._PTSNormalize(M.pts-this._initDTS,k),F=x-I;if(F<=-D)d.logger.warn("Dropping 1 audio frame @ "+Math.round(I/90)/1e3+"s due to "+Math.round(Math.abs(F/90))+" ms overlap."),P.splice(C,1),e.len-=M.unit.length;else if(F>=D){var N=Math.round(F/D);d.logger.warn("Injecting "+N+" audio frame @ "+Math.round(I/90)/1e3+"s due to "+Math.round(F/90)+" ms gap.");for(var U=0;U<N;U++)R=I+this._initDTS,R=Math.max(R,this._initDTS),_=o.default.getSilentFrame(e.channelCount),_||(d.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),_=M.unit.slice(0)),P.splice(C,0,{unit:_,pts:R,dts:R}),e.len+=_.length,I+=D,C+=1;M.pts=M.dts=I+this._initDTS,I+=D,C+=1}else Math.abs(F)>.1*D,I+=D,0===C?M.pts=M.dts=this._initDTS+k:M.pts=M.dts=P[C-1].pts+D,C+=1}for(;P.length;){if(n=P.shift(),l=n.unit,y=n.pts-this._initDTS,m=n.dts-this._initDTS,void 0!==p)E=this._PTSNormalize(y,p),b=this._PTSNormalize(m,p),s.duration=Math.round((b-p)/S);else{E=this._PTSNormalize(y,k),b=this._PTSNormalize(m,k);var G=Math.round(1e3*(E-k)/T),B=0;if(r&&G){if(G>0)B=Math.round((E-k)/D),d.logger.log(G+" ms hole between AAC samples detected,filling it"),B>0&&(_=o.default.getSilentFrame(e.channelCount),_||(_=l.slice(0)),e.len+=B*_.length);else if(G<-12){d.logger.log(-G+" ms overlapping between AAC samples detected, drop frame"),e.len-=l.byteLength;continue}E=b=k}if(v=Math.max(0,E),g=Math.max(0,b),!(e.len>0))return;h=new Uint8Array(e.len+8),a=new DataView(h.buffer),a.setUint32(0,h.byteLength),h.set(f.default.types.mdat,4);for(var j=0;j<B;j++)R=E-(B-j)*D,_=o.default.getSilentFrame(e.channelCount),_||(d.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),_=l.slice(0)),h.set(_,w),w+=_.byteLength,s={size:_.byteLength,cts:0,duration:e.isAAC?1024:1152,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},O.push(s)}h.set(l,w),w+=l.byteLength,s={size:l.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},O.push(s),p=b}var H=0,K=O.length;if(K>=2&&(H=O[K-2].duration,
27
+ s.duration=H),K){this.nextAacPts=E+S*H,e.len=0,e.samples=O,c=f.default.moof(e.sequenceNumber++,g/S,e),e.samples=[];var V={id:this.id,level:this.level,sn:this.sn,data1:c,data2:h,startPTS:v/T,endPTS:this.nextAacPts/T,startDTS:g/T,endDTS:(b+S*H)/T,type:"audio",nb:K};return this.observer.trigger(u.default.FRAG_PARSING_DATA,V),V}return null}},{key:"remuxEmptyAudio",value:function(e,t,r,i){var a=this.PES_TIMESCALE,n=e.timescale?e.timescale:e.audiosamplerate,s=a/n,l=this.nextAacPts,u=(void 0!==l?l:i.startDTS*a)+this._initDTS,h=i.endDTS*a+this._initDTS,f=1024,c=s*f,v=Math.ceil((h-u)/c),g=o.default.getSilentFrame(e.channelCount);if(d.logger.warn("remux empty Audio"),!g)return void d.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var p=[],y=0;y<v;y++){var m=u+y*c;p.push({unit:g.slice(0),pts:m,dts:m}),e.len+=g.length}e.samples=p,this.remuxAudio(e,t,r)}},{key:"remuxID3",value:function(e,t){var r,i=e.samples.length;if(i){for(var a=0;a<i;a++)r=e.samples[a],r.pts=(r.pts-this._initPTS)/this.PES_TIMESCALE,r.dts=(r.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_METADATA,{id:this.id,level:this.level,sn:this.sn,samples:e.samples})}e.samples=[],t=t}},{key:"remuxText",value:function(e,t){e.samples.sort(function(e,t){return e.pts-t.pts});var r,i=e.samples.length;if(i){for(var a=0;a<i;a++)r=e.samples[a],r.pts=(r.pts-this._initPTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_USERDATA,{id:this.id,level:this.level,sn:this.sn,samples:e.samples})}e.samples=[],t=t}},{key:"_PTSNormalize",value:function(e,t){var r;if(void 0===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}},{key:"passthrough",get:function(){return!1}}]),e}();r.default=v},{26:26,28:28,29:29,37:37,45:45,46:46}],39:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e(28),o=i(s),l=function(){function e(t,r){a(this,e),this.observer=t,this.id=r,this.ISGenerated=!1}return n(e,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(e,t,r,i,a,n){var s=this.observer;if(!this.ISGenerated){var l={},u={id:this.id,tracks:l,unique:!0},d=t,h=d.codec;h&&(u.tracks.video={container:d.container,codec:h,metadata:{width:d.width,height:d.height}}),d=e,h=d.codec,h&&(u.tracks.audio={container:d.container,codec:h,metadata:{channelCount:d.channelCount}}),this.ISGenerated=!0,s.trigger(o.default.FRAG_PARSING_INIT_SEGMENT,u)}s.trigger(o.default.FRAG_PARSING_DATA,{id:this.id,data1:n,startPTS:a,startDTS:a,type:"audiovideo",nb:1,dropped:0})}},{key:"passthrough",get:function(){return!0}}]),e}();r.default=l},{28:28}],40:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=/^(\d+)x(\d+)$/,s=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function e(t){i(this,e),"string"==typeof t&&(t=e.parseAttrList(t));for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])}return a(e,[{key:"decimalInteger",value:function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"hexadecimalInteger",value:function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)r[i]=parseInt(t.slice(2*i,2*i+2),16);return r}return null}},{key:"hexadecimalIntegerAsNumber",value:function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"decimalResolution",value:function(e){var t=n.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}}],[{key:"parseAttrList",value:function(e){var t,r={};for(s.lastIndex=0;null!==(t=s.exec(e));){var i=t[2],a='"';0===i.indexOf(a)&&i.lastIndexOf(a)===i.length-1&&(i=i.slice(1,-1)),r[t[1]]=i}return r}}]),e}();r.default=o},{}],41:[function(e,t,r){"use strict";var i={search:function(e,t){for(var r=0,i=e.length-1,a=null,n=null;r<=i;){a=(r+i)/2|0,n=e[a];var s=t(n);if(s>0)r=a+1;else{if(!(s<0))return n;i=a-1}}return null}};t.exports=i},{}],42:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},s=function(e){var t=e;return n.hasOwnProperty(e)&&(t=n[e]),String.fromCharCode(t)},o=15,l=32,u={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},d={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},c=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],v={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var r=this.verboseFilter[e];this.verboseLevel>=r}},g=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},p=function(){function e(t,r,a,n,s){i(this,e),this.foreground=t||"white",this.underline=r||!1,this.italics=a||!1,this.background=n||"black",this.flash=s||!1}return a(e,[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(e){for(var t=["foreground","underline","italics","background","flash"],r=0;r<t.length;r++){var i=t[r];e.hasOwnProperty(i)&&(this[i]=e[i])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}},{key:"copy",value:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}]),e}(),y=function(){function e(t,r,a,n,s,o){i(this,e),this.uchar=t||" ",this.penState=new p(r,a,n,s,o)}return a(e,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(e,t){this.uchar=e,this.penState.copy(t)}},{key:"setPenState",value:function(e){this.penState.copy(e)}},{key:"equals",value:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}},{key:"copy",value:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)}},{key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),e}(),m=function(){function e(){i(this,e),this.chars=[];for(var t=0;t<l;t++)this.chars.push(new y);this.pos=0,this.currPenState=new p}return a(e,[{key:"equals",value:function(e){for(var t=!0,r=0;r<l;r++)if(!this.chars[r].equals(e.chars[r])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<l;t++)this.chars[t].copy(e.chars[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<l;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}},{key:"setCursor",value:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(v.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(v.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(e){e>=144&&this.backSpace();var t=s(e);return this.pos>=l?void v.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))}},{key:"clearFromPos",value:function(e){var t;for(t=e;t<l;t++)this.chars[t].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var e=[],t=!0,r=0;r<l;r++){var i=this.chars[r].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")}},{key:"setPenStyles",value:function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)}}]),e}(),E=function(){function e(){i(this,e),this.rows=[];for(var t=0;t<o;t++)this.rows.push(new m);this.currRow=o-1,this.nrRollUpRows=null,this.reset()}return a(e,[{key:"reset",value:function(){for(var e=0;e<o;e++)this.rows[e].clear();this.currRow=o-1}},{key:"equals",value:function(e){for(var t=!0,r=0;r<o;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<o;t++)this.rows[t].copy(e.rows[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<o;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}},{key:"backSpace",value:function(){var e=this.rows[this.currRow];e.backSpace()}},{key:"clearToEndOfRow",value:function(){var e=this.rows[this.currRow];e.clearToEndOfRow()}},{key:"insertChar",value:function(e){var t=this.rows[this.currRow];t.insertChar(e)}},{key:"setPen",value:function(e){var t=this.rows[this.currRow];t.setPenStyles(e)}},{key:"moveCursor",value:function(e){var t=this.rows[this.currRow];t.moveCursor(e)}},{key:"setCursor",value:function(e){v.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)}},{key:"setPAC",value:function(e,t){v.log("INFO","pacData = "+JSON.stringify(e));var r=e.row-1;if(this.nrRollUpRows&&r<this.nrRollUpRows-1&&(r=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==r){for(var i=0;i<o;i++)this.rows[i].clear();var a=this.currRow+1-this.nrRollUpRows,n=t.rows[a].cueStartTime;if(n&&n<v.time)for(i=0;i<this.nrRollUpRows;i++)this.rows[r-this.nrRollUpRows+i+1].copy(t.rows[a+i])}this.currRow=r;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,u=Math.max(l-1,0);s.setCursor(e.indent),e.color=s.chars[u].penState.foreground}var d={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(d)}},{key:"setBkgData",value:function(e){v.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}},{key:"setRollUpRows",value:function(e){this.nrRollUpRows=e}},{key:"rollUp",value:function(){if(null===this.nrRollUpRows)return void v.log("DEBUG","roll_up but nrRollUpRows not set yet");v.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),v.log("INFO","Rolling up")}},{key:"getDisplayText",value:function(e){e=e||!1;for(var t=[],r="",i=-1,a=0;a<o;a++){var n=this.rows[a].getTextString();n&&(i=a+1,e?t.push("Row "+i+": '"+n+"'"):t.push(n.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r}},{key:"getTextAndFormat",value:function(){return this.rows}}]),e}(),b=function(){function e(t,r){i(this,e),this.chNr=t,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new E,this.nonDisplayedMemory=new E,this.lastOutputScreen=new E,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return a(e,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",value:function(e){this.writeScreen.setPAC(e,this.lastOutputScreen)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,v.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset(),this.lastOutputScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}},{key:"insertChars",value:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";v.log("INFO",r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(v.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}},{key:"ccRCL",value:function(){v.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){v.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){v.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(e){v.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}},{key:"ccFON",value:function(){v.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){v.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){v.log("INFO","TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){v.log("INFO","RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){v.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()}},{key:"ccCR",value:function(){v.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()}},{key:"ccENM",value:function(){v.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){if(v.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,v.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()}},{key:"ccTO",value:function(e){v.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}},{key:"ccMIDROW",value:function(e){var t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[r]}v.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=v.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}]),e}(),_=function(){function e(t,r,a){i(this,e),this.field=t||1,this.outputs=[r,a],this.channels=[new b(1,r),new b(2,a)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return a(e,[{key:"getHandler",value:function(e){return this.channels[e].getHandler()}},{key:"setHandler",value:function(e,t){this.channels[e].setHandler(t)}},{key:"addData",value:function(e,t){var r,i,a,n=!1;this.lastTime=e,v.setTime(e);for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(v.log("DATA","["+g([t[s],t[s+1]])+"] -> ("+g([i,a])+")"),r=this.parseCmd(i,a),r||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r&&(n=this.parseChars(i,a)))if(this.currChNr&&this.currChNr>=0){var o=this.channels[this.currChNr-1];o.insertChars(n)}else v.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,v.log("WARNING","Couldn't parse cleaned data "+g([i,a])+" orig: "+g([t[s],t[s+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(e,t){var r=null,i=(20===e||28===e)&&32<=t&&t<=47,a=(23===e||31===e)&&33<=t&&t<=35;if(!i&&!a)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,v.log("DEBUG","Repeated command ("+g([e,t])+") is dropped"),!0;r=20===e||23===e?1:2;var n=this.channels[r-1];return 20===e||28===e?32===t?n.ccRCL():33===t?n.ccBS():34===t?n.ccAOF():35===t?n.ccAON():36===t?n.ccDER():37===t?n.ccRU(2):38===t?n.ccRU(3):39===t?n.ccRU(4):40===t?n.ccFON():41===t?n.ccRDC():42===t?n.ccTR():43===t?n.ccRTD():44===t?n.ccEDM():45===t?n.ccCR():46===t?n.ccENM():47===t&&n.ccEOC():n.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0}},{key:"parseMidrow",value:function(e,t){var r=null;if((17===e||25===e)&&32<=t&&t<=47){if(r=17===e?1:2,r!==this.currChNr)return v.log("ERROR","Mismatch channel in midrow parsing"),!1;var i=this.channels[r-1];return i.ccMIDROW(t),v.log("DEBUG","MIDROW ("+g([e,t])+")"),!0}return!1}},{key:"parsePAC",value:function(e,t){var r=null,i=null,a=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,n=(16===e||24===e)&&64<=t&&t<=95;if(!a&&!n)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=e<=23?1:2,i=64<=t&&t<=95?1===r?u[e]:h[e]:1===r?d[e]:f[e];var s=this.interpretPAC(i,t),o=this.channels[r-1];return o.setPAC(s),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0}},{key:"interpretPAC",value:function(e,t){var r=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,i.underline=1===(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i}},{key:"parseChars",value:function(e,t){var r=null,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),17<=a&&a<=19){var n=t;n=17===a?t+80:18===a?t+112:t+144,v.log("INFO","Special char '"+s(n)+"' in channel "+r),i=[n]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var o=g(i);v.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i}},{key:"parseBackgroundAttributes",value:function(e,t){var r,i,a,n,s=(16===e||24===e)&&32<=t&&t<=47,o=(23===e||31===e)&&45<=t&&t<=47;return!(!s&&!o)&&(r={},16===e||24===e?(i=Math.floor((t-32)/2),r.background=c[i],t%2===1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0)),a=e<24?1:2,n=this.channels[a-1],n.setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)}},{key:"reset",value:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null}},{key:"cueSplitAtTime",value:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}}]),e}();r.default=_},{}],43:[function(e,t,r){"use strict";var i={newCue:function(e,t,r,i){for(var a,n,s,o,l,u=window.VTTCue||window.TextTrackCue,d=0;d<i.rows.length;d++)if(a=i.rows[d],s=!0,o=0,l="",!a.isEmpty()){for(var h=0;h<a.chars.length;h++)a.chars[h].uchar.match(/\s/)&&s?o++:(l+=a.chars[h].uchar,s=!1);a.cueStartTime=t,n=new u(t,r,l.trim()),o>=16?o--:o++,navigator.userAgent.match(/Firefox\//)?n.line=d+1:n.line=d>7?d-2:d+1,n.align="left",n.position=Math.max(0,Math.min(100,100*(o/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(n)}}};t.exports=i},{}],44:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(t){i(this,e),this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}return a(e,[{key:"sample",value:function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_}}]),e}();r.default=n},{}],45:[function(e,t,r){"use strict";function i(){}function a(e,t){return t="["+e+"] > "+t}function n(e){var t=self.console[e];return t?function(){for(var r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];i[0]&&(i[0]=a(e,i[0])),t.apply(self.console,i)}:i}function s(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach(function(t){u[t]=e[t]?e[t].bind(e):n(t)})}Object.defineProperty(r,"__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},l={trace:i,debug:i,log:i,warn:i,info:i,error:i},u=l;r.enableLogs=function(e){if(e===!0||"object"===("undefined"==typeof e?"undefined":o(e))){s(e,"debug","log","info","warn","error");try{u.log()}catch(e){u=l}}else u=l},r.logger=u},{}],46:[function(e,t,r){"use strict";"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(e,t){var r=new Uint8Array(this);void 0===t&&(t=r.length);for(var i=new ArrayBuffer(t-e),a=new Uint8Array(i),n=0;n<a.length;n++)a[n]=r[n+e];return i})},{}],47:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=function(){function e(){i(this,e)}return a(e,null,[{key:"toString",value:function(e){for(var t="",r=e.length,i=0;i<r;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}}]),e}();r.default=n},{}],48:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=e(45),s=function(){function e(t){i(this,e),t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}return a(e,[{key:"destroy",value:function(){this.abort(),this.loader=null}},{key:"abort",value:function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null}},{key:"load",value:function(e,t,r){this.context=e,this.config=t,this.callbacks=r,this.stats={trequest:performance.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()}},{key:"loadInternal",value:function(){var e,t=this.context;e="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest,e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.open("GET",t.url,!0),t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.responseType=t.responseType;var r=this.stats;r.tfirst=0,r.loaded=0,this.xhrSetup&&this.xhrSetup(e,t.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()}},{key:"readystatechange",value:function(e){var t=e.currentTarget,r=t.readyState,i=this.stats,a=this.context,s=this.config;if(!i.aborted&&(window.clearTimeout(this.requestTimeout),r>=2&&(0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout-(i.tfirst-i.trequest))),4===r))){var o=t.status;if(o>=200&&o<300){i.tload=Math.max(i.tfirst,performance.now());var l=void 0,u=void 0;"arraybuffer"===a.responseType?(l=t.response,u=l.byteLength):(l=t.responseText,u=l.length),i.loaded=i.total=u;var d={url:t.responseURL,data:l};this.callbacks.onSuccess(d,i,a)}else i.retry>=s.maxRetry||o>=400&&o<499?(n.logger.error(o+" while loading "+a.url),this.callbacks.onError({code:o,text:t.statusText},a)):(n.logger.warn(o+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),i.retry++)}}},{key:"loadtimeout",value:function(){n.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total);var r=this.callbacks.onProgress;r&&r(t,this.context,null)}}]),e}();r.default=s},{45:45}]},{},[33])(33)});
28
+ !function(){"use strict";var e=function(e,a){var r,t="hlsjs",o=a.common,i=a.extend,n=a.support,s=a.version,l=0===s.indexOf("6."),u=window,c=u.MediaSource||u.WebKitMediaSource,d=u.performance,f=function(e){return e.toLowerCase().indexOf("mpegurl")>-1},p=function(e){var a=e.clip&&e.clip.hlsQualities||e.hlsQualities;return n.inlineVideo&&(a===!0||a&&a.length)},v=function(n,v){var h,y,g,b,m,k,E,w=a.bean,L="is-seeking",O=function(e,a,r){if(e.debug&&console.log("recovery."+t,"<-",a),o.removeClass(v,"is-paused"),o.addClass(v,L),r)y.startLoad();else{var i=d.now();if(!b||i-b>3e3)b=d.now(),y.recoverMediaError();else{if(m&&!(i-m>3e3))return 3;m=d.now(),y.swapAudioCodec(),y.recoverMediaError()}}g>0&&(g-=1)},C="is-poster",q=function(){w.one(h,"timeupdate."+t,function(){o.addClass(v,C),n.poster=!0})},R=function(){l&&n.poster&&w.one(h,"timeupdate."+t,function(){o.removeClass(v,C),n.poster=!1})},x=!1,A=0,S=function(){y.startLoad(y.config.startPosition)},T="active",M=function(e){return e||(e=n.quality),e.toLowerCase().replace(/\ /g,"")},N=function(){var e=n.qualities;e&&e.length&&(o.removeClass(v,"quality-abr"),e.forEach(function(e){o.removeClass(v,"quality-"+M(e))}))},D=function(){delete n.hlsQualities,N(),o.find(".fp-quality-selector",v).forEach(o.removeNode)},_=function(){return n.hlsQualities[n.qualities.indexOf(n.quality)+1]},P=function(e,a,r){var i,s=r.levels,l=[],u=[],d=0;if(D(),"drive"===e)switch(s.length){case 4:l=[1,2,3];break;case 5:l=[1,2,3,4];break;case 6:l=[1,3,4,5];break;case 7:l=[1,3,5,6];break;case 8:l=[1,3,6,7];break;default:if(s.length<3||s[0].height&&s[2].height&&s[0].height===s[2].height)return;l=[1,2]}else if("string"==typeof e?e.split(/\s*,\s*/).forEach(function(e){u.push(parseInt(e,10))}):"boolean"!=typeof e&&e.forEach(function(e){u.push("number"==typeof e?e:e.level)}),s.forEach(function(a){(e===!0||u.indexOf(d)>-1)&&(!a.videoCodec||a.videoCodec&&c.isTypeSupported("video/mp4;codecs="+a.videoCodec))&&l.push(d),d+=1}),l.length<2)return;n.qualities=[],l.forEach(function(a){var r=s[a],t=r.width,o=r.height,i=u.length?e[u.indexOf(a)]:a,l="object"==typeof i?i.label:t&&o?Math.min(t,o)+"p":"Level "+(a+1);n.qualities.push(l)}),i=o.createElement("ul",{class:"fp-quality-selector"}),o.find(".fp-ui",v)[0].appendChild(i),l.unshift(-1),n.hlsQualities=l,!n.quality||n.qualities.indexOf(n.quality)<0?n.quality="abr":(y.startLevel=_(),y.loadLevel=y.startLevel),i.appendChild(o.createElement("li",{"data-quality":"abr"},"Auto")),n.qualities.forEach(function(e){i.appendChild(o.createElement("li",{"data-quality":M(e)},e))}),o.addClass(v,"quality-"+M()),w.on(v,"click."+t,".fp-quality-selector li",function(e){var r,i,s,l=e.currentTarget,u=a.smoothSwitching,c=h.paused;if(!o.hasClass(l,T)){for(c||u||w.one(h,"pause."+t,function(){o.removeClass(v,"is-paused")}),r=o.find(".fp-quality-selector li",v),s=0;s<r.length;s+=1)i=r[s]===l,i&&(n.quality=s>0?n.qualities[s-1]:"abr",u&&!n.poster?y.nextLevel=_():y.currentLevel=_(),o.addClass(l,T),c&&h.play()),o.toggleClass(r[s],T,i);N(),o.addClass(v,"quality-"+M())}})},j={engineName:t,pick:function(e){var a,r;for(a=0;a<e.length;a+=1)if(r=e[a],f(r.type))return"string"==typeof r.src&&(r.src=o.createAbsoluteUrl(r.src)),r},load:function(a){var s=n.conf,c={ended:"finish",loadeddata:"ready",pause:"pause",play:"resume",progress:"buffer",ratechange:"speed",seeked:"seek",timeupdate:"progress",volumechange:"volume",error:"error"},d=e.Events,f=!!a.autoplay||!!s.autoplay,k=a.hlsQualities||s.hlsQualities,E=i(r,s.hlsjs,s.clip.hlsjs,a.hlsjs),C=i({},E);a.hlsQualities===!1&&(k=!1),y?(y.destroy(),(n.video.src&&a.src!==n.video.src||a.index)&&o.attr(h,"autoplay","autoplay")):(o.removeNode(o.findDirect("video",v)[0]||o.find(".fp-player > video",v)[0]),h=o.createElement("video",{class:"fp-engine "+t+"-engine",autoplay:!!f&&"autoplay",volume:n.volumeLevel,"x-webkit-airplay":"allow"}),Object.keys(c).forEach(function(e){var r,l=c[e],u=e+"."+t;w.on(h,u,function(e){if(s.debug&&l.indexOf("progress")<0&&console.log(u,"->",l,e.originalEvent),n.ready||!(l.indexOf("ready")<0)){var c,f,p,g,b=h.currentTime,m=0,k=0,L=n.video,C=L.src,q=!1,S=L.loop,M=n.quality;switch(l){case"ready":r=i(L,{duration:h.duration,seekable:h.seekable.end(null),width:h.videoWidth,height:h.videoHeight,url:C});break;case"resume":R(),E.bufferWhilePaused||y.startLoad(b);break;case"seek":R(),!E.bufferWhilePaused&&h.paused&&(y.stopLoad(),h.pause()),r=b;break;case"pause":E.bufferWhilePaused||y.stopLoad();break;case"progress":r=b;break;case"speed":r=h.playbackRate;break;case"volume":r=h.volume;break;case"buffer":try{if(c=h.buffered,m=c.end(null),b)for(f=c.length-1;f>-1;f-=1)k=c.end(f),k>=b&&(m=k)}catch(e){}a.buffer=m,r=m;break;case"finish":y.autoLevelEnabled&&(S||s.playlist.length<2||s.advance===!1)&&(q=!y.levels[A].details,q||y.levels[A].details.fragments.forEach(function(e){q=!!q||!e.loadCounter}),q&&(y.trigger(d.BUFFER_FLUSHING,{startOffset:0,endOffset:.9*L.duration}),S&&w.one(h,"pause."+t,function(){o.removeClass(v,"is-paused")}),w.one(h,(S?"play.":"timeupdate.")+t,function(){var e=y.currentLevel;e<A&&(y.currentLevel=A,x=!0)})));break;case"error":g=h.error.code,(E.recoverMediaError&&3===g||E.recoverNetworkError&&2===g||E.recover&&(2===g||3===g))&&(g=O(s,l,2===g)),void 0!==g?(r={code:g},g>2&&(r.video=i(L,{src:C,url:C}))):r=!1}if(r===!1)return r;n.trigger(l,[n,r]),"ready"===l&&M&&(p="abr"===M?0:n.qualities.indexOf(M)+1,o.addClass(o.find(".fp-quality-selector li",v)[p],T))}})}),l&&s.poster&&(n.on("stop."+t,q),!n.live||f||n.video.autoplay||w.one(h,"seeked."+t,q)),E.bufferWhilePaused||n.on("beforeseek."+t,function(e,a,r){a.paused&&(w.one(h,"seeked."+t,function(){h.pause()}),y.startLoad(r))}),n.on("error."+t,function(){y&&(y.destroy(),y=0)}),o.prepend(o.find(".fp-player",v)[0],h)),n.video=a,A=0,x=!1,Object.keys(E).forEach(function(a){e.DefaultConfig.hasOwnProperty(a)||delete C[a];var r=E[a];switch(a){case"adaptOnStartOnly":r&&(C.startLevel=-1);break;case"autoLevelCapping":r===!1&&(r=-1),C[a]=r;break;case"startLevel":switch(r){case"auto":r=-1;break;case"firstLevel":r=void 0}C[a]=r;break;case"recover":E.recoverMediaError=!1,E.recoverNetworkError=!1,g=r;break;case"strict":r&&(E.recoverMediaError=!1,E.recoverNetworkError=!1,g=0)}}),C.autoStartLoad=!1,y=new e(C),n.engine[t]=y,b=null,m=null,Object.keys(d).forEach(function(a){var r=d[a],c=E.listeners,f=c&&c.indexOf(r)>-1;y.on(r,function(r,c){var d,b={},m=e.ErrorTypes,C=e.ErrorDetails,q=n.video,R=q.src;switch(a){case"MEDIA_ATTACHED":y.loadSource(R);break;case"MANIFEST_PARSED":p(s)?k?P(k,E,c):D():delete n.quality,n.live?S():setTimeout(S);break;case"FRAG_LOADED":x?(y.nextLevel=-1,x=!1,A=0):!n.live&&y.autoLevelEnabled&&y.loadLevel>A&&(A=y.loadLevel);break;case"FRAG_PARSING_METADATA":if(l)return;c.samples.forEach(function(e){var a;a=function(){if(!(h.currentTime<e.dts)){w.off(h,"timeupdate."+t,a);var r,o=u.TextDecoder;r=o&&"function"==typeof o?new o("utf-8").decode(e.data):decodeURIComponent(u.escape(String.fromCharCode.apply(null,e.data))),n.trigger("metadata",[n,{key:r.substr(10,4),data:r.substr(21)}])}},w.on(h,"timeupdate."+t,a)});break;case"ERROR":if(c.fatal||E.strict){switch(c.type){case m.NETWORK_ERROR:E.recoverNetworkError||g?O(s,c.type,!0):c.frag&&c.frag.url?(b.url=c.frag.url,d=2):d=4;break;case m.MEDIA_ERROR:d=E.recoverMediaError||g?O(s,c.type):3;break;default:y.destroy(),d=5}void 0!==d&&(b.code=d,d>2&&(b.video=i(q,{src:R,url:c.url||R})),n.trigger("error",[n,b]))}else switch(c.details){case C.BUFFER_STALLED_ERROR:case C.FRAG_LOOP_LOADING_ERROR:o.addClass(v,L),w.one(h,"timeupdate."+t,function(){o.removeClass(v,L)})}}f&&n.trigger(r,[n,c])})}),E.adaptOnStartOnly&&w.one(h,"timeupdate."+t,function(){y.loadLevel=y.loadLevel}),y.attachMedia(h),h.paused&&f&&h.play()},resume:function(){h.play()},pause:function(){h.pause()},seek:function(e){h.currentTime=e},volume:function(e){h&&(h.volume=e)},speed:function(e){h.playbackRate=e,n.trigger("speed",[n,e])},unload:function(){if(y){var e="."+t;y.destroy(),y=0,D(),n.off(e),w.off(v,e),w.off(h,e),o.removeNode(h),h=0}}};return!/^6\.0\.[0-3]$/.test(s)||n.conf.splash||n.conf.poster||n.conf.autoplay||(k=o.css(v,"backgroundColor"),E="none"!==o.css(v,"backgroundImage")||k&&"rgba(0, 0, 0, 0)"!==k&&"transparent"!==k,E&&(n.conf.poster=!0)),j};e.isSupported()&&0!==s.indexOf("5.")&&(v.engineName=t,v.canPlay=function(e,o){var s=n.browser,l=u.navigator,c=l.userAgent.indexOf("Trident/7")>-1;return o[t]!==!1&&o.clip[t]!==!1&&(r=i({bufferWhilePaused:!0,smoothSwitching:!0,recoverMediaError:!0},a.conf[t],o[t],o.clip[t]),!!f(e)&&(!!r.debug||(!r.anamorphic||0!==l.platform.indexOf("Win")||!s.mozilla||0!==s.version.indexOf("44."))&&(c||!s.safari)))},a.engines.unshift(v),a(function(e){e.pluginQualitySelectorEnabled=p(e.conf)&&v.canPlay("application/x-mpegurl",e.conf)}))};"object"==typeof module&&module.exports?module.exports=e.bind(void 0,require("hls.js/lib/index.js")):window.Hls&&window.flowplayer&&e(window.Hls,window.flowplayer)}();
29
+ /*@
30
+ @end
31
+ @*/
flowplayer/flowplayer.swf CHANGED
Binary file
flowplayer/flowplayerhls.swf ADDED
Binary file
flowplayer/fv-flowplayer.min.js CHANGED
@@ -1,24 +1,14 @@
1
  /*!
2
 
3
- Flowplayer Unlimited v5.5.2 (2014-11-27) | flowplayer.org/license
4
-
5
- */!function(e){function a(t,n,r){r=r||"transparent";var i="obj"+(""+Math.random()).slice(2,15),s='<object class="fp-engine" id="'+i+'" name="'+i+'" ';s+=e.browser.msie?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+t+'" type="application/x-shockwave-flash">';var o={width:"100%",height:"100%",allowscriptaccess:"always",wmode:r,quality:"high",flashvars:"",movie:t+(e.browser.msie?"?"+i:""),name:i};return e.each(n,function(e,t){o.flashvars+=e+"="+t+"&"}),e.each(o,function(e,t){s+='<param name="'+e+'" value="'+t+'"/>'}),s+="</object>",e(s)}function c(e,t){return t=t||100,Math.round(e*t)/t}function h(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}function p(e){return/^(video|application)/i.test(e)||(e=h(e)),!!f.canPlayType(e).replace("no","")}function d(t,n){var r=e.grep(t,function(e){return e.type===n});return r.length?r[0]:null}function b(e){var t=e.attr("src"),n=e.attr("type")||"",r=t.split(y)[1];return n=/mpegurl/i.test(n)?"mpegurl":n.replace("video/",""),{src:t,suffix:r||n,type:n||r}}function w(t){var n=this,r=[];e("source",t).each(function(){r.push(b(e(this)))}),r.length||r.push(b(t)),n.initialSources=r,n.resolve=function(t){return t?(e.isArray(t)?t={sources:e.map(t,function(t){var n,r=e.extend({},t);return e.each(t,function(e,t){n=e}),r.type=n,r.src=t[n],delete r[n],r})}:typeof t=="string"&&(t={src:t,sources:[]},e.each(r,function(e,n){n.type!="flash"&&t.sources.push({type:n.type,src:t.src.replace(y,"."+n.suffix+"$2")})})),t):{sources:r}}}function E(e){return e=parseInt(e,10),e>=10?e:"0"+e}function S(e){e=e||0;var t=Math.floor(e/3600),n=Math.floor(e/60);return e-=n*60,t>=1?(n-=t*60,t+":"+E(n)+":"+E(e)):E(n)+":"+E(e)}!function(e){if(!e.browser){var t=e.browser={},n=navigator.userAgent.toLowerCase(),r=/(chrome)[ \/]([\w.]+)/.exec(n)||/(safari)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];r[1]&&(t[r[1]]=!0,t.version=r[2]||"0")}}(jQuery),e(function(){typeof e.fn.flowplayer=="function"&&e("video").parent(".flowplayer").flowplayer()});var t=[],n=[],r=window.navigator.userAgent;window.flowplayer=function(r){return e.isFunction(r)?n.push(r):typeof r=="number"||r===undefined?t[r||0]:e(r).data("flowplayer")},e(window).on("beforeunload",function(){e.each(t,function(t,n){n.conf.splash?n.unload():n.bind("error",function(){e(".flowplayer.is-error .fp-message").remove()})})});var i=!1;try{typeof window.localStorage=="object"&&(window.localStorage.flowplayerTestStorage="test",i=!0)}catch(s){}var o=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent);m=/(\d+\.\d+) Safari/.exec(navigator.userAgent),safariVersion=m?Number(m[1]):100,e.extend(flowplayer,{version:"5.5.2",engine:{},conf:{},support:{},defaults:{debug:!1,disabled:!1,engine:"html5",fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,flashfit:!1,rtmp:0,splash:!1,live:!1,swf:"//releases.flowplayer.org/5.5.2/commercial/flowplayer.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,volume:i?localStorage.muted=="true"?0:isNaN(localStorage.volume)?1:localStorage.volume||1:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:o&&safariVersion<8}});var u=1;e.fn.flowplayer=function(r,s){return typeof r=="string"&&(r={swf:r}),e.isFunction(r)&&(s=r,r={}),!r&&this.data("flowplayer")||this.each(function(){var o=e(this).addClass("is-loading"),a=e.extend({},flowplayer.defaults,flowplayer.conf,r,o.data()),f=e("video",o).addClass("fp-engine").removeAttr("controls"),l=f.length?new w(f):null,c={},h,p;if(a.playlist.length){var d=a.preload||f.attr("preload"),v;f.length&&f.replaceWith(v=e("<p />")),f=e("<video />").addClass("fp-engine"),v?v.replaceWith(f):o.prepend(f),flowplayer.support.video&&f.attr("preload",d),typeof a.playlist[0]=="string"?f.attr("src",a.playlist[0]):e.each(a.playlist[0],function(t,n){for(var r in n)n.hasOwnProperty(r)&&f.append(e("<source />").attr({type:"video/"+r,src:n[r]}))}),l=new w(f)}var m=o.data("flowplayer");m&&m.unload(),o.data("fp-player_id",o.data("fp-player_id")||u++);try{c=i?window.localStorage:c}catch(g){}var y=this.currentStyle&&this.currentStyle.direction==="rtl"||window.getComputedStyle&&window.getComputedStyle(this,null).getPropertyValue("direction")==="rtl";y&&o.addClass("is-rtl");var b=m||{conf:a,currentSpeed:1,volumeLevel:typeof a.volume=="undefined"?c.volume*1:a.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:c.muted=="true"||a.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:y,load:function(t,n){if(b.error||b.loading||b.disabled)return;t=l.resolve(t),e.extend(t,p.pick(t.sources));if(t.src){var r=e.Event("load");o.trigger(r,[b,t,p]),r.isDefaultPrevented()?b.loading=!1:(p.load(t),e.isFunction(t)&&(n=t),n&&o.one("ready",n))}return b},pause:function(e){return b.ready&&!b.seeking&&!b.disabled&&!b.loading&&(p.pause(),b.one("pause",e)),b},resume:function(){return b.ready&&b.paused&&!b.disabled&&(p.resume(),b.finished&&(b.trigger("resume",[b]),b.finished=!1)),b},toggle:function(){return b.ready?b.paused?b.resume():b.pause():b.load()},seek:function(t,n){if(b.ready&&!b.live){if(typeof t=="boolean"){var r=b.video.duration*.1;t=b.video.time+(t?r:-r)}t=h=Math.min(Math.max(t,0),b.video.duration).toFixed(1);var i=e.Event("beforeseek");o.trigger(i,[b,t]),i.isDefaultPrevented()?(b.seeking=!1,o.toggleClass("is-seeking",b.seeking)):(p.seek(t),e.isFunction(n)&&o.one("seek",n))}return b},seekTo:function(e,t){var n=e===undefined?h:b.video.duration*.1*e;return b.seek(n,t)},mute:function(e){return e===undefined&&(e=!b.muted),c.muted=b.muted=e,c.volume=isNaN(c.volume)?a.volume:c.volume,b.volume(e?0:c.volume,!0),b.trigger("mute",e),b},volume:function(e,t){return b.ready&&(e=Math.min(Math.max(e,0),1),t||(c.volume=e),p.volume(e)),b},speed:function(t,n){return b.ready&&(typeof t=="boolean"&&(t=a.speeds[e.inArray(b.currentSpeed,a.speeds)+(t?1:-1)]||b.currentSpeed),p.speed(t),n&&o.one("speed",n)),b},stop:function(){return b.ready&&(b.pause(),b.seek(0,function(){o.trigger("stop")})),b},unload:function(){return o.hasClass("is-embedding")||(a.splash?(b.trigger("unload"),p.unload()):b.stop()),b},disable:function(e){return e===undefined&&(e=!b.disabled),e!=b.disabled&&(b.disabled=e,b.trigger("disable",e)),b}};b.conf=e.extend(b.conf,a),e.each(["bind","one","unbind"],function(e,t){b[t]=function(e,n){return o[t](e,n),b}}),b.trigger=function(e,t){return o.trigger(e,[b,t]),b},o.data("flowplayer")||o.bind("boot",function(){e.each(["autoplay","loop","preload","poster"],function(e,t){var n=f.attr(t);n!==undefined&&(a[t]=n?n:!0)});if(a.splash||o.hasClass("is-splash")||!flowplayer.support.firstframe)b.forcedSplash=!a.splash&&!o.hasClass("is-splash"),b.splash=a.splash=a.autoplay=!0,o.addClass("is-splash"),flowplayer.support.video&&f.attr("preload","none");if(a.live||o.hasClass("is-live"))b.live=a.live=!0,o.addClass("is-live");e.each(n,function(e){this(b,o)}),p=flowplayer.engine[a.engine],p&&(p=p(b,o)),p.pick(l.initialSources)?b.engine=a.engine:e.each(flowplayer.engine,function(e,t){if(e!=a.engine){p=this(b,o);if(p.pick(l.initialSources))return b.engine=e,!1}}),t.push(b);if(!b.engine)return b.trigger("error",{code:flowplayer.support.flashVideo?5:10});a.splash?b.unload():b.load(),a.disabled&&b.disable(),p.volume(b.volumeLevel),o.one("ready",s)}).bind("load",function(t,n,r){a.splash&&e(".flowplayer").filter(".is-ready, .is-loading").not(o).each(function(){var t=e(this).data("flowplayer");t.conf.splash&&t.unload()}),o.addClass("is-loading"),n.loading=!0}).bind("ready",function(e,t,n){function r(){o.removeClass("is-loading"),t.loading=!1}n.time=0,t.video=n,a.splash?o.one("progress",r):r(),t.muted?t.mute(!0):t.volume(t.volumeLevel);var i=t.conf.hlsFix&&/mpegurl/i.exec(n.type);o.toggleClass("hls-fix",!!i)}).bind("unload",function(e){a.splash&&f.remove(),o.removeClass("is-loading"),b.loading=!1}).bind("ready unload",function(e){var t=e.type=="ready";o.toggleClass("is-splash",!t).toggleClass("is-ready",t),b.ready=t,b.splash=!t}).bind("progress",function(e,t,n){t.video.time=n}).bind("speed",function(e,t,n){t.currentSpeed=n}).bind("volume",function(e,t,n){t.volumeLevel=Math.round(n*100)/100,t.muted?n&&t.mute(!1):c.volume=n}).bind("beforeseek seek",function(e){b.seeking=e.type=="beforeseek",o.toggleClass("is-seeking",b.seeking)}).bind("ready pause resume unload finish stop",function(e,t,n){b.paused=/pause|finish|unload|stop/.test(e.type),e.type=="ready"&&(b.paused=a.preload=="none",n&&(b.paused=!n.duration||!a.autoplay&&a.preload!="none")),b.playing=!b.paused,o.toggleClass("is-paused",b.paused).toggleClass("is-playing",b.playing),b.load.ed||b.pause()}).bind("finish",function(e){b.finished=!0}).bind("error",function(){f.remove()}),o.trigger("boot",[b,o]).data("flowplayer",b)})},!function(){var t=function(e){var t=/Version\/(\d\.\d)/.exec(e);return t&&t.length>1?parseFloat(t[1],10):0},n=flowplayer.support,r=e.browser,i=e("<video loop autoplay preload/>")[0],s=navigator.userAgent,o=r.msie||/Trident\/7/.test(s),u=/iPad|MeeGo/.test(s)&&!/CriOS/.test(s),a=/iPad/.test(s)&&/CriOS/.test(s),f=/iP(hone|od)/i.test(s)&&!/iPad/.test(s),l=/Android/.test(s)&&!/Firefox/.test(s),c=/Android/.test(s)&&/Firefox/.test(s),h=/Silk/.test(s),p=/IEMobile/.test(s),d=p?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(s)[1],10):0,v=p?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(s)[1],10):0,m=u?t(s):0,g=l?parseFloat(/Android\ (\d\.\d)/.exec(s)[1],10):0;e.extend(n,{subtitles:!!i.addTextTrack,fullscreen:typeof document.webkitCancelFullScreen=="function"&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(s)||document.mozFullScreenEnabled||typeof document.exitFullscreen=="function"||typeof document.msExitFullscreen=="function",inlineBlock:!(o&&r.version<8),touch:"ontouchstart"in window,dataload:!u&&!f&&!p,zeropreload:!o&&!l,volume:!u&&!l&&!f&&!h&&!a,cachedVideoTag:!u&&!f&&!a&&!p,firstframe:!f&&!u&&!l&&!h&&!a&&!p&&!c,inlineVideo:(d>=8.1&&v>=11)||(!f&&(!l||g>=3)),hlsDuration:!l&&(!r.safari||u||f||a),seekable:!u&&!a});try{var y=navigator.plugins["Shockwave Flash"],b=o?(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version"):y.description;!o&&!y[0].enabledPlugin?n.flashVideo=!1:(b=b.split(/\D+/),b.length&&!b[0]&&(b=b.slice(1)),n.flashVideo=b[0]>9||b[0]==9&&b[3]>=115)}catch(w){}try{n.video=!!i.canPlayType,n.video&&i.canPlayType("video/mp4")}catch(E){n.video=!1}n.animation=function(){var t=["","Webkit","Moz","O","ms","Khtml"],n=e("<p/>")[0];for(var r=0;r<t.length;r++)if(n.style[t[r]+"AnimationName"]!=="undefined")return!0}()}(),window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_savedUnloadHandler=__flash_unloadHandler=function(){}}),flowplayer.engine.flash=function(t,n){var r=t.conf,i=t.video,s,o,u,f=e(window),l=function(){if(C=="webkit"||D){var r=e("object param[name='flashvars']",n),i=(r.attr("value")||"").split("&");e.each(i,function(e,n){n=n.split("=");if(n[0]=="url"&&n[1]!=t.video.url)return i[e]="url="+t.video.url,r.attr({value:i.join("&")}),!1})}},c=function(r){var i=n.height(),s=n.width();if(t.conf.flashfit||/full/.test(r.type)){var o=t.isFullscreen,u=o&&O,a=!flowplayer.support.inlineBlock,l=o?u?screen.width:f.width():s,c=o?u?screen.height:f.height():i,h=0,p=0,d=a?s:"",v=a?i:"",m,g;if(t.conf.flashfit||r.type==="fullscreen")m=t.video.width/t.video.height,g=t.video.height/t.video.width,v=Math.max(g*l),d=Math.max(m*c),v=v>c?d*g:v,v=Math.min(Math.round(v),c),d=d>l?v*m:d,d=Math.min(Math.round(d),l),p=Math.max(Math.round((c+p-v)/2),0),h=Math.max(Math.round((l+h-d)/2),0);e("object",n).css({width:d,height:v,marginTop:p,marginLeft:h})}},h={pick:function(t){if(flowplayer.support.flashVideo){var n=e.grep(t,function(e){return e.type=="flash"})[0];if(n)return n;for(var r=0,i;r<t.length;r++){i=t[r];if(/mp4|flv/i.test(i.type))return i}}},load:function(i){function f(e){return e.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}var h=e("video",n),p=f(i.src);is_absolute=/^https?:/.test(p);var d=function(){h.remove()},v=function(t){return e.grep(t,function(e){return!!h[0].canPlayType("video/"+e.type)}).length>0};flowplayer.support.video&&h.prop("autoplay")&&v(i.sources)?h.one("timeupdate",d):d(),!is_absolute&&!r.rtmp&&(p=e("<img/>").attr("src",p)[0].src);if(u)u.__play(p);else{t.bind("ready",l).bind("ready fullscreen fullscreen-exit",c),s="fp"+(""+Math.random()).slice(3,15);var m={hostname:r.embedded?r.hostname:location.hostname,url:p,callback:"jQuery."+s};n.data("origin")&&(m.origin=n.data("origin")),is_absolute&&delete r.rtmp,e.each(["key","autoplay","preload","rtmp","subscribe","live","loop","debug","splash","poster","rtmpt"],function(e,t){r.hasOwnProperty(t)&&(m[t]=r[t])}),r.bufferTime!==undefined&&(m.bufferTime=r.bufferTime),m.rtmp&&(m.rtmp=f(m.rtmp)),m.initialVolume=t.volumeLevel,o=a(r.swf,m,r.wmode),o.prependTo(n),u=o[0],setTimeout(function(){try{if(!u.PercentLoaded())return n.trigger("error",[t,{code:7,url:r.swf}])}catch(e){}},5e3),setTimeout(function(){typeof u.PercentLoaded=="undefined"&&n.trigger("flashdisabled",[t])},1e3),u.pollInterval=setInterval(function(){if(!u)return;var e=u.__status?u.__status():null;if(!e)return;t.trigger("progress",e.time),i.buffer=e.buffer/i.bytes*i.duration,t.trigger("buffer",i.buffer),!i.buffered&&e.time>0&&(i.buffered=!0,t.trigger("buffered"))},250),e[s]=function(n,s){r.debug&&console.log("--",n,s);var o=e.Event(n);switch(n){case"ready":s=e.extend(i,s);break;case"click":o.flash=!0;break;case"keydown":o.which=s;break;case"seek":i.time=s}n!="buffered"&&setTimeout(function(){t.trigger(o,s)},1)}}},speed:e.noop,unload:function(){u&&u.__unload&&u.__unload(),delete e[s],e("object",n).remove(),u=0,t.unbind("ready",l).unbind("ready fullscreen fullscreen-exit",c),clearInterval(u.pollInterval)}};return e.each("pause,resume,seek,volume".split(","),function(e,r){h[r]=function(e){try{t.ready&&(r=="seek"&&t.video.time&&!t.paused&&t.trigger("beforeseek"),e===undefined?u["__"+r]():u["__"+r](e))}catch(i){if(typeof u["__"+r]=="undefined")return n.trigger("flashdisabled",[t]);throw i}}}),h};var f=e("<video/>")[0],l={ended:"finish",pause:"pause",play:"resume",progress:"buffer",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadeddata:"ready",error:"error",dataunavailable:"error"},v,g=function(t){return v?v.attr({type:h(t.type),src:t.src}):v=e("<video/>",{src:t.src,type:h(t.type),"class":"fp-engine",autoplay:"autoplay",preload:"none","x-webkit-airplay":"allow"})};flowplayer.engine.html5=function(t,n){function m(r,s,u){if(r.listeners&&r.listeners.hasOwnProperty(n.data("fp-player_id")))return;(r.listeners||(r.listeners={}))[n.data("fp-player_id")]=!0,s.bind("error",function(n){try{if(n.originalEvent&&e(n.originalEvent.originalTarget).is("img"))return n.preventDefault();p(e(n.target).attr("type"))&&t.trigger("error",{code:4})}catch(r){}}),e.each(l,function(s,f){r.addEventListener(s,function(l){f=="progress"&&l.srcElement&&l.srcElement.readyState===0&&setTimeout(function(){!t.video.duration&&(!t.conf.live||t.video.type==="mpegurl"&&i.hlsDuration)&&(f="error",t.trigger(f,{code:4}))},1e4),o.debug&&!/progress/.test(f)&&console.log(s,"->",f,l);if(!t.ready&&!/ready|error/.test(f)||!f||!e("video",n).length)return;var h=e.Event(f),p,d;switch(f){case"ready":p=e.extend(u,{duration:r.duration,width:r.videoWidth,height:r.videoHeight,url:r.currentSrc,src:r.currentSrc});try{p.seekable=!o.live&&/mpegurl/i.test(u?u.type||"":"")&&r.duration||r.seekable&&r.seekable.end(null)}catch(v){}a=a||setInterval(function(){try{p.buffer=r.buffered.end(null)}catch(e){}p.buffer&&(c(p.buffer,1e3)<c(p.duration,1e3)&&!p.buffered?t.trigger("buffer",l):p.buffered||(p.buffered=!0,t.trigger("buffer",l).trigger("buffered",l),clearInterval(a),a=0))},250);if(!o.live&&!p.duration&&!i.hlsDuration&&s==="loadeddata"){var m=function(){p.duration=r.duration;try{p.seekable=r.seekable&&r.seekable.end(null)}catch(e){}t.trigger(h,p),r.removeEventListener("durationchange",m)};r.addEventListener("durationchange",m);return}break;case"progress":case"seek":var g=t.video.duration;if(r.currentTime>0||t.live){p=Math.max(r.currentTime,0);break}if(f=="progress")return;case"speed":p=c(r.playbackRate);break;case"volume":p=c(r.volume);break;case"error":try{p=(l.srcElement||l.originalTarget).error}catch(y){return}}t.trigger(h,p)},!1)})}var r=e("video",n),i=flowplayer.support,s=e("track",r),o=t.conf,u,a,f,h;return u={pick:function(e){if(i.video){if(o.videoTypePreference){var t=d(e,o.videoTypePreference);if(t)return t}for(var n=0,r;n<e.length;n++)if(p(e[n].type))return e[n]}},load:function(s){if(o.splash&&!f)r=g(s).prependTo(n),i.inlineVideo||r.css({position:"absolute",top:"-9999em"}),o.loop&&r.attr("loop","loop"),f=r[0],typeof h!="undefined"&&(f.volume=h);else{f=r[0];var u=r.find("source");!f.src&&u.length&&(f.src=s.src,u.remove());if(t.video.src&&s.src!=t.video.src)r.attr("autoplay","autoplay"),f.src=s.src;else if(o.preload=="none"||!i.dataload)i.zeropreload?t.trigger("ready",s).trigger("pause").one("ready",function(){n.trigger("resume",[t])}):t.one("ready",function(){n.trigger("pause",[t])})}m(f,e("source",r).add(r),s),(o.preload!="none"&&s.type!="mpegurl"||!i.zeropreload||!i.dataload)&&f.load(),o.splash&&f.load()},pause:function(){f.pause()},resume:function(){f.play()},speed:function(e){f.playbackRate=e},seek:function(e){try{var n=t.paused;f.currentTime=e,n&&f.pause()}catch(r){}},volume:function(e){h=e,f&&(f.volume=e)},unload:function(){e("video.fp-engine",n).remove(),i.cachedVideoTag||(v=null),a=clearInterval(a),f=0}}};var y=/\.(\w{3,4})(\?.*)?$/i;e.throttle=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},e.fn.slider2=function(t){var n=/iPad/.test(navigator.userAgent)&&!/CriOS/.test(navigator.userAgent);return this.each(function(){var r=e(this),i=e(document),s=r.children(":last"),o,u,a,f,l,c,h,p,d=!1,v=function(){u=r.offset(),a=r.width(),f=r.height(),c=l?f:a,p=b(h)},m=function(e){!o&&e!=w.value&&(!h||e<h)&&(r.trigger("slide",[e]),w.value=e)},g=function(e){var n=e.pageX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var r=l?e.pageY-u.top:n-u.left;r=Math.max(0,Math.min(p||c,r));var i=r/c;return l&&(i=1-i),t&&(i=1-i),y(i,0,!0)},y=function(e,t){t===undefined&&(t=0),e>1&&(e=1);var r=Math.round(e*1e3)/10+"%";if(!h||e<=h)!n&&!d&&s.stop(),d?s.css("width",r):s.animate(l?{height:r}:{width:r},t,"linear");return e},b=function(e){return Math.max(0,Math.min(c,l?(1-e)*f:e*a))},w={max:function(e){h=e},disable:function(e){o=e},slide:function(e,t,n){v(),n&&m(e),y(e,t)},disableAnimation:function(e,t){d=e!==!1,r.toggleClass("no-animation",!!t)}};v(),r.data("api",w).bind("mousedown.sld touchstart",function(t){t.preventDefault();if(!o){var n=e.throttle(m,100);v(),w.dragging=!0,r.addClass("is-dragging"),m(g(t)),i.bind("mousemove.sld touchmove",function(e){e.preventDefault(),n(g(e))}).one("mouseup touchend",function(){w.dragging=!1,r.removeClass("is-dragging"),i.unbind("mousemove.sld touchmove")})}})})},flowplayer(function(t,n){function o(t){return e(".fp-"+t,n)}function T(t){if(n.css("width")==="0px"||n.css("height")==="0px"||t!==flowplayer.defaults.ratio)parseInt(v,10)||h.css("paddingTop",t*100+"%");i.inlineBlock||e("object",n).height(n.height())}function N(e){n.toggleClass("is-mouseover",e).toggleClass("is-mouseout",!e)}var r=t.conf,i=flowplayer.support,s;n.find(".fp-ratio,.fp-ui").remove(),n.addClass("flowplayer").append(' <div class="ratio"/> <div class="ui"> <div class="waiting"><em/><em/><em/></div> <a class="fullscreen"/> <a class="unload"/> <p class="speed"/> <div class="controls"> <a class="play"></a> <div class="timeline"> <div class="buffer"/> <div class="progress"/> </div> <div class="volume"> <a class="mute"></a> <div class="volumeslider"> <div class="volumelevel"/> </div> </div> </div> <div class="time"> <em class="elapsed">00:00</em> <em class="remaining"/> <em class="duration">00:00</em> </div> <div class="message"><h2/><p/></div> </div>'.replace(/class="/g,'class="fp-'));var u=o("progress"),a=o("buffer"),f=o("elapsed"),l=o("remaining"),c=o("waiting"),h=o("ratio"),p=o("speed"),d=o("duration"),v=h.css("paddingTop"),m=o("timeline").slider2(t.rtl),g=m.data("api"),y=o("volume"),b=o("fullscreen"),w=o("volumeslider").slider2(t.rtl),E=w.data("api"),x=n.is(".fixed-controls, .no-toggle");g.disableAnimation(n.hasClass("is-touch")),i.animation||c.html("<p>loading &hellip;</p>"),T(r.ratio);try{r.fullscreen||b.remove()}catch(C){b.remove()}t.bind("ready",function(){var e=t.video.duration;g.disable(t.disabled||!e),r.adaptiveRatio&&T(t.video.height/t.video.width),d.add(l).html(S(e)),e>=3600&&n.addClass("is-long")||n.removeClass("is-long"),E.slide(t.volumeLevel),t.engine==="flash"&&g.disableAnimation(!0,!0)}).bind("unload",function(){v||h.css("paddingTop","")}).bind("buffer",function(){var e=t.video,n=e.buffer/e.duration;!e.seekable&&i.seekable&&g.max(n),n<1?a.css("width",n*100+"%"):a.css({width:"100%"})}).bind("speed",function(e,t,n){p.text(n+"x").addClass("fp-hilite"),setTimeout(function(){p.removeClass("fp-hilite")},1e3)}).bind("buffered",function(){a.css({width:"100%"}),g.max(1)}).bind("progress",function(){var e=t.video.time,n=t.video.duration;g.dragging||g.slide(e/n,t.seeking?0:250),f.html(S(e)),l.html("-"+S(n-e))}).bind("finish resume seek",function(e){n.toggleClass("is-finished",e.type=="finish")}).bind("stop",function(){f.html(S(0)),g.slide(0,100)}).bind("finish",function(){f.html(S(t.video.duration)),g.slide(1,100),n.removeClass("is-seeking")}).bind("beforeseek",function(){u.stop()}).bind("volume",function(){E.slide(t.volumeLevel)}).bind("disable",function(){var e=t.disabled;g.disable(e),E.disable(e),n.toggleClass("is-disabled",t.disabled)}).bind("mute",function(e,t,r){n.toggleClass("is-muted",r)}).bind("error",function(t,i,s){n.removeClass("is-loading").addClass("is-error");if(s){s.message=r.errors[s.code],i.error=!0;var o=e(".fp-message",n);e("h2",o).text((i.engine||"html5")+": "+s.message),e("p",o).text(s.url||i.video.url||i.video.src||r.errorUrls[s.code]),n.unbind("mouseenter click").removeClass("is-mouseover")}}).bind("mouseenter mouseleave",function(e){if(x)return;var t=e.type=="mouseenter",r;N(t),t?(n.bind("pause.x mousemove.x volume.x",function(){N(!0),r=new Date}),s=setInterval(function(){new Date-r>( flowplayer.support.touch ? 5e3 : 2e3 )&&(N(!1),r=new Date)},100)):(n.unbind(".x"),clearInterval(s))}).bind("mouseleave",function(){(g.dragging||E.dragging)&&n.addClass("is-mouseover").removeClass("is-mouseout")}).bind("click.player",function(n){if(e(n.target).is(".fp-ui, .fp-engine")||n.flash)return n.preventDefault(),t.toggle()}).bind("contextmenu",function(t){t.preventDefault();var r=n.offset(),i=e(window),s=t.clientX-r.left,o=t.clientY-r.top+i.scrollTop(),u=n.find(".fp-context-menu").css({left:s+"px",top:o+"px",display:"block"}).on("click",function(e){e.stopPropagation()});e("html").on("click.outsidemenu",function(t){u.hide(),e("html").off("click.outsidemenu")})}).bind("flashdisabled",function(){n.addClass("is-flash-disabled").one("ready",function(){n.removeClass("is-flash-disabled").find(".fp-flash-disabled").remove()}).append('<div class="fp-flash-disabled">Adobe Flash is disabled for this page, click player area to enable.</div>')}),r.poster&&n.css("backgroundImage","url("+r.poster+")");var k=n.css("backgroundColor"),L=n.css("backgroundImage")!="none"||k&&k!="rgba(0, 0, 0, 0)"&&k!="transparent";L&&!r.splash&&!r.autoplay&&t.bind("ready stop",function(){n.addClass("is-poster").one("progress",function(){n.removeClass("is-poster")})}),!L&&t.forcedSplash&&n.css("backgroundColor","#555"),e(".fp-toggle, .fp-play",n).click(t.toggle),e.each(["mute","fullscreen","unload"],function(e,n){o(n).click(function(){t[n]()})}),m.bind("slide",function(e,n){t.seeking=!0,t.seek(n*t.video.duration)}),w.bind("slide",function(e,n){t.volume(n)}),o("time").click(function(t){e(this).toggleClass("is-inverted")}),N(x)});var x,T,N="is-help";e(document).bind("keydown.fp",function(t){var n=x,r=t.ctrlKey||t.metaKey||t.altKey,i=t.which,s=n&&n.conf;if(!n||!s.keyboard||n.disabled)return;if(e.inArray(i,[63,187,191])!=-1)return T.toggleClass(N),!1;if(i==27&&T.hasClass(N))return T.toggleClass(N),!1;if(!r&&n.ready){t.preventDefault();if(t.shiftKey){i==39?n.speed(!0):i==37&&n.speed(!1);return}if(i<58&&i>47)return n.seekTo(i-48);switch(i){case 38:case 75:n.volume(n.volumeLevel+.15);break;case 40:case 74:n.volume(n.volumeLevel-.15);break;case 39:case 76:n.seeking=!0,n.seek(!0);break;case 37:case 72:n.seeking=!0,n.seek(!1);break;case 190:n.seekTo();break;case 32:n.toggle();break;case 70:s.fullscreen&&n.fullscreen();break;case 77:n.mute();break;case 81:n.unload()}}}),flowplayer(function(t,n){if(!t.conf.keyboard)return;n.bind("mouseenter mouseleave",function(e){x=!t.disabled&&e.type=="mouseenter"?t:0,x&&(T=n)});var r=flowplayer.support.video&&t.conf.engine!=="flash"&&!!e("<video/>")[0].playbackRate?"<p><em>shift</em> + <em>&#8592;</em><em>&#8594;</em>slower / faster</p>":"";n.append(' <div class="fp-help"> <a class="fp-close"></a> <div class="fp-help-section fp-help-basics"> <p><em>space</em>play / pause</p> <p><em>q</em>unload | stop</p> <p><em>f</em>fullscreen</p>'+r+' </div> <div class="fp-help-section"> <p><em>&#8593;</em><em>&#8595;</em>volume</p> <p><em>m</em>mute</p> </div> <div class="fp-help-section"> <p><em>&#8592;</em><em>&#8594;</em>seek</p> <p><em>&nbsp;. </em>seek to previous </p><p><em>1</em><em>2</em>&hellip; <em>6</em> seek to 10%, 20% &hellip; 60% </p> </div> </div> '),t.conf.tooltip&&e(".fp-ui",n).attr("title","Hit ? for help").on("mouseout.tip",function(){e(this).removeAttr("title").off("mouseout.tip")}),e(".fp-close",n).click(function(){n.toggleClass(N)})});var C=e.browser.mozilla?"moz":"webkit",k="fullscreen",L="fullscreen-exit",A,O=flowplayer.support.fullscreen,M=typeof document.exitFullscreen=="function",_=navigator.userAgent.toLowerCase(),D=/(safari)[ \/]([\w.]+)/.exec(_)&&!/(chrome)[ \/]([\w.]+)/.exec(_);e(document).bind("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",function(t){var n=e(document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement||t.target);n.length&&!A?A=n.trigger(k,[n]):(A.trigger(L,[A]),A=null)}),flowplayer(function(t,n){if(!t.conf.fullscreen)return;var r=e(window),i={apply:!1,pos:0,play:!1},s;t.isFullscreen=!1,t.fullscreen=function(o){if(t.disabled)return;o===undefined&&(o=!t.isFullscreen),o&&(s=r.scrollTop()),(C=="webkit"||D)&&t.engine=="flash"&&(i={apply:!0,pos:t.video.time,play:t.playing});if(O)if(o){var u=n[0];e.each(["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"],function(e,t){if(typeof u[t]=="function")return u[t](Element.ALLOW_KEYBOARD_INPUT),D&&!document.webkitCurrentFullScreenElement&&!document.mozFullScreenElement&&u[t](),!1})}else e.each(["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"],function(e,t){if(typeof document[t]=="function")return document[t](),!1});else t.trigger(o?k:L,[t]);return t};var o;n.bind("mousedown.fs",function(){+(new Date)-o<150&&t.ready&&t.fullscreen(),o=+(new Date)}),t.bind(k,function(e){n.addClass("is-fullscreen"),t.isFullscreen=!0}).bind(L,function(e){var i;!O&&t.engine==="html5"&&(i=n.css("opacity")||"",n.css("opacity",0)),n.removeClass("is-fullscreen"),!O&&t.engine==="html5"&&setTimeout(function(){n.css("opacity",i)}),t.isFullscreen=!1,r.scrollTop(s)}).bind("ready",function(){if(i.apply){var n=function(){!i.play&&!t.conf.live?t.pause():t.resume(),e.extend(i,{pos:0,play:!1})};t.conf.live?n():t.conf.rtmp&&i.pos&&!isNaN(i.pos)?(t.resume(),t.seek(i.pos,n)):n()}})}),flowplayer(function(t,n){function s(){return e(r.query,n)}function o(){return e(r.query+"."+i,n)}var r=e.extend({active:"is-active",advance:!0,query:".fp-playlist a"},t.conf),i=r.active;t.play=function(n){return n===undefined?t.resume():typeof n=="number"&&!t.conf.playlist[n]?t:(typeof n!="number"&&t.load.apply(null,arguments),t.unbind("resume.fromfirst"),t.video.index=n,t.load(typeof t.conf.playlist[n]=="string"?t.conf.playlist[n].toString():e.map(t.conf.playlist[n],function(t){return e.extend({},t)})),t)},t.next=function(e){e&&e.preventDefault();var n=t.video.index;return n!=-1&&(n=n===t.conf.playlist.length-1?0:n+1,t.play(n)),t},t.prev=function(e){e&&e.preventDefault();var n=t.video.index;return n!=-1&&(n=n===0?t.conf.playlist.length-1:n-1,t.play(n)),t},e(".fp-next",n).click(t.next),e(".fp-prev",n).click(t.prev),r.advance&&n.unbind("finish.pl").bind("finish.pl",function(e,t){var i=t.video.index>=0?t.video.index+1:undefined;i<t.conf.playlist.length||r.loop?(i=i===t.conf.playlist.length?0:i,n.removeClass("is-finished"),setTimeout(function(){t.play(i)})):(n.addClass("is-playing"),t.conf.playlist.length>1&&t.one("resume.fromfirst",function(){return t.play(0),!1}))});var u=!1;if(t.conf.playlist.length){u=!0;var a=n.find(".fp-playlist");if(!a.length){a=e('<div class="fp-playlist"></div>');var f=e(".fp-next,.fp-prev",n);f.length?f.eq(0).before(a):e("video",n).after(a)}a.empty(),e.each(t.conf.playlist,function(t,n){var r;if(typeof n=="string")r=n;else for(var i in n[0])if(n[0].hasOwnProperty(i)){r=n[0][i];break}a.append(e("<a />").attr({href:r,"data-index":t}))})}if(s().length){u||(t.conf.playlist=[],s().each(function(){var n=e(this).attr("href");e(this).attr("data-index",t.conf.playlist.length),t.conf.playlist.push(n)})),n.on("click",r.query,function(n){n.preventDefault();var i=e(n.target).closest(r.query),s=Number(i.attr("data-index"));s!=-1&&t.play(s)});var l=s().filter("[data-cuepoints]").length;t.bind("load",function(r,s,u){var a=o().removeClass(i),f=a.attr("data-index"),c=u.index=t.video.index||0,h=e('a[data-index="'+c+'"]',n).addClass(i),p=c==t.conf.playlist.length-1;n.removeClass("video"+f).addClass("video"+c).toggleClass("last-video",p),u.index=s.video.index=c,u.is_last=s.video.is_last=p,l&&(t.cuepoints=h.data("cuepoints"))}).bind("unload.pl",function(){o().toggleClass(i)})}t.conf.playlist.length&&(t.conf.loop=!1)});var P=/ ?cue\d+ ?/;flowplayer(function(t,n){function i(e){n[0].className=n[0].className.replace(P," "),e>=0&&n.addClass("cue"+e)}var r=0;t.cuepoints=t.conf.cuepoints||[],t.bind("progress",function(e,s,o){if(r&&o-r<.015)return r=o;r=o;var u=t.cuepoints||[];for(var a=0,f;a<u.length;a++)f=u[a],isNaN(f)||(f={time:f}),f.time<0&&(f.time=t.video.duration+f.time),f.index=a,Math.abs(f.time-o)<.125*t.currentSpeed&&(i(a),n.trigger("cuepoint",[t,f]))}).bind("unload seek",i),t.conf.generate_cuepoints&&t.bind("load",function(){e(".fp-cuepoint",n).remove()}).bind("ready",function(){var r=t.cuepoints||[],i=t.video.duration,s=e(".fp-timeline",n).css("overflow","visible");e.each(r,function(n,r){var o=r.time||r;o<0&&(o=i+r);var u=e("<a/>").addClass("fp-cuepoint fp-cuepoint"+n).css("left",o/i*100+"%");u.appendTo(s).mousedown(function(){return t.seek(o),!1})})})}),flowplayer(function(t,n,r){function a(e){var t=e.split(":");return t.length==2&&t.unshift(0),t[0]*60*60+t[1]*60+parseFloat(t[2].replace(",","."))}var i=e("track",n),s=t.conf;if(flowplayer.support.subtitles){t.subtitles=i.length&&i[0].track;if(s.nativesubtitles&&s.engine=="html5"){if(!t.subtitles)return;var o=function(t){var r=e("video",n)[0].textTracks;if(!r.length)return;r[0].mode=t};o("disabled"),t.one("ready",function(){t.conf.splash&&e("video.fp-engine",n).append(e("<track />").attr({kind:"subtitles",srclang:t.subtitles.language||"en",label:t.subtitles.language||"en",src:i.attr("src"),"default":"default"})),o("disabled"),o("showing")});return}}i.remove();var u=/^(([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/;t.subtitles=[];var f=i.attr("src");if(!f)return;setTimeout(function(){e.get(f,function(n){for(var r=0,i=n.split("\n"),s=i.length,o={},f,l,c,h;r<s;r++){l=u.exec(i[r]);if(l){f=i[r-1],c="<p>"+i[++r]+"</p><br/>";while(e.trim(i[++r])&&r<i.length)c+="<p>"+i[r]+"</p><br/>";o={title:f,startTime:a(l[1]),endTime:a(l[3]),text:c},h={time:o.startTime,subtitle:o},t.subtitles.push(o),t.cuepoints.push(h),t.cuepoints
6
- .push({time:o.endTime,subtitleEnd:f}),o.startTime===0&&t.trigger("cuepoint",h)}}}).fail(function(){return t.trigger("error",{code:8,url:f}),!1})});var l=e("<div class='fp-subtitle'/>").appendTo(n),c;t.bind("cuepoint",function(e,t,n){n.subtitle?(c=n.index,l.html(n.subtitle.text).addClass("fp-active")):n.subtitleEnd&&(l.removeClass("fp-active"),c=n.index)}).bind("seek",function(n,r,i){c&&t.cuepoints[c]&&t.cuepoints[c].time>i&&(l.removeClass("fp-active"),c=null),e.each(t.cuepoints||[],function(e,n){var r=n.subtitle;r&&c!=n.index?i>=n.time&&(!r.endTime||i<=r.endTime)&&t.trigger("cuepoint",n):n.subtitleEnd&&i>=n.time&&n.index==c+1&&t.trigger("cuepoint",n)})})}),flowplayer(function(t,n){var r=t.conf.analytics,i=0,s=0;if(r){typeof _gat=="undefined"&&e.getScript("//google-analytics.com/ga.js");function o(e){if(i&&typeof _gat!="undefined"){var s=_gat._getTracker(r),o=t.video;if( typeof s._setAllowLinker != 'undefined' ) {s._setAllowLinker(!0),s._trackEvent("Video / Seconds played",t.engine+"/"+o.type,n.attr("title")||o.src.split("/").slice(-1)[0].replace(y,""),Math.round(i/1e3))};i=0}}t.bind("load unload",o).bind("progress",function(){t.seeking||(i+=s?+(new Date)-s:0,s=+(new Date))}).bind("pause",function(){s=0}),e(window).unload(o)}});var H=/IEMobile/.test(r);(flowplayer.support.touch||H)&&flowplayer(function(t,n){var i=/Android/.test(r)&&!/Firefox/.test(r)&&!/Opera/.test(r),s=/Silk/.test(r),o=i?parseFloat(/Android\ (\d\.\d)/.exec(r)[1],10):0;if(i){if(!/Chrome/.test(r)&&o<4){var u=t.load;t.load=function(e,n){var r=u.apply(t,arguments);return t.trigger("ready",[t,t.video]),r}}var a,f=0,l=function(e){a=setInterval(function(){e.video.time=++f,e.trigger("progress",f)},1e3)};t.bind("ready pause unload",function(){a&&(clearInterval(a),a=null)}),t.bind("ready",function(){f=0}),t.bind("resume",function(e,n){if(!n.live)return;if(f)return l(n);t.one("progress",function(e,t,n){n===0&&l(t)})})}flowplayer.support.volume||n.addClass("no-volume no-mute"),n.addClass("is-touch"),n.find(".fp-timeline").data("api").disableAnimation();if(!flowplayer.support.inlineVideo||t.conf.native_fullscreen)t.conf.nativesubtitles=!0;var c=!1;n.bind("touchmove",function(){c=!0}).bind("touchend click",function(r){if(c){c=!1;return}if(t.playing&&!n.hasClass("is-mouseover"))return n.addClass("is-mouseover").removeClass("is-mouseout"),!1;t.paused&&n.hasClass("is-mouseout")&&!t.splash&&t.toggle(),t.paused&&H&&e("video.fp-engine",n)[0].play()}),t.conf.native_fullscreen&&typeof e("<video />")[0].webkitEnterFullScreen=="function"&&(t.fullscreen=function(){var t=e("video.fp-engine",n);t[0].webkitEnterFullScreen(),t.one("webkitendfullscreen",function(){t.prop("controls",!0).prop("controls",!1)})}),(i||s)&&t.bind("ready",function(){var r=e("video.fp-engine",n);r.one("canplay",function(){r[0].play()}),r[0].play(),t.bind("progress.dur",function(){var i=r[0].duration;i!==1&&(t.video.duration=i,e(".fp-duration",n).html(S(i)),t.unbind("progress.dur"))})})}),flowplayer(function(t,n){if(t.conf.embed===!1)return;var r=t.conf,i=e(".fp-ui",n),s=e("<a/>",{"class":"fp-embed",title:"Copy to your site"}).appendTo(i),o=e("<div/>",{"class":"fp-embed-code"}).append("<label>Copy and paste this HTML code into your webpage to embed.</label><textarea/>").appendTo(i),u=e("textarea",o);t.embedCode=function(){var i=t.video,s=i.width||n.width(),o=i.height||n.height(),u=e("<div/>",{"class":"flowplayer",css:{width:s,height:o}}),a=e("<video/>").appendTo(u);e.each(["origin","analytics","key","rtmp","subscribe","bufferTime"],function(e,t){r.hasOwnProperty(t)&&u.attr("data-"+t,r[t])}),r.logo&&u.attr("data-logo",e("<img />").attr("src",r.logo)[0].src),e.each(i.sources,function(t,n){var i=n.src;if(!/^https?:/.test(n.src)&&n.type!=="flash"||!r.rtmp)i=e("<img/>").attr("src",n.src)[0].src;a.append(e("<source/>",{type:n.type!="mpegurl"?"video/"+n.type:"application/x-mpegurl",src:i}))});var f={src:"//foliovision.com/flowplayer/5.5.2/embed.min.js"};e.isPlainObject(r.embed)&&(f["data-swf"]=r.embed.swf,f["data-library"]=r.embed.library,f.src=r.embed.script||f.src,r.embed.skin&&(f["data-skin"]=r.embed.skin));var l=e("<foo/>",f).append(u);return e("<p/>").append(l).html().replace(/<(\/?)foo/g,"<$1script")},n.fptip(".fp-embed","is-embedding"),u.click(function(){this.select()}),s.click(function(){u.text(t.embedCode()),u[0].focus(),u[0].select()})}),e.fn.fptip=function(t,n){return this.each(function(){function i(){r.removeClass(n),e(document).unbind(".st")}var r=e(this);e(t||"a",this).click(function(t){t.preventDefault(),r.toggleClass(n),r.hasClass(n)&&e(document).bind("keydown.st",function(e){e.which==27&&i()}).bind("click.st",function(t){e(t.target).parents("."+n).length||i()})})})}}(jQuery),flowplayer(function(e,t){function n(e){var t=s("<a/>")[0];return t.href=e,t.hostname}function r(e){var t="ab.ca,ac.ac,ac.at,ac.be,ac.cn,ac.il,ac.in,ac.jp,ac.kr,ac.th,ac.uk,adm.br,adv.br,ah.cn,am.br,arq.br,art.br,arts.ro,asn.au,asso.fr,asso.mc,bc.ca,bio.br,biz.pl,biz.tr,bj.cn,br.com,cn.com,cng.br,cnt.br,co.ac,co.at,co.gl,co.id,co.il,co.in,co.jp,co.kr,co.mg,co.ms,co.nz,co.th,co.uk,co.ve,co.vi,co.za,com.ag,com.ai,com.ar,com.au,com.br,com.cn,com.co,com.cy,com.de,com.do,com.ec,com.es,com.fj,com.fr,com.gl,com.gt,com.hk,com.hr,com.hu,com.kg,com.ki,com.lc,com.mg,com.mm,com.ms,com.mt,com.mu,com.mx,com.my,com.nf,com.ng,com.ni,com.pa,com.ph,com.pl,com.pt,com.qa,com.ro,com.ru,com.sb,com.sc,com.sg,com.sv,com.tr,com.tw,com.ua,com.uy,com.ve,com.vn,cq.cn,de.com,de.org,ecn.br,edu.au,edu.cn,edu.hk,edu.mm,edu.my,edu.pl,edu.pt,edu.qa,edu.tr,eng.br,ernet.in,esp.br,etc.br,eti.br,eu.com,eu.int,eu.lv,firm.in,firm.ro,fm.br,fot.br,fst.br,g12.br,gb.com,gb.net,gd.cn,gen.in,go.jp,go.kr,go.th,gov.au,gov.az,gov.br,gov.cn,gov.il,gov.in,gov.mm,gov.my,gov.qa,gov.sg,gov.tr,gov.tw,gov.uk,gs.cn,gv.ac,gv.at,gx.cn,gz.cn,he.cn,hi.cn,hk.cn,hl.cn,hu.com,id.au,idv.tw,in.ua,ind.br,ind.in,inf.br,info.pl,info.ro,info.tr,info.ve,iwi.nz,jl.cn,jor.br,js.cn,k12.il,k12.tr,kr.com,lel.br,ln.cn,ltd.uk,maori.nz,mb.ca,me.uk,med.br,mi.th,mil.br,mil.uk,mo.cn,mod.uk,muni.il,nb.ca,ne.jp,ne.kr,net.ag,net.ai,net.au,net.br,net.cn,net.do,net.gl,net.hk,net.il,net.in,net.kg,net.ki,net.lc,net.mg,net.mm,net.mu,net.ni,net.nz,net.pl,net.ru,net.sb,net.sc,net.sg,net.th,net.tr,net.tw,net.uk,net.ve,nf.ca,nhs.uk,nm.cn,nm.kr,no.com,nom.br,nom.ni,nom.ro,ns.ca,nt.ca,nt.ro,ntr.br,nx.cn,odo.br,off.ai,on.ca,or.ac,or.at,or.jp,or.kr,or.th,org.ag,org.ai,org.au,org.br,org.cn,org.do,org.es,org.gl,org.hk,org.in,org.kg,org.ki,org.lc,org.mg,org.mm,org.ms,org.nf,org.ni,org.nz,org.pl,org.ro,org.ru,org.sb,org.sc,org.sg,org.tr,org.tw,org.uk,org.ve,pe.ca,plc.uk,police.uk,ppg.br,presse.fr,pro.br,psc.br,psi.br,qc.ca,qc.com,qh.cn,rec.br,rec.ro,res.in,sa.com,sc.cn,sch.uk,se.com,se.net,sh.cn,sk.ca,slg.br,sn.cn,store.ro,tj.cn,tm.fr,tm.mc,tm.ro,tmp.br,tur.br,tv.br,tv.tr,tw.cn,uk.com,uk.net,us.com,uy.com,vet.br,waw.pl,web.ve,www.ro,xj.cn,xz.cn,yk.ca,yn.cn,zj.cn,zlg.br".split(",");e=e.toLowerCase();var n=e.split("."),r=n.length;if(r<2||/^\d+$/.test(n[r-1]))return e;var i=n.slice(-2).join(".");return r>=3&&s.inArray(i,t)>=0?n.slice(-3).join("."):i}function i(e,t){t=r(t);var n=0;for(var i=t.length-1;i>=0;i--)n+=t.charCodeAt(i)*22886841204;n=(""+n).substring(0,7);for(i=0;i<e.length;i++)if(n===e[i].substring(1,8))return 1}var s=jQuery,o=e.conf,u=o.swf.indexOf("flowplayer.org")&&o.e&&t.data("origin"),a=u?n(u):location.hostname,f=o.key;location.protocol=="file:"&&(a="localhost"),e.load.ed=1,o.hostname=a,o.origin=u||location.href,u&&t.addClass("is-embedded"),typeof f=="string"&&(f=f.split(/,\s*/));if(f&&typeof i=="function"&&i(f,a))o.logo&&t.append(s("<a>",{"class":"fp-logo",href:u}).append(s("<img/>",{src:o.logo})));else{var l=s("<a/>").attr("onclick","").appendTo(t),c=s(".fp-controls",t),h=s('<div class="fp-context-menu"><ul><li class="copyright">&copy; 2014</li><li><a href="http://flowplayer.org">About Flowplayer</a></li><li><a href="http://flowplayer.org/license">GPL based license</a></li></ul></div>').appendTo(t);e.bind("pause resume finish unload",function(e,n){var r=-1;n.video.src&&s.each([["org","flowplayer","drive"],["org","flowplayer","my"]],function(e,t){return r=n.video.src.indexOf("://"+t.reverse().join(".")),r===-1}),/pause|resume/.test(e.type)&&n.engine!="flash"&&r!=4&&r!=5?(l.show().css({position:"absolute",left:16,bottom:36,zIndex:99999,width:120,height:27,backgroundImage:"url("+[".png","fplogo","/",".com","foliovision","//"].reverse().join("")+")"}),n.load.ed=l.is(":visible")&&s.contains(t[0],h[0]),n.load.ed||n.pause()):l.hide()})}});
7
-
8
 
 
 
 
 
 
9
 
10
 
11
- /*
12
- * dash.all.js
13
- */
14
- function X2JS(a,b,c){function d(a){var b=a.localName;return null==b&&(b=a.baseName),(null==b||""==b)&&(b=a.nodeName),b}function e(a){return a.prefix}function f(a){return"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):a}function g(a){return a.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/")}function h(f){if(f.nodeType==u.DOCUMENT_NODE){var i,j,k,l=f.firstChild;for(j=0,k=f.childNodes.length;k>j;j+=1)if(f.childNodes[j].nodeType!==u.COMMENT_NODE){l=f.childNodes[j];break}if(c)i=h(l);else{i={};var m=d(l);i[m]=h(l)}return i}if(f.nodeType==u.ELEMENT_NODE){var i=new Object;i.__cnt=0;for(var n=f.childNodes,o=0;o<n.length;o++){var l=n.item(o),m=d(l);if(i.__cnt++,null==i[m])i[m]=h(l),i[m+"_asArray"]=new Array(1),i[m+"_asArray"][0]=i[m];else{if(null!=i[m]&&!(i[m]instanceof Array)){var p=i[m];i[m]=new Array,i[m][0]=p,i[m+"_asArray"]=i[m]}for(var q=0;null!=i[m][q];)q++;i[m][q]=h(l)}}for(var r=0;r<f.attributes.length;r++){var s=f.attributes.item(r);i.__cnt++;for(var v=s.value,w=0,x=a.length;x>w;w++){var y=a[w];y.test.call(this,s)&&(v=y.converter.call(this,s.value))}i[b+s.name]=v}var z=e(f);return null!=z&&""!=z&&(i.__cnt++,i.__prefix=z),1==i.__cnt&&null!=i["#text"]&&(i=i["#text"]),null!=i["#text"]&&(i.__text=i["#text"],t&&(i.__text=g(i.__text)),delete i["#text"],delete i["#text_asArray"]),null!=i["#cdata-section"]&&(i.__cdata=i["#cdata-section"],delete i["#cdata-section"],delete i["#cdata-section_asArray"]),(null!=i.__text||null!=i.__cdata)&&(i.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),i}return f.nodeType==u.TEXT_NODE||f.nodeType==u.CDATA_SECTION_NODE?f.nodeValue:f.nodeType==u.COMMENT_NODE?null:void 0}function i(a,b,c,d){var e="<"+(null!=a&&null!=a.__prefix?a.__prefix+":":"")+b;if(null!=c)for(var f=0;f<c.length;f++){var g=c[f],h=a[g];e+=" "+g.substr(1)+"='"+h+"'"}return e+=d?"/>":">"}function j(a,b){return"</"+(null!=a.__prefix?a.__prefix+":":"")+b+">"}function k(a,b){return-1!==a.indexOf(b,a.length-b.length)}function l(a,b){return k(b.toString(),"_asArray")||0==b.toString().indexOf("_")||a[b]instanceof Function?!0:!1}function m(a){var b=0;if(a instanceof Object)for(var c in a)l(a,c)||b++;return b}function n(a){var b=[];if(a instanceof Object)for(var c in a)-1==c.toString().indexOf("__")&&0==c.toString().indexOf("_")&&b.push(c);return b}function o(a){var b="";return null!=a.__cdata&&(b+="<![CDATA["+a.__cdata+"]]>"),null!=a.__text&&(b+=t?f(a.__text):a.__text),b}function p(a){var b="";return a instanceof Object?b+=o(a):null!=a&&(b+=t?f(a):a),b}function q(a,b,c){var d="";if(0==a.length)d+=i(a,b,c,!0);else for(var e=0;e<a.length;e++)d+=i(a[e],b,n(a[e]),!1),d+=r(a[e]),d+=j(a[e],b);return d}function r(a){var b="",c=m(a);if(c>0)for(var d in a)if(!l(a,d)){var e=a[d],f=n(e);if(null==e||void 0==e)b+=i(e,d,f,!0);else if(e instanceof Object)if(e instanceof Array)b+=q(e,d,f);else{var g=m(e);g>0||null!=e.__text||null!=e.__cdata?(b+=i(e,d,f,!1),b+=r(e),b+=j(e,d)):b+=i(e,d,f,!0)}else b+=i(e,d,f,!1),b+=p(e),b+=j(e,d)}return b+=p(a)}(null===b||void 0===b)&&(b="_"),(null===c||void 0===c)&&(c=!1);var s="1.0.11",t=!1,u={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(a){var b;if(window.DOMParser){var c=new window.DOMParser;b=c.parseFromString(a,"text/xml")}else 0==a.indexOf("<?")&&(a=a.substr(a.indexOf("?>")+2)),b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},this.xml2json=function(a){return h(a)},this.xml_str2json=function(a){var b=this.parseXmlString(a);return this.xml2json(b)},this.json2xml_str=function(a){return r(a)},this.json2xml=function(a){var b=this.json2xml_str(a);return this.parseXmlString(b)},this.getVersion=function(){return s},this.escapeMode=function(a){t=a}}function ObjectIron(a){var b;for(b=[],i=0,len=a.length;i<len;i+=1)b.push(a[i].isRoot?"root":a[i].name);var c=function(a,b){var c;if(null!==a&&null!==b)for(c in a)a.hasOwnProperty(c)&&(b.hasOwnProperty(c)||(b[c]=a[c]))},d=function(a,b,d){var e,f,g,h,i;if(null!==a&&0!==a.length)for(e=0,f=a.length;f>e;e+=1)g=a[e],b.hasOwnProperty(g.name)&&(d.hasOwnProperty(g.name)?g.merge&&(h=b[g.name],i=d[g.name],"object"==typeof h&&"object"==typeof i?c(h,i):d[g.name]=null!=g.mergeFunction?g.mergeFunction(h,i):h+i):d[g.name]=b[g.name])},e=function(a,b){var c,f,g,h,i,j,k,l=a;if(null!==l.children&&0!==l.children.length)for(c=0,f=l.children.length;f>c;c+=1)if(j=l.children[c],b.hasOwnProperty(j.name))if(j.isArray)for(i=b[j.name+"_asArray"],g=0,h=i.length;h>g;g+=1)k=i[g],d(l.properties,b,k),e(j,k);else k=b[j.name],d(l.properties,b,k),e(j,k)},f=function(c){var d,g,h,i,j,k,l;if(null===c)return c;if("object"!=typeof c)return c;for(d=0,g=b.length;g>d;d+=1)"root"===b[d]&&(j=a[d],k=c,e(j,k));for(i in c)if(c.hasOwnProperty(i)){if(h=b.indexOf(i),-1!==h)if(j=a[h],j.isArray)for(l=c[i+"_asArray"],d=0,g=l.length;g>d;d+=1)k=l[d],e(j,k);else k=c[i],e(j,k);f(c[i])}return c};return{run:f}}if(function(a){"use strict";var b={VERSION:"0.5.3"};b.System=function(){this._mappings={},this._outlets={},this._handlers={},this.strictInjections=!0,this.autoMapOutlets=!1,this.postInjectionHook="setup"},b.System.prototype={_createAndSetupInstance:function(a,b){var c=new b;return this.injectInto(c,a),c},_retrieveFromCacheOrCreate:function(a,b){"undefined"==typeof b&&(b=!1);var c;if(!this._mappings.hasOwnProperty(a))throw new Error(1e3);var d=this._mappings[a];return!b&&d.isSingleton?(null==d.object&&(d.object=this._createAndSetupInstance(a,d.clazz)),c=d.object):c=d.clazz?this._createAndSetupInstance(a,d.clazz):d.object,c},mapOutlet:function(a,b,c){if("undefined"==typeof a)throw new Error(1010);return b=b||"global",c=c||a,this._outlets.hasOwnProperty(b)||(this._outlets[b]={}),this._outlets[b][c]=a,this},getObject:function(a){if("undefined"==typeof a)throw new Error(1020);return this._retrieveFromCacheOrCreate(a)},mapValue:function(a,b){if("undefined"==typeof a)throw new Error(1030);return this._mappings[a]={clazz:null,object:b,isSingleton:!0},this.autoMapOutlets&&this.mapOutlet(a),this.hasMapping(a)&&this.injectInto(b,a),this},hasMapping:function(a){if("undefined"==typeof a)throw new Error(1040);return this._mappings.hasOwnProperty(a)},mapClass:function(a,b){if("undefined"==typeof a)throw new Error(1050);if("undefined"==typeof b)throw new Error(1051);return this._mappings[a]={clazz:b,object:null,isSingleton:!1},this.autoMapOutlets&&this.mapOutlet(a),this},mapSingleton:function(a,b){if("undefined"==typeof a)throw new Error(1060);if("undefined"==typeof b)throw new Error(1061);return this._mappings[a]={clazz:b,object:null,isSingleton:!0},this.autoMapOutlets&&this.mapOutlet(a),this},instantiate:function(a){if("undefined"==typeof a)throw new Error(1070);return this._retrieveFromCacheOrCreate(a,!0)},injectInto:function(a,b){if("undefined"==typeof a)throw new Error(1080);if("object"==typeof a){var c=[];this._outlets.hasOwnProperty("global")&&c.push(this._outlets.global),"undefined"!=typeof b&&this._outlets.hasOwnProperty(b)&&c.push(this._outlets[b]);for(var d in c){var e=c[d];for(var f in e){var g=e[f];(!this.strictInjections||f in a)&&(a[f]=this.getObject(g))}}"setup"in a&&a.setup.call(a)}return this},unmap:function(a){if("undefined"==typeof a)throw new Error(1090);return delete this._mappings[a],this},unmapOutlet:function(a,b){if("undefined"==typeof a)throw new Error(1100);if("undefined"==typeof b)throw new Error(1101);return delete this._outlets[a][b],this},mapHandler:function(a,b,c,d,e){if("undefined"==typeof a)throw new Error(1110);return b=b||"global",c=c||a,"undefined"==typeof d&&(d=!1),"undefined"==typeof e&&(e=!1),this._handlers.hasOwnProperty(a)||(this._handlers[a]={}),this._handlers[a].hasOwnProperty(b)||(this._handlers[a][b]=[]),this._handlers[a][b].push({handler:c,oneShot:d,passEvent:e}),this},unmapHandler:function(a,b,c){if("undefined"==typeof a)throw new Error(1120);if(b=b||"global",c=c||a,this._handlers.hasOwnProperty(a)&&this._handlers[a].hasOwnProperty(b)){var d=this._handlers[a][b];for(var e in d){var f=d[e];if(f.handler===c){d.splice(e,1);break}}}return this},notify:function(a){if("undefined"==typeof a)throw new Error(1130);var b=Array.prototype.slice.call(arguments),c=b.slice(1);if(this._handlers.hasOwnProperty(a)){var d=this._handlers[a];for(var e in d){var f,g=d[e];"global"!==e&&(f=this.getObject(e));var h,i,j=[];for(h=0,i=g.length;i>h;h++){var k,l=g[h];k=f&&"string"==typeof l.handler?f[l.handler]:l.handler,l.oneShot&&j.unshift(h),l.passEvent?k.apply(f,b):k.apply(f,c)}for(h=0,i=j.length;i>h;h++)g.splice(j[h],1)}}return this}},a.dijon=b}(this),"undefined"==typeof utils)var utils={};"undefined"==typeof utils.Math&&(utils.Math={}),utils.Math.to64BitNumber=function(a,b){var c,d,e;return c=new goog.math.Long(0,b),d=new goog.math.Long(a,0),e=c.add(d),e.toNumber()},goog={},goog.math={},goog.math.Long=function(a,b){this.low_=0|a,this.high_=0|b},goog.math.Long.IntCache_={},goog.math.Long.fromInt=function(a){if(a>=-128&&128>a){var b=goog.math.Long.IntCache_[a];if(b)return b}var c=new goog.math.Long(0|a,0>a?-1:0);return a>=-128&&128>a&&(goog.math.Long.IntCache_[a]=c),c},goog.math.Long.fromNumber=function(a){return isNaN(a)||!isFinite(a)?goog.math.Long.ZERO:a<=-goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MIN_VALUE:a+1>=goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MAX_VALUE:0>a?goog.math.Long.fromNumber(-a).negate():new goog.math.Long(a%goog.math.Long.TWO_PWR_32_DBL_|0,a/goog.math.Long.TWO_PWR_32_DBL_|0)},goog.math.Long.fromBits=function(a,b){return new goog.math.Long(a,b)},goog.math.Long.fromString=function(a,b){if(0==a.length)throw Error("number format error: empty string");var c=b||10;if(2>c||c>36)throw Error("radix out of range: "+c);if("-"==a.charAt(0))return goog.math.Long.fromString(a.substring(1),c).negate();if(a.indexOf("-")>=0)throw Error('number format error: interior "-" character: '+a);for(var d=goog.math.Long.fromNumber(Math.pow(c,8)),e=goog.math.Long.ZERO,f=0;f<a.length;f+=8){var g=Math.min(8,a.length-f),h=parseInt(a.substring(f,f+g),c);if(8>g){var i=goog.math.Long.fromNumber(Math.pow(c,g));e=e.multiply(i).add(goog.math.Long.fromNumber(h))}else e=e.multiply(d),e=e.add(goog.math.Long.fromNumber(h))}return e},goog.math.Long.TWO_PWR_16_DBL_=65536,goog.math.Long.TWO_PWR_24_DBL_=1<<24,goog.math.Long.TWO_PWR_32_DBL_=goog.math.Long.TWO_PWR_16_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_31_DBL_=goog.math.Long.TWO_PWR_32_DBL_/2,goog.math.Long.TWO_PWR_48_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_64_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_32_DBL_,goog.math.Long.TWO_PWR_63_DBL_=goog.math.Long.TWO_PWR_64_DBL_/2,goog.math.Long.ZERO=goog.math.Long.fromInt(0),goog.math.Long.ONE=goog.math.Long.fromInt(1),goog.math.Long.NEG_ONE=goog.math.Long.fromInt(-1),goog.math.Long.MAX_VALUE=goog.math.Long.fromBits(-1,2147483647),goog.math.Long.MIN_VALUE=goog.math.Long.fromBits(0,-2147483648),goog.math.Long.TWO_PWR_24_=goog.math.Long.fromInt(1<<24),goog.math.Long.prototype.toInt=function(){return this.low_},goog.math.Long.prototype.toNumber=function(){return this.high_*goog.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()},goog.math.Long.prototype.toString=function(a){var b=a||10;if(2>b||b>36)throw Error("radix out of range: "+b);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){var c=goog.math.Long.fromNumber(b),d=this.div(c),e=d.multiply(c).subtract(this);return d.toString(b)+e.toInt().toString(b)}return"-"+this.negate().toString(b)}for(var f=goog.math.Long.fromNumber(Math.pow(b,6)),e=this,g="";;){var h=e.div(f),i=e.subtract(h.multiply(f)).toInt(),j=i.toString(b);if(e=h,e.isZero())return j+g;for(;j.length<6;)j="0"+j;g=""+j+g}},goog.math.Long.prototype.getHighBits=function(){return this.high_},goog.math.Long.prototype.getLowBits=function(){return this.low_},goog.math.Long.prototype.getLowBitsUnsigned=function(){return this.low_>=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_},goog.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(goog.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var a=0!=this.high_?this.high_:this.low_,b=31;b>0&&0==(a&1<<b);b--);return 0!=this.high_?b+33:b+1},goog.math.Long.prototype.isZero=function(){return 0==this.high_&&0==this.low_},goog.math.Long.prototype.isNegative=function(){return this.high_<0},goog.math.Long.prototype.isOdd=function(){return 1==(1&this.low_)},goog.math.Long.prototype.equals=function(a){return this.high_==a.high_&&this.low_==a.low_},goog.math.Long.prototype.notEquals=function(a){return this.high_!=a.high_||this.low_!=a.low_},goog.math.Long.prototype.lessThan=function(a){return this.compare(a)<0},goog.math.Long.prototype.lessThanOrEqual=function(a){return this.compare(a)<=0},goog.math.Long.prototype.greaterThan=function(a){return this.compare(a)>0},goog.math.Long.prototype.greaterThanOrEqual=function(a){return this.compare(a)>=0},goog.math.Long.prototype.compare=function(a){if(this.equals(a))return 0;var b=this.isNegative(),c=a.isNegative();return b&&!c?-1:!b&&c?1:this.subtract(a).isNegative()?-1:1},goog.math.Long.prototype.negate=function(){return this.equals(goog.math.Long.MIN_VALUE)?goog.math.Long.MIN_VALUE:this.not().add(goog.math.Long.ONE)},goog.math.Long.prototype.add=function(a){var b=this.high_>>>16,c=65535&this.high_,d=this.low_>>>16,e=65535&this.low_,f=a.high_>>>16,g=65535&a.high_,h=a.low_>>>16,i=65535&a.low_,j=0,k=0,l=0,m=0;return m+=e+i,l+=m>>>16,m&=65535,l+=d+h,k+=l>>>16,l&=65535,k+=c+g,j+=k>>>16,k&=65535,j+=b+f,j&=65535,goog.math.Long.fromBits(l<<16|m,j<<16|k)},goog.math.Long.prototype.subtract=function(a){return this.add(a.negate())},goog.math.Long.prototype.multiply=function(a){if(this.isZero())return goog.math.Long.ZERO;if(a.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE))return a.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(a.equals(goog.math.Long.MIN_VALUE))return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(this.isNegative())return a.isNegative()?this.negate().multiply(a.negate()):this.negate().multiply(a).negate();if(a.isNegative())return this.multiply(a.negate()).negate();if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&a.lessThan(goog.math.Long.TWO_PWR_24_))return goog.math.Long.fromNumber(this.toNumber()*a.toNumber());var b=this.high_>>>16,c=65535&this.high_,d=this.low_>>>16,e=65535&this.low_,f=a.high_>>>16,g=65535&a.high_,h=a.low_>>>16,i=65535&a.low_,j=0,k=0,l=0,m=0;return m+=e*i,l+=m>>>16,m&=65535,l+=d*i,k+=l>>>16,l&=65535,l+=e*h,k+=l>>>16,l&=65535,k+=c*i,j+=k>>>16,k&=65535,k+=d*h,j+=k>>>16,k&=65535,k+=e*g,j+=k>>>16,k&=65535,j+=b*i+c*h+d*g+e*f,j&=65535,goog.math.Long.fromBits(l<<16|m,j<<16|k)},goog.math.Long.prototype.div=function(a){if(a.isZero())throw Error("division by zero");if(this.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE)){if(a.equals(goog.math.Long.ONE)||a.equals(goog.math.Long.NEG_ONE))return goog.math.Long.MIN_VALUE;if(a.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ONE;var b=this.shiftRight(1),c=b.div(a).shiftLeft(1);if(c.equals(goog.math.Long.ZERO))return a.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE;var d=this.subtract(a.multiply(c)),e=c.add(d.div(a));return e}if(a.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ZERO;if(this.isNegative())return a.isNegative()?this.negate().div(a.negate()):this.negate().div(a).negate();if(a.isNegative())return this.div(a.negate()).negate();for(var f=goog.math.Long.ZERO,d=this;d.greaterThanOrEqual(a);){for(var c=Math.max(1,Math.floor(d.toNumber()/a.toNumber())),g=Math.ceil(Math.log(c)/Math.LN2),h=48>=g?1:Math.pow(2,g-48),i=goog.math.Long.fromNumber(c),j=i.multiply(a);j.isNegative()||j.greaterThan(d);)c-=h,i=goog.math.Long.fromNumber(c),j=i.multiply(a);i.isZero()&&(i=goog.math.Long.ONE),f=f.add(i),d=d.subtract(j)}return f},goog.math.Long.prototype.modulo=function(a){return this.subtract(this.div(a).multiply(a))},goog.math.Long.prototype.not=function(){return goog.math.Long.fromBits(~this.low_,~this.high_)},goog.math.Long.prototype.and=function(a){return goog.math.Long.fromBits(this.low_&a.low_,this.high_&a.high_)},goog.math.Long.prototype.or=function(a){return goog.math.Long.fromBits(this.low_|a.low_,this.high_|a.high_)},goog.math.Long.prototype.xor=function(a){return goog.math.Long.fromBits(this.low_^a.low_,this.high_^a.high_)},goog.math.Long.prototype.shiftLeft=function(a){if(a&=63,0==a)return this;var b=this.low_;if(32>a){var c=this.high_;return goog.math.Long.fromBits(b<<a,c<<a|b>>>32-a)}return goog.math.Long.fromBits(0,b<<a-32)},goog.math.Long.prototype.shiftRight=function(a){if(a&=63,0==a)return this;var b=this.high_;if(32>a){var c=this.low_;return goog.math.Long.fromBits(c>>>a|b<<32-a,b>>a)}return goog.math.Long.fromBits(b>>a-32,b>=0?0:-1)},goog.math.Long.prototype.shiftRightUnsigned=function(a){if(a&=63,0==a)return this;var b=this.high_;if(32>a){var c=this.low_;return goog.math.Long.fromBits(c>>>a|b<<32-a,b>>>a)}return 32==a?goog.math.Long.fromBits(b,0):goog.math.Long.fromBits(b>>>a-32,0)};var UTF8={};UTF8.encode=function(a){for(var b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);128>d?b.push(d):2048>d?(b.push(192|d>>6),b.push(128|63&d)):65536>d?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},UTF8.decode=function(a){for(var b=[],c=0;c<a.length;){var d=a[c++];128>d||(224>d?(d=(31&d)<<6,d|=63&a[c++]):240>d?(d=(15&d)<<12,d|=(63&a[c++])<<6,d|=63&a[c++]):(d=(7&d)<<18,d|=(63&a[c++])<<12,d|=(63&a[c++])<<6,d|=63&a[c++])),b.push(String.fromCharCode(d))}return b.join("")};var BASE64={};if(function(b){var c=function(a){for(var c=0,d=[],e=0|a.length/3;0<e--;){var f=(a[c]<<16)+(a[c+1]<<8)+a[c+2];c+=3,d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push(b.charAt(63&f))}if(2==a.length-c){var f=(a[c]<<16)+(a[c+1]<<8);d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push("=")}else if(1==a.length-c){var f=a[c]<<16;d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push("==")}return d.join("")},d=function(){for(var a=[],c=0;c<b.length;++c)a[b.charCodeAt(c)]=c;return a["=".charCodeAt(0)]=0,a}(),e=function(a){for(var b=0,c=[],e=0|a.length/4;0<e--;){var f=(d[a.charCodeAt(b)]<<18)+(d[a.charCodeAt(b+1)]<<12)+(d[a.charCodeAt(b+2)]<<6)+d[a.charCodeAt(b+3)];c.push(255&f>>16),c.push(255&f>>8),c.push(255&f),b+=4}return c&&("="==a.charAt(b-2)?(c.pop(),c.pop()):"="==a.charAt(b-1)&&c.pop()),c},f={};f.encode=function(a){for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b},f.decode=function(){for(var b=0;b<s.length;++b)a[b]=String.fromCharCode(a[b]);return a.join("")},BASE64.decodeArray=function(a){var b=e(a);return new Uint8Array(b)},BASE64.encodeASCII=function(a){var b=f.encode(a);return c(b)},BASE64.decodeASCII=function(a){var b=e(a);return f.decode(b)},BASE64.encode=function(a){var b=UTF8.encode(a);return c(b)},BASE64.decode=function(a){var b=e(a);return UTF8.decode(b)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),void 0===btoa)var btoa=BASE64.encode;if(void 0===atob)var atob=BASE64.decode;MediaPlayer=function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m="1.3.0",n=a,o=null,p=!1,q=!1,r=!0,s=!1,t=MediaPlayer.dependencies.BufferController.BUFFER_SIZE_REQUIRED,u=function(){return!!e&&!!f},v=function(){if(!p)throw"MediaPlayer not initialized!";if(!this.capabilities.supportsMediaSource())return void this.errHandler.capabilityError("mediasource");if(!e||!f)throw"Missing view or source.";q=!0,g=b.getObject("streamController"),g.subscribe(MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED,i),c.subscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,g),c.subscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,i),g.initialize(),g.setVideoModel(l),g.setAutoPlay(r),g.setProtectionData(o),g.load(f),b.mapValue("scheduleWhilePaused",s),b.mapOutlet("scheduleWhilePaused","stream"),b.mapOutlet("scheduleWhilePaused","scheduleController"),b.mapValue("bufferMax",t),b.mapOutlet("bufferMax","bufferController"),h.initialize()},w=function(){u()&&v.call(this)},x=function(){var a=k.getReadOnlyMetricsFor("video")||k.getReadOnlyMetricsFor("audio");return j.getCurrentDVRInfo(a)},y=function(){return x.call(this).manifestInfo.DVRWindowSize},z=function(a){var b=x.call(this),c=b.range.start+a;return c>b.range.end&&(c=b.range.end),c},A=function(a){l.getElement().currentTime=this.getDVRSeekOffset(a)},B=function(){var a=x.call(this);return null===a?0:this.duration()-(a.range.end-a.time)},C=function(){var a,b=x.call(this);return null===b?0:(a=b.range.end-b.range.start,a<b.manifestInfo.DVRWindowSize?a:b.manifestInfo.DVRWindowSize)},D=function(){var a,b,c=x.call(this);return null===c?0:(a=c.manifestInfo.availableFrom.getTime()/1e3,b=this.time()+(a+c.range.start))},E=function(){var a,b,c=x.call(this);return null===c?0:(a=c.manifestInfo.availableFrom.getTime()/1e3,b=a+c.range.start+this.duration())},F=function(a,b,c){var d=new Date(1e3*a),e=d.toLocaleDateString(b),f=d.toLocaleTimeString(b,{hour12:c});return f+" "+e},G=function(a){a=Math.max(a,0);var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=Math.floor(a%3600%60);return(0===b?"":10>b?"0"+b.toString()+":":b.toString()+":")+(10>c?"0"+c.toString():c.toString())+":"+(10>d?"0"+d.toString():d.toString())},H=function(a,b,c){b&&void 0!==a&&null!==a&&(c?h.setRules(a,b):h.addRules(a,b))},I=function(){q&&g&&(g.unsubscribe(MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED,i),c.unsubscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,g),c.unsubscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,i),g.reset(),d.reset(),h.reset(),g=null,q=!1)};return b=new dijon.System,b.mapValue("system",b),b.mapOutlet("system"),b.injectInto(n),{notifier:void 0,debug:void 0,eventBus:void 0,capabilities:void 0,adapter:void 0,errHandler:void 0,uriQueryFragModel:void 0,videoElementExt:void 0,setup:function(){j=b.getObject("metricsExt"),c=b.getObject("manifestLoader"),i=b.getObject("manifestUpdater"),d=b.getObject("abrController"),h=b.getObject("rulesController"),k=b.getObject("metricsModel")},addEventListener:function(a,b,c){this.eventBus.addEventListener(a,b,c)},removeEventListener:function(a,b,c){this.eventBus.removeEventListener(a,b,c)},getVersion:function(){return m},startup:function(){p||(b.injectInto(this),p=!0)},getDebug:function(){return this.debug},getVideoModel:function(){return l},setAutoPlay:function(a){r=a},getAutoPlay:function(){return r},setScheduleWhilePaused:function(a){s=a},getScheduleWhilePaused:function(){return s},setBufferMax:function(a){t=a},getBufferMax:function(){return t},getMetricsExt:function(){return j},getMetricsFor:function(a){var b=k.getReadOnlyMetricsFor(a);return b},getQualityFor:function(a){return d.getQualityFor(a,g.getActiveStreamInfo())},setQualityFor:function(a,b){d.setPlaybackQuality(a,g.getActiveStreamInfo(),b)},getAutoSwitchQuality:function(){return d.getAutoSwitchBitrate()},setAutoSwitchQuality:function(a){d.setAutoSwitchBitrate(a)},setSchedulingRules:function(a){H.call(this,h.SCHEDULING_RULE,a,!0)},addSchedulingRules:function(a){H.call(this,h.SCHEDULING_RULE,a,!1)},setABRRules:function(a){H.call(this,h.ABR_RULE,a,!0)},addABRRules:function(a){H.call(this,h.ABR_RULE,a,!1)},attachView:function(a){if(!p)throw"MediaPlayer not initialized!";e=a,l=null,e&&(l=b.getObject("videoModel"),l.setElement(e)),I.call(this),u.call(this)&&w.call(this)},attachSource:function(a){if(!p)throw"MediaPlayer not initialized!";this.uriQueryFragModel.reset(),f=this.uriQueryFragModel.parseURI(a),I.call(this),u.call(this)&&w.call(this)},attachProtectionData:function(a){o=a},reset:function(){this.attachSource(null),this.attachView(null)},play:v,isReady:u,seek:A,time:B,duration:C,timeAsUTC:D,durationAsUTC:E,getDVRWindowSize:y,getDVRSeekOffset:z,formatUTC:F,convertToTimeCode:G}},MediaPlayer.prototype={constructor:MediaPlayer},MediaPlayer.dependencies={},MediaPlayer.dependencies.protection={},MediaPlayer.utils={},MediaPlayer.models={},MediaPlayer.vo={},MediaPlayer.vo.metrics={},MediaPlayer.vo.protection={},MediaPlayer.rules={},MediaPlayer.di={},MediaPlayer.di.Context=function(){"use strict";var a=function(){var a=document.createElement("video");if(MediaPlayer.models.ProtectionModel_3Feb2014.detect(a))this.system.mapClass("protectionModel",MediaPlayer.models.ProtectionModel_3Feb2014);else if(MediaPlayer.models.ProtectionModel_01b.detect(a))this.system.mapClass("protectionModel",MediaPlayer.models.ProtectionModel_01b);else{var b=this.system.getObject("debug");b.log("No supported version of EME detected on this user agent!"),b.log("Attempts to play encrypted content will fail!")}};return{system:void 0,setup:function(){this.system.autoMapOutlets=!0,this.system.mapSingleton("debug",MediaPlayer.utils.Debug),this.system.mapSingleton("eventBus",MediaPlayer.utils.EventBus),this.system.mapSingleton("capabilities",MediaPlayer.utils.Capabilities),this.system.mapSingleton("textTrackExtensions",MediaPlayer.utils.TextTrackExtensions),this.system.mapSingleton("vttParser",MediaPlayer.utils.VTTParser),this.system.mapSingleton("ttmlParser",MediaPlayer.utils.TTMLParser),this.system.mapClass("videoModel",MediaPlayer.models.VideoModel),this.system.mapSingleton("manifestModel",MediaPlayer.models.ManifestModel),this.system.mapSingleton("metricsModel",MediaPlayer.models.MetricsModel),this.system.mapSingleton("uriQueryFragModel",MediaPlayer.models.URIQueryAndFragmentModel),this.system.mapSingleton("ksPlayReady",MediaPlayer.dependencies.protection.KeySystem_PlayReady),this.system.mapSingleton("ksWidevine",MediaPlayer.dependencies.protection.KeySystem_Widevine),this.system.mapSingleton("ksClearKey",MediaPlayer.dependencies.protection.KeySystem_ClearKey),this.system.mapSingleton("requestModifierExt",MediaPlayer.dependencies.RequestModifierExtensions),this.system.mapSingleton("textSourceBuffer",MediaPlayer.dependencies.TextSourceBuffer),this.system.mapSingleton("mediaSourceExt",MediaPlayer.dependencies.MediaSourceExtensions),this.system.mapSingleton("sourceBufferExt",MediaPlayer.dependencies.SourceBufferExtensions),this.system.mapSingleton("abrController",MediaPlayer.dependencies.AbrController),this.system.mapSingleton("errHandler",MediaPlayer.dependencies.ErrorHandler),this.system.mapSingleton("videoExt",MediaPlayer.dependencies.VideoModelExtensions),this.system.mapSingleton("protectionExt",MediaPlayer.dependencies.ProtectionExtensions),this.system.mapClass("protectionController",MediaPlayer.dependencies.ProtectionController),this.system.mapClass("playbackController",MediaPlayer.dependencies.PlaybackController),a.call(this),this.system.mapSingleton("liveEdgeFinder",MediaPlayer.dependencies.LiveEdgeFinder),this.system.mapClass("metrics",MediaPlayer.models.MetricsList),this.system.mapClass("downloadRatioRule",MediaPlayer.rules.DownloadRatioRule),this.system.mapClass("insufficientBufferRule",MediaPlayer.rules.InsufficientBufferRule),this.system.mapClass("limitSwitchesRule",MediaPlayer.rules.LimitSwitchesRule),this.system.mapClass("bufferOccupancyRule",MediaPlayer.rules.BufferOccupancyRule),this.system.mapClass("throughputRule",MediaPlayer.rules.ThroughputRule),this.system.mapSingleton("abrRulesCollection",MediaPlayer.rules.ABRRulesCollection),this.system.mapSingleton("rulesController",MediaPlayer.rules.RulesController),this.system.mapClass("bufferLevelRule",MediaPlayer.rules.BufferLevelRule),this.system.mapClass("pendingRequestsRule",MediaPlayer.rules.PendingRequestsRule),this.system.mapClass("playbackTimeRule",MediaPlayer.rules.PlaybackTimeRule),this.system.mapClass("sameTimeRequestRule",MediaPlayer.rules.SameTimeRequestRule),this.system.mapSingleton("scheduleRulesCollection",MediaPlayer.rules.ScheduleRulesCollection),this.system.mapClass("liveEdgeBinarySearchRule",MediaPlayer.rules.LiveEdgeBinarySearchRule),this.system.mapClass("liveEdgeWithTimeSynchronizationRule",MediaPlayer.rules.LiveEdgeWithTimeSynchronizationRule),this.system.mapSingleton("synchronizationRulesCollection",MediaPlayer.rules.SynchronizationRulesCollection),this.system.mapClass("streamProcessor",MediaPlayer.dependencies.StreamProcessor),this.system.mapClass("eventController",MediaPlayer.dependencies.EventController),this.system.mapClass("textController",MediaPlayer.dependencies.TextController),this.system.mapClass("bufferController",MediaPlayer.dependencies.BufferController),this.system.mapSingleton("manifestLoader",MediaPlayer.dependencies.ManifestLoader),this.system.mapSingleton("manifestUpdater",MediaPlayer.dependencies.ManifestUpdater),this.system.mapClass("fragmentController",MediaPlayer.dependencies.FragmentController),this.system.mapClass("fragmentLoader",MediaPlayer.dependencies.FragmentLoader),this.system.mapClass("fragmentModel",MediaPlayer.dependencies.FragmentModel),this.system.mapSingleton("streamController",MediaPlayer.dependencies.StreamController),this.system.mapClass("stream",MediaPlayer.dependencies.Stream),this.system.mapClass("scheduleController",MediaPlayer.dependencies.ScheduleController),this.system.mapSingleton("timeSyncController",MediaPlayer.dependencies.TimeSyncController),this.system.mapSingleton("notifier",MediaPlayer.dependencies.Notifier)}}},Dash=function(){"use strict";return{modules:{},dependencies:{},vo:{},di:{}}}(),Dash.di.DashContext=function(){"use strict";return{system:void 0,setup:function(){Dash.di.DashContext.prototype.setup.call(this),this.system.mapClass("parser",Dash.dependencies.DashParser),this.system.mapClass("indexHandler",Dash.dependencies.DashHandler),this.system.mapSingleton("baseURLExt",Dash.dependencies.BaseURLExtensions),this.system.mapClass("fragmentExt",Dash.dependencies.FragmentExtensions),this.system.mapClass("trackController",Dash.dependencies.RepresentationController),this.system.mapSingleton("manifestExt",Dash.dependencies.DashManifestExtensions),this.system.mapSingleton("metricsExt",Dash.dependencies.DashMetricsExtensions),this.system.mapSingleton("timelineConverter",Dash.dependencies.TimelineConverter),this.system.mapSingleton("adapter",Dash.dependencies.DashAdapter)}}},Dash.di.DashContext.prototype=new MediaPlayer.di.Context,Dash.di.DashContext.prototype.constructor=Dash.di.DashContext,Dash.dependencies.DashAdapter=function(){"use strict";var a=[],b={},c=function(a,b){return b.getRepresentationForQuality(a.quality)},d=function(a){return b[a.streamInfo.id][a.index]},e=function(b){var c,d=a.length,e=0;for(e;d>e;e+=1)if(c=a[e],b.id===c.id)return c;return null},f=function(a){var b=new MediaPlayer.vo.TrackInfo,c=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index],d=this.manifestExt.getRepresentationFor(a.index,c);return b.id=a.id,b.quality=a.index,b.bandwidth=this.manifestExt.getBandwidth(d),b.DVRWindow=a.segmentAvailabilityRange,b.fragmentDuration=a.segmentDuration||(a.segments&&a.segments.length>0?a.segments[0].duration:0/0),b.MSETimeOffset=a.MSETimeOffset,b.useCalculatedLiveEdgeTime=a.useCalculatedLiveEdgeTime,b.mediaInfo=g.call(this,a.adaptation),b},g=function(a){var b=new MediaPlayer.vo.MediaInfo,c=this,d=a.period.mpd.manifest.Period_asArray[a.period.index].AdaptationSet_asArray[a.index];return b.id=a.id,b.index=a.index,b.type=a.type,b.streamInfo=h.call(this,a.period),b.trackCount=this.manifestExt.getRepresentationCount(d),b.lang=this.manifestExt.getLanguageForAdaptation(d),b.codec=this.manifestExt.getCodec(d),b.mimeType=this.manifestExt.getMimeType(d),b.contentProtection=this.manifestExt.getContentProtectionData(d),b.contentProtection&&b.contentProtection.forEach(function(a){a.KID=c.manifestExt.getKID(a)}),b.isText=this.manifestExt.getIsTextTrack(b.mimeType),b},h=function(a){var b=new MediaPlayer.vo.StreamInfo,c=1;
15
- return b.id=a.id,b.index=a.index,b.start=a.start,b.duration=a.duration,b.manifestInfo=i.call(this,a.mpd),b.isLast=Math.abs(b.start+b.duration-b.manifestInfo.duration)<c,b},i=function(a){var b=new MediaPlayer.vo.ManifestInfo,c=this.manifestModel.getValue();return b.DVRWindowSize=a.timeShiftBufferDepth,b.loadedTime=a.manifest.loadedTime,b.availableFrom=a.availabilityStartTime,b.minBufferTime=a.manifest.minBufferTime,b.maxFragmentDuration=a.maxSegmentDuration,b.duration=this.manifestExt.getDuration(c),b.isDynamic=this.manifestExt.getIsDynamic(c),b},j=function(a,c,d){var f,h=e(c),i=h.id,j=this.manifestExt.getAdaptationForType(a,c.index,d);return j?(f=this.manifestExt.getIndexForAdaptation(j,a,c.index),b[i]=b[i]||this.manifestExt.getAdaptationsForPeriod(a,h),g.call(this,b[i][f])):null},k=function(c){var d,e,f,g=[];if(!c)return null;for(d=this.manifestExt.getMpd(c),a=this.manifestExt.getRegularPeriods(c,d),b={},e=a.length,f=0;e>f;f+=1)g.push(h.call(this,a[f]));return g},l=function(a){var b=this.manifestExt.getMpd(a);return i.call(this,b)},m=function(a,b){var c=a.trackController.getRepresentationForQuality(b);return a.indexHandler.getInitRequest(c)},n=function(a,b){var d=c(b,a.trackController);return a.indexHandler.getNextSegmentRequest(d)},o=function(a,b,d,e){var f=c(b,a.trackController);return a.indexHandler.getSegmentRequestForTime(f,d,e)},p=function(a,b,d){var e=c(b,a.trackController),f=a.indexHandler.generateSegmentRequestForTime(e,d);return f},q=function(a){return a.indexHandler.getCurrentTime()},r=function(a,b){return a.indexHandler.setCurrentTime(b)},s=function(a){var b,c,f=e(a.getStreamInfo()),g=a.getMediaInfo(),h=d(g),i=this.manifestModel.getValue(),j=a.getType();b=g.id,c=b?this.manifestExt.getAdaptationForId(b,i,f.index):this.manifestExt.getAdaptationForIndex(g.index,i,f.index),a.setMediaInfo(g),a.trackController.updateData(c,h,j)},t=function(a,b){var c=a.getRepresentationForQuality(b);return c?f.call(this,c):null},u=function(a){var b=a.getCurrentRepresentation();return b?f.call(this,b):null},v=function(a,b,c){var d=new Dash.vo.Event,e=a[0],f=a[1],g=a[2],h=a[3],i=a[4],j=a[5],k=a[6],l=c*g+h;return b[e]?(d.eventStream=b[e],d.eventStream.value=f,d.eventStream.timescale=g,d.duration=i,d.id=j,d.presentationTime=l,d.messageData=k,d.presentationTimeDelta=h,d):null},w=function(a,b){var f=this.manifestModel.getValue(),g=[];return a instanceof MediaPlayer.vo.StreamInfo?g=this.manifestExt.getEventsForPeriod(f,e(a)):a instanceof MediaPlayer.vo.MediaInfo?g=this.manifestExt.getEventStreamForAdaptationSet(f,d(a)):a instanceof MediaPlayer.vo.TrackInfo&&(g=this.manifestExt.getEventStreamForRepresentation(f,c(a,b.trackController))),g};return{system:void 0,manifestExt:void 0,manifestModel:void 0,timelineConverter:void 0,metricsList:{TCP_CONNECTION:"TcpConnection",HTTP_REQUEST:"HttpRequest",HTTP_REQUEST_TRACE:"HttpRequestTrace",TRACK_SWITCH:"RepresentationSwitch",BUFFER_LEVEL:"BufferLevel",BUFFER_STATE:"BufferState",DVR_INFO:"DVRInfo",DROPPED_FRAMES:"DroppedFrames",SCHEDULING_INFO:"SchedulingInfo",MANIFEST_UPDATE:"ManifestUpdate",MANIFEST_UPDATE_STREAM_INFO:"ManifestUpdatePeriodInfo",MANIFEST_UPDATE_TRACK_INFO:"ManifestUpdateRepresentationInfo",PLAY_LIST:"PlayList",PLAY_LIST_TRACE:"PlayListTrace"},convertDataToTrack:f,convertDataToMedia:g,convertDataToStream:h,getDataForTrack:c,getDataForMedia:d,getDataForStream:e,getStreamsInfo:k,getManifestInfo:l,getMediaInfoForType:j,getCurrentTrackInfo:u,getTrackInfoForQuality:t,updateData:s,getInitRequest:m,getNextFragmentRequest:n,getFragmentRequestForTime:o,generateFragmentRequestForTime:p,getIndexHandlerTime:q,setIndexHandlerTime:r,getEventsFor:w,getEvent:v,reset:function(){a=[],b={}}}},Dash.dependencies.DashAdapter.prototype={constructor:Dash.dependencies.DashAdapter},Dash.create=function(a,b,c){if(void 0!==typeof a&&"VIDEO"==a.nodeName){var d,e=a.id||a.name||"video element";return c=c||new Dash.di.DashContext,b=b||[].slice.call(a.querySelectorAll("source")).filter(function(a){return a.type==Dash.supportedManifestMimeTypes.mimeType})[0],d=new MediaPlayer(c),d.startup(),d.attachView(a),d.setAutoPlay(a.autoplay),d.attachSource(b.src),d.getDebug().log("Converted "+e+" to dash.js player and added content: "+b.src),d}},Dash.createAll=function(a,b,c){var d=[];a=a||".dashjs-player",b=b||document,c=c||new Dash.di.DashContext;for(var e=b.querySelectorAll(a),f=0;f<e.length;f++){var g=Dash.create(e[f],void 0,c);d.push(g)}return d},Dash.supportedManifestMimeTypes={mimeType:"application/dash+xml"},Dash.dependencies.DashHandler=function(){"use strict";var a,b,c,d=-1,e=0,f=new RegExp("^(?:(?:[a-z]+:)?/)?/","i"),g=function(a,b){for(;a.length<b;)a="0"+a;return a},h=function(a,b,c){for(var d,e,f,h,i=0,j=0,k=b.length,l="%0",m=l.length;;){if(i=a.indexOf("$"+b),0>i)return a;if(j=a.indexOf("$",i+k),0>j)return a;if(d=a.indexOf(l,i+k),d>i&&j>d)switch(e=a.charAt(j-1),f=parseInt(a.substring(d+m,j-1),10),e){case"d":case"i":case"u":h=g(c.toString(),f);break;case"x":h=g(c.toString(16),f);break;case"X":h=g(c.toString(16),f).toUpperCase();break;case"o":h=g(c.toString(8),f);break;default:return this.debug.log("Unsupported/invalid IEEE 1003.1 format identifier string in URL"),a}else h=c;a=a.substring(0,i)+h+a.substring(j+1)}},i=function(a){return a.split("$$").join("$")},j=function(a,b){if(null===b||-1===a.indexOf("$RepresentationID$"))return a;var c=b.toString();return a.split("$RepresentationID$").join(c)},k=function(a,b){return a.representation.startNumber+b},l=function(a,b){var c,d=b.adaptation.period.mpd.manifest.Period_asArray[b.adaptation.period.index].AdaptationSet_asArray[b.adaptation.index].Representation_asArray[b.index].BaseURL;return c=a===d?a:f.test(a)?a:d+a},m=function(a,c){var d,e,f=this,g=new MediaPlayer.vo.FragmentRequest;return d=a.adaptation.period,g.mediaType=c,g.type="Initialization Segment",g.url=l(a.initialization,a),g.range=a.range,e=d.start,g.availabilityStartTime=f.timelineConverter.calcAvailabilityStartTimeFromPresentationTime(e,a.adaptation.period.mpd,b),g.availabilityEndTime=f.timelineConverter.calcAvailabilityEndTimeFromPresentationTime(e+d.duration,d.mpd,b),g.quality=a.index,g},n=function(a){var b,d=this;return a?b=m.call(d,a,c):null},o=function(a){var c,e,f,g=a.adaptation.period,h=!1;return b?h=!1:0>d?h=!1:d<a.availableSegmentsNumber?(e=B(d,a),e&&(f=e.presentationStartTime-g.start,c=a.adaptation.period.duration,this.debug.log(a.segmentInfoType+": "+f+" / "+c),h=f>=c)):h=!0,h},p=function(a,c){var d,e,f,g,h=this;return e=a.segmentDuration,f=a.adaptation.period.start+c*e,g=f+e,d=new Dash.vo.Segment,d.representation=a,d.duration=e,d.presentationStartTime=f,d.mediaStartTime=h.timelineConverter.calcMediaTimeFromPresentationTime(d.presentationStartTime,a),d.availabilityStartTime=h.timelineConverter.calcAvailabilityStartTimeFromPresentationTime(d.presentationStartTime,a.adaptation.period.mpd,b),d.availabilityEndTime=h.timelineConverter.calcAvailabilityEndTimeFromPresentationTime(g,a.adaptation.period.mpd,b),d.wallStartTime=h.timelineConverter.calcWallTimeForSegment(d,b),d.replacementNumber=k(d,c),d.availabilityIdx=c,d},q=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q=this,r=b.adaptation.period.mpd.manifest.Period_asArray[b.adaptation.period.index].AdaptationSet_asArray[b.adaptation.index].Representation_asArray[b.index].SegmentTemplate,s=r.SegmentTimeline,v=b.availableSegmentsNumber>0,w=10,x=[],y=0,z=0,A=-1,B=function(a){return u.call(q,b,y,a.d,p,r.media,a.mediaRange,A)};for(p=b.timescale,c=s.S_asArray,k=t.call(q,b),k?(n=k.start,o=k.end):m=q.timelineConverter.calcMediaTimeFromPresentationTime(a||0,b),e=0,f=c.length;f>e;e+=1)if(d=c[e],h=0,d.hasOwnProperty("r")&&(h=d.r),d.hasOwnProperty("t")&&(y=d.t,z=y/p),0>h&&(j=c[e+1],j&&j.hasOwnProperty("t")?i=j.t/p:(i=q.timelineConverter.calcMediaTimeFromPresentationTime(b.segmentAvailabilityRange.end,b),b.segmentDuration=d.d/p),h=Math.ceil((i-z)/(d.d/p))-1),l){if(v)break;A+=h+1}else for(g=0;h>=g;g+=1){if(A+=1,k){if(A>o){if(l=!0,v)break;continue}A>=n&&x.push(B.call(q,d))}else{if(x.length>w){if(l=!0,v)break;continue}z>=m-d.d/p&&x.push(B.call(q,d))}y+=d.d,z=y/p}return v||(b.availableSegmentsNumber=A+1),x},r=function(a){var b,c,d,e,f,g=[],i=this,j=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate,k=a.segmentDuration,l=a.segmentAvailabilityRange,m=null,n=null;for(f=a.startNumber,b=s.call(i,a),d=b.start,e=b.end,c=d;e>=c;c+=1)m=p.call(i,a,c),m.replacementTime=(f+c-1)*a.segmentDuration,n=j.media,n=h(n,"Number",m.replacementNumber),n=h(n,"Time",m.replacementTime),m.media=n,g.push(m),m=null;return a.availableSegmentsNumber=Math.ceil((l.end-l.start)/k),g},s=function(c){var e,f,g,h=this,i=c.segmentDuration,j=c.adaptation.period.mpd.manifest.minBufferTime,k=c.segmentAvailabilityRange,l={start:h.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(c,k.start),end:h.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(c,k.end)},m=0/0,n=null,o=c.segments,p=2*i,q=Math.max(2*j,10*i);return l||(l=h.timelineConverter.calcSegmentAvailabilityRange(c,b)),b&&!h.timelineConverter.isTimeSyncCompleted()?(e=Math.floor(l.start/i),f=Math.floor(l.end/i),g={start:e,end:f}):(o?(n=B(d,c),m=n?h.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(c,n.presentationStartTime):d>0?d*i:h.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(c,a||o[0].presentationStartTime)):m=d>0?d*i:b?l.end:l.start,e=Math.floor(Math.max(m-p,l.start)/i),f=Math.floor(Math.min(e+q/i,l.end/i)),g={start:e,end:f})},t=function(){var c,e,f,g=2,h=10,i=0,j=Number.POSITIVE_INFINITY;return b&&!this.timelineConverter.isTimeSyncCompleted()?f={start:i,end:j}:!b&&a||0>d?null:(c=Math.max(d-g,i),e=Math.min(d+h,j),f={start:c,end:e})},u=function(a,c,d,e,f,g,i){var j,l,m,n=this,o=c/e,p=Math.min(d/e,a.adaptation.period.mpd.maxSegmentDuration);return j=n.timelineConverter.calcPresentationTimeFromMediaTime(o,a),l=j+p,m=new Dash.vo.Segment,m.representation=a,m.duration=p,m.mediaStartTime=o,m.presentationStartTime=j,m.availabilityStartTime=a.adaptation.period.mpd.manifest.loadedTime,m.availabilityEndTime=n.timelineConverter.calcAvailabilityEndTimeFromPresentationTime(l,a.adaptation.period.mpd,b),m.wallStartTime=n.timelineConverter.calcWallTimeForSegment(m,b),m.replacementTime=c,m.replacementNumber=k(m,i),f=h(f,"Number",m.replacementNumber),f=h(f,"Time",m.replacementTime),m.media=f,m.mediaRange=g,m.availabilityIdx=i,m},v=function(a){var b,c,d,e,f,g,h,i=this,j=[],k=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,l=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].BaseURL,m=k.SegmentURL_asArray.length;for(h=a.startNumber,e=s.call(i,a),f=Math.max(e.start,0),g=Math.min(e.end,k.SegmentURL_asArray.length-1),b=f;g>=b;b+=1)d=k.SegmentURL_asArray[b],c=p.call(i,a,b),c.replacementTime=(h+b-1)*a.segmentDuration,c.media=d.media?d.media:l,c.mediaRange=d.mediaRange,c.index=d.index,c.indexRange=d.indexRange,j.push(c),c=null;return a.availableSegmentsNumber=m,j},w=function(a){var b,c=this,d=a.segmentInfoType;return"SegmentBase"!==d&&"BaseURL"!==d&&C.call(c,a)?("SegmentTimeline"===d?b=q.call(c,a):"SegmentTemplate"===d?b=r.call(c,a):"SegmentList"===d&&(b=v.call(c,a)),x.call(c,a,b)):b=a.segments,b},x=function(a,c){var d,e,f,g;a.segments=c,d=c.length-1,b&&isNaN(this.timelineConverter.getExpectedLiveEdge())&&(g=c[d],e=g.presentationStartTime+g.duration,f=this.metricsModel.getMetricsFor("stream"),this.timelineConverter.setExpectedLiveEdge(e),this.metricsModel.updateManifestUpdateInfo(this.metricsExt.getCurrentManifestUpdate(f),{presentationStartTime:e}))},y=function(a){var b=this;if(!a)throw new Error("no representation");return a.segments=null,w.call(b,a),a},z=function(a,e){var f,g=this,h=a.initialization,i="BaseURL"!==a.segmentInfoType&&"SegmentBase"!==a.segmentInfoType;return a.segmentAvailabilityRange=null,a.segmentAvailabilityRange=g.timelineConverter.calcSegmentAvailabilityRange(a,b),a.segmentAvailabilityRange.end<a.segmentAvailabilityRange.start&&!a.useCalculatedLiveEdgeTime?(f=new MediaPlayer.vo.Error(Dash.dependencies.DashHandler.SEGMENTS_UNAVAILABLE_ERROR_CODE,"no segments are available yet",{availabilityDelay:Math.abs(a.segmentAvailabilityRange.end)}),void g.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED,{representation:a},f)):(e||(d=-1),y.call(g,a),h||g.baseURLExt.loadInitialization(a),i||g.baseURLExt.loadSegments(a,c,a.indexRange),void(h&&i&&g.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED,{representation:a})))},A=function(a,b,c){var d,e,f,g,h,i=b.segments,j=i?i.length:null,k=-1;if(i&&j>0)for(h=0;j>h;h+=1)if(e=i[h],f=e.presentationStartTime,g=e.duration,d=void 0===c||null===c?g/2:c,a+d>=f&&f+g>a-d){k=e.availabilityIdx;break}return k},B=function(a,b){if(!b||!b.segments)return null;var c,d,e=b.segments.length;for(d=0;e>d;d+=1)if(c=b.segments[d],c.availabilityIdx===a)return c;return null},C=function(a){var b,c,e=!1,f=a.segments;return f&&0!==f.length?(c=f[0].availabilityIdx,b=f[f.length-1].availabilityIdx,e=c>d||d>b):e=!0,e},D=function(a){if(null===a||void 0===a)return null;var b,d=new MediaPlayer.vo.FragmentRequest,e=a.representation,f=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].bandwidth;return b=l(a.media,e),b=h(b,"Number",a.replacementNumber),b=h(b,"Time",a.replacementTime),b=h(b,"Bandwidth",f),b=j(b,e.id),b=i(b),d.mediaType=c,d.type="Media Segment",d.url=b,d.range=a.mediaRange,d.startTime=a.presentationStartTime,d.duration=a.duration,d.timescale=e.timescale,d.availabilityStartTime=a.availabilityStartTime,d.availabilityEndTime=a.availabilityEndTime,d.wallStartTime=a.wallStartTime,d.quality=e.index,d.index=a.availabilityIdx,d},E=function(b,e,f){var g,h,i,j=d,k=f?f.keepIdx:!1,l=f?f.timeThreshold:null,m=this;return b?(a=e,m.debug.log("Getting the request for time: "+e),d=A.call(m,e,b,l),w.call(m,b),0>d&&(d=A.call(m,e,b,l)),m.debug.log("Index for time "+e+" is "+d),i=o.call(m,b),i?(g=new MediaPlayer.vo.FragmentRequest,g.action=g.ACTION_COMPLETE,g.index=d,g.mediaType=c,m.debug.log("Signal complete."),m.debug.log(g)):(h=B(d,b),g=D.call(m,h)),k&&(d=j),g):null},F=function(a,b){var c=(a.segmentAvailabilityRange.end-a.segmentAvailabilityRange.start)/2;return a.segments=null,a.segmentAvailabilityRange={start:b-c,end:b+c},E.call(this,a,b,{keepIdx:!1})},G=function(b){var e,f,g,h,i=this;if(!b)return null;if(-1===d)throw"You must call getSegmentRequestForTime first.";return a=null,d+=1,h=d,g=o.call(i,b),g?(e=new MediaPlayer.vo.FragmentRequest,e.action=e.ACTION_COMPLETE,e.index=h,e.mediaType=c,i.debug.log("Signal complete.")):(w.call(i,b),f=B(h,b),e=D.call(i,f)),e},H=function(a){var b=a.data.representation;b.segments&&this.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED,{representation:b})},I=function(a){if(!a.error&&c===a.data.mediaType){var b,d,e,f,g=this,h=a.data.segments,i=a.data.representation,j=[],k=0;for(b=0,d=h.length;d>b;b+=1)e=h[b],f=u.call(g,i,e.startTime,e.duration,e.timescale,e.media,e.mediaRange,k),j.push(f),f=null,k+=1;i.segmentAvailabilityRange={start:j[0].presentationStartTime,end:j[d-1].presentationStartTime},i.availableSegmentsNumber=d,x.call(g,i,j),i.initialization&&this.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED,{representation:i})}};return{debug:void 0,baseURLExt:void 0,timelineConverter:void 0,metricsModel:void 0,metricsExt:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED]=H,this[Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED]=I},initialize:function(a){this.subscribe(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED,a.trackController),c=a.getType(),b=a.isDynamic(),this.streamProcessor=a},getType:function(){return c},setType:function(a){c=a},getIsDynamic:function(){return b},setIsDynamic:function(a){b=a},setCurrentTime:function(a){e=a},getCurrentTime:function(){return e},reset:function(){e=0,a=void 0,d=-1,this.unsubscribe(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED,this.streamProcessor.trackController)},getInitRequest:n,getSegmentRequestForTime:E,getNextSegmentRequest:G,generateSegmentRequestForTime:F,updateRepresentation:z}},Dash.dependencies.DashHandler.prototype={constructor:Dash.dependencies.DashHandler},Dash.dependencies.DashHandler.SEGMENTS_UNAVAILABLE_ERROR_CODE=1,Dash.dependencies.DashHandler.eventList={ENAME_REPRESENTATION_UPDATED:"representationUpdated"},Dash.dependencies.DashParser=function(){"use strict";var a=31536e3,b=2592e3,c=86400,d=3600,e=60,f=60,g=1e3,h=/^P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,i=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})([0-9]{2}))?/,j=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,k=[{type:"duration",test:function(a){for(var b=["minBufferTime","mediaPresentationDuration","minimumUpdatePeriod","timeShiftBufferDepth","maxSegmentDuration","maxSubsegmentDuration","suggestedPresentationDelay","start","starttime","duration"],c=b.length,d=0;c>d;d++)if(a.nodeName===b[d])return h.test(a.value);return!1},converter:function(f){var g=h.exec(f);return parseFloat(g[2]||0)*a+parseFloat(g[4]||0)*b+parseFloat(g[6]||0)*c+parseFloat(g[8]||0)*d+parseFloat(g[10]||0)*e+parseFloat(g[12]||0)}},{type:"datetime",test:function(a){return i.test(a.value)},converter:function(a){var b,c=i.exec(a);if(b=Date.UTC(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10),c[6]&&parseInt(c[6],10)||0,c[7]&&parseFloat(c[7])*g||0),c[9]&&c[10]){var d=parseInt(c[9],10)*f+parseInt(c[10],10);b+=("+"===c[8]?-1:1)*d*e*g}return new Date(b)}},{type:"numeric",test:function(a){return j.test(a.value)},converter:function(a){return parseFloat(a)}}],l=function(){var a,b,c,d;return d=[{name:"profiles",merge:!1},{name:"width",merge:!1},{name:"height",merge:!1},{name:"sar",merge:!1},{name:"frameRate",merge:!1},{name:"audioSamplingRate",merge:!1},{name:"mimeType",merge:!1},{name:"segmentProfiles",merge:!1},{name:"codecs",merge:!1},{name:"maximumSAPPeriod",merge:!1},{name:"startsWithSap",merge:!1},{name:"maxPlayoutRate",merge:!1},{name:"codingDependency",merge:!1},{name:"scanType",merge:!1},{name:"FramePacking",merge:!0},{name:"AudioChannelConfiguration",merge:!0},{name:"ContentProtection",merge:!0}],a={},a.name="AdaptationSet",a.isRoot=!1,a.isArray=!0,a.parent=null,a.children=[],a.properties=d,b={},b.name="Representation",b.isRoot=!1,b.isArray=!0,b.parent=a,b.children=[],b.properties=d,a.children.push(b),c={},c.name="SubRepresentation",c.isRoot=!1,c.isArray=!0,c.parent=b,c.children=[],c.properties=d,b.children.push(c),a},m=function(){var a,b,c,d;return d=[{name:"SegmentBase",merge:!0},{name:"SegmentTemplate",merge:!0},{name:"SegmentList",merge:!0}],a={},a.name="Period",a.isRoot=!1,a.isArray=!0,a.parent=null,a.children=[],a.properties=d,b={},b.name="AdaptationSet",b.isRoot=!1,b.isArray=!0,b.parent=a,b.children=[],b.properties=d,a.children.push(b),c={},c.name="Representation",c.isRoot=!1,c.isArray=!0,c.parent=b,c.children=[],c.properties=d,b.children.push(c),a},n=function(){var a,b,c,d,e;return e=[{name:"BaseURL",merge:!0,mergeFunction:function(a,b){var c;return c=0===b.indexOf("http://")?b:a+b}}],a={},a.name="mpd",a.isRoot=!0,a.isArray=!0,a.parent=null,a.children=[],a.properties=e,b={},b.name="Period",b.isRoot=!1,b.isArray=!0,b.parent=null,b.children=[],b.properties=e,a.children.push(b),c={},c.name="AdaptationSet",c.isRoot=!1,c.isArray=!0,c.parent=b,c.children=[],c.properties=e,b.children.push(c),d={},d.name="Representation",d.isRoot=!1,d.isArray=!0,d.parent=c,d.children=[],d.properties=e,c.children.push(d),a},o=function(){var a=[];return a.push(l()),a.push(m()),a.push(n()),a},p=function(a,b){var c,d=new X2JS(k,"",!0),e=new ObjectIron(o()),f=new Date,g=null,h=null;try{c=d.xml_str2json(a),g=new Date,c.hasOwnProperty("BaseURL")?(c.BaseURL=c.BaseURL_asArray[0],0!==c.BaseURL.toString().indexOf("http")&&(c.BaseURL=b+c.BaseURL)):c.BaseURL=b,c.hasOwnProperty("Location")&&(c.Location=c.Location_asArray[0]),e.run(c),h=new Date,this.debug.log("Parsing complete: ( xml2json: "+(g.getTime()-f.getTime())+"ms, objectiron: "+(h.getTime()-g.getTime())+"ms, total: "+(h.getTime()-f.getTime())/1e3+"s)")}catch(i){return this.errHandler.manifestError("parsing the manifest failed","parse",a),null}return c};return{debug:void 0,errHandler:void 0,parse:p}},Dash.dependencies.DashParser.prototype={constructor:Dash.dependencies.DashParser},Dash.dependencies.TimelineConverter=function(){"use strict";var a=0,b=!1,c=0/0,d=function(b,c,d,e){var f=0/0;return f=e?d&&c.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(c.availabilityStartTime.getTime()+1e3*(b+c.timeShiftBufferDepth)):c.availabilityEndTime:d?new Date(c.availabilityStartTime.getTime()+1e3*(b-a)):c.availabilityStartTime},e=function(a,b,c){return d.call(this,a,b,c)},f=function(a,b,c){return d.call(this,a,b,c,!0)},g=function(b,c){return(b.getTime()-c.mpd.availabilityStartTime.getTime()+1e3*a)/1e3},h=function(a,b){var c=b.adaptation.period.start,d=b.presentationTimeOffset;return a+(c-d)},i=function(a,b){var c=b.adaptation.period.start,d=b.presentationTimeOffset;return a-c+d},j=function(a,b){var c,d,e;return b&&(c=a.representation.adaptation.period.mpd.suggestedPresentationDelay,d=a.presentationStartTime+c,e=new Date(a.availabilityStartTime.getTime()+1e3*d)),e},k=function(a,c){var d,e,f=a.adaptation.period.start,h=f+a.adaptation.period.duration,i={start:f,end:h};return c?!b&&a.segmentAvailabilityRange?a.segmentAvailabilityRange:(d=a.adaptation.period.mpd.checkTime,e=g(new Date((new Date).getTime()),a.adaptation.period),f=Math.max(e-a.adaptation.period.mpd.timeShiftBufferDepth,0),h=isNaN(d)?e:Math.min(d,e),i={start:f,end:h}):i},l=function(a,b){var c=a.adaptation.period.start;return b-c},m=function(a,b){var c=a.adaptation.period.start;return b+c},n=function(d){b||d.error||(a=d.data.liveEdge-(c+d.data.searchTime),b=!0)},o=function(c){b||c.error||(a=c.data.offset/1e3,b=!0)},p=function(a){var b=a.presentationTimeOffset,c=a.adaptation.period.start;return c-b},q=function(){a=0,b=!1,c=0/0};return{notifier:void 0,uriQueryFragModel:void 0,setup:function(){this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED]=n,this[MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED]=o},calcAvailabilityStartTimeFromPresentationTime:e,calcAvailabilityEndTimeFromPresentationTime:f,calcPresentationTimeFromWallTime:g,calcPresentationTimeFromMediaTime:h,calcPeriodRelativeTimeFromMpdRelativeTime:l,calcMpdRelativeTimeFromPeriodRelativeTime:m,calcMediaTimeFromPresentationTime:i,calcSegmentAvailabilityRange:k,calcWallTimeForSegment:j,calcMSETimeOffset:p,reset:q,isTimeSyncCompleted:function(){return b},getClientTimeOffset:function(){return a},getExpectedLiveEdge:function(){return c},setExpectedLiveEdge:function(a){c=a}}},Dash.dependencies.TimelineConverter.prototype={constructor:Dash.dependencies.TimelineConverter},Dash.dependencies.RepresentationController=function(){"use strict";var a,b=null,c=-1,d=!0,e=[],f=function(c,f,h){var j=this;if(d=!0,j.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED),e=k.call(j,f),a=i.call(j,j.abrController.getQualityFor(h,j.streamProcessor.getStreamInfo())),b=c,"video"!==h&&"audio"!==h)return j.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,{data:b,currentRepresentation:a}),void g.call(j);for(var l=0;l<e.length;l+=1)j.indexHandler.updateRepresentation(e[l],!0)},g=function(){var a=new Date,b=this.getCurrentRepresentation(),c=this.streamProcessor.playbackController.getTime();this.metricsModel.addTrackSwitch(b.adaptation.type,a,c,b.id)},h=function(){var b=this.streamProcessor,c=this.timelineConverter.calcSegmentAvailabilityRange(a,b.isDynamic());this.metricsModel.addDVRInfo(b.getType(),b.playbackController.getTime(),b.getStreamInfo().manifestInfo,c)},i=function(a){return e[a]},j=function(){for(var a=0,b=e.length;b>a;a+=1)if(null===e[a].segmentAvailabilityRange||null===e[a].initialization)return!1;return!0},k=function(a){var d,e=this,f=e.manifestModel.getValue();return c=e.manifestExt.getIndexForAdaptation(b,f,a.period.index),d=e.manifestExt.getRepresentationsForAdaptation(f,a)},l=function(a){for(var b,c=this,d=0,f=e.length;f>d;d+=1)b=e[d],b.segmentAvailabilityRange=c.timelineConverter.calcSegmentAvailabilityRange(b,a)},m=function(b){var c=this,f=1e3*(b+3*a.segmentDuration),g=function(){if(!this.isUpdating()){d=!0,c.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED);for(var a=0;a<e.length;a+=1)c.indexHandler.updateRepresentation(e[a],!0)}};d=!1,setTimeout(g.bind(this),f)},n=function(c){if(this.isUpdating()){var e,f,i=this,k=c.data.representation,l=i.metricsModel.getMetricsFor("stream"),n=i.metricsExt.getCurrentManifestUpdate(l),o=!1;if(c.error&&c.error.code===Dash.dependencies.DashHandler.SEGMENTS_UNAVAILABLE_ERROR_CODE)return h.call(this),m.call(this,c.error.data.availabilityDelay),f=new MediaPlayer.vo.Error(Dash.dependencies.RepresentationController.SEGMENTS_UPDATE_FAILED_ERROR_CODE,"Segments update failed",null),void this.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,{data:b,currentRepresentation:a},f);for(var p=0;p<n.trackInfo.length;p+=1)if(e=n.trackInfo[p],e.index===k.index&&e.mediaType===i.streamProcessor.getType()){o=!0;break}o||i.metricsModel.addManifestUpdateTrackInfo(n,k.id,k.index,k.adaptation.period.index,i.streamProcessor.getType(),k.presentationTimeOffset,k.startNumber,k.segmentInfoType),j()&&(d=!1,i.metricsModel.updateManifestUpdateInfo(n,{latency:a.segmentAvailabilityRange.end-i.streamProcessor.playbackController.getTime()}),this.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,{data:b,currentRepresentation:a}),g.call(i))}},o=function(a){l.call(this,a.data.isDynamic)},p=function(b){if(!b.error){l.call(this,!0),this.indexHandler.updateRepresentation(a,!1);var c=this.manifestModel.getValue();a.adaptation.period.mpd.checkTime=this.manifestExt.getCheckTime(c,a.adaptation.period)}},q=function(){h.call(this)},r=function(b){var c=this;b.data.mediaType===c.streamProcessor.getType()&&c.streamProcessor.getStreamInfo().id===b.data.streamInfo.id&&(a=c.getRepresentationForQuality(b.data.newQuality),g.call(c))};return{system:void 0,debug:void 0,manifestExt:void 0,manifestModel:void 0,metricsModel:void 0,metricsExt:void 0,abrController:void 0,timelineConverter:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED]=r,this[Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED]=n,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED]=o,this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED]=p,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED]=q},initialize:function(a){this.streamProcessor=a,this.indexHandler=a.indexHandler},getData:function(){return b},getDataIndex:function(){return c},isUpdating:function(){return d},updateData:f,getRepresentationForQuality:i,getCurrentRepresentation:function(){return a}}},Dash.dependencies.RepresentationController.prototype={constructor:Dash.dependencies.RepresentationController},Dash.dependencies.RepresentationController.SEGMENTS_UPDATE_FAILED_ERROR_CODE=1,Dash.dependencies.RepresentationController.eventList={ENAME_DATA_UPDATE_COMPLETED:"dataUpdateCompleted",ENAME_DATA_UPDATE_STARTED:"dataUpdateStarted"},Dash.dependencies.BaseURLExtensions=function(){"use strict";var a=function(a,b){for(var c,d,e,f,g,h,i,j,k,l,m=new DataView(a),n={},o=0;"sidx"!==j&&o<m.byteLength;){for(k=m.getUint32(o),o+=4,j="",f=0;4>f;f+=1)l=m.getInt8(o),j+=String.fromCharCode(l),o+=1;"moof"!==j&&"traf"!==j&&"sidx"!==j?o+=k-8:"sidx"===j&&(o-=8)}if(e=m.getUint32(o,!1)+o,e>a.byteLength)throw"sidx terminates after array buffer";for(n.version=m.getUint8(o+8),o+=12,n.timescale=m.getUint32(o+4,!1),o+=8,0===n.version?(n.earliest_presentation_time=m.getUint32(o,!1),n.first_offset=m.getUint32(o+4,!1),o+=8):(n.earliest_presentation_time=utils.Math.to64BitNumber(m.getUint32(o+4,!1),m.getUint32(o,!1)),n.first_offset=(m.getUint32(o+8,!1)<<32)+m.getUint32(o+12,!1),o+=16),n.first_offset+=e+(b||0),n.reference_count=m.getUint16(o+2,!1),o+=4,n.references=[],c=n.first_offset,d=n.earliest_presentation_time,f=0;f<n.reference_count;f+=1)h=m.getUint32(o,!1),g=h>>>31,h=2147483647&h,i=m.getUint32(o+4,!1),o+=12,n.references.push({size:h,type:g,offset:c,duration:i,time:d,timescale:n.timescale}),c+=h,d+=i;if(o!==e)throw"Error: final pos "+o+" differs from SIDX end "+e;return n},b=function(b,c,d){var e,f,g,h,i,j,k,l;for(e=a.call(this,b,d),f=e.references,g=[],i=0,j=f.length;j>i;i+=1)h=new Dash.vo.Segment,h.duration=f[i].duration,h.media=c,h.startTime=f[i].time,h.timescale=f[i].timescale,k=f[i].offset,l=f[i].offset+f[i].size-1,h.mediaRange=k+"-"+l,g.push(h);return this.debug.log("Parsed SIDX box: "+g.length+" segments."),g},c=function(a,b,d){var e,f,g,h,i,j,k,l,m,n=new DataView(a),o=0,p="",q=0,r=!1,s=this;for(s.debug.log("Searching for initialization.");"moov"!==p&&o<n.byteLength;){for(q=n.getUint32(o),o+=4,p="",j=0;4>j;j+=1)k=n.getInt8(o),p+=String.fromCharCode(k),o+=1;"ftyp"===p&&(e=o-8),"moov"===p&&(f=o-8),"moov"!==p&&(o+=q-8)}i=n.byteLength-o,"moov"!==p?(s.debug.log("Loading more bytes to find initialization."),b.range.start=0,b.range.end=b.bytesLoaded+b.bytesToLoad,l=new XMLHttpRequest,l.onloadend=function(){r||d.call(s,null,new Error("Error loading initialization."))},l.onload=function(){r=!0,b.bytesLoaded=b.range.end,c.call(s,l.response,function(a){d.call(s,a)})},l.onerror=function(){d.call(s,null,new Error("Error loading initialization."))},l.open("GET",s.requestModifierExt.modifyRequestURL(b.url)),l.responseType="arraybuffer",l.setRequestHeader("Range","bytes="+b.range.start+"-"+b.range.end),l=s.requestModifierExt.modifyRequestHeader(l),l.send(null)):(g=void 0===e?f:e,h=f+q-1,m=g+"-"+h,s.debug.log("Found the initialization. Range: "+m),d.call(s,m))},d=function(a){var b=new XMLHttpRequest,d=!0,e=this,f=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].BaseURL,g={url:f,range:{},searching:!1,bytesLoaded:0,bytesToLoad:1500,request:b};e.debug.log("Start searching for initialization."),g.range.start=0,g.range.end=g.bytesToLoad,b.onload=function(){b.status<200||b.status>299||(d=!1,g.bytesLoaded=g.range.end,c.call(e,b.response,g,function(b){a.range=b,a.initialization=f,e.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED,{representation:a})}))},b.onloadend=b.onerror=function(){d&&(d=!1,e.errHandler.downloadError("initialization",g.url,b),e.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED,{representation:a}))},b.open("GET",e.requestModifierExt.modifyRequestURL(g.url)),b.responseType="arraybuffer",b.setRequestHeader("Range","bytes="+g.range.start+"-"+g.range.end),b=e.requestModifierExt.modifyRequestHeader(b),b.send(null),e.debug.log("Perform init search: "+g.url)},e=function(a,c,d,g){var h,i,j,k,l,m,n,o,p,q=new DataView(a),r=new XMLHttpRequest,s=0,t="",u=0,v=!0,w=!1,x=this;for(x.debug.log("Searching for SIDX box."),x.debug.log(c.bytesLoaded+" bytes loaded.");"sidx"!==t&&s<q.byteLength;){for(u=q.getUint32(s),s+=4,t="",m=0;4>m;m+=1)n=q.getInt8(s),t+=String.fromCharCode(n),s+=1;"sidx"!==t&&(s+=u-8)}if(i=q.byteLength-s,"sidx"!==t)g.call(x);else if(u-8>i)x.debug.log("Found SIDX but we don't have all of it."),c.range.start=0,c.range.end=c.bytesLoaded+(u-i),r.onload=function(){r.status<200||r.status>299||(v=!1,c.bytesLoaded=c.range.end,e.call(x,r.response,c,d,g))
16
- },r.onloadend=r.onerror=function(){v&&(v=!1,x.errHandler.downloadError("SIDX",c.url,r),g.call(x))},r.open("GET",x.requestModifierExt.modifyRequestURL(c.url)),r.responseType="arraybuffer",r.setRequestHeader("Range","bytes="+c.range.start+"-"+c.range.end),r=x.requestModifierExt.modifyRequestHeader(r),r.send(null);else if(c.range.start=s-8,c.range.end=c.range.start+u,x.debug.log("Found the SIDX box. Start: "+c.range.start+" | End: "+c.range.end),j=new ArrayBuffer(c.range.end-c.range.start),l=new Uint8Array(j),k=new Uint8Array(a,c.range.start,c.range.end-c.range.start),l.set(k),o=this.parseSIDX.call(this,j,c.range.start),p=o.references,null!==p&&void 0!==p&&p.length>0&&(w=1===p[0].type),w){x.debug.log("Initiate multiple SIDX load.");var y,z,A,B,C,D=[],E=0,F=function(a){a?(D=D.concat(a),E+=1,E>=z&&g.call(x,D)):g.call(x)};for(y=0,z=p.length;z>y;y+=1)A=p[y].offset,B=p[y].offset+p[y].size-1,C=A+"-"+B,f.call(x,d,null,C,F)}else x.debug.log("Parsing segments from SIDX."),h=b.call(x,j,c.url,c.range.start),g.call(x,h)},f=function(a,c,d,f){var g,h,i=new XMLHttpRequest,j=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].BaseURL,k=!0,l=this,m={url:j,range:{},searching:!1,bytesLoaded:0,bytesToLoad:1500,request:i};null===d?(l.debug.log("No known range for SIDX request."),m.searching=!0,m.range.start=0,m.range.end=m.bytesToLoad):(h=d.split("-"),m.range.start=parseFloat(h[0]),m.range.end=parseFloat(h[1])),i.onload=function(){i.status<200||i.status>299||(k=!1,m.searching?(m.bytesLoaded=m.range.end,e.call(l,i.response,m,a,function(b){b&&f.call(l,b,a,c)})):(g=b.call(l,i.response,m.url,m.range.start),f.call(l,g,a,c)))},i.onloadend=i.onerror=function(){k&&(k=!1,l.errHandler.downloadError("SIDX",m.url,i),f.call(l,null,a,c))},i.open("GET",l.requestModifierExt.modifyRequestURL(m.url)),i.responseType="arraybuffer",i.setRequestHeader("Range","bytes="+m.range.start+"-"+m.range.end),i=l.requestModifierExt.modifyRequestHeader(i),i.send(null),l.debug.log("Perform SIDX load: "+m.url)},g=function(a,b,c){var d=this;a?d.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):d.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c},new MediaPlayer.vo.Error(null,"error loading segments",null))};return{debug:void 0,errHandler:void 0,requestModifierExt:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,loadSegments:function(a,b,c){f.call(this,a,b,c,g.bind(this))},loadInitialization:d,parseSegments:b,parseSIDX:a,findSIDX:e}},Dash.dependencies.BaseURLExtensions.prototype={constructor:Dash.dependencies.BaseURLExtensions},Dash.dependencies.BaseURLExtensions.eventList={ENAME_INITIALIZATION_LOADED:"initializationLoaded",ENAME_SEGMENTS_LOADED:"segmentsLoaded"},Dash.dependencies.DashManifestExtensions=function(){"use strict";this.timelineConverter=void 0},Dash.dependencies.DashManifestExtensions.prototype={constructor:Dash.dependencies.DashManifestExtensions,getIsTypeOf:function(a,b){"use strict";var c,d,e,f=a.ContentComponent_asArray,g=new RegExp("text"!==b?b:"(vtt|ttml)"),h=!1,i=!1;if(f)for(c=0,d=f.length;d>c;c+=1)f[c].contentType===b&&(h=!0,i=!0);if(a.hasOwnProperty("mimeType")&&(h=g.test(a.mimeType),i=!0),!i)for(c=0,d=a.Representation_asArray.length;!i&&d>c;)e=a.Representation_asArray[c],e.hasOwnProperty("mimeType")&&(h=g.test(e.mimeType),i=!0),c+=1;return h},getIsAudio:function(a){"use strict";return this.getIsTypeOf(a,"audio")},getIsVideo:function(a){"use strict";return this.getIsTypeOf(a,"video")},getIsText:function(a){"use strict";return this.getIsTypeOf(a,"text")},getIsTextTrack:function(a){return"text/vtt"===a||"application/ttml+xml"===a},getLanguageForAdaptation:function(a){var b="";return a.hasOwnProperty("lang")&&(b=a.lang),b},getIsMain:function(){"use strict";return!1},processAdaptation:function(a){"use strict";return void 0!==a.Representation_asArray&&null!==a.Representation_asArray&&a.Representation_asArray.sort(function(a,b){return a.bandwidth-b.bandwidth}),a},getAdaptationForId:function(a,b,c){"use strict";var d,e,f=b.Period_asArray[c].AdaptationSet_asArray;for(d=0,e=f.length;e>d;d+=1)if(f[d].hasOwnProperty("id")&&f[d].id===a)return f[d];return null},getAdaptationForIndex:function(a,b,c){"use strict";var d=b.Period_asArray[c].AdaptationSet_asArray;return d[a]},getIndexForAdaptation:function(a,b,c){"use strict";var d,e,f=b.Period_asArray[c].AdaptationSet_asArray;for(d=0,e=f.length;e>d;d+=1)if(f[d]===a)return d;return-1},getAdaptationsForType:function(a,b,c){"use strict";var d,e,f=this,g=a.Period_asArray[b].AdaptationSet_asArray,h=[];for(d=0,e=g.length;e>d;d+=1)this.getIsTypeOf(g[d],c)&&h.push(f.processAdaptation(g[d]));return h},getAdaptationForType:function(a,b,c){"use strict";var d,e,f,g=this;if(f=this.getAdaptationsForType(a,b,c),!f||0===f.length)return null;for(d=0,e=f.length;e>d;d+=1)if(g.getIsMain(f[d]))return f[d];return f[0]},getCodec:function(a){"use strict";var b=a.Representation_asArray[0],c=b.mimeType+';codecs="'+b.codecs+'"';return c},getMimeType:function(a){"use strict";return a.Representation_asArray[0].mimeType},getKID:function(a){"use strict";return a&&a.hasOwnProperty("cenc:default_KID")?a["cenc:default_KID"]:null},getContentProtectionData:function(a){"use strict";return a&&a.hasOwnProperty("ContentProtection_asArray")&&0!==a.ContentProtection_asArray.length?a.ContentProtection_asArray:null},getIsDynamic:function(a){"use strict";var b=!1,c="dynamic";return a.hasOwnProperty("type")&&(b=a.type===c),b},getIsDVR:function(a){"use strict";var b,c,d=this.getIsDynamic(a);return b=!isNaN(a.timeShiftBufferDepth),c=d&&b},getIsOnDemand:function(a){"use strict";var b=!1;return a.profiles&&a.profiles.length>0&&(b=-1!==a.profiles.indexOf("urn:mpeg:dash:profile:isoff-on-demand:2011")),b},getDuration:function(a){var b;return b=a.hasOwnProperty("mediaPresentationDuration")?a.mediaPresentationDuration:Number.POSITIVE_INFINITY},getBandwidth:function(a){"use strict";return a.bandwidth},getRefreshDelay:function(a){"use strict";var b=0/0,c=2;return a.hasOwnProperty("minimumUpdatePeriod")&&(b=Math.max(parseFloat(a.minimumUpdatePeriod),c)),b},getRepresentationCount:function(a){"use strict";return a.Representation_asArray.length},getRepresentationFor:function(a,b){"use strict";return b.Representation_asArray[a]},getRepresentationsForAdaptation:function(a,b){for(var c,d,e,f,g,h=this,i=h.processAdaptation(a.Period_asArray[b.period.index].AdaptationSet_asArray[b.index]),j=[],k=0;k<i.Representation_asArray.length;k+=1)f=i.Representation_asArray[k],c=new Dash.vo.Representation,c.index=k,c.adaptation=b,f.hasOwnProperty("id")&&(c.id=f.id),f.hasOwnProperty("SegmentBase")?(e=f.SegmentBase,c.segmentInfoType="SegmentBase"):f.hasOwnProperty("SegmentList")?(e=f.SegmentList,c.segmentInfoType="SegmentList",c.useCalculatedLiveEdgeTime=!0):f.hasOwnProperty("SegmentTemplate")?(e=f.SegmentTemplate,e.hasOwnProperty("SegmentTimeline")?(c.segmentInfoType="SegmentTimeline",g=e.SegmentTimeline.S_asArray[e.SegmentTimeline.S_asArray.length-1],(!g.hasOwnProperty("r")||g.r>=0)&&(c.useCalculatedLiveEdgeTime=!0)):c.segmentInfoType="SegmentTemplate",e.hasOwnProperty("initialization")&&(c.initialization=e.initialization.split("$Bandwidth$").join(f.bandwidth).split("$RepresentationID$").join(f.id))):(e=f.BaseURL,c.segmentInfoType="BaseURL"),e.hasOwnProperty("Initialization")?(d=e.Initialization,d.hasOwnProperty("sourceURL")?c.initialization=d.sourceURL:d.hasOwnProperty("range")&&(c.initialization=f.BaseURL,c.range=d.range)):f.hasOwnProperty("mimeType")&&h.getIsTextTrack(f.mimeType)&&(c.initialization=f.BaseURL,c.range=0),e.hasOwnProperty("timescale")&&(c.timescale=e.timescale),e.hasOwnProperty("duration")&&(c.segmentDuration=e.duration/c.timescale),e.hasOwnProperty("startNumber")&&(c.startNumber=e.startNumber),e.hasOwnProperty("indexRange")&&(c.indexRange=e.indexRange),e.hasOwnProperty("presentationTimeOffset")&&(c.presentationTimeOffset=e.presentationTimeOffset/c.timescale),c.MSETimeOffset=h.timelineConverter.calcMSETimeOffset(c),j.push(c);return j},getAdaptationsForPeriod:function(a,b){for(var c,d,e=a.Period_asArray[b.index],f=[],g=0;g<e.AdaptationSet_asArray.length;g+=1)d=e.AdaptationSet_asArray[g],c=new Dash.vo.AdaptationSet,d.hasOwnProperty("id")&&(c.id=d.id),c.index=g,c.period=b,c.type=this.getIsAudio(d)?"audio":this.getIsVideo(d)?"video":"text",f.push(c);return f},getRegularPeriods:function(a,b){var c,d,e=this,f=[],g=e.getIsDynamic(a),h=null,i=null,j=null,k=null;for(c=0,d=a.Period_asArray.length;d>c;c+=1)i=a.Period_asArray[c],i.hasOwnProperty("start")?(k=new Dash.vo.Period,k.start=i.start):null!==h&&i.hasOwnProperty("duration")&&null!==j?(k=new Dash.vo.Period,k.start=j.start+j.duration,k.duration=i.duration):0!==c||g||(k=new Dash.vo.Period,k.start=0),null!==j&&isNaN(j.duration)&&(j.duration=k.start-j.start),null!==k&&i.hasOwnProperty("id")&&(k.id=i.id),null!==k&&i.hasOwnProperty("duration")&&(k.duration=i.duration),null!==k&&(k.index=c,k.mpd=b,f.push(k),h=i,j=k),i=null,k=null;return 0===f.length?f:(b.checkTime=e.getCheckTime(a,f[0]),null!==j&&isNaN(j.duration)&&(j.duration=e.getEndTimeForLastPeriod(b)-j.start),f)},getMpd:function(a){var b=new Dash.vo.Mpd;return b.manifest=a,b.availabilityStartTime=new Date(a.hasOwnProperty("availabilityStartTime")?a.availabilityStartTime.getTime():a.loadedTime.getTime()),a.hasOwnProperty("availabilityEndTime")&&(b.availabilityEndTime=new Date(a.availabilityEndTime.getTime())),a.hasOwnProperty("suggestedPresentationDelay")&&(b.suggestedPresentationDelay=a.suggestedPresentationDelay),a.hasOwnProperty("timeShiftBufferDepth")&&(b.timeShiftBufferDepth=a.timeShiftBufferDepth),a.hasOwnProperty("maxSegmentDuration")&&(b.maxSegmentDuration=a.maxSegmentDuration),b},getFetchTime:function(a,b){var c=this.timelineConverter.calcPresentationTimeFromWallTime(a.loadedTime,b);return c},getCheckTime:function(a,b){var c,d=this,e=0/0;return a.hasOwnProperty("minimumUpdatePeriod")&&(c=d.getFetchTime(a,b),e=c+a.minimumUpdatePeriod),e},getEndTimeForLastPeriod:function(a){var b;if(a.manifest.mediaPresentationDuration)b=a.manifest.mediaPresentationDuration;else{if(isNaN(a.checkTime))throw new Error("Must have @mediaPresentationDuration or @minimumUpdatePeriod on MPD or an explicit @duration on the last period.");b=a.checkTime}return b},getEventsForPeriod:function(a,b){var c=a.Period_asArray,d=c[b.index].EventStream_asArray,e=[];if(d)for(var f=0;f<d.length;f+=1){var g=new Dash.vo.EventStream;if(g.period=b,g.timescale=1,!d[f].hasOwnProperty("schemeIdUri"))throw"Invalid EventStream. SchemeIdUri has to be set";g.schemeIdUri=d[f].schemeIdUri,d[f].hasOwnProperty("timescale")&&(g.timescale=d[f].timescale),d[f].hasOwnProperty("value")&&(g.value=d[f].value);for(var h=0;h<d[f].Event_asArray.length;h+=1){var i=new Dash.vo.Event;i.presentationTime=0,i.eventStream=g,d[f].Event_asArray[h].hasOwnProperty("presentationTime")&&(i.presentationTime=d[f].Event_asArray[h].presentationTime),d[f].Event_asArray[h].hasOwnProperty("duration")&&(i.duration=d[f].Event_asArray[h].duration),d[f].Event_asArray[h].hasOwnProperty("id")&&(i.id=d[f].Event_asArray[h].id),e.push(i)}}return e},getEventStreamForAdaptationSet:function(a,b){var c=[],d=a.Period_asArray[b.period.index].AdaptationSet_asArray[b.index].InbandEventStream_asArray;if(d)for(var e=0;e<d.length;e+=1){var f=new Dash.vo.EventStream;if(f.timescale=1,!d[e].hasOwnProperty("schemeIdUri"))throw"Invalid EventStream. SchemeIdUri has to be set";f.schemeIdUri=d[e].schemeIdUri,d[e].hasOwnProperty("timescale")&&(f.timescale=d[e].timescale),d[e].hasOwnProperty("value")&&(f.value=d[e].value),c.push(f)}return c},getEventStreamForRepresentation:function(a,b){var c=[],d=a.Period_asArray[b.adaptation.period.index].AdaptationSet_asArray[b.adaptation.index].Representation_asArray[b.index].InbandEventStream_asArray;if(d)for(var e=0;e<d.length;e++){var f=new Dash.vo.EventStream;if(f.timescale=1,f.representation=b,!d[e].hasOwnProperty("schemeIdUri"))throw"Invalid EventStream. SchemeIdUri has to be set";f.schemeIdUri=d[e].schemeIdUri,d[e].hasOwnProperty("timescale")&&(f.timescale=d[e].timescale),d[e].hasOwnProperty("value")&&(f.value=d[e].value),c.push(f)}return c},getUTCTimingSources:function(a){"use strict";var b=this,c=b.getIsDynamic(a),d=a.hasOwnProperty("availabilityStartTime"),e=a.UTCTiming_asArray,f=[];return(c||d)&&e&&e.forEach(function(a){var b=new Dash.vo.UTCTiming;a.hasOwnProperty("schemeIdUri")&&(b.schemeIdUri=a.schemeIdUri,a.hasOwnProperty("value")&&(b.value=a.value.toString(),f.push(b)))}),f}},Dash.dependencies.DashMetricsExtensions=function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j;for(h=0;h<a.length;h+=1)for(c=a[h],e=c.AdaptationSet_asArray,i=0;i<e.length;i+=1)for(d=e[i],g=d.Representation_asArray,j=0;j<g.length;j+=1)if(f=g[j],b===f.id)return j;return-1},b=function(a,b){var c,d,e,f,g,h,i,j;for(h=0;h<a.length;h+=1)for(c=a[h],e=c.AdaptationSet_asArray,i=0;i<e.length;i+=1)for(d=e[i],g=d.Representation_asArray,j=0;j<g.length;j+=1)if(f=g[j],b===f.id)return f;return null},c=function(a,b){return this.manifestExt.getIsTypeOf(a,b)},d=function(a,b){var d,e,f,g,h,i;for(h=0;h<a.length;h+=1)for(d=a[h],f=d.AdaptationSet_asArray,i=0;i<f.length;i+=1)if(e=f[i],g=e.Representation_asArray,c.call(this,e,b))return g.length;return-1},e=function(a){var c,d=this,e=d.manifestModel.getValue(),f=e.Period_asArray;return c=b.call(d,f,a),null===c?null:c.bandwidth},f=function(b){var c,d=this,e=d.manifestModel.getValue(),f=e.Period_asArray;return c=a.call(d,f,b)},g=function(a){var b,c=this,e=c.manifestModel.getValue(),f=e.Period_asArray;return b=d.call(this,f,a)},h=function(a){if(null===a)return null;var b,c,d,e=a.RepSwitchList;return null===e||e.length<=0?null:(b=e.length,c=b-1,d=e[c])},i=function(a){if(null===a)return null;var b,c,d,e=a.BufferLevel;return null===e||e.length<=0?null:(b=e.length,c=b-1,d=e[c])},j=function(a){if(null===a)return null;var b,c,d=a.PlayList;return null===d||d.length<=0?null:(b=d[d.length-1].trace,null===b||b.length<=0?null:c=b[b.length-1].playbackspeed)},k=function(a){if(null===a)return null;var b,c,d=a.HttpList,e=null;if(null===d||d.length<=0)return null;for(b=d.length,c=b-1;c>0;){if(d[c].responsecode){e=d[c];break}c-=1}return e},l=function(a){return null===a?[]:a.HttpList?a.HttpList:[]},m=function(a){if(null===a)return null;var b,c,d,e=a.DroppedFrames;return null===e||e.length<=0?null:(b=e.length,c=b-1,d=e[c])},n=function(a){if(null===a)return null;var b,c,d,e=a.SchedulingInfo;return null===e||e.length<=0?null:(b=e.length,c=b-1,d=e[c])},o=function(a){if(null===a)return null;var b,c,d,e=a.ManifestUpdate;return null===e||e.length<=0?null:(b=e.length,c=b-1,d=e[c])},p=function(a){if(null===a)return null;var b,c=a.DVRInfo,d=null;return null===c||c.length<=0?null:(b=c.length-1,d=c[b])},q=function(a,b){if(null===a)return null;var c,d=l(a),e=d[d.length-1];return"MPD"===e.type&&(c=s(e.responseHeaders,b)),void 0===c[b]?null:c[b]},r=function(a,b){if(null===a)return null;var c,d=k(a);return null===d||null===d.responseHeaders?null:(c=s(d.responseHeaders,b),void 0===c[b]?null:c[b])},s=function(a){var b={};if(!a)return b;for(var c=a.split("\r\n"),d=0,e=c.length;e>d;d++){var f=c[d],g=f.indexOf(": ");g>0&&(b[f.substring(0,g)]=f.substring(g+2))}return b};return{manifestModel:void 0,manifestExt:void 0,getBandwidthForRepresentation:e,getIndexForRepresentation:f,getMaxIndexForBufferType:g,getCurrentRepresentationSwitch:h,getCurrentBufferLevel:i,getCurrentPlaybackRate:j,getCurrentHttpRequest:k,getHttpRequests:l,getCurrentDroppedFrames:m,getCurrentSchedulingInfo:n,getCurrentDVRInfo:p,getCurrentManifestUpdate:o,getLatestFragmentRequestHeaderValueByID:r,getLatestMPDRequestHeaderValueByID:q}},Dash.dependencies.DashMetricsExtensions.prototype={constructor:Dash.dependencies.DashMetricsExtensions},Dash.dependencies.FragmentExtensions=function(){"use strict";var a=function(a){for(var b,c,d,e,f,g,h=new DataView(a),i=0;"tfdt"!==e&&i<h.byteLength;){for(d=h.getUint32(i),i+=4,e="",f=0;4>f;f+=1)g=h.getInt8(i),e+=String.fromCharCode(g),i+=1;"moof"!==e&&"traf"!==e&&"tfdt"!==e&&(i+=d-8)}if(i===h.byteLength)throw"Error finding live offset.";return c=h.getUint8(i),this.debug.log("position: "+i),0===c?(i+=4,b=h.getUint32(i,!1)):(i+=d-16,b=utils.Math.to64BitNumber(h.getUint32(i+4,!1),h.getUint32(i,!1))),{version:c,base_media_decode_time:b}},b=function(a){for(var b,c,d,e,f,g,h,i=new DataView(a),j=0;"sidx"!==f&&j<i.byteLength;){for(g=i.getUint32(j),j+=4,f="",e=0;4>e;e+=1)h=i.getInt8(j),f+=String.fromCharCode(h),j+=1;"moof"!==f&&"traf"!==f&&"sidx"!==f?j+=g-8:"sidx"===f&&(j-=8)}return b=i.getUint8(j+8),j+=12,c=i.getUint32(j+4,!1),j+=8,d=0===b?i.getUint32(j,!1):utils.Math.to64BitNumber(i.getUint32(j+4,!1),i.getUint32(j,!1)),{earliestPresentationTime:d,timescale:c}},c=function(b){var c,d=this,e=new XMLHttpRequest,f=b,g=!1,h="Error loading fragment: "+f,i=new MediaPlayer.vo.Error(null,h,null);e.onloadend=function(){g||(h="Error loading fragment: "+f,d.notify(Dash.dependencies.FragmentExtensions.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,{fragment:null},i))},e.onload=function(){g=!0,c=a(e.response),d.notify(Dash.dependencies.FragmentExtensions.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,{fragment:c})},e.onerror=function(){h="Error loading fragment: "+f,d.notify(Dash.dependencies.FragmentExtensions.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,{fragment:null},i)},e.responseType="arraybuffer",e.open("GET",f),e.send(null)};return{debug:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,loadFragment:c,parseTFDT:a,parseSIDX:b}},Dash.dependencies.FragmentExtensions.prototype={constructor:Dash.dependencies.FragmentExtensions},Dash.dependencies.FragmentExtensions.eventList={ENAME_FRAGMENT_LOADING_COMPLETED:"fragmentLoadingCompleted"},Dash.vo.AdaptationSet=function(){"use strict";this.period=null,this.index=-1,this.type=null},Dash.vo.AdaptationSet.prototype={constructor:Dash.vo.AdaptationSet},Dash.vo.Event=function(){"use strict";this.duration=0/0,this.presentationTime=0/0,this.id=0/0,this.messageData="",this.eventStream=null,this.presentationTimeDelta=0/0},Dash.vo.Event.prototype={constructor:Dash.vo.Event},Dash.vo.EventStream=function(){"use strict";this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""},Dash.vo.EventStream.prototype={constructor:Dash.vo.EventStream},Dash.vo.Mpd=function(){"use strict";this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.checkTime=0/0,this.clientServerTimeShift=0,this.isClientServerTimeSyncCompleted=!1},Dash.vo.Mpd.prototype={constructor:Dash.vo.Mpd},Dash.vo.Period=function(){"use strict";this.id=null,this.index=-1,this.duration=0/0,this.start=0/0,this.mpd=null},Dash.vo.Period.prototype={constructor:Dash.vo.Period},Dash.vo.Representation=function(){"use strict";this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.segmentDuration=0/0,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=0/0,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0},Dash.vo.Representation.prototype={constructor:Dash.vo.Representation},Dash.vo.Segment=function(){"use strict";this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=0/0,this.replacementTime=null,this.replacementNumber=0/0,this.mediaStartTime=0/0,this.presentationStartTime=0/0,this.availabilityStartTime=0/0,this.availabilityEndTime=0/0,this.availabilityIdx=0/0,this.wallStartTime=0/0,this.representation=null},Dash.vo.Segment.prototype={constructor:Dash.vo.Segment},Dash.vo.UTCTiming=function(){"use strict";this.schemeIdUri="",this.value=""},Dash.vo.UTCTiming.prototype={constructor:Dash.vo.UTCTiming},MediaPlayer.dependencies.ErrorHandler=function(){"use strict";return{eventBus:void 0,capabilityError:function(a){this.eventBus.dispatchEvent({type:"error",error:"capability",event:a})},downloadError:function(a,b,c){this.eventBus.dispatchEvent({type:"error",error:"download",event:{id:a,url:b,request:c}})},manifestError:function(a,b,c){this.eventBus.dispatchEvent({type:"error",error:"manifestError",event:{message:a,id:b,manifest:c}})},closedCaptionsError:function(a,b,c){this.eventBus.dispatchEvent({type:"error",error:"cc",event:{message:a,id:b,cc:c}})},mediaSourceError:function(a){this.eventBus.dispatchEvent({type:"error",error:"mediasource",event:a})},mediaKeySessionError:function(a){this.eventBus.dispatchEvent({type:"error",error:"key_session",event:a})},mediaKeyMessageError:function(a){this.eventBus.dispatchEvent({type:"error",error:"key_message",event:a})},mediaKeySystemSelectionError:function(a){this.eventBus.dispatchEvent({type:"error",error:"key_system_selection",event:a})}}},MediaPlayer.dependencies.ErrorHandler.prototype={constructor:MediaPlayer.dependencies.ErrorHandler},MediaPlayer.dependencies.FragmentLoader=function(){"use strict";var a=3,b=500,c=[],d=function(a,e){var f=new XMLHttpRequest,g=null,h=!0,i=!0,j=null,k=this;c.push(f),a.requestStartDate=new Date,g=k.metricsModel.addHttpRequest(a.mediaType,null,a.type,a.url,null,a.range,a.requestStartDate,null,null,null,null,a.duration,null),k.metricsModel.appendHttpTrace(g,a.requestStartDate,a.requestStartDate.getTime()-a.requestStartDate.getTime(),[0]),j=a.requestStartDate,f.open("GET",k.requestModifierExt.modifyRequestURL(a.url),!0),f.responseType="arraybuffer",f=k.requestModifierExt.modifyRequestHeader(f),a.range&&f.setRequestHeader("Range","bytes="+a.range),f.onprogress=function(b){var c=new Date;h&&(h=!1,(!b.lengthComputable||b.lengthComputable&&b.total!=b.loaded)&&(a.firstByteDate=c,g.tresponse=c)),k.metricsModel.appendHttpTrace(g,c,c.getTime()-j.getTime(),[f.response?f.response.byteLength:0]),j=c},f.onload=function(){if(!(f.status<200||f.status>299)){i=!1;var b,c,d=new Date,e=f.response;a.firstByteDate||(a.firstByteDate=a.requestStartDate),a.requestEndDate=d,b=a.firstByteDate.getTime()-a.requestStartDate.getTime(),c=a.requestEndDate.getTime()-a.firstByteDate.getTime(),k.debug.log("loaded "+a.mediaType+":"+a.type+":"+a.startTime+" ("+f.status+", "+b+"ms, "+c+"ms)"),g.tresponse=a.firstByteDate,g.tfinish=a.requestEndDate,g.responsecode=f.status,g.responseHeaders=f.getAllResponseHeaders(),k.metricsModel.appendHttpTrace(g,d,d.getTime()-j.getTime(),[e?e.byteLength:0]),j=d,k.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED,{request:a,response:e})}},f.onloadend=f.onerror=function(){if(-1!==c.indexOf(f)&&(c.splice(c.indexOf(f),1),i)){i=!1;var h,l,m=new Date,n=f.response;a.firstByteDate||(a.firstByteDate=a.requestStartDate),a.requestEndDate=m,h=a.firstByteDate.getTime()-a.requestStartDate.getTime(),l=a.requestEndDate.getTime()-a.firstByteDate.getTime(),k.debug.log("failed "+a.mediaType+":"+a.type+":"+a.startTime+" ("+f.status+", "+h+"ms, "+l+"ms)"),g.tresponse=a.firstByteDate,g.tfinish=a.requestEndDate,g.responsecode=f.status,k.metricsModel.appendHttpTrace(g,m,m.getTime()-j.getTime(),[n?n.byteLength:0]),j=m,e>0?(k.debug.log("Failed loading fragment: "+a.mediaType+":"+a.type+":"+a.startTime+", retry in "+b+"ms attempts: "+e),e--,setTimeout(function(){d.call(k,a,e)},b)):(k.debug.log("Failed loading fragment: "+a.mediaType+":"+a.type+":"+a.startTime+" no retry attempts left"),k.errHandler.downloadError("content",a.url,f),k.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED,{request:a,bytes:null},new MediaPlayer.vo.Error(null,"failed loading fragment",null)))}},f.send()},e=function(a){var b=this,c=new XMLHttpRequest,d=!1;c.open("HEAD",a.url,!0),c.onload=function(){c.status<200||c.status>299||(d=!0,b.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED,{request:a,exists:!0}))},c.onloadend=c.onerror=function(){d||b.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED,{request:a,exists:!1})},c.send()};return{metricsModel:void 0,errHandler:void 0,debug:void 0,requestModifierExt:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,load:function(b){b?d.call(this,b,a):this.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED,{request:b,bytes:null},new MediaPlayer.vo.Error(null,"request is null",null))},checkForExistence:function(a){return a?void e.call(this,a):void this.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED,{request:a,exists:!1})},abort:function(){var a,b,d=c.length;for(a=0;d>a;a+=1)b=c[a],c[a]=null,b.abort(),b=null;c=[]}}},MediaPlayer.dependencies.FragmentLoader.prototype={constructor:MediaPlayer.dependencies.FragmentLoader},MediaPlayer.dependencies.FragmentLoader.eventList={ENAME_LOADING_COMPLETED:"loadingCompleted",ENAME_CHECK_FOR_EXISTENCE_COMPLETED:"checkForExistenceCompleted"},MediaPlayer.dependencies.LiveEdgeFinder=function(){"use strict";var a,b=!1,c=0/0,d=MediaPlayer.rules.SynchronizationRulesCollection.prototype.BEST_GUESS_RULES,e=function(a){var b=a.value,d=((new Date).getTime()-c)/1e3;this.notify(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,{liveEdge:b,searchTime:d},null===b?new MediaPlayer.vo.Error(MediaPlayer.dependencies.LiveEdgeFinder.LIVE_EDGE_NOT_FOUND_ERROR_CODE,"live edge has not been found",null):null)},f=function(f){var g=this;!g.streamProcessor.isDynamic()||b||f.error||(a=g.synchronizationRulesCollection.getRules(d),b=!0,c=(new Date).getTime(),g.rulesController.applyRules(a,g.streamProcessor,e.bind(g),null,function(a,b){return b}))},g=function(a){d=a.error?MediaPlayer.rules.SynchronizationRulesCollection.prototype.BEST_GUESS_RULES:MediaPlayer.rules.SynchronizationRulesCollection.prototype.TIME_SYNCHRONIZED_RULES};return{system:void 0,synchronizationRulesCollection:void 0,rulesController:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED]=f,this[MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED]=g},initialize:function(a){this.streamProcessor=a,this.fragmentLoader=a.fragmentLoader},abortSearch:function(){b=!1,c=0/0}}},MediaPlayer.dependencies.LiveEdgeFinder.prototype={constructor:MediaPlayer.dependencies.LiveEdgeFinder},MediaPlayer.dependencies.LiveEdgeFinder.eventList={ENAME_LIVE_EDGE_SEARCH_COMPLETED:"liveEdgeFound"},MediaPlayer.dependencies.LiveEdgeFinder.LIVE_EDGE_NOT_FOUND_ERROR_CODE=1,MediaPlayer.dependencies.ManifestLoader=function(){"use strict";var a=3,b=500,c=function(a){var b=null;return-1!==a.indexOf("/")&&(-1!==a.indexOf("?")&&(a=a.substring(0,a.indexOf("?"))),b=a.substring(0,a.lastIndexOf("/")+1)),b},d=function(a,e){var f,g=c(a),h=new XMLHttpRequest,i=new Date,j=null,k=!0,l=null,m=null,n=this;l=function(){h.status<200||h.status>299||(k=!1,j=new Date,n.metricsModel.addHttpRequest("stream",null,"MPD",a,null,null,i,j,null,h.status,null,null,h.getAllResponseHeaders()),f=n.parser.parse(h.responseText,g),f?(f.url=a,f.loadedTime=j,n.metricsModel.addManifestUpdate("stream",f.type,i,j,f.availabilityStartTime),n.notify(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,{manifest:f})):n.notify(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,{manifest:null},new MediaPlayer.vo.Error(null,"Failed loading manifest: "+a,null)))},m=function(){k&&(k=!1,n.metricsModel.addHttpRequest("stream",null,"MPD",a,null,null,i,new Date,h.status,null,null,h.getAllResponseHeaders()),e>0?(n.debug.log("Failed loading manifest: "+a+", retry in "+b+"ms attempts: "+e),e--,setTimeout(function(){d.call(n,a,e)},b)):(n.debug.log("Failed loading manifest: "+a+" no retry attempts left"),n.errHandler.downloadError("manifest",a,h),n.notify(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED,null,new Error("Failed loading manifest: "+a+" no retry attempts left"))))};try{h.onload=l,h.onloadend=m,h.onerror=m,h.open("GET",n.requestModifierExt.modifyRequestURL(a),!0),h.send()}catch(o){h.onerror()}};return{debug:void 0,parser:void 0,errHandler:void 0,metricsModel:void 0,requestModifierExt:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,load:function(b){d.call(this,b,a)}}},MediaPlayer.dependencies.ManifestLoader.prototype={constructor:MediaPlayer.dependencies.ManifestLoader},MediaPlayer.dependencies.ManifestLoader.eventList={ENAME_MANIFEST_LOADED:"manifestLoaded"},MediaPlayer.dependencies.ManifestUpdater=function(){"use strict";var a=0/0,b=null,c=!1,d=!1,e=function(){null!==b&&(clearInterval(b),b=null)},f=function(){e.call(this),isNaN(a)||(this.debug.log("Refresh manifest in "+a+" seconds."),b=setTimeout(h.bind(this),Math.min(1e3*a,Math.pow(2,31)-1),this))},g=function(){var b,c,d=this,e=d.manifestModel.getValue();void 0!==e&&null!==e&&(b=d.manifestExt.getRefreshDelay(e),c=((new Date).getTime()-e.loadedTime.getTime())/1e3,a=Math.max(b-c,0),f.call(d))},h=function(){var a,b,c=this;d||(d=!0,a=c.manifestModel.getValue(),b=a.url,a.hasOwnProperty("Location")&&(b=a.Location),c.manifestLoader.load(b))},i=function(a){a.error||(this.manifestModel.setValue(a.data.manifest),this.debug.log("Manifest has been refreshed."),c||g.call(this))},j=function(){this.start()},k=function(){this.stop()},l=function(){d=!1};return{debug:void 0,system:void 0,manifestModel:void 0,manifestExt:void 0,manifestLoader:void 0,setup:function(){this[MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED]=l,this[MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED]=i,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED]=j,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED]=k},start:function(){c=!1,g.call(this)},stop:function(){c=!0,e.call(this)}}},MediaPlayer.dependencies.ManifestUpdater.prototype={constructor:MediaPlayer.dependencies.ManifestUpdater},MediaPlayer.dependencies.Notifier=function(){"use strict";var a,b=0,c=function(){return this.id||(b+=1,this.id="_id_"+b),this.id};return{system:void 0,setup:function(){a=this.system,a.mapValue("notify",this.notify),a.mapValue("subscribe",this.subscribe),a.mapValue("unsubscribe",this.unsubscribe)},notify:function(){var b=arguments[0]+c.call(this),d=new MediaPlayer.vo.Event;d.sender=this,d.type=arguments[0],d.data=arguments[1],d.error=arguments[2],d.timestamp=(new Date).getTime(),a.notify.call(a,b,d)},subscribe:function(b,d,e,f){if(!e&&d[b]&&(e=d[b]=d[b].bind(d)),!d)throw"observer object cannot be null or undefined";if(!e)throw"event handler cannot be null or undefined";b+=c.call(this),a.mapHandler(b,void 0,e,f)},unsubscribe:function(b,d,e){e=e||d[b],b+=c.call(this),a.unmapHandler(b,void 0,e)}}},MediaPlayer.dependencies.Notifier.prototype={constructor:MediaPlayer.dependencies.Notifier},MediaPlayer.dependencies.Stream=function(){"use strict";var a,b,c={},d=[],e=!0,f=!1,g=!1,h=!1,i=null,j=[],k=!0,l=null,m={},n=null,o=function(){f&&this.playbackController.start()},p=function(){this.playbackController.pause()},q=function(a){f&&(this.debug.log("Do seek: "+a),this.playbackController.seek(a))},r=function(a){try{var b=c.video,d=this.protectionExt.autoSelectKeySystem(this.protectionModel,b,a.data.initData);if(this.keySystem&&this.keySystem!==this.protectionModel.keySystem)throw new Error("DRM: Changing key systems within a single Period is not allowed!");this.keySystem||(this.keySystem=this.protectionModel.keySystem,this.protectionModel.keySystem.subscribe(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,this)),this.debug.log("DRM: Key required for - "+b.codec),this.protectionController.createKeySession(d,b.codec)}catch(e){this.errHandler.mediaKeySessionError(e.message),this.debug.log(e.message),this.reset()}},s=function(){this.debug.log("DRM: Key added.")
17
- },t=function(a){a.error?(p.call(this),this.debug.log(a.error),this.errHandler.mediaKeyMessageError(a.error)):(this.debug.log("DRM: License request successful. Session ID = "+a.data.requestData.sessionID),this.protectionController.updateKeySession(a.data.requestData,a.data.message))},u=function(a){var b,c=a.data.sessionToken,d=c.sessionID?c.sessionID:"NONE";b="DRM: MediaKeyError - sessionId: "+d+". "+a.data.error,this.debug.log(b),this.errHandler.mediaKeySessionError(b)},v=function(a){this.debug.log("DRM: Session created. SessionID = "+a.data.sessionID)},w=function(a){this.debug.log("DRM: Session loaded. SessionID = "+a.data.sessionID)},x=function(a){this.debug.log("DRM: Session unloaded. SessionID = "+a.data.sessionID)},y=function(a){this.debug.log("DRM: Session closed. SessionID = "+a.data.sessionID)},z=function(a,b){var c,d=this,e=function(f){d.debug.log("MediaSource is open!"),d.debug.log(f),window.URL.revokeObjectURL(c),a.removeEventListener("sourceopen",e),a.removeEventListener("webkitsourceopen",e),b(a)};a.addEventListener("sourceopen",e,!1),a.addEventListener("webkitsourceopen",e,!1),c=d.mediaSourceExt.attachMediaSource(a,d.videoModel)},A=function(){var e,g=this,k=d.length,l=0;for(l;k>l;l+=1)e=d[l],e.reset(h),e=null;n&&n.reset(),d=[],b&&g.mediaSourceExt.detachMediaSource(g.videoModel),f=!1,i=null,j=[],c={},b=null,a=null},B=function(a,e){var f,g,h,i=this,j=function(a){return a.codec},k=i.adapter.getMediaInfoForType(e,l,a);if("text"===a&&(j=function(a){return f=a.mimeType}),null!==k){var m,o=j.call(i,k),p=null;if(o===f)try{p=i.sourceBufferExt.createSourceBuffer(b,k)}catch(q){i.errHandler.mediaSourceError("Error creating "+a+" source buffer.")}else if(g=o,i.debug.log(a+" codec: "+g),c[a]=k,m=k.contentProtection,m&&!i.capabilities.supportsEncryptedMedia())i.errHandler.capabilityError("encryptedmedia");else if(i.capabilities.supportsCodec(i.videoModel.getElement(),g))try{p=i.sourceBufferExt.createSourceBuffer(b,k)}catch(q){i.errHandler.mediaSourceError("Error creating "+a+" source buffer.")}else{var r=a+"Codec ("+g+") is not supported.";i.errHandler.manifestError(r,"codec",e),i.debug.log(r)}null===p?i.debug.log("No buffer was created, skipping "+a+" data."):(h=i.system.getObject("streamProcessor"),d.push(h),h.initialize(f||a,p,i.videoModel,i.fragmentController,i.playbackController,b,i,n),h.setMediaInfo(k),i.adapter.updateData(h))}else i.debug.log("No "+a+" data.")},C=function(){var b,c=this;n=c.system.getObject("eventController"),n.initialize(c.videoModel),b=c.adapter.getEventsFor(l),n.addInlineEvents(b),B.call(c,"video",a),B.call(c,"audio",a),B.call(c,"text",a)},D=function(){var a,c,d=this;a=l.manifestInfo.duration,c=d.mediaSourceExt.setDuration(b,a),d.debug.log("Duration successfully set to: "+c),f=!0,G.call(d)},E=function(){this.debug.log("element loaded!"),g=!0,F.call(this)},F=function(){f&&g&&0===l.index&&(n.start(),e&&o.call(this))},G=function(){var a=this,b=d.length,c=!!m.audio||!!m.video,e=c?new MediaPlayer.vo.Error(MediaPlayer.dependencies.Stream.DATA_UPDATE_FAILED_ERROR_CODE,"Data update failed",null):null,g=0;if(f){for(g;b>g;g+=1)if(d[g].isUpdating())return;k=!1,a.notify(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED,null,e)}},H=function(a){var b=a.data.error.code,c="";if(-1!==b){switch(b){case 1:c="MEDIA_ERR_ABORTED";break;case 2:c="MEDIA_ERR_NETWORK";break;case 3:c="MEDIA_ERR_DECODE";break;case 4:c="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:c="MEDIA_ERR_ENCRYPTED"}h=!0,this.debug.log("Video Element Error: "+c),this.debug.log(a.error),this.errHandler.mediaSourceError(c),this.reset()}},I=function(c){var e,f=this,g=function(c){if(b=c,C.call(f),0===d.length){var e="No streams to play.";f.errHandler.manifestError(e,"nostreams",a),f.debug.log(e)}else f.liveEdgeFinder.initialize(d[0]),f.liveEdgeFinder.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,f.playbackController),D.call(f),F.call(f)};a=c,e=f.mediaSourceExt.createMediaSource(),z.call(f,e,g)},J=function(){var a=L(),c=a.length,d=0;for(d;c>d;d+=1)if(!a[d].isBufferingCompleted())return;b&&l.isLast&&this.mediaSourceExt.signalEndOfStream(b)},K=function(a){var b=a.sender.streamProcessor.getType();m[b]=a.error,G.call(this)},L=function(){var a,b,c=[],e=0,f=d.length;for(e;f>e;e+=1)b=d[e],a=b.getType(),("audio"===a||"video"===a)&&c.push(b);return c},M=function(b){var c,e,f,g=this,h=d.length,i=0;for(k=!0,a=g.manifestModel.getValue(),l=b,g.debug.log("Manifest updated... set new data on buffers."),n&&(e=g.adapter.getEventsFor(l),n.addInlineEvents(e)),i;h>i;i+=1)f=d[i],c=g.adapter.getMediaInfoForType(a,l,f.getType()),f.setMediaInfo(c),this.adapter.updateData(f)};return{system:void 0,manifestModel:void 0,mediaSourceExt:void 0,sourceBufferExt:void 0,adapter:void 0,fragmentController:void 0,playbackController:void 0,protectionExt:void 0,capabilities:void 0,debug:void 0,errHandler:void 0,liveEdgeFinder:void 0,abrController:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,eventList:{ENAME_STREAM_UPDATED:"streamUpdated"},setup:function(){this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED]=J,this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED]=K,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR]=H,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_METADATA_LOADED]=E,this[MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE]=t.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY]=r.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED]=s.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR]=u.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED]=v.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_LOADED]=w.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_UNLOADED]=x.bind(this),this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED]=y.bind(this)},load:function(a){I.call(this,a)},setVideoModel:function(a){this.videoModel=a},initProtection:function(){this.capabilities.supportsEncryptedMedia()&&(this.protectionModel=this.system.getObject("protectionModel"),this.protectionModel.init(this.getVideoModel()),this.protectionModel.setMediaElement(this.videoModel.getElement()),this.protectionController=this.system.getObject("protectionController"),this.protectionController.init(this.protectionModel),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY,this),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED,this),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR,this),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED,this),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_LOADED,this),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_UNLOADED,this),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED,this))},getVideoModel:function(){return this.videoModel},setAutoPlay:function(a){e=a},getAutoPlay:function(){return e},reset:function(){p.call(this),this.protectionModel&&(this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY,this),this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED,this),this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR,this),this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED,this),this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_LOADED,this),this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_UNLOADED,this),this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED,this),this.keySystem&&(this.keySystem.unsubscribe(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,this),this.keySystem=void 0),this.protectionController.teardown(),this.protectionModel.teardown(),this.protectionController=void 0,this.protectionModel=void 0),A.call(this),this.fragmentController=void 0,this.playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR,this),this.playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_METADATA_LOADED,this),this.playbackController.reset(),this.liveEdgeFinder.abortSearch(),this.liveEdgeFinder.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,this.playbackController),g=!1,m={}},getDuration:function(){return l.duration},getStartTime:function(){return l.start},getStreamIndex:function(){return l.index},getId:function(){return l.id},setStreamInfo:function(a){l=a},getStreamInfo:function(){return l},startEventController:function(){n.start()},resetEventController:function(){n.reset()},setPlaybackController:function(a){this.playbackController=a,a.initialize(l,this.videoModel)},getPlaybackController:function(){return this.playbackController},isUpdating:function(){return k},updateData:M,play:o,seek:q,pause:p}},MediaPlayer.dependencies.Stream.prototype={constructor:MediaPlayer.dependencies.Stream},MediaPlayer.dependencies.Stream.DATA_UPDATE_FAILED_ERROR_CODE=1,MediaPlayer.dependencies.Stream.eventList={ENAME_STREAM_UPDATED:"streamUpdated"},MediaPlayer.dependencies.StreamProcessor=function(){"use strict";var a,b,c,d,e,f=function(a){var b=this,c="video"===a||"audio"===a?"bufferController":"textController";return b.system.getObject(c)};return{system:void 0,indexHandler:void 0,liveEdgeFinder:void 0,timelineConverter:void 0,eventList:void 0,abrController:void 0,baseURLExt:void 0,adapter:void 0,initialize:function(c,g,h,i,j,k,l,m){var n,o=this,p=o.system.getObject("trackController"),q=o.system.getObject("scheduleController"),r=o.liveEdgeFinder,s=o.abrController,t=o.indexHandler,u=o.baseURLExt,v=this.system.getObject("fragmentLoader"),w=f.call(o,c);b=l,d=c,e=m,a=b.getStreamInfo().manifestInfo.isDynamic,o.bufferController=w,o.playbackController=j,o.scheduleController=q,o.trackController=p,o.videoModel=h,o.fragmentController=i,o.fragmentLoader=v,p.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,w),i.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED,w),"video"===d||"audio"===d?(s.subscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,w),s.subscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,p),s.subscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,q),r.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,this.timelineConverter),r.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,p),r.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,q),p.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED,q),p.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,q),p.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,s),p.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,b),j.streamProcessor||(j.streamProcessor=o,p.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,j)),i.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED,w),i.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START,q),i.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,q),i.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,w),i.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,q.scheduleRulesCollection.bufferLevelRule),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED,h),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED,q),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED,q),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED,q),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED,p),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED,q),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED,q),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED,b),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED,q),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN,q.scheduleRulesCollection.bufferLevelRule),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED,q.scheduleRulesCollection.bufferLevelRule),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED,j),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS,w),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED,w),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED,w),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED,q),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,w),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,q),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED,q),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,q.scheduleRulesCollection.playbackTimeRule),a&&j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,p),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,w),j.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,q),u.subscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED,t),u.subscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED,t)):w.subscribe(MediaPlayer.dependencies.TextController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED,q),t.initialize(this),w.initialize(d,g,k,o),q.initialize(d,this),n=this.getFragmentModel(),n.setLoader(v),n.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED,i),n.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,i),n.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED,i),n.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,q),v.subscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED,n),("video"===d||"audio"===d)&&(w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN,n),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED,n),w.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED,n)),p.initialize(this)},isUpdating:function(){return this.trackController.isUpdating()},getType:function(){return d},getFragmentLoader:function(){return this.fragmentLoader},getFragmentModel:function(){return this.scheduleController.getFragmentModel()},getPlaybackController:function(){return this.playbackController},getStreamInfo:function(){return b.getStreamInfo()},setMediaInfo:function(a){c=a},getMediaInfo:function(){return c},getScheduleController:function(){return this.scheduleController},getEventController:function(){return e},start:function(){this.scheduleController.start()},stop:function(){this.scheduleController.stop()},getCurrentTrack:function(){return this.adapter.getCurrentTrackInfo(this.trackController)},getTrackForQuality:function(a){return this.adapter.getTrackInfoForQuality(this.trackController,a)},isBufferingCompleted:function(){return this.bufferController.isBufferingCompleted()},isDynamic:function(){return a},reset:function(a){var c=this,d=c.bufferController,e=c.trackController,f=c.scheduleController,g=c.liveEdgeFinder,h=c.fragmentController,i=c.abrController,j=c.playbackController,k=this.indexHandler,l=this.baseURLExt,m=this.getFragmentModel(),n=this.fragmentLoader,o=c.videoModel;i.unsubscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,d),i.unsubscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,e),i.unsubscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,f),g.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,this.timelineConverter),g.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,f),g.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED,e),e.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED,f),e.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,d),e.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,f),e.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,i),e.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,b),e.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED,j),h.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED,d),h.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED,d),h.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START,f),h.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,f),h.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,d),h.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,f.scheduleRulesCollection.bufferLevelRule),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED,o),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED,f),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED,f),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED,f),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED,e),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED,f),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED,f),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED,b),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED,f),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN,f.scheduleRulesCollection.bufferLevelRule),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED,f.scheduleRulesCollection.bufferLevelRule),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED,j),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS,d),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED,d),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED,d),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED,f),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,d),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,f),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED,f),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,e),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,d),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,f),j.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,f.scheduleRulesCollection.playbackTimeRule),l.unsubscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED,k),l.unsubscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED,k),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN,m),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED,m),d.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED,m),m.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED,h),m.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,h),m.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED,h),m.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,f),n.unsubscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED,m),h.resetModel(m),k.reset(),this.bufferController.reset(a),this.scheduleController.reset(),this.bufferController=null,this.scheduleController=null,this.trackController=null,this.videoModel=null,this.fragmentController=null}}},MediaPlayer.dependencies.StreamProcessor.prototype={constructor:MediaPlayer.dependencies.StreamProcessor},MediaPlayer.utils.TTMLParser=function(){"use strict";var a,b=3600,c=60,d=/^(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])((\.[0-9][0-9][0-9])|(:[0-9][0-9]))$/,e=function(e){var f,g,h,i=d.test(e);if(!i)return 0/0;if(f=e.split(":"),g=parseFloat(f[0])*b+parseFloat(f[1])*c+parseFloat(f[2]),f[3]){if(h=a.tt.frameRate,!h||isNaN(h))return 0/0;g+=parseFloat(f[3])/h}return g},f=function(){var b=!1,c=a.hasOwnProperty("tt"),d=c?a.tt.hasOwnProperty("head"):!1,e=d?a.tt.head.hasOwnProperty("layout"):!1,f=d?a.tt.head.hasOwnProperty("styling"):!1,g=c?a.tt.hasOwnProperty("body"):!1,h=d?a.tt.head.hasOwnProperty("profile"):!1;return c&&d&&e&&f&&g&&(b=!0),b&&(b=h&&"http://www.w3.org/ns/ttml/profile/sdp-us"===a.tt.head.profile.use),b},g=function(a,b){var c=Object.keys(a).filter(function(c){return"xmlns"===c.split(":")[0]&&a[c]===b}).map(function(a){return a.split(":")[1]});return 1!=c.length?null:c[0]},h=function(b){var c,d,h,i,j,k,l,m=[],n=new X2JS([],"",!1);if(a=n.xml_str2json(b),!f())throw c="TTML document has incorrect structure";if(k=g(a.tt,"http://www.w3.org/ns/ttml#parameter"),a.tt.hasOwnProperty(k+":frameRate")&&(a.tt.frameRate=parseInt(a.tt[k+":frameRate"],10)),d=a.tt.body.div_asArray[0].p_asArray,!d||0===d.length)throw c="TTML document does not contain any cues";for(l=0;l<d.length;l+=1){if(h=d[l],i=e(h.begin),j=e(h.end),isNaN(i)||isNaN(j))throw c="TTML document has incorrect timing value";m.push({start:i,end:j,data:h.__text})}return m};return{parse:h}},MediaPlayer.dependencies.TextSourceBuffer=function(){var a,b;return{system:void 0,eventBus:void 0,errHandler:void 0,initialize:function(c,d){b=c,this.videoModel=d.videoModel,a=d.streamProcessor.getCurrentTrack().mediaInfo},append:function(b){var c,d,e,f=this,g=String.fromCharCode.apply(null,new Uint16Array(b));try{c=f.getParser().parse(g),d=a.id,e=a.lang,f.getTextTrackExtensions().addTextTrack(f.videoModel.getElement(),c,d,e,!0),f.eventBus.dispatchEvent({type:"updateend"})}catch(h){f.errHandler.closedCaptionsError(h,"parse",g)}},abort:function(){this.getTextTrackExtensions().deleteCues(this.videoModel.getElement())},getParser:function(){var a;return"text/vtt"===b?a=this.system.getObject("vttParser"):"application/ttml+xml"===b&&(a=this.system.getObject("ttmlParser")),a},getTextTrackExtensions:function(){return this.system.getObject("textTrackExtensions")},addEventListener:function(a,b,c){this.eventBus.addEventListener(a,b,c)},removeEventListener:function(a,b,c){this.eventBus.removeEventListener(a,b,c)}}},MediaPlayer.dependencies.TextSourceBuffer.prototype={constructor:MediaPlayer.dependencies.TextSourceBuffer},MediaPlayer.dependencies.TimeSyncController=function(){"use strict";var a=5e3,b=0,c=!1,d=!1,e=function(a){c=a},f=function(){return c},g=function(a){d=a},h=function(a){b=a},i=function(){return b},j=function(a){var b,c,d=60,e=60,f=1e3,g=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/,h=g.exec(a);return b=Date.UTC(parseInt(h[1],10),parseInt(h[2],10)-1,parseInt(h[3],10),parseInt(h[4],10),parseInt(h[5],10),h[6]&&(parseInt(h[6],10)||0),h[7]&&parseFloat(h[7])*f||0),h[9]&&h[10]&&(c=parseInt(h[9],10)*e+parseInt(h[10],10),b+=("+"===h[8]?-1:1)*c*d*f),new Date(b).getTime()},k=function(a){var b=Date.parse(a);return isNaN(b)&&(b=j(a)),b},l=function(a){return Date.parse(a)},m=function(a){return Date.parse(a)},n=function(a,b,c){c()},o=function(a,b,c){var d=k(a);return isNaN(d)?void c():void b(d)},p=function(b,c,d,e,f){var g,h,i=!1,j=new XMLHttpRequest,k=f?"HEAD":"GET",l=c.match(/\S+/g);c=l.shift(),g=function(){i||(i=!0,l.length?p(b,l.join(" "),d,e,f):e())},h=function(){var a,c;200===j.status&&(a=f?j.getResponseHeader("Date"):j.response,c=b(a),isNaN(c)||(d(c),i=!0))},j.open(k,c),j.timeout=a||0,j.onload=h,j.onloadend=g,j.send()},q=function(a,b,c){p.call(this,m,a,b,c,!0)},r={"urn:mpeg:dash:utc:http-head:2014":q,"urn:mpeg:dash:utc:http-xsdate:2014":p.bind(null,k),"urn:mpeg:dash:utc:http-iso:2014":p.bind(null,l),"urn:mpeg:dash:utc:direct:2014":o,"urn:mpeg:dash:utc:http-head:2012":q,"urn:mpeg:dash:utc:http-xsdate:2012":p.bind(null,k),"urn:mpeg:dash:utc:http-iso:2012":p.bind(null,l),"urn:mpeg:dash:utc:direct:2012":o,"urn:mpeg:dash:utc:http-ntp:2014":n,"urn:mpeg:dash:utc:ntp:2014":n,"urn:mpeg:dash:utc:sntp:2014":n},s=function(a,b){var c=this,d=b||0,f=a[d],g=function(a,b){var d=!a||!b;e(!1),c.notify(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,{time:a,offset:b},d?new MediaPlayer.vo.Error(MediaPlayer.dependencies.TimeSyncController.TIME_SYNC_FAILED_ERROR_CODE):null)};e(!0),f?r.hasOwnProperty(f.schemeIdUri)?r[f.schemeIdUri](f.value,function(a){var b=(new Date).getTime(),d=a-b;h(d),c.debug.log("Local time: "+new Date(b)),c.debug.log("Server time: "+new Date(a)),c.debug.log("Difference (ms): "+d),g.call(c,a,d)},function(){s.call(c,a,d+1)}):s.call(c,a,d+1):(h(0),g.call(c))};return{debug:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,getOffsetToDeviceTimeMs:function(){return i()},initialize:function(a){f()||(s.call(this,a),g(!0))},reset:function(){g(!1),e(!1)}}},MediaPlayer.dependencies.TimeSyncController.prototype={constructor:MediaPlayer.dependencies.TimeSyncController},MediaPlayer.dependencies.TimeSyncController.eventList={ENAME_TIME_SYNCHRONIZATION_COMPLETED:"timeSynchronizationComplete"},MediaPlayer.dependencies.TimeSyncController.TIME_SYNC_FAILED_ERROR_CODE=1,MediaPlayer.utils.VTTParser=function(){"use strict";var a=function(a){var b=a.split(":"),c=b.length-1;return a=60*parseInt(b[c-1],10)+parseFloat(b[c],10),2===c&&(a+=3600*parseInt(b[0],10)),a};return{parse:function(b){var c,d=/(?:\r\n|\r|\n)/gm,e=/-->/,f=/(^[\s]+|[\s]+$)/g,g=[];b=b.split(d),c=b.length;for(var h=0;c>h;h++){var i=b[h];if(i.length>0&&"WEBVTT"!==i&&i.match(e)){var j=i.split(e),k=b[h+1];g.push({start:a(j[0].replace(f,"")),end:a(j[1].replace(f,"")),data:k})}}return g}}},MediaPlayer.dependencies.AbrController=function(){"use strict";var a=!0,b={},c={},d={},e=function(a,b){var d;return c[b]=c[b]||{},c[b].hasOwnProperty(a)||(c[b][a]=0),d=c[b][a]},f=function(a,b,d){c[b]=c[b]||{},c[b][a]=d},g=function(a,b){var c;return d[b]=d[b]||{},d[b].hasOwnProperty(a)||(d[b][a]=0),c=d[b][a]},h=function(a,b,c){d[b]=d[b]||{},d[b][a]=c},i=function(a,c,d){b[c]=b[c]||{},b[c][a]=d},j=function(a,c){var d;return b[c]=b[c]||{},b[c].hasOwnProperty(a)||(b[c][a]=0),d=b[c][a]},k=function(a){if(!a.error){var b,c=this,d=this.adapter.convertDataToTrack(a.data.currentRepresentation).mediaInfo,e=d.type,f=d.streamInfo.id;b=d.trackCount-1,j(e,f)!==b&&(i(e,f,b),c.notify(MediaPlayer.dependencies.AbrController.eventList.ENAME_TOP_QUALITY_INDEX_CHANGED,{mediaType:e,streamInfo:d.streamInfo,maxIndex:b}))}};return{debug:void 0,adapter:void 0,abrRulesCollection:void 0,rulesController:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED]=k},getAutoSwitchBitrate:function(){return a},setAutoSwitchBitrate:function(b){a=b},getPlaybackQuality:function(b){var c,d,i,k,l=this,m=b.getType(),n=b.getStreamInfo().id,o=function(a){var g=j(m,n);c=a.value,k=a.confidence,0>c&&(c=0),c>g&&(c=g),d=e(m,n),c!==d&&(f(m,n,c),h(m,n,k),l.notify(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,{mediaType:m,streamInfo:b.getStreamInfo(),oldQuality:d,newQuality:c}))};c=e(m,n),k=g(m,n),a&&(i=l.abrRulesCollection.getRules(MediaPlayer.rules.ABRRulesCollection.prototype.QUALITY_SWITCH_RULES),l.rulesController.applyRules(i,b,o.bind(l),c,function(a,b){return a=a===MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE?0:a,Math.max(a,b)}))},setPlaybackQuality:function(a,c,d){var g=c.id,h=e(a,g),i=null!==d&&!isNaN(d)&&d%1===0;if(!i)throw"argument is not an integer";d!==h&&d>=0&&b[g].hasOwnProperty(a)&&d<=b[g][a]&&(f(a,c.id,d),this.notify(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED,{mediaType:a,streamInfo:c,oldQuality:h,newQuality:d}))},getQualityFor:function(a,b){return e(a,b.id)},getConfidenceFor:function(a,b){return g(a,b.id)},isPlayingAtTopQuality:function(a){var b,c=this,d=a.id,e=c.getQualityFor("audio",a),f=c.getQualityFor("video",a);return b=e===j("audio",d)&&f===j("video",d)},reset:function(){a=!0,b={},c={},d={}}}},MediaPlayer.dependencies.AbrController.prototype={constructor:MediaPlayer.dependencies.AbrController},MediaPlayer.dependencies.AbrController.eventList={ENAME_QUALITY_CHANGED:"qualityChanged",ENAME_TOP_QUALITY_INDEX_CHANGED:"topQualityIndexChanged"},MediaPlayer.dependencies.BufferController=function(){"use strict";var a,b,c,d,e=.5,f=[],g=0,h=-1,i=!1,j=0,k=0,l=Number.POSITIVE_INFINITY,m=-1,n=-1,o=null,p=null,q=!1,r=!1,s=[],t=!1,u=function(){var a=this.streamProcessor.getFragmentModel().getLoadingRequests();return h>g&&(v(s,h)||v(a,h))?!1:h!==g},v=function(a,b){var c=0,d=a.length;for(c;d>c;c+=1)if(a[c].quality===b)return!0;return!1},w=function(a,b){var c=function(a,c){return a[b]<c[b]?-1:a[b]>c[b]?1:0};a.sort(c)},x=function(a){var c=this;a.data.fragmentModel===c.streamProcessor.getFragmentModel()&&(c.debug.log("Initialization finished loading: "+b),f[a.data.quality]=a.data.bytes,a.data.quality===g&&u.call(c)&&Z.call(c))},y=function(a){if(a.data.fragmentModel===this.streamProcessor.getFragmentModel()){var b,c=a.data.bytes,d=a.data.quality,e=a.data.index,f=this.streamProcessor.getFragmentModel().getExecutedRequestForQualityAndIndex(d,e),g=this.streamProcessor.getTrackForQuality(d),h=this.adapter.getEventsFor(g.mediaInfo,this.streamProcessor),i=this.adapter.getEventsFor(g,this.streamProcessor);(h.length>0||i.length>0)&&(b=C.call(this,c,f,h,i),this.streamProcessor.getEventController().addInbandEvents(b)),c=D.call(this,c),s.push({bytes:c,quality:d,index:e}),w(s,"index"),Q.call(this)
18
- }},z=function(a,b,c){r=!0,d={quality:b,index:c};var e=this,f=isNaN(c);return b!==g&&f||b!==h&&!f?void S.call(e,b,c):void e.sourceBufferExt.append(o,a)},A=function(c){if(o===c.data.buffer){this.isBufferingCompleted()&&this.streamProcessor.getStreamInfo().isLast&&this.mediaSourceExt.signalEndOfStream(a);var e,f=this;if(c.error)return c.error.code===MediaPlayer.dependencies.SourceBufferExtensions.QUOTA_EXCEEDED_ERROR_CODE&&(s.unshift({bytes:c.data.bytes,quality:d.quality,index:d.index}),l=.8*J.call(f),f.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED,{criticalBufferLevel:l}),H.call(f)),void(r=!1);if(B.call(f),G.call(f)||(f.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED,{criticalBufferLevel:l}),H.call(f)),e=f.sourceBufferExt.getAllRanges(o),e&&e.length>0){var g,h;for(g=0,h=e.length;h>g;g+=1)f.debug.log("Buffered "+b+" Range: "+e.start(g)+" - "+e.end(g))}R.call(f,d.quality,d.index),f.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED,{quality:d.quality,index:d.index,bufferedRanges:e})}},B=function(){var a=this,b=a.playbackController.getTime();return j=a.sourceBufferExt.getBufferLength(o,b),a.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED,{bufferLevel:j}),E.call(a),L.call(a),e>j&&N.call(a,!1),!0},C=function(a,b,c,d){var e,f,g,h,i=[],j=0,k=Math.pow(256,2),l=Math.pow(256,3),m=Math.max(isNaN(b.startTime)?0:b.startTime,0),n=[];t=!1,h=c.concat(d);for(var o=0;o<h.length;o++)n[h[o].schemeIdUri]=h[o];for(;j<a.length&&(e=String.fromCharCode(a[j+4],a[j+5],a[j+6],a[j+7]),f=a[j]*l+a[j+1]*k+256*a[j+2]+1*a[j+3],"moov"!=e&&"moof"!=e);){if("emsg"==e){t=!0;for(var p=["","",0,0,0,0,""],q=0,r=j+12;f+j>r;)0===q||1==q||6==q?(0!==a[r]?p[q]+=String.fromCharCode(a[r]):q+=1,r+=1):(p[q]=a[r]*l+a[r+1]*k+256*a[r+2]+1*a[r+3],r+=4,q+=1);g=this.adapter.getEvent(p,n,m),g&&i.push(g)}j+=f}return i},D=function(a){if(!t)return a;for(var b,c,d=a.length,e=0,f=0,g=Math.pow(256,2),h=Math.pow(256,3),i=new Uint8Array(a.length);d>e;){if(b=String.fromCharCode(a[e+4],a[e+5],a[e+6],a[e+7]),c=a[e]*h+a[e+1]*g+256*a[e+2]+1*a[e+3],"emsg"!=b)for(var j=e;e+c>j;j++)i[f]=a[j],f+=1;e+=c}return i.subarray(0,f)},E=function(){var a=F.call(this),b=2*c,d=j-a;d>=b&&!q?(q=!0,this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN)):b/2>d&&q&&(this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED),q=!1,Q.call(this))},F=function(){var a=this.metricsModel.getReadOnlyMetricsFor("video"),b=this.metricsExt.getCurrentBufferLevel(a),c=this.metricsModel.getReadOnlyMetricsFor("audio"),d=this.metricsExt.getCurrentBufferLevel(c),e=null;return e=null===b||null===d?null!==d?d.level:null!==b?b.level:null:Math.min(d.level,b.level)},G=function(){var a=this,b=J.call(a);return l>b},H=function(){var b,c,d,e,f,g=this;o&&(b=g.playbackController.getTime(),f=g.fragmentController.getExecutedRequestForTime(g.streamProcessor.getFragmentModel(),b),d=f&&!isNaN(f.startTime)?f.startTime:Math.floor(b),e=g.sourceBufferExt.getBufferRange(o,b),null===e&&o.buffered.length>0&&(d=o.buffered.end(o.buffered.length-1)),c=o.buffered.start(0),g.sourceBufferExt.remove(o,c,d,a))},I=function(a){o===a.data.buffer&&(B.call(this),this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED,{from:a.data.from,to:a.data.to,hasEnoughSpaceToAppend:G.call(this)}),G.call(this)||setTimeout(H.bind(this),1e3*c))},J=function(){var a,b,c=this,d=c.sourceBufferExt.getAllRanges(o),e=0;if(!d)return e;for(b=0,a=d.length;a>b;b+=1)e+=d.end(b)-d.start(b);return e},K=function(){var a=m===n-1;a&&!i&&(i=!0,this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED))},L=function(){var a=this.playbackController.getTimeToStreamEnd();e>j&&a>c||c>=a&&!i?N.call(this,!1):N.call(this,!0)},M=function(){return p?MediaPlayer.dependencies.BufferController.BUFFER_LOADED:MediaPlayer.dependencies.BufferController.BUFFER_EMPTY},N=function(a){if(p!==a){p=a;var c=M();this.metricsModel.addBufferState(b,c,k),this.eventBus.dispatchEvent({type:c,data:{bufferType:b}}),this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED,{hasSufficientBuffer:a}),this.debug.log(p?"Got enough "+b+" buffer to start.":"Waiting for more "+b+" buffer before starting playback.")}},O=function(a){o.timestampOffset!==a&&(o.timestampOffset=a)},P=function(){var a=this,c=this.streamProcessor.getScheduleController().getFragmentToLoadCount(),d=this.streamProcessor.getCurrentTrack().fragmentDuration;B.call(a),k=c>0?c*d+j:k,this.metricsModel.addBufferState(b,M(),k),Q.call(a)},Q=function(){u.call(this)?Z.call(this):V.call(this)},R=function(a,b){r=!1,isNaN(b)?T.call(this,a):U.call(this,b),Q.call(this)},S=function(a,b){r=!1,this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED,{quality:a,index:b}),Q.call(this)},T=function(a){h=a},U=function(a){m=Math.max(a,m),K.call(this)},V=function(){var a;0===s.length||q||r||u.call(this)||!G.call(this)||(a=s.shift(),z.call(this,a.bytes,a.quality,a.index))},W=function(a){if(!a.error){var b,d=this;O.call(d,a.data.currentRepresentation.MSETimeOffset),b=d.streamProcessor.getStreamInfo().manifestInfo.minBufferTime,c!==b&&(d.setMinBufferTime(b),d.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_MIN_BUFFER_TIME_UPDATED,{minBufferTime:b}))}},X=function(a){var b=this;a.data.fragmentModel===b.streamProcessor.getFragmentModel()&&(n=a.data.request.index,K.call(b))},Y=function(a){if(b===a.data.mediaType&&this.streamProcessor.getStreamInfo().id===a.data.streamInfo.id){var c=this,d=a.data.newQuality;g!==d&&(O.call(c,c.streamProcessor.getTrackForQuality(d).MSETimeOffset),g=d,u.call(c)&&Z.call(c))}},Z=function(){var a=this;if(f[g]){if(r)return;z.call(a,f[g],g)}else a.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED,{requiredQuality:g})},$=function(){Q.call(this)},_=function(){L.call(this)};return{manifestModel:void 0,sourceBufferExt:void 0,eventBus:void 0,bufferMax:void 0,mediaSourceExt:void 0,metricsModel:void 0,metricsExt:void 0,adapter:void 0,scheduleRulesCollection:void 0,debug:void 0,system:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED]=W,this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED]=x,this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED]=y,this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED]=X,this[MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED]=Y,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS]=P,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING]=P,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED]=P,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED]=_,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED]=$,A=A.bind(this),I=I.bind(this),this.sourceBufferExt.subscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED,this,A),this.sourceBufferExt.subscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED,this,I)},initialize:function(a,c,d,e){var f=this;b=a,f.setMediaSource(d),f.setBuffer(c),f.streamProcessor=e,f.fragmentController=e.fragmentController,f.scheduleController=e.scheduleController,f.playbackController=e.playbackController},getStreamProcessor:function(){return this.streamProcessor},setStreamProcessor:function(a){this.streamProcessor=a},getBuffer:function(){return o},setBuffer:function(a){o=a},getBufferLevel:function(){return j},getMinBufferTime:function(){return c},setMinBufferTime:function(a){c=a},getCriticalBufferLevel:function(){return l},setMediaSource:function(b){a=b},isBufferingCompleted:function(){return i},reset:function(b){var e=this;f=[],l=Number.POSITIVE_INFINITY,p=null,c=null,h=-1,g=0,e.sourceBufferExt.unsubscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED,e,A),e.sourceBufferExt.unsubscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED,e,I),d=null,q=!1,r=!1,s=[],b||(e.sourceBufferExt.abort(a,o),e.sourceBufferExt.removeSourceBuffer(a,o)),o=null}}},MediaPlayer.dependencies.BufferController.BUFFER_SIZE_REQUIRED="required",MediaPlayer.dependencies.BufferController.BUFFER_SIZE_MIN="min",MediaPlayer.dependencies.BufferController.BUFFER_SIZE_INFINITY="infinity",MediaPlayer.dependencies.BufferController.DEFAULT_MIN_BUFFER_TIME=12,MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD=4,MediaPlayer.dependencies.BufferController.BUFFER_TIME_AT_TOP_QUALITY=30,MediaPlayer.dependencies.BufferController.BUFFER_TIME_AT_TOP_QUALITY_LONG_FORM=300,MediaPlayer.dependencies.BufferController.LONG_FORM_CONTENT_DURATION_THRESHOLD=600,MediaPlayer.dependencies.BufferController.RICH_BUFFER_THRESHOLD=20,MediaPlayer.dependencies.BufferController.BUFFER_LOADED="bufferLoaded",MediaPlayer.dependencies.BufferController.BUFFER_EMPTY="bufferStalled",MediaPlayer.dependencies.BufferController.prototype={constructor:MediaPlayer.dependencies.BufferController},MediaPlayer.dependencies.BufferController.eventList={ENAME_BUFFER_LEVEL_STATE_CHANGED:"bufferLevelStateChanged",ENAME_BUFFER_LEVEL_UPDATED:"bufferLevelUpdated",ENAME_QUOTA_EXCEEDED:"quotaExceeded",ENAME_BYTES_APPENDED:"bytesAppended",ENAME_BYTES_REJECTED:"bytesRejected",ENAME_BUFFERING_COMPLETED:"bufferingCompleted",ENAME_BUFFER_CLEARED:"bufferCleared",ENAME_INIT_REQUESTED:"initRequested",ENAME_BUFFER_LEVEL_OUTRUN:"bufferLevelOutrun",ENAME_BUFFER_LEVEL_BALANCED:"bufferLevelBalanced",ENAME_MIN_BUFFER_TIME_UPDATED:"minBufferTimeUpdated"},MediaPlayer.dependencies.EventController=function(){"use strict";var a=[],b=[],c=[],d=null,e=100,f=e/1e3,g="urn:mpeg:dash:event:2012",h=1,i=function(){null!==d&&(clearInterval(d),d=null),a=null,b=null,c=null},j=function(){null!==d&&(clearInterval(d),d=null)},k=function(){var a=this;a.debug.log("Start Event Controller"),isNaN(e)||(d=setInterval(n.bind(this),e))},l=function(b){var c=this;a=[],b&&b.length>0&&(a=b),c.debug.log("Added "+b.length+" inline events")},m=function(a){for(var c=this,d=0;d<a.length;d++){var e=a[d];b[e.id]=e,c.debug.log("Add inband event with id "+e.id)}},n=function(){o.call(this,b),o.call(this,a),p.call(this)},o=function(a){var b,d=this,e=this.videoModel.getCurrentTime();if(a)for(var i=0;i<a.length;i++){var j=a[i];void 0!==j&&(b=j.presentationTime/j.eventStream.timescale,(0===b||e>=b&&b+f>e)&&(d.debug.log("Start Event at "+e),j.duration>0&&c.push(j),j.eventStream.schemeIdUri==g&&j.eventStream.value==h&&q.call(this),a.splice(i,1)))}},p=function(){var a=this;if(c)for(var b=this.videoModel.getCurrentTime(),d=0;d<c.length;d++){var e=c[d];null!==e&&(e.duration+e.presentationTime)/e.eventStream.timescale<b&&(a.debug.log("Remove Event at time "+b),e=null,c.splice(d,1))}},q=function(){var a=this,b=a.manifestModel.getValue(),c=b.url;b.hasOwnProperty("Location")&&(c=b.Location),a.debug.log("Refresh manifest @ "+c),a.manifestLoader.load(c)};return{manifestModel:void 0,manifestLoader:void 0,debug:void 0,system:void 0,errHandler:void 0,videoModel:void 0,addInlineEvents:l,addInbandEvents:m,reset:i,clear:j,start:k,getVideoModel:function(){return this.videoModel},setVideoModel:function(a){this.videoModel=a},initialize:function(a){this.setVideoModel(a)}}},MediaPlayer.dependencies.EventController.prototype={constructor:MediaPlayer.dependencies.EventController},MediaPlayer.dependencies.FragmentController=function(){"use strict";var a=[],b=!1,c=function(b){for(var c=a.length,d=0;c>d;d++)if(a[d].getContext()==b)return a[d];return null},d=function(b,c){var d=this,e=a[0].getContext().streamProcessor,f=e.getStreamInfo().id,g=d.scheduleRulesCollection.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_EXECUTE_RULES);-1!==g.indexOf(this.scheduleRulesCollection.sameTimeRequestRule)&&this.scheduleRulesCollection.sameTimeRequestRule.setFragmentModels(a,f),d.rulesController.applyRules(g,e,c,b,function(a,b){return b})},e=function(a){var b=this,c=a.data.request;b.isInitializationRequest(c)?b.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADING_START,{request:c,fragmentModel:a.sender}):b.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START,{request:c,fragmentModel:a.sender})},f=function(a){var b=this,c=a.data.request,d=b.process(a.data.response);return null===d?void b.debug.log("No "+c.mediaType+" bytes to push."):(b.isInitializationRequest(c)?b.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED,{bytes:d,quality:c.quality,fragmentModel:a.sender}):b.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED,{bytes:d,quality:c.quality,index:c.index,fragmentModel:a.sender}),void j.call(this))},g=function(a){this.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED,{request:a.data.request,fragmentModel:a.sender})},h=function(){j.call(this)},i=function(c){var d,e,f,g,h,i=c.value;for(g=0;g<i.length;g+=1)if(e=i[g])for(h=0;h<a.length;h+=1)f=a[h],d=f.getContext().streamProcessor.getType(),e.mediaType===d&&(e instanceof MediaPlayer.vo.FragmentRequest||(e=f.getPendingRequestForTime(e.startTime)),f.executeRequest(e));b=!1},j=function(a){b||(b=!0,d.call(this,a,i.bind(this)))};return{system:void 0,debug:void 0,scheduleRulesCollection:void 0,rulesController:void 0,fragmentLoader:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED]=e,this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED]=f,this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED]=g,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED]=h},process:function(a){var b=null;return null!==a&&void 0!==a&&a.byteLength>0&&(b=new Uint8Array(a)),b},getModel:function(b){if(!b)return null;var d=c(b);return d||(d=this.system.getObject("fragmentModel"),d.setContext(b),a.push(d)),d},detachModel:function(b){var c=a.indexOf(b);c>-1&&a.splice(c,1)},isFragmentLoadedOrPending:function(a,b){var d,e=c(a);return e?d=e.isFragmentLoadedOrPending(b):!1},getPendingRequests:function(a){var b=c(a);return b?b.getPendingRequests():null},getLoadingRequests:function(a){var b=c(a);return b?b.getLoadingRequests():null},isInitializationRequest:function(a){return a&&a.type&&-1!==a.type.toLowerCase().indexOf("initialization")},getLoadingTime:function(a){var b=c(a);return b?b.getLoadingTime():null},getExecutedRequestForTime:function(a,b){return a?a.getExecutedRequestForTime(b):null},removeExecutedRequest:function(a,b){a&&a.removeExecutedRequest(b)},removeExecutedRequestsBeforeTime:function(a,b){a&&a.removeExecutedRequestsBeforeTime(b)},cancelPendingRequestsForModel:function(a){a&&a.cancelPendingRequests()},abortRequestsForModel:function(a){a&&a.abortRequests(),j.call(this)},prepareFragmentForLoading:function(a,b){var d=c(a);d&&b&&d.addRequest(b)&&j.call(this,b)},executePendingRequests:function(){j.call(this)},resetModel:function(a){this.abortRequestsForModel(a),this.cancelPendingRequestsForModel(a)}}},MediaPlayer.dependencies.FragmentController.prototype={constructor:MediaPlayer.dependencies.FragmentController},MediaPlayer.dependencies.FragmentController.eventList={ENAME_STREAM_COMPLETED:"streamCompleted",ENAME_INIT_FRAGMENT_LOADING_START:"initFragmentLoadingStart",ENAME_MEDIA_FRAGMENT_LOADING_START:"mediaFragmentLoadingStart",ENAME_INIT_FRAGMENT_LOADED:"initFragmentLoaded",ENAME_MEDIA_FRAGMENT_LOADED:"mediaFragmentLoaded"},MediaPlayer.dependencies.PlaybackController=function(){"use strict";var a,b,c,d,e=1e3,f=0,g=0/0,h=null,i=null,j=function(a){var b,c=parseInt(this.uriQueryFragModel.getURIFragmentData.s);return d?(!isNaN(c)&&c>1262304e3&&(b=c-a.manifestInfo.availableFrom.getTime()/1e3,(b>g||b<g-a.manifestInfo.DVRWindowSize)&&(b=null)),b=b||g):b=!isNaN(c)&&c<a.duration&&c>=0?c:a.start,b},k=function(b){var d,e=this,f=e.metricsModel.getMetricsFor(c.mediaInfo.type),g=e.metricsExt.getCurrentDVRInfo(f),h=g?g.range:null;return h?b>=h.start&&b<=h.end?b:d=Math.max(h.end-2*a.manifestInfo.minBufferTime,h.start):0/0},l=function(){if(null===h){var a=this,b=function(){C.call(a)};h=setInterval(b,e)}},m=function(){clearInterval(h),h=null},n=function(){var b=j.call(this,a);this.debug.log("Starting playback at offset: "+b),this.seek(b)},o=function(){if(!this.isPaused()&&d){var a=this.getTime(),b=k.call(this,a),c=!isNaN(b)&&b!==a;c&&this.seek(b)}},p=function(b){b.error||(c=this.adapter.convertDataToTrack(b.data.currentRepresentation),a=c.mediaInfo.streamInfo,d=b.sender.streamProcessor.isDynamic(),o.call(this))},q=function(a){a.error||0===b.getElement().readyState||n.call(this)},r=function(){b&&(b.unlisten("play",s),b.unlisten("pause",t),b.unlisten("error",B),b.unlisten("seeking",u),b.unlisten("seeked",v),b.unlisten("timeupdate",w),b.unlisten("progress",x),b.unlisten("ratechange",y),b.unlisten("loadedmetadata",z),b.unlisten("ended",A))},s=function(){o.call(this),l.call(this),this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED,{startTime:this.getTime()})},t=function(){this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED)},u=function(){l.call(this),this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,{seekTime:this.getTime()})},v=function(){this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKED)},w=function(){var a=this.getTime();a!==f&&(f=a,this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED,{timeToEnd:this.getTimeToStreamEnd()}))},x=function(){var c,d,e,f=b.getElement().buffered;f.length&&(c=f.length-1,d=f.end(c),e=j.call(this,a)+a.duration-d),this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS,{bufferedRanges:b.getElement().buffered,remainingUnbufferedDuration:e})},y=function(){this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED)},z=function(){this.debug.log("Got loadmetadata event."),(!d||this.timelineConverter.isTimeSyncCompleted())&&n.call(this),this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_METADATA_LOADED),l.call(this)},A=function(){this.debug.log("Got ended event."),m.call(this)},B=function(a){this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR,{error:a.srcElement.error})},C=function(){this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED,{isDynamic:d,time:new Date})},D=function(b){var d,e,f=b.data.bufferedRanges,g=i,h=j.call(this,a);f&&f.length&&(d=f.start(0),i=null===i?d:Math.max(i,d),g!==i&&(e=this.adapter.getFragmentRequestForTime(b.sender.streamProcessor,c,h,{keepIdx:!1}),e&&e.index===b.data.index&&this.seek(i)))},E=function(a){b=a,b.listen("play",s),b.listen("pause",t),b.listen("error",B),b.listen("seeking",u),b.listen("seeked",v),b.listen("timeupdate",w),b.listen("progress",x),b.listen("ratechange",y),b.listen("loadedmetadata",z),b.listen("ended",A)};return{debug:void 0,timelineConverter:void 0,uriQueryFragModel:void 0,metricsModel:void 0,metricsExt:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,adapter:void 0,setup:function(){this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED]=p,this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED]=q,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED]=D,s=s.bind(this),t=t.bind(this),B=B.bind(this),u=u.bind(this),v=v.bind(this),w=w.bind(this),x=x.bind(this),y=y.bind(this),z=z.bind(this),A=A.bind(this)},initialize:function(c,d){a=c,b!==d&&(r.call(this),E.call(this,d))},getTimeToStreamEnd:function(){var c=b.getCurrentTime();return j.call(this,a)+a.duration-c},getStreamId:function(){return a.id},getStreamDuration:function(){return a.duration},getTime:function(){return b.getCurrentTime()},getPlaybackRate:function(){return b.getPlaybackRate()},setLiveStartTime:function(a){g=a},getLiveStartTime:function(){return g},start:function(){b.play()},isPaused:function(){return b.isPaused()},pause:function(){b&&b.pause()},isSeeking:function(){return b.getElement().seeking},seek:function(a){a!==this.getTime()&&b.setCurrentTime(a)},reset:function(){m.call(this),r.call(this),b=null,a=null,f=0,g=0/0,i=null}}},MediaPlayer.dependencies.PlaybackController.prototype={constructor:MediaPlayer.dependencies.PlaybackController},MediaPlayer.dependencies.PlaybackController.eventList={ENAME_PLAYBACK_STARTED:"playbackStarted",ENAME_PLAYBACK_STOPPED:"playbackStopped",ENAME_PLAYBACK_PAUSED:"playbackPaused",ENAME_PLAYBACK_SEEKING:"playbackSeeking",ENAME_PLAYBACK_SEEKED:"playbackSeeked",ENAME_PLAYBACK_TIME_UPDATED:"playbackTimeUpdated",ENAME_PLAYBACK_PROGRESS:"playbackProgress",ENAME_PLAYBACK_RATE_CHANGED:"playbackRateChanged",ENAME_PLAYBACK_METADATA_LOADED:"playbackMetaDataLoaded",ENAME_PLAYBACK_ERROR:"playbackError",ENAME_WALLCLOCK_TIME_UPDATED:"wallclockTimeUpdated"},MediaPlayer.dependencies.ProtectionController=function(){"use strict";var a=null,b=function(a){if(a.error)this.debug.log(a.error);else{var b=a.data;this.protectionModel.keySystem.doLicenseRequest(b.message,b.defaultURL,b.sessionToken)}};return{system:void 0,debug:void 0,protectionExt:void 0,setup:function(){this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE]=b.bind(this)},init:function(b){this.protectionModel=b,a=this.protectionExt.getKeySystems(),this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE,this)},teardown:function(){this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE,this)},selectKeySystem:function(a,b){this.protectionExt.autoSelectKeySystem(a,b)},createKeySession:function(a,b){this.protectionModel.createKeySession(a,b,"cenc")},updateKeySession:function(a,b){this.protectionModel.updateKeySession(a,b)}}},MediaPlayer.dependencies.ProtectionController.prototype={constructor:MediaPlayer.dependencies.ProtectionController},MediaPlayer.dependencies.ScheduleController=function(){"use strict";var a,b,c,d,e,f=0,g=!0,h=null,i=0,j=!1,k=null,l=null,m=!0,n=function(a,b){var c=0,d=null;m===!1&&(d=l.start,c=a.getTime()-d.getTime(),l.duration=c,l.stopreason=b,m=!0)},o=function(){b&&(j=!1,g&&(g=!1),this.debug.log("ScheduleController "+a+" start."),x.call(this))},p=function(){g&&(s.call(this,e.quality),L.call(this,MediaPlayer.vo.metrics.PlayList.INITIAL_PLAY_START_REASON)),o.call(this)},q=function(b){j||(j=!0,this.debug.log("ScheduleController "+a+" stop."),b&&this.fragmentController.cancelPendingRequestsForModel(c),n(new Date,MediaPlayer.vo.metrics.PlayList.Trace.USER_REQUEST_STOP_REASON))},r=function(a){var b=this,c=b.scheduleRulesCollection.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.NEXT_FRAGMENT_RULES);b.rulesController.applyRules(c,b.streamProcessor,a,null,function(a,b){return b})},s=function(a){var b,c=this;return b=c.adapter.getInitRequest(c.streamProcessor,a),null!==b&&c.fragmentController.prepareFragmentForLoading(c,b),b},t=function(a){var b=this,c=b.scheduleRulesCollection.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_SCHEDULE_RULES);b.rulesController.applyRules(c,b.streamProcessor,a,f,function(a,b){return a=a===MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE?0:a,Math.max(a,b)})},u=function(a){var b,c,d,f=a.length,g=.1;for(d=0;f>d;d+=1)b=a[d],c=b.startTime+b.duration/2+g,b=this.adapter.getFragmentRequestForTime(this.streamProcessor,e,c,{timeThreshold:0}),this.fragmentController.prepareFragmentForLoading(this,b)},v=function(a){var b=this;return f=a.value,0>=f?void b.fragmentController.executePendingRequests():void r.call(b,w.bind(b))},w=function(a){var b=a.value;null===b||b instanceof MediaPlayer.vo.FragmentRequest||(b=this.adapter.getFragmentRequestForTime(this.streamProcessor,e,b.startTime)),b?(f--,this.fragmentController.prepareFragmentForLoading(this,b)):this.fragmentController.executePendingRequests()},x=function(){var a=(new Date).getTime(),b=h?a-h>this.fragmentController.getLoadingTime(this):!0,c=1e3;a-i>c&&(i=a,this.abrController.getPlaybackQuality(this.streamProcessor)),!b||j||this.playbackController.isPaused()&&(!this.scheduleWhilePaused||d)||(h=a,t.call(this,v.bind(this)))},y=function(){var b=this;null!==a&&""!==a&&b.metricsModel.clearCurrentMetricsForType(a)},z=function(a){a.error||(e=this.adapter.convertDataToTrack(a.data.currentRepresentation),d||(b=!0),b&&p.call(this))},A=function(b){b.data.fragmentModel===this.streamProcessor.getFragmentModel()&&(this.debug.log(a+" Stream is complete."),n(new Date,MediaPlayer.vo.metrics.PlayList.Trace.END_OF_CONTENT_STOP_REASON))},B=function(a){var b=this;a.data.fragmentModel===b.streamProcessor.getFragmentModel()&&x.call(b)},C=function(a){a.error&&q.call(this)},D=function(){M.call(this)},E=function(){q.call(this,!1)},F=function(a){s.call(this,a.data.requiredQuality)},G=function(a){this.fragmentController.removeExecutedRequestsBeforeTime(c,a.data.to),a.data.hasEnoughSpaceToAppend&&o.call(this)},H=function(b){var c=this;b.data.hasSufficientBuffer||c.playbackController.isSeeking()||(c.debug.log("Stalling "+a+" Buffer: "+a),n(new Date,MediaPlayer.vo.metrics.PlayList.Trace.REBUFFERING_REASON))},I=function(b){var c=this;c.metricsModel.addBufferLevel(a,new Date,b.data.bufferLevel),x.call(this)},J=function(){q.call(this,!1)},K=function(b){if(a===b.data.mediaType&&this.streamProcessor.getStreamInfo().id===b.data.streamInfo.id){var d,f=this;if(d=c.cancelPendingRequests(b.data.oldQuality),e=f.streamProcessor.getTrackForQuality(b.data.newQuality),null===e||void 0===e)throw"Unexpected error!";u.call(f,d),n(new Date,MediaPlayer.vo.metrics.PlayList.Trace.REPRESENTATION_SWITCH_STOP_REASON)}},L=function(b){var c=new Date,d=this.playbackController.getTime();n(c,MediaPlayer.vo.metrics.PlayList.Trace.USER_REQUEST_STOP_REASON),k=this.metricsModel.addPlayList(a,c,d,b)},M=function(){var a=this,b=a.playbackController.getTime(),c=a.playbackController.getPlaybackRate(),d=new Date;m===!0&&e&&k&&(m=!1,l=a.metricsModel.appendPlayListTrace(k,e.id,null,d,b,null,c,null))},N=function(a){var b=this,d=s.call(b,a.data.CCIndex);c.executeRequest(d)},O=function(){o.call(this)},P=function(b){g||this.fragmentController.cancelPendingRequestsForModel(c);var d=this.metricsModel.getMetricsFor("stream"),f=this.metricsExt.getCurrentManifestUpdate(d);this.debug.log("ScheduleController "+a+" seek: "+b.data.seekTime),L.call(this,MediaPlayer.vo.metrics.PlayList.SEEK_START_REASON),this.metricsModel.updateManifestUpdateInfo(f,{latency:e.DVRWindow.end-this.playbackController.getTime()})},Q=function(){M.call(this)},R=function(){x.call(this)},S=function(a){if(!a.error){var c,d,f=this,g=a.data.liveEdge,h=e.mediaInfo.streamInfo.manifestInfo,i=g-Math.min(2*h.minBufferTime,h.DVRWindowSize/2),j=f.metricsModel.getMetricsFor("stream"),k=f.metricsExt.getCurrentManifestUpdate(j),l=f.playbackController.getLiveStartTime();c=f.adapter.getFragmentRequestForTime(f.streamProcessor,e,i),d=c.startTime,(isNaN(l)||d>l)&&f.playbackController.setLiveStartTime(d),f.metricsModel.updateManifestUpdateInfo(k,{currentTime:d,presentationStartTime:g,latency:g-d,clientTimeOffset:f.timelineConverter.getClientTimeOffset()}),b=!0,p.call(f)}};return{debug:void 0,system:void 0,metricsModel:void 0,metricsExt:void 0,scheduleWhilePaused:void 0,timelineConverter:void 0,abrController:void 0,adapter:void 0,scheduleRulesCollection:void 0,rulesController:void 0,setup:function(){this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED]=S,this[MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED]=K,this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED]=E,this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED]=z,this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START]=B,this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED]=C,this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED]=A,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED]=G,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED]=D,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED]=H,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED]=I,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED]=F,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED]=J,this[MediaPlayer.dependencies.TextController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED]=N,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED]=O,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING]=P,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED]=Q,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED]=R},initialize:function(b,e){var f=this;a=b,f.streamProcessor=e,f.playbackController=e.playbackController,f.fragmentController=e.fragmentController,f.liveEdgeFinder=e.liveEdgeFinder,f.bufferController=e.bufferController,d=e.isDynamic(),c=this.fragmentController.getModel(this),f.scheduleRulesCollection.bufferLevelRule&&f.scheduleRulesCollection.bufferLevelRule.setScheduleController(f),f.scheduleRulesCollection.pendingRequestsRule&&f.scheduleRulesCollection.pendingRequestsRule.setScheduleController(f),f.scheduleRulesCollection.playbackTimeRule&&f.scheduleRulesCollection.playbackTimeRule.setScheduleController(f)},getFragmentModel:function(){return c},getFragmentToLoadCount:function(){return f},reset:function(){var a=this;q.call(a,!0),a.bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN,a.scheduleRulesCollection.bufferLevelRule),a.bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED,a.scheduleRulesCollection.bufferLevelRule),a.fragmentController.abortRequestsForModel(c),a.fragmentController.detachModel(c),y.call(a),f=0},start:o,stop:q}},MediaPlayer.dependencies.ScheduleController.prototype={constructor:MediaPlayer.dependencies.ScheduleController},MediaPlayer.dependencies.StreamController=function(){"use strict";var a,b=[],c=6,d=.2,e=!0,f=!1,g=function(){a.play()},h=function(){a.pause()},i=function(b){a.seek(b)},j=function(a,b){var c=a.getElement(),d=b.getElement();d.parentNode||c.parentNode.insertBefore(d,c),c.style.width="0px",d.style.width="100%",m(c,d)},k=function(a){var b=a.getPlaybackController();b.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED,this.manifestUpdater),b.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED,this.manifestUpdater),b.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,this),b.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED,this),b.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS,this)},l=function(a){var b=this,c=a.getPlaybackController();setTimeout(function(){c.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED,b.manifestUpdater),c.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED,b.manifestUpdater),c.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING,b),c.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED,b),c.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS,b)
19
- },1)},m=function(a,b){["controls","loop","muted","volume"].forEach(function(c){b[c]=a[c]})},n=function(a){!a.data.remainingUnbufferedDuration||a.data.remainingUnbufferedDuration>=c||q()},o=function(b){var c=this,e=c.videoExt.getPlaybackQuality(a.getVideoModel().getElement());e&&c.metricsModel.addDroppedFrames("video",e),r()&&(a.getVideoModel().getElement().seeking||b.data.timeToEnd<d&&v.call(this,a,r()))},p=function(b){var c=s(b.data.seekTime);c&&c!==a&&v.call(this,a,c,b.data.seekTime)},q=function(){var a=r();a&&a.seek(a.getStartTime())},r=function(){var c=a.getStreamIndex()+1;return c<b.length?b[c]:null},s=function(a){var c=0,d=null,e=b.length;e>0&&(c+=b[0].getStartTime());for(var f=0;e>f;f++)if(d=b[f],c+=d.getDuration(),c>a)return d;return null},t=function(){var a=this.system.getObject("videoModel"),b=document.createElement("video");return a.setElement(b),a},u=function(a){a.parentNode&&a.parentNode.removeChild(a)},v=function(b,c,d){!f&&b&&c&&b!==c&&(f=!0,b.pause(),a=c,j.call(this,b.getVideoModel(),c.getVideoModel()),l.call(this,b),k.call(this,c),i(d?b.getPlaybackController().getTime():c.getStartTime()),g(),b.resetEventController(),a.startEventController(),f=!1)},w=function(){var c,d,f,g,h,i,j,l,m=this,n=m.manifestModel.getValue(),o=m.metricsModel.getMetricsFor("stream"),p=m.metricsExt.getCurrentManifestUpdate(o),q=a?a.getVideoModel():m.getVideoModel();if(n){j=m.adapter.getStreamsInfo(n);try{if(0===j.length)throw new Error("There are no streams");for(m.metricsModel.updateManifestUpdateInfo(p,{currentTime:q.getCurrentTime(),buffered:q.getElement().buffered,presentationStartTime:j[0].start,clientTimeOffset:m.timelineConverter.getClientTimeOffset()}),h=0,f=j.length;f>h;h+=1){for(d=j[h],i=0,g=b.length;g>i;i+=1)b[i].getId()===d.id&&(l=b[i],l.updateData(d));l||(l=m.system.getObject("stream"),c=m.system.getObject("playbackController"),l.setStreamInfo(d),l.setVideoModel(0===h?m.videoModel:t.call(m)),l.setPlaybackController(c),c.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR,l),c.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_METADATA_LOADED,l),l.initProtection(),l.setAutoPlay(e),l.load(n),l.subscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED,m),b.push(l)),m.metricsModel.addManifestUpdateStreamInfo(p,d.id,d.index,d.start,d.duration),l=null}a||(a=b[0],k.call(m,a),a.subscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED,this.liveEdgeFinder))}catch(r){m.errHandler.manifestError(r.message,"nostreamscomposed",m.manifestModel.getValue()),m.reset()}}},x=function(){var a=this,c=b.length,d=0;for(d;c>d;d+=1)if(b[d].isUpdating())return;a.notify(MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED)},y=function(){w.call(this)},z=function(a){a.error?this.reset():(this.manifestModel.setValue(a.data.manifest),this.debug.log("Manifest has loaded."),this.timeSyncController.initialize(this.manifestExt.getUTCTimingSources(a.data.manifest)))};return{system:void 0,videoModel:void 0,manifestLoader:void 0,manifestUpdater:void 0,manifestModel:void 0,manifestExt:void 0,adapter:void 0,debug:void 0,metricsModel:void 0,metricsExt:void 0,videoExt:void 0,liveEdgeFinder:void 0,timelineConverter:void 0,protectionExt:void 0,timeSyncController:void 0,errHandler:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED]=z,this[MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED]=x,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING]=p,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS]=n,this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED]=o,this[MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED]=y},setAutoPlay:function(a){e=a},getAutoPlay:function(){return e},setProtectionData:function(a){this.protectionExt.init(a)},getVideoModel:function(){return this.videoModel},setVideoModel:function(a){this.videoModel=a},getActiveStreamInfo:function(){return a?a.getStreamInfo():null},initialize:function(){this.timeSyncController.subscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,this.timelineConverter),this.timeSyncController.subscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,this.liveEdgeFinder),this.timeSyncController.subscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,this)},load:function(a){this.manifestLoader.load(a)},reset:function(){a&&(l.call(this,a),a.getVideoModel()!==this.getVideoModel()&&j.call(this,a.getVideoModel(),this.getVideoModel())),this.timeSyncController.unsubscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,this.timelineConverter),this.timeSyncController.unsubscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,this.liveEdgeFinder),this.timeSyncController.unsubscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED,this),this.timeSyncController.reset();for(var c=0,d=b.length;d>c;c++){var e=b[c];e.unsubscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED,this),e.reset(),e.getVideoModel()!==this.getVideoModel()&&u(e.getVideoModel().getElement())}b=[],this.manifestUpdater.stop(),this.metricsModel.clearAllCurrentMetrics(),this.manifestModel.setValue(null),this.timelineConverter.reset(),this.adapter.reset(),f=!1,a=null},play:g,seek:i,pause:h}},MediaPlayer.dependencies.StreamController.prototype={constructor:MediaPlayer.dependencies.StreamController},MediaPlayer.dependencies.StreamController.eventList={ENAME_STREAMS_COMPOSED:"streamsComposed"},MediaPlayer.dependencies.TextController=function(){var a,b,c,d=!1,e=function(){d||(b.hasOwnProperty("initialize")&&b.initialize(c,this),d=!0),this.notify(MediaPlayer.dependencies.TextController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED,{CCIndex:0})},f=function(a){var c=this;a.data.fragmentModel===c.streamProcessor.getFragmentModel()&&null!==a.data.bytes&&c.sourceBufferExt.append(b,a.data.bytes,c.videoModel)};return{sourceBufferExt:void 0,debug:void 0,system:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED]=e,this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED]=f},initialize:function(a,b,d,e){var f=this;c=a,f.setBuffer(b),f.setMediaSource(d),f.videoModel=e.videoModel,f.trackController=e.trackController,f.streamProcessor=e},getBuffer:function(){return b},setBuffer:function(a){b=a},setMediaSource:function(b){a=b},reset:function(c){c||(this.sourceBufferExt.abort(a,b),this.sourceBufferExt.removeSourceBuffer(a,b))}}},MediaPlayer.dependencies.TextController.prototype={constructor:MediaPlayer.dependencies.TextController},MediaPlayer.dependencies.TextController.eventList={ENAME_CLOSED_CAPTIONING_REQUESTED:"closedCaptioningRequested"},MediaPlayer.dependencies.MediaSourceExtensions=function(){"use strict"},MediaPlayer.dependencies.MediaSourceExtensions.prototype={constructor:MediaPlayer.dependencies.MediaSourceExtensions,createMediaSource:function(){"use strict";var a="WebKitMediaSource"in window,b="MediaSource"in window;return b?new MediaSource:a?new WebKitMediaSource:null},attachMediaSource:function(a,b){"use strict";var c=window.URL.createObjectURL(a);return b.setSource(c),c},detachMediaSource:function(a){"use strict";a.setSource("")},setDuration:function(a,b){"use strict";return a.duration=b,a.duration},signalEndOfStream:function(a){"use strict";var b=a.sourceBuffers,c=b.length,d=0;if("open"===a.readyState){for(d;c>d;d+=1)if(b[d].updating)return;a.endOfStream()}}},MediaPlayer.dependencies.ProtectionExtensions=function(){"use strict";var a,b=[];return{system:void 0,debug:void 0,setup:function(){var c;c=this.system.getObject("ksPlayReady"),b.push(c),c=this.system.getObject("ksWidevine"),b.push(c),c=this.system.getObject("ksClearKey"),b.push(c),a=c},init:function(a){for(var c=(function(b){var c=null;return a&&(c=b in a?a[b]:null),c}),d=0;d<b.length;d++){var e=b[d];e.init(c(e.systemString))}},getKeySystems:function(){return b},isClearKey:function(b){return b===a},autoSelectKeySystem:function(a,c,d){var e,f,g,h,i=null;for(e=0;e<b.length;++e)for(f=0;f<c.contentProtection.length;++f)if(g=c.contentProtection[f],a.isSupported(b[e],c.codec)&&g.schemeIdUri.toLowerCase()===b[e].schemeIdURI){if(h=b[e].getInitData(g),!h)continue;i=b[e],a.selectKeySystem(i);break}if(!i&&(g=MediaPlayer.dependencies.protection.CommonEncryption.findCencContentProtection(c.contentProtection))){this.debug.log("CommonEncryption detected in MPD. Searching initData for supported key systems...");var j=MediaPlayer.dependencies.protection.CommonEncryption.parsePSSHList(d);for(e=0;e<b.length;++e)if(b[e].uuid in j&&a.isSupported(b[e],c.codec)){i=b[e],h=j[b[e].uuid],a.selectKeySystem(i);break}}if(!i)throw new Error("DRM: The protection system for this content is not supported.");return this.debug.log("Selected key system -- "+i.systemString),h}}},MediaPlayer.dependencies.ProtectionExtensions.prototype={constructor:MediaPlayer.dependencies.ProtectionExtensions},MediaPlayer.dependencies.RequestModifierExtensions=function(){"use strict";return{modifyRequestURL:function(a){return a},modifyRequestHeader:function(a){return a}}},MediaPlayer.dependencies.SourceBufferExtensions=function(){"use strict";this.system=void 0,this.errHandler=void 0,this.notify=void 0,this.subscribe=void 0,this.unsubscribe=void 0},MediaPlayer.dependencies.SourceBufferExtensions.prototype={constructor:MediaPlayer.dependencies.SourceBufferExtensions,createSourceBuffer:function(a,b){"use strict";var c=this,d=b.codec,e=null;try{e=a.addSourceBuffer(d)}catch(f){if(!b.isText)throw f;e=c.system.getObject("textSourceBuffer")}return e},removeSourceBuffer:function(a,b){"use strict";try{a.removeSourceBuffer(b)}catch(c){}},getBufferRange:function(a,b,c){"use strict";var d,e,f=null,g=0,h=0,i=null,j=null,k=0,l=c||.15;try{f=a.buffered}catch(m){return null}if(null!==f){for(e=0,d=f.length;d>e;e+=1)if(g=f.start(e),h=f.end(e),null===i)k=Math.abs(g-b),b>=g&&h>b?(i=g,j=h):l>=k&&(i=g,j=h);else{if(k=g-j,!(l>=k))break;j=h}if(null!==i)return{start:i,end:j}}return null},getAllRanges:function(a){var b=null;try{return b=a.buffered}catch(c){return null}},getBufferLength:function(a,b,c){"use strict";var d,e,f=this;return d=f.getBufferRange(a,b,c),e=null===d?0:d.end-b},waitForUpdateEnd:function(a,b){"use strict";var c,d=50,e=function(){a.updating||(clearInterval(c),b(!0))},f=function(){a.updating||(a.removeEventListener("updateend",f,!1),b(!0))};if(!a.updating)return void b(!0);if("function"==typeof a.addEventListener)try{a.addEventListener("updateend",f,!1)}catch(g){c=setInterval(e,d)}else c=setInterval(e,d)},append:function(a,b){var c=this,d="append"in a?"append":"appendBuffer"in a?"appendBuffer":null;if(d)try{c.waitForUpdateEnd(a,function(){a[d](b),c.waitForUpdateEnd(a,function(){c.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED,{buffer:a,bytes:b})})})}catch(e){c.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED,{buffer:a,bytes:b},new MediaPlayer.vo.Error(e.code,e.message,null))}},remove:function(a,b,c,d){var e=this;try{b>=0&&c>b&&"ended"!==d.readyState&&a.remove(b,c),this.waitForUpdateEnd(a,function(){e.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:b,to:c})})}catch(f){e.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:b,to:c},new MediaPlayer.vo.Error(f.code,f.message,null))}},abort:function(a,b){"use strict";try{"open"===a.readyState&&b.abort()}catch(c){}}},MediaPlayer.dependencies.SourceBufferExtensions.QUOTA_EXCEEDED_ERROR_CODE=22,MediaPlayer.dependencies.SourceBufferExtensions.eventList={ENAME_SOURCEBUFFER_REMOVE_COMPLETED:"sourceBufferRemoveCompleted",ENAME_SOURCEBUFFER_APPEND_COMPLETED:"sourceBufferAppendCompleted"},MediaPlayer.utils.TextTrackExtensions=function(){"use strict";var a;return{setup:function(){a=window.VTTCue||window.TextTrackCue},addTextTrack:function(b,c,d,e,f){var g=b.addTextTrack("captions",d,e);g["default"]=f,g.mode="showing";for(var h in c){var i=c[h];g.addCue(new a(i.start,i.end,i.data))}return g},deleteCues:function(a){for(var b=0,c=!1;!c;){if(null!==a.textTracks[b].cues){c=!0;break}b++}var d=a.textTracks[b],e=d.cues,f=e.length-1;for(b=f;b>=0;b--)d.removeCue(e[b]);d.mode="disabled",d["default"]=!1}}},MediaPlayer.dependencies.VideoModelExtensions=function(){"use strict";return{getPlaybackQuality:function(a){var b="webkitDroppedFrameCount"in a,c="getVideoPlaybackQuality"in a,d=null;return c?d=a.getVideoPlaybackQuality():b&&(d={droppedVideoFrames:a.webkitDroppedFrameCount,creationTime:new Date}),d}}},MediaPlayer.dependencies.VideoModelExtensions.prototype={constructor:MediaPlayer.dependencies.VideoModelExtensions},MediaPlayer.dependencies.FragmentModel=function(){"use strict";var a,b=[],c=[],d=[],e=[],f=!1,g=function(a){var b=this;b.notify(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED,{request:a}),b.fragmentLoader.load(a)},h=function(a){var c=b.indexOf(a);-1!==c&&b.splice(c,1)},i=function(a,b){var c,d=a.length-1,e=.001,f=0/0,g=0/0,h=null;for(c=d;c>=0;c-=1)if(h=a[c],f=h.startTime,g=f+h.duration,!isNaN(f)&&!isNaN(g)&&b+e>=f&&g>b||isNaN(f)&&isNaN(b))return h;return null},j=function(a,b){if(a){var c=a.mediaType,d=new Date,e=a.type,f=a.startTime,g=a.availabilityStartTime,h=a.duration,i=a.quality,j=a.range;this.metricsModel.addSchedulingInfo(c,d,e,f,g,h,i,j,b)}},k=function(a){var c=a.data.request,e=a.data.response,f=a.error;d.splice(d.indexOf(c),1),e&&!f&&b.push(c),j.call(this,c,f?MediaPlayer.vo.metrics.SchedulingInfo.FAILED_STATE:MediaPlayer.vo.metrics.SchedulingInfo.EXECUTED_STATE),this.notify(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED,{request:c,response:e},f)},l=function(a){var b=this.getExecutedRequestForQualityAndIndex(a.data.quality,a.data.index);b&&(this.removeExecutedRequest(b),isNaN(a.data.index)||(e.push(b),j.call(this,b,MediaPlayer.vo.metrics.SchedulingInfo.REJECTED_STATE)))},m=function(){f=!0},n=function(){f=!1};return{system:void 0,debug:void 0,metricsModel:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,setup:function(){this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN]=m,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED]=n,this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED]=l,this[MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED]=k},setLoader:function(a){this.fragmentLoader=a},setContext:function(b){a=b},getContext:function(){return a},getIsPostponed:function(){return f},addRequest:function(a){return!a||this.isFragmentLoadedOrPending(a)?!1:(c.push(a),j.call(this,a,MediaPlayer.vo.metrics.SchedulingInfo.PENDING_STATE),!0)},isFragmentLoadedOrPending:function(a){var e=function(a,b){return"complete"===a.action&&a.action===b.action},f=function(a,b){return a.url===b.url&&a.startTime===b.startTime},g=function(a,b){return isNaN(a.index)&&isNaN(b.index)&&a.quality===b.quality},h=function(b){var c,d,h=!1,i=b.length;for(d=0;i>d;d+=1)if(c=b[d],f(a,c)||g(a,c)||e(a,c)){h=!0;break}return h};return h(c)||h(d)||h(b)},getPendingRequests:function(){return c},getLoadingRequests:function(){return d},getExecutedRequests:function(){return b},getRejectedRequests:function(){return e},getLoadingTime:function(){var a,c,d=0;for(c=b.length-1;c>=0;c-=1)if(a=b[c],a.requestEndDate instanceof Date&&a.firstByteDate instanceof Date){d=a.requestEndDate.getTime()-a.firstByteDate.getTime();break}return d},getExecutedRequestForTime:function(a){return i(b,a)},getPendingRequestForTime:function(a){return i(c,a)},getLoadingRequestForTime:function(a){return i(d,a)},getExecutedRequestForQualityAndIndex:function(a,c){var d,e=b.length-1,f=null;for(d=e;d>=0;d-=1)if(f=b[d],f.quality===a&&f.index===c)return f;return null},removeExecutedRequest:function(a){h.call(this,a)},removeExecutedRequestsBeforeTime:function(a){var c,d=b.length-1,e=0/0,f=null;for(c=d;c>=0;c-=1)f=b[c],e=f.startTime,!isNaN(e)&&a>e&&h.call(this,f)},cancelPendingRequests:function(a){var b=this,d=c,e=d;return c=[],void 0!==a&&(c=d.filter(function(b){return b.quality===a?!1:(e.splice(e.indexOf(b),1),!0)})),e.forEach(function(a){j.call(b,a,MediaPlayer.vo.metrics.SchedulingInfo.CANCELED_STATE)}),e},abortRequests:function(){this.fragmentLoader.abort();for(var a=0,b=d.length;b>a;a+=1)this.removeExecutedRequest(d[a]);d=[]},executeRequest:function(a){var e=this,f=c.indexOf(a);if(a&&-1!==f)switch(c.splice(f,1),a.action){case"complete":b.push(a),j.call(e,a,MediaPlayer.vo.metrics.SchedulingInfo.EXECUTED_STATE),e.notify(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED,{request:a});break;case"download":d.push(a),j.call(e,a,MediaPlayer.vo.metrics.SchedulingInfo.LOADING_STATE),g.call(e,a);break;default:this.debug.log("Unknown request action.")}}}},MediaPlayer.dependencies.FragmentModel.prototype={constructor:MediaPlayer.dependencies.FragmentModel},MediaPlayer.dependencies.FragmentModel.eventList={ENAME_STREAM_COMPLETED:"streamCompleted",ENAME_FRAGMENT_LOADING_STARTED:"fragmentLoadingStarted",ENAME_FRAGMENT_LOADING_COMPLETED:"fragmentLoadingCompleted"},MediaPlayer.models.ManifestModel=function(){"use strict";var a;return{system:void 0,eventBus:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,getValue:function(){return a},setValue:function(b){a=b,this.eventBus.dispatchEvent({type:"manifestLoaded",data:b}),this.notify(MediaPlayer.models.ManifestModel.eventList.ENAME_MANIFEST_UPDATED,{manifest:b})}}},MediaPlayer.models.ManifestModel.prototype={constructor:MediaPlayer.models.ManifestModel},MediaPlayer.models.ManifestModel.eventList={ENAME_MANIFEST_UPDATED:"manifestUpdated"},MediaPlayer.models.MetricsModel=function(){"use strict";return{system:void 0,eventBus:void 0,adapter:void 0,streamMetrics:{},metricsChanged:function(){this.eventBus.dispatchEvent({type:"metricsChanged",data:{}})},metricChanged:function(a){this.eventBus.dispatchEvent({type:"metricChanged",data:{stream:a}}),this.metricsChanged()},metricUpdated:function(a,b,c){this.eventBus.dispatchEvent({type:"metricUpdated",data:{stream:a,metric:b,value:c}}),this.metricChanged(a)},metricAdded:function(a,b,c){this.eventBus.dispatchEvent({type:"metricAdded",data:{stream:a,metric:b,value:c}}),this.metricChanged(a)},clearCurrentMetricsForType:function(a){delete this.streamMetrics[a],this.metricChanged(a)},clearAllCurrentMetrics:function(){var a=this;this.streamMetrics={},this.metricsChanged.call(a)},getReadOnlyMetricsFor:function(a){return this.streamMetrics.hasOwnProperty(a)?this.streamMetrics[a]:null},getMetricsFor:function(a){var b;return this.streamMetrics.hasOwnProperty(a)?b=this.streamMetrics[a]:(b=this.system.getObject("metrics"),this.streamMetrics[a]=b),b},addTcpConnection:function(a,b,c,d,e,f){var g=new MediaPlayer.vo.metrics.TCPConnection;return g.tcpid=b,g.dest=c,g.topen=d,g.tclose=e,g.tconnect=f,this.getMetricsFor(a).TcpList.push(g),this.metricAdded(a,this.adapter.metricsList.TCP_CONNECTION,g),g},addHttpRequest:function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=new MediaPlayer.vo.metrics.HTTPRequest;return n.stream=a,n.tcpid=b,n.type=c,n.url=d,n.actualurl=e,n.range=f,n.trequest=g,n.tresponse=h,n.tfinish=i,n.responsecode=j,n.interval=k,n.mediaduration=l,n.responseHeaders=m,this.getMetricsFor(a).HttpList.push(n),this.metricAdded(a,this.adapter.metricsList.HTTP_REQUEST,n),n},appendHttpTrace:function(a,b,c,d){var e=new MediaPlayer.vo.metrics.HTTPRequest.Trace;return e.s=b,e.d=c,e.b=d,a.trace.push(e),this.metricUpdated(a.stream,this.adapter.metricsList.HTTP_REQUEST_TRACE,a),e},addTrackSwitch:function(a,b,c,d,e){var f=new MediaPlayer.vo.metrics.TrackSwitch;return f.t=b,f.mt=c,f.to=d,f.lto=e,this.getMetricsFor(a).RepSwitchList.push(f),this.metricAdded(a,this.adapter.metricsList.TRACK_SWITCH,f),f},addBufferLevel:function(a,b,c){var d=new MediaPlayer.vo.metrics.BufferLevel;return d.t=b,d.level=c,this.getMetricsFor(a).BufferLevel.push(d),this.metricAdded(a,this.adapter.metricsList.BUFFER_LEVEL,d),d},addBufferState:function(a,b,c){var d=new MediaPlayer.vo.metrics.BufferState;return d.target=c,d.state=b,this.getMetricsFor(a).BufferState.push(d),this.metricAdded(a,this.adapter.metricsList.BUFFER_STATE,d),d},addDVRInfo:function(a,b,c,d){var e=new MediaPlayer.vo.metrics.DVRInfo;return e.time=b,e.range=d,e.manifestInfo=c,this.getMetricsFor(a).DVRInfo.push(e),this.metricAdded(a,this.adapter.metricsList.DVR_INFO,e),e},addDroppedFrames:function(a,b){var c=new MediaPlayer.vo.metrics.DroppedFrames,d=this.getMetricsFor(a).DroppedFrames;return c.time=b.creationTime,c.droppedFrames=b.droppedVideoFrames,d.length>0&&d[d.length-1]==c?d[d.length-1]:(d.push(c),this.metricAdded(a,this.adapter.metricsList.DROPPED_FRAMES,c),c)},addSchedulingInfo:function(a,b,c,d,e,f,g,h,i){var j=new MediaPlayer.vo.metrics.SchedulingInfo;return j.mediaType=a,j.t=b,j.type=c,j.startTime=d,j.availabilityStartTime=e,j.duration=f,j.quality=g,j.range=h,j.state=i,this.getMetricsFor(a).SchedulingInfo.push(j),this.metricAdded(a,this.adapter.metricsList.SCHEDULING_INFO,j),j},addManifestUpdate:function(a,b,c,d,e,f,g,h,i,j){var k=new MediaPlayer.vo.metrics.ManifestUpdate,l=this.getMetricsFor("stream");return k.mediaType=a,k.type=b,k.requestTime=c,k.fetchTime=d,k.availabilityStartTime=e,k.presentationStartTime=f,k.clientTimeOffset=g,k.currentTime=h,k.buffered=i,k.latency=j,l.ManifestUpdate.push(k),this.metricAdded(a,this.adapter.metricsList.MANIFEST_UPDATE,k),k},updateManifestUpdateInfo:function(a,b){for(var c in b)a[c]=b[c];this.metricUpdated(a.mediaType,this.adapter.metricsList.MANIFEST_UPDATE,a)},addManifestUpdateStreamInfo:function(a,b,c,d,e){var f=new MediaPlayer.vo.metrics.ManifestUpdate.StreamInfo;return f.id=b,f.index=c,f.start=d,f.duration=e,a.streamInfo.push(f),this.metricUpdated(a.mediaType,this.adapter.metricsList.MANIFEST_UPDATE_STREAM_INFO,a),f},addManifestUpdateTrackInfo:function(a,b,c,d,e,f,g,h){var i=new MediaPlayer.vo.metrics.ManifestUpdate.TrackInfo;return i.id=b,i.index=c,i.streamIndex=d,i.mediaType=e,i.startNumber=g,i.fragmentInfoType=h,i.presentationTimeOffset=f,a.trackInfo.push(i),this.metricUpdated(a.mediaType,this.adapter.metricsList.MANIFEST_UPDATE_TRACK_INFO,a),i},addPlayList:function(a,b,c,d){var e=new MediaPlayer.vo.metrics.PlayList;return e.stream=a,e.start=b,e.mstart=c,e.starttype=d,this.getMetricsFor(a).PlayList.push(e),this.metricAdded(a,this.adapter.metricsList.PLAY_LIST,e),e},appendPlayListTrace:function(a,b,c,d,e,f,g,h){var i=new MediaPlayer.vo.metrics.PlayList.Trace;return i.representationid=b,i.subreplevel=c,i.start=d,i.mstart=e,i.duration=f,i.playbackspeed=g,i.stopreason=h,a.trace.push(i),this.metricUpdated(a.stream,this.adapter.metricsList.PLAY_LIST_TRACE,a),i}}},MediaPlayer.models.MetricsModel.prototype={constructor:MediaPlayer.models.MetricsModel},MediaPlayer.models.ProtectionModel={},MediaPlayer.models.ProtectionModel.eventList={ENAME_NEED_KEY:"needkey",ENAME_KEY_MESSAGE:"keyMessage",ENAME_KEY_ADDED:"keyAdded",ENAME_KEY_ERROR:"keyError",ENAME_KEY_SESSION_CREATED:"keySessionCreated",ENAME_KEY_SESSION_LOADED:"keySessionLoaded",ENAME_KEY_SESSION_UNLOADED:"keySessionUnloaded",ENAME_KEY_SESSION_CLOSED:"keySessionClosed"},MediaPlayer.models.ProtectionModel_01b=function(){var a,b=null,c=null,d=[],e=[],f=function(){var b=this;return{handleEvent:function(f){var g=null;switch(f.type){case c.needkey:b.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY,new MediaPlayer.vo.protection.NeedKey(f.initData));break;case c.keyerror:if(g=h(e,f.sessionId),g||(g=h(d,f.sessionId)),g){var i="";switch(f.errorCode.code){case 1:i+="MEDIA_KEYERR_UNKNOWN - An unspecified error occurred. This value is used for errors that don't match any of the other codes.";break;case 2:i+="MEDIA_KEYERR_CLIENT - The Key System could not be installed or updated.";break;case 3:i+="MEDIA_KEYERR_SERVICE - The message passed into update indicated an error from the license service.";break;case 4:i+="MEDIA_KEYERR_OUTPUT - There is no available output device with the required characteristics for the content protection system.";break;case 5:i+="MEDIA_KEYERR_HARDWARECHANGE - A hardware configuration change caused a content protection error.";break;case 6:i+="MEDIA_KEYERR_DOMAIN - An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain."}i+=" System Code = "+f.systemCode,b.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR,new MediaPlayer.vo.protection.KeyError(g,i))}else b.debug.log("No session token found for key error");break;case c.keyadded:g=h(e,f.sessionId),g||(g=h(d,f.sessionId)),g?b.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED,g):b.debug.log("No session token found for key added");break;case c.keymessage:a=null!==f.sessionId&&void 0!==f.sessionId,a?(g=h(e,f.sessionId),g||(g=d.shift(),e.push(g),g.sessionID=f.sessionId)):(g=d.shift(),e.push(g),0!==d.length&&b.errHandler.mediaKeyMessageError("Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!")),g?(g.keyMessage=f.message,b.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE,new MediaPlayer.vo.protection.KeyMessage(g,f.message,f.defaultURL))):b.debug.log("No session token found for key message")}}}},g=null,h=function(a,b){if(b&&a){for(var c=a.length,d=0;c>d;d++)if(a[d].sessionID==b)return a[d];return null}return null},i=function(){b.removeEventListener(c.keyerror,g),b.removeEventListener(c.needkey,g),b.removeEventListener(c.keymessage,g),b.removeEventListener(c.keyadded,g)};return{system:void 0,debug:void 0,errHandler:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,protectionExt:void 0,keySystem:null,setup:function(){g=f.call(this)},init:function(){var a=document.createElement("video");c=MediaPlayer.models.ProtectionModel_01b.detect(a)},teardown:function(){b&&i();for(var a=0;a<e.length;a++)this.closeKeySession(e[a])},isSupported:function(a,c){return""!==b.canPlayType(c,a.systemString)},selectKeySystem:function(a){this.keySystem=a},setMediaElement:function(a){b&&i(),b=a,b.addEventListener(c.keyerror,g),b.addEventListener(c.needkey,g),b.addEventListener(c.keymessage,g),b.addEventListener(c.keyadded,g)},createKeySession:function(f){if(!this.keySystem)throw new Error("Can not create sessions until you have selected a key system");if(a||0===e.length){var g={prototype:(new MediaPlayer.models.SessionToken).prototype,sessionID:null,initData:f};return d.push(g),b[c.generateKeyRequest](this.keySystem.systemString,f),g}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(a,d){var e=a.sessionID;if(this.protectionExt.isClearKey(this.keySystem))for(var f=0;f<d.keyPairs.length;f++)b[c.addKey](this.keySystem.systemString,d.keyPairs[f].key,d.keyPairs[f].keyID,e);else b[c.addKey](this.keySystem.systemString,d,a.initData,e)},closeKeySession:function(a){b[c.cancelKeyRequest](this.keySystem.systemString,a.sessionID)},setServerCertificate:function(){}}},MediaPlayer.models.ProtectionModel_01b.prototype={constructor:MediaPlayer.models.ProtectionModel_01b},MediaPlayer.models.ProtectionModel_01b.APIs=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],MediaPlayer.models.ProtectionModel_01b.detect=function(a){for(var b=MediaPlayer.models.ProtectionModel_01b.APIs,c=0;c<b.length;c++){var d=b[c];if("function"==typeof a[d.generateKeyRequest]&&"function"==typeof a[d.addKey]&&"function"==typeof a[d.cancelKeyRequest])return d}return null},MediaPlayer.models.ProtectionModel_3Feb2014=function(){var a=null,b=null,c=null,d=[],e=function(){var a=this;return{handleEvent:function(b){switch(b.type){case c.needkey:a.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY,new MediaPlayer.vo.protection.NeedKey(b.initData))}}}},f=null,g=function(a,b){var d=this;return{prototype:(new MediaPlayer.models.SessionToken).prototype,session:a,sessionID:a.sessionId,initData:b,handleEvent:function(a){switch(a.type){case c.error:var b="KeyError";d.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR,new MediaPlayer.vo.protection.KeyError(this,b));break;case c.message:d.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE,new MediaPlayer.vo.protection.KeyMessage(this,a.message,a.destinationURL));break;case c.ready:d.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED,this);break;case c.close:d.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED,this)}}}};return{system:void 0,notify:void 0,subscribe:void 0,unsubscribe:void 0,protectionExt:void 0,keySystem:null,setup:function(){f=e.call(this)},init:function(){var a=document.createElement("video");c=MediaPlayer.models.ProtectionModel_3Feb2014.detect(a)},teardown:function(){a&&a.removeEventListener(c.needkey,f);for(var b=0;b<d.length;b++)this.closeKeySession(d[b])},isSupported:function(a,b){return window[c.MediaKeys].isTypeSupported(a.systemString,b)},selectKeySystem:function(d){this.keySystem=d,b=new window[c.MediaKeys](this.keySystem.systemString),a&&a[c.setMediaKeys](b)},setMediaElement:function(d){a&&a.removeEventListener(c.needkey,f().bind(this)),a=d,a.addEventListener(c.needkey,f),b&&a[c.setMediaKeys](b)},createKeySession:function(a,e){if(!this.keySystem||!b)throw new Error("Can not create sessions until you have selected a key system");var f=b.createSession(e,a),h=g.call(this,f,a);return f.addEventListener(c.error,h),f.addEventListener(c.message,h),f.addEventListener(c.ready,h),f.addEventListener(c.close,h),d.push(h),h},updateKeySession:function(a,b){var c=a.session;c.update(this.protectionExt.isClearKey(this.keySystem)?b.toJWKString():b)},closeKeySession:function(a){var b=a.session;b.removeEventListener(c.error,a),b.removeEventListener(c.message,a),b.removeEventListener(c.ready,a),b.removeEventListener(c.close,a);for(var e=0;e<d.length;e++)if(d[e]===a){d.splice(e,1);break}b[c.release]()}}},MediaPlayer.models.ProtectionModel_3Feb2014.APIs=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}],MediaPlayer.models.ProtectionModel_3Feb2014.detect=function(a){for(var b=MediaPlayer.models.ProtectionModel_3Feb2014.APIs,c=0;c<b.length;c++){var d=b[c];if("function"==typeof a[d.setMediaKeys]&&"function"==typeof window[d.MediaKeys])return d}return null},MediaPlayer.models.ProtectionModel_3Feb2014.prototype={constructor:MediaPlayer.models.ProtectionModel_3Feb2014},MediaPlayer.models.URIQueryAndFragmentModel=function(){"use strict";var a=new MediaPlayer.vo.URIFragmentData,b=[],c=function(c){function d(a,b,c,d){var e=d[0].split(/[=]/);return d.push({key:e[0],value:e[1]}),d.shift(),d}function e(a,c,d){return c>0&&(j&&0===b.length?b=d[c].split(/[&]/):k&&(g=d[c].split(/[&]/))),d}if(!c)return null;var f,g=[],h=new RegExp(/[?]/),i=new RegExp(/[#]/),j=h.test(c),k=i.test(c);return f=c.split(/[?#]/).map(e),b.length>0&&(b=b.reduce(d,null)),g.length>0&&(g=g.reduce(d,null),g.forEach(function(b){a[b.key]=b.value
20
- })),c};return{parseURI:c,getURIFragmentData:function(){return a},getURIQueryData:function(){return b},reset:function(){a=new MediaPlayer.vo.URIFragmentData,b=[]}}},MediaPlayer.models.URIQueryAndFragmentModel.prototype={constructor:MediaPlayer.models.URIQueryAndFragmentModel},MediaPlayer.models.VideoModel=function(){"use strict";var a,b=[],c=function(){return b.length>0},d=function(c){null!==c&&(a.playbackRate=0,b[c]!==!0&&(b.push(c),b[c]=!0))},e=function(d){if(null!==d){b[d]=!1;var e=b.indexOf(d);-1!==e&&b.splice(e,1),c()===!1&&(a.playbackRate=1)}},f=function(a,b){b?d(a):e(a)},g=function(a){var b=a.sender.streamProcessor.getType();f.call(this,b,!a.data.hasSufficientBuffer)};return{system:void 0,setup:function(){this.bufferLevelStateChanged=g},play:function(){a.play()},pause:function(){a.pause()},isPaused:function(){return a.paused},getPlaybackRate:function(){return a.playbackRate},setPlaybackRate:function(b){a.playbackRate=b},getCurrentTime:function(){return a.currentTime},setCurrentTime:function(b){a.currentTime!=b&&(a.currentTime=b)},listen:function(b,c){a.addEventListener(b,c,!1)},unlisten:function(b,c){a.removeEventListener(b,c,!1)},getElement:function(){return a},setElement:function(b){a=b},setSource:function(b){a.src=b}}},MediaPlayer.models.VideoModel.prototype={constructor:MediaPlayer.models.VideoModel},MediaPlayer.dependencies.protection.CommonEncryption={findCencContentProtection:function(a){for(var b=null,c=0;c<a.length;++c){var d=a[c];"urn:mpeg:dash:mp4protection:2011"===d.schemeIdUri.toLowerCase()&&"cenc"===d.value.toLowerCase()&&(b=d)}return b},getPSSHData:function(a){return new Uint8Array(a.buffer.slice(32))},parsePSSHList:function(a){if(null===a)return[];for(var b=new DataView(a.buffer),c=!1,d={},e=0;!c;){var f,g,h,i,j,k=e;if(e>=b.buffer.byteLength)break;if(f=b.getUint32(e),g=e+f,e+=4,1886614376===b.getUint32(e))if(e+=4,h=b.getUint8(e),0===h){e+=1,e+=3,i="";var l,m;for(l=0;4>l;l++)m=b.getUint8(e+l).toString(16),i+=1===m.length?"0"+m:m;for(e+=4,i+="-",l=0;2>l;l++)m=b.getUint8(e+l).toString(16),i+=1===m.length?"0"+m:m;for(e+=2,i+="-",l=0;2>l;l++)m=b.getUint8(e+l).toString(16),i+=1===m.length?"0"+m:m;for(e+=2,i+="-",l=0;2>l;l++)m=b.getUint8(e+l).toString(16),i+=1===m.length?"0"+m:m;for(e+=2,i+="-",l=0;6>l;l++)m=b.getUint8(e+l).toString(16),i+=1===m.length?"0"+m:m;e+=6,i=i.toLowerCase(),j=b.getUint32(e),e+=4,d[i]=new Uint8Array(b.buffer.slice(k,g)),e=g}else e=g;else e=g}return d}},MediaPlayer.dependencies.protection.KeySystem={eventList:{ENAME_LICENSE_REQUEST_COMPLETE:"licenseRequestComplete"}},MediaPlayer.dependencies.protection.KeySystem_Access=function(){"use strict"},MediaPlayer.dependencies.protection.KeySystem_Access.prototype={constructor:MediaPlayer.dependencies.protection.KeySystem_Access},MediaPlayer.dependencies.protection.KeySystem_ClearKey=function(){"use strict";var a,b="webkit-org.w3.clearkey",c="10000000-0000-0000-0000-000000000000",d=function(a,b){var c,d,e=MediaPlayer.dependencies.protection.CommonEncryption.getPSSHData(a),f=new DataView(e.buffer),g=0,h=[];if(d=f.getUint8(g),g+=1,0===d){var i="",j="",k=f.getUint16(g);for(g+=2,c=0;k>c;c++)j+=String.fromCharCode(f.getUint8(g+c));i=atob(j),i=i.replace(/&amp;/,"&");var l=new XMLHttpRequest;l.onload=function(){if(200==l.status){for(l.response.hasOwnProperty("keys")||this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error("DRM: ClearKey Remote update, Illegal response JSON")),c=0;c<l.reponse.keys.length;c++){var a=l.response.keys[c],d=atob(a.kid),e=atob(a.k);h.push(new MediaPlayer.vo.protection.KeyPair(d,e))}var f=new MediaPlayer.vo.protection.LicenseRequestComplete(new MediaPlayer.vo.protection.ClearKeyKeySet(h),b);this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,f)}else this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error('DRM: ClearKey Remote update, XHR aborted. status is "'+l.statusText+'" ('+l.status+"), readyState is "+l.readyState))},l.onabort=function(){this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error('DRM: ClearKey update, XHR aborted. status is "'+l.statusText+'" ('+l.status+"), readyState is "+l.readyState))},l.onerror=function(){this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error('DRM: ClearKey update, XHR error. status is "'+l.statusText+'" ('+l.status+"), readyState is "+l.readyState))},l.open("GET",i),l.responseType="json",l.send()}else if(1===d){var m=f.getUint8(g);for(g+=1,c=0;m>c;c++){var n,o;n=new Uint8Array(e.buffer.slice(g,g+16)),g+=16,o=new Uint8Array(e.buffer.slice(g,g+16)),g+=16,h.push(new MediaPlayer.vo.protection.KeyPair(n,o))}var p=new MediaPlayer.vo.protection.LicenseRequestComplete(new MediaPlayer.vo.protection.ClearKeyKeySet(h),b);this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,p)}else this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error("DRM: Illegal ClearKey type: "+d))};return{schemeIdURI:void 0,systemString:b,uuid:c,notify:void 0,subscribe:void 0,unsubscribe:void 0,init:function(b){this.schemeIdURI="urn:uuid:"+c,a=b},doLicenseRequest:function(a,b,c){d.call(this,a,c)},getInitData:function(){return null},initDataEquals:function(a,b){return a.length===b.length&&btoa(a.buffer)===btoa(b.buffer)?!0:!1}}},MediaPlayer.dependencies.protection.KeySystem_ClearKey.prototype={constructor:MediaPlayer.dependencies.protection.KeySystem_ClearKey},MediaPlayer.dependencies.protection.KeySystem_PlayReady=function(){"use strict";var a,b="com.microsoft.playready",c="9a04f079-9840-4286-ab92-e65be0885f95",d=function(b,c,d){var e,f,g,h,i,j,k=null,l={},m=new DOMParser,n=this;if(j=new Uint16Array(b.buffer),i=String.fromCharCode.apply(null,j),h=m.parseFromString(i,"application/xml"),h.getElementsByTagName("Challenge")[0]){var o=h.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;o&&(k=BASE64.decode(o))}else n.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new MediaPlayer.vo.Error(null,"DRM: playready update, can not find Challenge in keyMessage",null));var p=h.getElementsByTagName("name"),q=h.getElementsByTagName("value");p.length!=q.length&&n.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new MediaPlayer.vo.Error(null,"DRM: playready update, invalid header name/value pair in keyMessage",null));for(var r=0;r<p.length;r++)l[p[r].childNodes[0].nodeValue]=q[r].childNodes[0].nodeValue;a&&a.bearerToken&&l.push({name:"Authorization",value:a.bearerToken});var s=new XMLHttpRequest;if(s.onload=function(){if(200==s.status){var a=new MediaPlayer.vo.protection.LicenseRequestComplete(new Uint8Array(s.response),d);n.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,a)}else n.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new MediaPlayer.vo.Error(null,'DRM: playready update, XHR status is "'+s.statusText+'" ('+s.status+"), expected to be 200. readyState is "+s.readyState,null))},s.onabort=function(){n.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new MediaPlayer.vo.Error(null,'DRM: playready update, XHR aborted. status is "'+s.statusText+'" ('+s.status+"), readyState is "+s.readyState,null))},s.onerror=function(){n.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new MediaPlayer.vo.Error(null,'DRM: playready update, XHR error. status is "'+s.statusText+'" ('+s.status+"), readyState is "+s.readyState,null))},s.open("POST",a&&a.laURL&&""!==a.laURL?a.laURL:c),s.responseType="arraybuffer",g=a?a.httpRequestHeaders:null)for(f in g)l[f]=g[f];for(e in l)"authorization"===e.toLowerCase()&&(s.withCredentials=!0),s.setRequestHeader(e,l[e]);s.send(k)},e=function(a){var b=0,c=0,d=0,e=new Uint8Array([112,115,115,104,0,0,0,0]),f=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),g=null,h=null,i=null,j=null;if("pro"in a)g=BASE64.decodeArray(a.pro.__text);else{if(!("prheader"in a))return null;g=BASE64.decodeArray(a.prheader.__text)}return c=g.length,d=4+e.length+f.length+4+c,h=new ArrayBuffer(d),i=new Uint8Array(h),j=new DataView(h),j.setUint32(b,d),b+=4,i.set(e,b),b+=e.length,i.set(f,b),b+=f.length,j.setUint32(b,c),b+=4,i.set(g,b),b+=c,i},f=function(){return!1};return{schemeIdURI:"urn:uuid:"+c,systemString:b,uuid:c,notify:void 0,subscribe:void 0,unsubscribe:void 0,init:function(b){a=b},doLicenseRequest:d,getInitData:e,initDataEquals:f}},MediaPlayer.dependencies.protection.KeySystem_PlayReady.prototype={constructor:MediaPlayer.dependencies.protection.KeySystem_PlayReady},MediaPlayer.dependencies.protection.KeySystem_Widevine=function(){"use strict";var a,b="com.widevine.alpha",c="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",d=function(b,c,d){var e,f,g,h,i=new XMLHttpRequest,j={},k=this;if(h=a&&a.laURL&&""!==a.laURL?a.laURL:c){if(i.open("POST",h,!0),i.responseType="arraybuffer",i.onload=function(){if(200==this.status){var a=new MediaPlayer.vo.protection.LicenseRequestComplete(new Uint8Array(this.response),d);k.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,a)}else k.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error('DRM: widevine update, XHR status is "'+i.statusText+'" ('+i.status+"), expected to be 200. readyState is "+i.readyState)+". Response is "+(this.response?String.fromCharCode.apply(null,new Uint8Array(this.response)):"NONE"))},i.onabort=function(){k.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error('DRM: widevine update, XHR aborted. status is "'+i.statusText+'" ('+i.status+"), readyState is "+i.readyState))},i.onerror=function(){k.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error('DRM: widevine update, XHR error. status is "'+i.statusText+'" ('+i.status+"), readyState is "+i.readyState))},f=a?a.httpRequestHeaders:null)for(e in f)j[e]=f[e];for(g in j)"authorization"===g.toLowerCase()&&(i.withCredentials=!0),i.setRequestHeader(g,j[g]);i.send(b)}else k.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE,null,new Error("DRM: No valid Widevine Proxy Server URL specified!"))},e=function(){return null},f=function(){return!1};return{schemeIdURI:"urn:uuid:"+c,systemString:b,uuid:c,notify:void 0,subscribe:void 0,unsubscribe:void 0,init:function(b){a=b},doLicenseRequest:d,getInitData:e,initDataEquals:f}},MediaPlayer.dependencies.protection.KeySystem_Widevine.prototype={constructor:MediaPlayer.dependencies.protection.KeySystem_Widevine},MediaPlayer.rules.ABRRulesCollection=function(){"use strict";var a=[];return{downloadRatioRule:void 0,insufficientBufferRule:void 0,limitSwitchesRule:void 0,bufferOccupancyRule:void 0,throughputRule:void 0,getRules:function(b){switch(b){case MediaPlayer.rules.ABRRulesCollection.prototype.QUALITY_SWITCH_RULES:return a;default:return null}},setup:function(){a.push(this.insufficientBufferRule),a.push(this.throughputRule),a.push(this.bufferOccupancyRule),a.push(this.limitSwitchesRule)}}},MediaPlayer.rules.ABRRulesCollection.prototype={constructor:MediaPlayer.rules.ABRRulesCollection,QUALITY_SWITCH_RULES:"qualitySwitchRules"},MediaPlayer.rules.BufferOccupancyRule=function(){"use strict";return{debug:void 0,metricsModel:void 0,execute:function(a,b){var c=this,d=a.getMediaInfo(),e=d.type,f=this.metricsModel.getReadOnlyMetricsFor(e),g=f.BufferLevel.length>0?f.BufferLevel[f.BufferLevel.length-1]:null,h=f.BufferState.length>0?f.BufferState[f.BufferState.length-1]:null,i=!1,j=d.trackCount-1,k=new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE,MediaPlayer.rules.SwitchRequest.prototype.WEAK);null!==g&&null!==h&&g.level>h.target&&(i=g.level-h.target>MediaPlayer.dependencies.BufferController.RICH_BUFFER_THRESHOLD,i&&d.trackCount>1&&(k=new MediaPlayer.rules.SwitchRequest(j,MediaPlayer.rules.SwitchRequest.prototype.STRONG))),k.value!==MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE&&c.debug.log("BufferOccupancyRule requesting switch to index: ",k.value,"type: ",e," Priority: ",k.priority===MediaPlayer.rules.SwitchRequest.prototype.DEFAULT?"Default":k.priority===MediaPlayer.rules.SwitchRequest.prototype.STRONG?"Strong":"Weak"),b(k)}}},MediaPlayer.rules.BufferOccupancyRule.prototype={constructor:MediaPlayer.rules.BufferOccupancyRule},MediaPlayer.rules.DownloadRatioRule=function(){"use strict";var a=1,b=[],c=20,d=3,e=1.4,f=function(a,b,c){return a.getTrackForQuality(b).bandwidth/a.getTrackForQuality(c).bandwidth},g=function(a){var d=0,e=b.length;if(a=a>e?e:a,e>0){for(var f=e-a,g=0,h=f;e>h;h++)g+=b[h];d=g/a}return b.length>c&&b.shift(),d};return{debug:void 0,metricsExt:void 0,metricsModel:void 0,execute:function(a,c){var h,i,j,k,l,m,n,o=this,p=a.getMediaInfo(),q=p.type,r=a.getCurrentValue(),s=a.getStreamProcessor(),t=s.isDynamic(),u=o.metricsModel.getReadOnlyMetricsFor(q),v=o.metricsExt.getCurrentHttpRequest(u),w=u.BufferLevel[u.BufferLevel.length-1]||null,x=null;if(!u||null===v||null===v.mediaduration||void 0===v.mediaduration||v.mediaduration<=0||isNaN(v.mediaduration))return void c(new MediaPlayer.rules.SwitchRequest);if(i=(v.tfinish.getTime()-v.trequest.getTime())/1e3,h=(v.tfinish.getTime()-v.tresponse.getTime())/1e3,0>=i)return void c(new MediaPlayer.rules.SwitchRequest);if(l=v.mediaduration/i,k=v.mediaduration/h,1/0!==k&&b.push(k),j=g(d),isNaN(j)||isNaN(k)||isNaN(l))return void c(new MediaPlayer.rules.SwitchRequest);if(1>j){if(r>0)for(n=r-1;n>0;n--)if(m=f.call(o,s,n,r),j>m*e){x=new MediaPlayer.rules.SwitchRequest(n,MediaPlayer.rules.SwitchRequest.prototype.STRONG);break}}else if(null!==w&&w.level>=w.target||t&&null!==w&&w.level>=MediaPlayer.dependencies.BufferController.DEFAULT_STARTUP_BUFFER_TIME){var y=p.trackCount-1;if(y>r)for(n=y;n>0;n--)if(m=f.call(o,s,n,r),j>m){r!==n&&(x=new MediaPlayer.rules.SwitchRequest(n,MediaPlayer.rules.SwitchRequest.prototype.DEFAULT));break}}null===x&&(x=new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE,MediaPlayer.rules.SwitchRequest.prototype.DEFAULT)),x.value!==MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE&&o.debug.log("DownloadRatioRule requesting switch to index: ",x.value,"type: ",q," priority: ",x.priority===MediaPlayer.rules.SwitchRequest.prototype.DEFAULT?"default":x.priority===MediaPlayer.rules.SwitchRequest.prototype.STRONG?"strong":"weak"),c(x)},reset:function(){a=1,b=[]}}},MediaPlayer.rules.DownloadRatioRule.prototype={constructor:MediaPlayer.rules.DownloadRatioRule},MediaPlayer.rules.InsufficientBufferRule=function(){"use strict";var a={},b=function(b,c){a[b]=a[b]||{},a[b].state=c,c===MediaPlayer.dependencies.BufferController.BUFFER_LOADED&&(a[b].stepDownFactor=1,a[b].lastDryBufferHitRecorded=!1)};return{debug:void 0,metricsModel:void 0,execute:function(c,d){var e,f,g=this,h=c.getMediaInfo().type,i=c.getCurrentValue(),j=c.getMediaInfo(),k=g.metricsModel.getReadOnlyMetricsFor(h),l=c.getStreamInfo(),m=l.duration,n=c.getStreamProcessor().getPlaybackController().getTime(),o=c.getStreamProcessor(),p=o.isDynamic(),q=new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE,MediaPlayer.rules.SwitchRequest.prototype.WEAK),r=k.BufferLevel.length>0?k.BufferLevel[k.BufferLevel.length-1]:null,s=k.BufferState.length>0?k.BufferState[k.BufferState.length-1]:null;return 1===j.trackCount||null===k.PlayList||void 0===k.PlayList||0===k.PlayList.length||null===s?void d(q):(e=k.PlayList[k.PlayList.length-1],null===e||void 0===e||0===e.trace.length?void d(q):(f=e.trace[Math.max(e.trace.length-2,0)],null===f||void 0===f?void d(q):(b(h,s.state),null===f.stopreason||f.stopreason!==MediaPlayer.vo.metrics.PlayList.Trace.REBUFFERING_REASON||a[h].lastDryBufferHitRecorded?!p&&a[h].state===MediaPlayer.dependencies.BufferController.BUFFER_LOADED&&f.stopreason!==MediaPlayer.vo.metrics.PlayList.Trace.REBUFFERING_REASON&&null!==r&&r.level<2*MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD&&r.level>MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD&&n<m-2*MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD&&(q=new MediaPlayer.rules.SwitchRequest(Math.max(i-a[h].stepDownFactor,0),MediaPlayer.rules.SwitchRequest.prototype.STRONG),a[h].stepDownFactor++):(a[h].lastDryBufferHitRecorded=!0,q=new MediaPlayer.rules.SwitchRequest(0,MediaPlayer.rules.SwitchRequest.prototype.STRONG)),q.value!==MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE&&g.debug.log("InsufficientBufferRule requesting switch to index: ",q.value,"type: ",h," Priority: ",q.priority===MediaPlayer.rules.SwitchRequest.prototype.DEFAULT?"Default":q.priority===MediaPlayer.rules.SwitchRequest.prototype.STRONG?"Strong":"Weak"),void d(q))))},reset:function(){a={}}}},MediaPlayer.rules.InsufficientBufferRule.prototype={constructor:MediaPlayer.rules.InsufficientBufferRule},MediaPlayer.rules.LimitSwitchesRule=function(){"use strict";var a=0,b=2e3;return{debug:void 0,metricsModel:void 0,execute:function(c,d){var e,f=c.getCurrentValue(),g=(new Date).getTime();return e=g-a,b>e?void d(new MediaPlayer.rules.SwitchRequest(f,MediaPlayer.rules.SwitchRequest.prototype.DEFAULT)):(a=g,void d(new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE,MediaPlayer.rules.SwitchRequest.prototype.WEAK)))}}},MediaPlayer.rules.LimitSwitchesRule.prototype={constructor:MediaPlayer.rules.LimitSwitchesRule},MediaPlayer.rules.ThroughputRule=function(){"use strict";var a=[],b=2,c=3,d=function(b,c){a[b]=a[b]||[],1/0!==c&&c!==a[b][a[b].length-1]&&a[b].push(c)},e=function(d,e){var f=0,g=e?b:c,h=a[d],i=h.length;if(g=g>i?i:g,i>0){for(var j=i-g,k=0,l=j;i>l;l++)k+=h[l];f=k/g}return h.length>g&&h.shift(),f};return{debug:void 0,metricsExt:void 0,metricsModel:void 0,manifestExt:void 0,manifestModel:void 0,execute:function(a,b){var c,f,g,h=this,i=a.getMediaInfo(),j=i.type,k=this.manifestModel.getValue(),l=h.metricsModel.getReadOnlyMetricsFor(j),m=a.getStreamProcessor().isDynamic(),n=h.metricsExt.getCurrentHttpRequest(l),o=l.BufferState.length>0?l.BufferState[l.BufferState.length-1]:null,p=l.BufferLevel.length>0?l.BufferLevel[l.BufferLevel.length-1]:null,q=new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE,MediaPlayer.rules.SwitchRequest.prototype.WEAK);if(!l||null===n||n.type!==MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE||null===o||null===p)return void b(new MediaPlayer.rules.SwitchRequest);c=(n.tfinish.getTime()-n.tresponse.getTime())/1e3,g=Math.round(8*n.trace[n.trace.length-1].b/c),d(j,g),f=Math.round(e(j,m));var r=this.manifestExt.getAdaptationForType(k,0,j),s=i.trackCount-1;if(o.state===MediaPlayer.dependencies.BufferController.BUFFER_LOADED&&(p.level>=2*MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD||m))for(var t=s;t>0;t--){var u=this.manifestExt.getRepresentationFor(t,r).bandwidth;if(f>=u){var v=MediaPlayer.rules.SwitchRequest.prototype.DEFAULT;q=new MediaPlayer.rules.SwitchRequest(t,v);break}}q.value!==MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE&&h.debug.log("ThroughputRule requesting switch to index: ",q.value,"type: ",j," Priority: ",q.priority===MediaPlayer.rules.SwitchRequest.prototype.DEFAULT?"Default":q.priority===MediaPlayer.rules.SwitchRequest.prototype.STRONG?"Strong":"Weak","Average throughput",Math.round(f/1024),"kbps"),b(q)},reset:function(){a=[]}}},MediaPlayer.rules.ThroughputRu
1
  /*!
2
 
3
+ Flowplayer Unlimited v6.0.5 (2016-01-13) | flowplayer.org/license
 
 
 
 
4
 
5
+ */
6
+ !function(e){function t(e,t,n,r){for(var i,a=n.slice(),l=o(t,e),s=0,u=a.length;u>s&&(handler=a[s],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(l):handler.call(e,l),!l.stoppedImmediatePropagation);s++);return i=!l.stoppedPropagation,r&&i&&e.parentNode?e.parentNode.dispatchEvent(l):!l.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function r(e,t,r){var o=y(t||e,r);g(e,"textContent",n(function(){return o.get.call(this)},function(e){o.set.call(this,e)}))}function o(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function i(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function a(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function l(e){!f&&k.test(document.readyState)&&(f=!f,document.detachEvent(d,l),e=document.createEvent("Event"),e.initEvent(p,!0,!0),document.dispatchEvent(e))}function s(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var c=!0,f=!1,d="onreadystatechange",p="DOMContentLoaded",m="__IE8__"+Math.random(),v=e.Object,g=v.defineProperty||function(e,t,n){e[t]=n.value},h=v.defineProperties||function(t,n){for(var r in n)if(b.call(n,r))try{g(t,r,n[r])}catch(o){e.console&&console.log(r+" failed on object:",t,o.message)}},y=v.getOwnPropertyDescriptor,b=v.prototype.hasOwnProperty,w=e.Element.prototype,x=e.Text.prototype,E=/^[a-z]+$/,k=/loaded|complete/,T={},S=document.createElement("div");r(e.HTMLCommentElement.prototype,w,"nodeValue"),r(e.HTMLScriptElement.prototype,null,"text"),r(x,null,"nodeValue"),r(e.HTMLTitleElement.prototype,null,"text"),g(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(y(e.CSSStyleSheet.prototype,"cssText"))),h(w,{textContent:{get:a,set:s},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,r){var o,a=this,l="on"+e,s=a[m]||g(a,m,{value:{}})[m],c=s[l]||(s[l]={}),f=c.h||(c.h=[]);if(!b.call(c,"w")){if(c.w=function(e){return e[m]||t(a,u(a,e),f,!1)},!b.call(T,l))if(E.test(e))try{o=document.createEventObject(),o[m]=!0,9!=a.nodeType&&null==a.parentNode&&S.appendChild(a),a.fireEvent(l,o),T[l]=!0}catch(o){for(T[l]=!1;S.hasChildNodes();)S.removeChild(S.firstChild)}else T[l]=!1;(c.n=T[l])&&a.attachEvent(l,c.w)}i(f,n)<0&&f[r?"unshift":"push"](n)}},dispatchEvent:{value:function(e){var n,r=this,o="on"+e.type,i=r[m],a=i&&i[o],l=!!a;return e.target||(e.target=r),l?a.n?r.fireEvent(o,e):t(r,e,a.h,!0):(n=r.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var r=this,o="on"+e,a=r[m],l=a&&a[o],s=l&&l.h,u=s?i(s,t):-1;u>-1&&s.splice(u,1)}}}),h(x,{addEventListener:{value:w.addEventListener},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener}}),h(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var r=this,o="on"+e,a=r[m]||g(r,m,{value:{}})[m],l=a[o]||(a[o]={}),s=l.h||(l.h=[]);i(s,t)<0&&(r[o]||(r[o]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),r.dispatchEvent(t)}),s[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,r="on"+e.type,o=n[m],i=o&&o[r],a=!!i;return a&&(i.n?n.fireEvent(r,e):t(n,e,i.h,!0))}},removeEventListener:{value:w.removeEventListener}}),h(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),h(e.HTMLDocument.prototype,{textContent:{get:function(){return 11===this.nodeType?a.call(this):null},set:function(e){11===this.nodeType&&s.call(this,e)}},addEventListener:{value:function(t,n,r){var o=this;w.addEventListener.call(o,t,n,r),c&&t===p&&!k.test(o.readyState)&&(c=!1,o.attachEvent(d,l),e==top&&function i(e){try{o.documentElement.doScroll("left"),l()}catch(t){setTimeout(i,50)}}())}},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),h(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,r=/^(top|right|bottom|left)$/,o=/\-([a-z])/g,i=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,a,l,s=this._,u=s.style,c=s.currentStyle,f=s.runtimeStyle;return e=("float"===e?"style-float":e).replace(o,i),t=c?c[e]:u[e],n.test(t)&&!r.test(e)&&(a=u.left,l=f&&f.left,l&&(f.left=c.left),u.left="fontSize"===e?"1em":t,t=u.pixelLeft+"px",u.left=a,l&&(f.left=l)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,r){return r?new t(n):new e(n)}}()},addEventListener:{value:function(n,r,o){var a,l=e,s="on"+n;l[s]||(l[s]=function(e){return t(l,u(l,e),a,!1)}),a=l[s][m]||(l[s][m]=[]),i(a,r)<0&&a[o?"unshift":"push"](r)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,r){var o="on"+t,a=(e[o]||v)[m],l=a?i(a,n):-1;l>-1&&a.splice(l,1)}}})}}(this),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.flowplayer=e()}}(function(){var e;return function t(e,n,r){function o(a,l){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!l&&s)return s(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return o(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";var r=t.exports={},o=e("class-list"),i=window.jQuery,a=e("punycode"),l=e("computed-style");r.noop=function(){},r.identity=function(e){return e},r.removeNode=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},r.find=function(e,t){return i?i(e,t).toArray():(t=t||document,Array.prototype.map.call(t.querySelectorAll(e),function(e){return e}))},r.text=function(e,t){e["innerText"in e?"innerText":"textContent"]=t},r.findDirect=function(e,t){return r.find(e,t).filter(function(e){return e.parentNode===t})},r.hasClass=function(e,t){return o(e).contains(t)},r.isSameDomain=function(e){var t=window.location,n=r.createElement("a",{href:e});return t.hostname===n.hostname&&t.protocol===n.protocol&&t.port===n.port},r.css=function(e,t,n){return"object"==typeof t?Object.keys(t).forEach(function(n){r.css(e,n,t[n])}):"undefined"!=typeof n?""===n?e?e.style.removeProperty(t):void 0:e?e.style.setProperty(t,n):void 0:e?l(e,t):void 0},r.createElement=function(e,t,n){try{var o=document.createElement(e);for(var a in t)t.hasOwnProperty(a)&&("css"===a?r.css(o,t[a]):r.attr(o,a,t[a]));return o.innerHTML=n||"",o}catch(l){if(!i)throw l;return i("<"+e+">"+n+"</"+e+">").attr(t)[0]}},r.toggleClass=function(e,t,n){if(e){var r=o(e);"undefined"==typeof n?r.toggle(t):n?r.add(t):n||r.remove(t)}},r.addClass=function(e,t){return r.toggleClass(e,t,!0)},r.removeClass=function(e,t){return r.toggleClass(e,t,!1)},r.append=function(e,t){return e.appendChild(t),e},r.appendTo=function(e,t){return r.append(t,e),e},r.prepend=function(e,t){e.insertBefore(t,e.firstChild)},r.insertAfter=function(e,t,n){t==r.lastChild(e)&&e.appendChild(n);var o=Array.prototype.indexOf.call(e.children,t);e.insertBefore(n,e.children[o+1])},r.html=function(e,t){e=e.length?e:[e],e.forEach(function(e){e.innerHTML=t})},r.attr=function(e,t,n){if("class"===t&&(t="className"),r.hasOwnOrPrototypeProperty(e,t))try{e[t]=n}catch(o){if(!i)throw o;i(e).attr(t,n)}else n===!1?e.removeAttribute(t):e.setAttribute(t,n);return e},r.prop=function(e,t,n){return"undefined"==typeof n?e&&e[t]:void(e[t]=n)},r.offset=function(e){var t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight&&(t={left:100*t.left,right:100*t.right,top:100*t.top,bottom:100*t.bottom,width:100*t.width,height:100*t.height}),t},r.width=function(e,t){if(t)return e.style.width=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).width;return"undefined"==typeof n?e.offsetWidth:n},r.height=function(e,t){if(t)return e.style.height=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).height;return"undefined"==typeof n?e.offsetHeight:n},r.lastChild=function(e){return e.children[e.children.length-1]},r.hasParent=function(e,t){for(var n=e.parentElement;n;){if(r.matches(n,t))return!0;n=n.parentElement}return!1},r.createAbsoluteUrl=function(e){return r.createElement("a",{href:e}).href},r.xhrGet=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===this.readyState?this.status>=400?n():void t(this.responseText):void 0},r.open("get",e,!0),r.send()},r.pick=function(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},r.hostname=function(e){return a.toUnicode(e||window.location.hostname)},r.browser={webkit:"WebkitAppearance"in document.documentElement.style},r.getPrototype=function(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__},r.hasOwnOrPrototypeProperty=function(e,t){for(var n=e;n;){if(Object.prototype.hasOwnProperty.call(n,t))return!0;n=r.getPrototype(n)}return!1},r.matches=function(e,t){var n=Element.prototype,r=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),r=0;n[r]&&n[r]!==t;)r++;return n[r]?!0:!1};return r.call(e,t)},function(e){function t(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})}"undefined"!=typeof e.setAttribute&&(e.setProperty=function(e,n){return this.setAttribute(t(e),String(n))},e.getPropertyValue=function(e){return this.getAttribute(t(e))||null},e.removeProperty=function(e){var n=this.getPropertyValue(e);return this.removeAttribute(t(e)),n})}(window.CSSStyleDeclaration.prototype)},{"class-list":21,"computed-style":23,punycode:29}],2:[function(e,t,n){"use strict";var r=e("../common");t.exports=function(e,t,n,o){n=n||"opaque";var i="obj"+(""+Math.random()).slice(2,15),a='<object class="fp-engine" id="'+i+'" name="'+i+'" ',l=navigator.userAgent.indexOf("MSIE")>-1;a+=l?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+e+'" type="application/x-shockwave-flash">';var s={width:"100%",height:"100%",allowscriptaccess:"always",wmode:n,quality:"high",flashvars:"",movie:e+(l?"?"+i:""),name:i};"transparent"!==n&&(s.bgcolor=o||"#333333"),Object.keys(t).forEach(function(e){s.flashvars+=e+"="+t[e]+"&"}),Object.keys(s).forEach(function(e){a+='<param name="'+e+'" value="'+s[e]+'"/>'}),a+="</object>";var u=r.createElement("div",{},a);return r.find("object",u)},window.attachEvent&&window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})},{"../common":1}],3:[function(e,t,n){"use strict";function r(e){return/^https?:/.test(e)}var o,i=e("../flowplayer"),a=e("../common"),l=e("./embed"),s=e("extend-object"),u=e("bean");o=function(e,t){function n(e){function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))?"#"+t(e[1])+t(e[2])+t(e[3]):void 0}function c(e){if(7===e.length)return e;var t=e.split("").slice(1);return"#"+t.map(function(e){return e+e}).join("")}function f(e){return/application\/x-mpegurl/i.test(e.type)}var d,p,m,v=e.conf,g=(e.video,window,{engineName:o.engineName,pick:function(t){var n=s({},function(){if(i.support.flashVideo){for(var n,r,o=0;o<t.length;o++)if(r=t[o],/mp4|flv|flash/i.test(r.type)&&(n=r),e.conf.swfHls&&/mpegurl/i.test(r.type)&&(n=r),n&&!/mp4/i.test(n.type))return n;return n}}());if(n)return!n.src||r(n.src)||e.conf.rtmp||n.rtmp||(n.src=a.createAbsoluteUrl(n.src)),n},load:function(o){function h(e){return e.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D").replace(/%2A/,'%252A').replace(/%2F/,'%252F')}d=o;var y=a.findDirect("video",t)[0]||a.find(".fp-player > video",t)[0],b=o.src,w=r(b),x=function(){a.removeNode(y)},E=function(e){return e.some(function(e){return!!y.canPlayType(e.type)})};i.support.video&&a.prop(y,"autoplay")&&E(o.sources)?u.one(y,"timeupdate",x):x();var k=o.rtmp||v.rtmp;if(w||k||(b=a.createAbsoluteUrl(b)),m&&f(o)&&m.data!==v.swfHls&&g.unload(),m){["live","preload","loop"].forEach(function(e){o.hasOwnProperty(e)&&m.__set(e,o[e])}),Object.keys(o.flashls||{}).forEach(function(e){m.__set("hls_"+e,o.flashls[e])});var T=!1;if(!w&&k)m.__set("rtmp",k.url||k);else{var S=m.__get("rtmp");T=!!S,m.__set("rtmp",null)}m.__play(b,T||o.rtmp&&o.rtmp!==v.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15),b=h(b);var N={hostname:v.embedded?a.hostname(v.hostname):a.hostname(location.hostname),url:b,callback:p};t.getAttribute("data-origin")&&(N.origin=t.getAttribute("data-origin")),["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(e){v.hasOwnProperty(e)&&(N[e]=v[e]),o.hasOwnProperty(e)&&(N[e]=o[e]),(v.rtmp||{}).hasOwnProperty(e)&&(N[e]=(v.rtmp||{})[e]),(o.rtmp||{}).hasOwnProperty(e)&&(N[e]=(o.rtmp||{})[e])}),v.rtmp&&(N.rtmp=v.rtmp.url||v.rtmp),o.rtmp&&(N.rtmp=o.rtmp.url||o.rtmp),Object.keys(o.flashls||{}).forEach(function(e){var t=o.flashls[e];N["hls_"+e]=t}),void 0!==v.bufferTime&&(N.bufferTime=v.bufferTime),w&&delete N.rtmp,N.rtmp&&(N.rtmp=h(N.rtmp));var C,j=v.bgcolor||a.css(t,"background-color")||"";0===j.indexOf("rgb")?C=n(j):0===j.indexOf("#")&&(C=c(j)),N.initialVolume=e.volumeLevel;var O=f(o)?v.swfHls:v.swf;m=l(O,N,v.wmode,C)[0];var P=a.find(".fp-player",t)[0];a.prepend(P,m),setTimeout(function(){try{if(!m.PercentLoaded())return e.trigger("error",[e,{code:7,url:v.swf}])}catch(t){}},5e3),setTimeout(function(){"undefined"==typeof m.PercentLoaded&&e.trigger("flashdisabled",[e])},1e3),e.off("resume.flashhack").on("resume.flashhack",function(){var t=setTimeout(function(){e.playing&&e.trigger("flashdisabled",[e])},1e3);e.one("progress",function(){clearTimeout(t)})}),m.pollInterval=setInterval(function(){if(m){var t=m.__status?m.__status():null;t&&(e.playing&&t.time&&t.time!==e.video.time&&e.trigger("progress",[e,t.time]),o.buffer=t.buffer/o.bytes*o.duration,e.trigger("buffer",[e,o.buffer]),!o.buffered&&t.time>0&&(o.buffered=!0,e.trigger("buffered",[e])))}},250),window[p]=function(n,r){var o=d;v.debug&&(0===n.indexOf("debug")&&r&&r.length?console.log.apply(console,["-- "+n].concat(r)):console.log("--",n,r));var i={type:n};switch(n){case"ready":r=s(o,r);break;case"click":i.flash=!0;break;case"keydown":i.which=r;break;case"seek":o.time=r;break;case"status":e.trigger("progress",[e,r.time]),r.buffer<o.bytes&&!o.buffered?(o.buffer=r.buffer/o.bytes*o.duration,e.trigger("buffer",o.buffer)):o.buffered||(o.buffered=!0,e.trigger("buffered"))}"click"===n||"keydown"===n?(i.target=t,u.fire(t,n,[i])):"buffered"!=n&&"unload"!==n?setTimeout(function(){e.trigger(i,[e,r])},1):"unload"===n&&e.trigger(i,[e,r])}}},speed:a.noop,unload:function(){m&&m.__unload&&m.__unload();try{p&&window[p]&&delete window[p]}catch(n){}a.find("object",t).forEach(a.removeNode),m=0,e.off(".flashengine"),clearInterval(m.pollInterval)}});return["pause","resume","seek","volume"].forEach(function(t){g[t]=function(n){try{e.ready&&(void 0===n?m["__"+t]():m["__"+t](n))}catch(r){if("undefined"==typeof m["__"+t])return e.trigger("flashdisabled",[e]);throw r}}}),g},o.engineName="flash",o.canPlay=function(e,t){return i.support.flashVideo&&/video\/(mp4|flash|flv)/i.test(e)||i.support.flashVideo&&t.swfHls&&/mpegurl/i.test(e)},i.engines.push(o)},{"../common":1,"../flowplayer":18,"./embed":2,bean:20,"extend-object":25}],4:[function(e,t,n){"use strict";function r(e,t){return t=t||100,Math.round(e*t)/t}function o(e){return/mpegurl/i.test(e)?"application/x-mpegurl":e}function i(e){return/^(video|application)/i.test(e)||(e=o(e)),!!m.canPlayType(e).replace("no","")}function a(e,t){var n=e.filter(function(e){return e.type===t});return n.length?n[0]:null}var l,s,u=e("../flowplayer"),c=e("bean"),f=e("class-list"),d=e("extend-object"),p=e("../common"),m=document.createElement("video"),v={ended:"finish",pause:"pause",play:"resume",progress:"buffer",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadeddata:"ready",error:"error",dataunavailable:"error",webkitendfullscreen:!/iPhone OS 10/.test(navigator.userAgent) && !u.support.inlineVideo&&"unload"},g=function(e,t,n,r){if("undefined"==typeof t&&(t=!0),"undefined"==typeof n&&(n="none"),"undefined"==typeof r&&(r=!0),r&&l)return l.type=o(e.type),l.src=e.src,p.find("track",l).forEach(p.removeNode),l.removeAttribute("crossorigin"),l;var i=document.createElement("video");return i.src=e.src,i.type=o(e.type),i.className="fp-engine",i.autoplay=t?"autoplay":!1,i.preload=n,i.setAttribute("x-webkit-airplay","allow"),r&&(l=i),i};s=function(e,t){function n(n,o,a){var l=t.getAttribute("data-flowplayer-instance-id");if(n.listeners&&n.listeners.hasOwnProperty(l))return void(n.listeners[l]=a);(n.listeners||(n.listeners={}))[l]=a,c.on(o,"error",function(t){try{i(t.target.getAttribute("type"))&&e.trigger("error",[e,{code:4,video:d(a,{src:n.src,url:n.src})}])}catch(r){}}),e.on("shutdown",function(){c.off(o)});var s={};return Object.keys(v).forEach(function(o){var i=v[o];if(i){var u=function(s){if(a=n.listeners[l],s.target&&f(s.target).contains("fp-engine")&&(w.debug&&!/progress/.test(i)&&console.log(o,"->",i,s),(e.ready||/ready|error/.test(i))&&i&&p.find("video",t).length)){var u;if("unload"===i)return void e.unload();var c=function(){e.trigger(i,[e,u])};switch(i){case"ready":u=d(a,{duration:n.duration,width:n.videoWidth,height:n.videoHeight,url:n.currentSrc,src:n.currentSrc});try{u.seekable=!e.live&&/mpegurl/i.test(a?a.type||"":"")&&n.duration||n.seekable&&n.seekable.end(null)}catch(v){}if(m=m||setInterval(function(){try{u.buffer=n.buffered.end(null)}catch(t){}u.buffer&&(r(u.buffer,1e3)<r(u.duration,1e3)&&!u.buffered?e.trigger("buffer",s):u.buffered||(u.buffered=!0,e.trigger("buffer",s).trigger("buffered",s),clearInterval(m),m=0))},250),!e.live&&!u.duration&&!b.hlsDuration&&"loadeddata"===o){var g=function(){u.duration=n.duration;try{u.seekable=n.seekable&&n.seekable.end(null)}catch(e){}c(),n.removeEventListener("durationchange",g),f(t).remove("is-live")};n.addEventListener("durationchange",g);var h=function(){e.ready||n.duration||(u.duration=0,f(t).add("is-live"),c()),n.removeEventListener("timeupdate",h)};return void n.addEventListener("timeupdate",h)}break;case"progress":case"seek":e.video.duration;if(n.currentTime>0||e.live)u=Math.max(n.currentTime,0);else if("progress"==i)return;break;case"speed":u=r(n.playbackRate);break;case"volume":u=r(n.volume);break;case"error":try{u=(s.srcElement||s.originalTarget).error,u.video=d(a,{src:n.src,url:n.src})}catch(y){return}}c()}};t.addEventListener(o,u,!0),s[o]||(s[o]=[]),s[o].push(u)}}),s}var o,m,h,y=p.findDirect("video",t)[0]||p.find(".fp-player > video",t)[0],b=u.support,w=(p.find("track",y)[0],e.conf);return o={engineName:s.engineName,pick:function(e){var t=function(){if(b.video){if(w.videoTypePreference){var t=a(e,w.videoTypePreference);if(t)return t}for(var n=0;n<e.length;n++)if(i(e[n].type))return e[n]}}();if(t)return"string"==typeof t.src&&(t.src=p.createAbsoluteUrl(t.src)),t},load:function(r){var i=!1,a=p.find(".fp-player",t)[0],l=!1;w.splash&&!y?(y=g(r),p.prepend(a,y),i=!0):y?(f(y).add("fp-engine"),p.find("source,track",y).forEach(p.removeNode),e.conf.nativesubtitles||p.attr(y,"crossorigin",!1),l=y.src===r.src):(y=g(r,!!r.autoplay||!!w.autoplay,w.clip.preload||"metadata",!1),p.prepend(a,y),i=!0),b.inlineVideo||p.css(y,{position:"absolute",top:"-9999em"}),c.off(y,"timeupdate",p.noop),c.on(y,"timeupdate",p.noop),p.prop(y,"loop",!(!r.loop&&!w.loop)),"undefined"!=typeof h&&(y.volume=h),(e.video.src&&r.src!=e.video.src||r.index)&&p.attr(y,"autoplay","autoplay"),y.src=r.src,y.type=r.type,o._listeners=n(y,p.find("source",y).concat(y),r),("none"!=w.clip.preload&&"mpegurl"!=r.type||!b.zeropreload||!b.dataload)&&y.load(),(i||l)&&y.load(),y.paused&&(r.autoplay||w.autoplay)&&y.play()},pause:function(){y.pause()},resume:function(){y.play()},speed:function(e){y.playbackRate=e},seek:function(t){try{var n=e.paused;y.currentTime=t,n&&y.pause()}catch(r){}},volume:function(e){h=e,y&&(y.volume=e)},unload:function(){p.find("video.fp-engine",t).forEach(p.removeNode),b.cachedVideoTag||(l=null),m=clearInterval(m);var e=t.getAttribute("data-flowplayer-instance-id");delete y.listeners[e],y=0,o._listeners&&Object.keys(o._listeners).forEach(function(e){o._listeners[e].forEach(function(n){t.removeEventListener(e,n,!0)})})}}},s.canPlay=function(e){return u.support.video&&i(e)},s.engineName="html5",u.engines.push(s)},{"../common":1,"../flowplayer":18,bean:20,"class-list":21,"extend-object":25}],5:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=e("./resolve").TYPE_RE,i=e("scriptjs"),a=e("bean");r(function(e,t){var n,r=e.conf.analytics,l=0,s=0;if(r){"undefined"==typeof _gat&&i("//google-analytics.com/ga.js");var u=function(){var e=_gat._getTracker(r); if( typeof e._setAllowLinker == 'undefined' ) return false; return e._setAllowLinker(!0),e},c=function(r,i,a){if(a=a||e.video,l&&"undefined"!=typeof _gat){var s=u(); if(!s) return; s._trackEvent("Video / Seconds played",e.engine.engineName+"/"+a.type,a.title||t.getAttribute("title")||a.src.split("/").slice(-1)[0].replace(o,""),Math.round(l/1e3)),l=0,n&&(clearTimeout(n),n=null)}};e.bind("load unload",c).bind("progress",function(){e.seeking||(l+=s?+new Date-s:0,s=+new Date),n||(n=setTimeout(function(){n=null;var e=u();e._trackEvent("Flowplayer heartbeat","Heartbeat","",0,!0)},6e5))}).bind("pause",function(){s=0}),e.bind("shutdown",function(){a.off(window,"unload",c)}),a.on(window,"unload",c)}})},{"../flowplayer":18,"./resolve":13,bean:20,scriptjs:28}],6:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=e("class-list"),i=e("../common"),a=e("bean");r(function(e,t){function n(e){t.className=t.className.replace(l," "),e>=0&&o(t).add("cue"+e)}function r(t){var n=t&&!isNaN(t.time)?t.time:t;return 0>n&&(n=e.video.duration+n),.125*Math.round(n/.125)}var l=/ ?cue\d+ ?/,s=!1,u={},c=-.125,f=function(t){var r=e.cuepoints.indexOf(t);isNaN(t)||(t={time:t}),t.index=r,n(r),e.trigger("cuepoint",[e,t])};e.on("progress",function(e,t,n){if(!s)for(var o=r(n);o>c;)c+=.125,u[c]&&u[c].forEach(f)}).on("unload",n).on("beforeseek",function(e){setTimeout(function(){e.defaultPrevented||(s=!0)})}).on("seek",function(e,t,o){n(),c=r(o||0)-.125,s=!1,!o&&u[0]&&u[0].forEach(f)}).on("ready",function(t,n,r){c=-.125;var o=r.cuepoints||e.conf.cuepoints||[];e.setCuepoints(o)}).on("finish",function(){c=-.125}),e.conf.generate_cuepoints&&e.bind("load",function(){i.find(".fp-cuepoint",t).forEach(i.removeNode)}),e.setCuepoints=function(t){return e.cuepoints=[],u={},t.forEach(e.addCuepoint),e},e.addCuepoint=function(n){e.cuepoints||(e.cuepoints=[]);var o=r(n);if(u[o]||(u[o]=[]),u[o].push(n),e.cuepoints.push(n),e.conf.generate_cuepoints&&n.visible!==!1){var l=e.video.duration,s=i.find(".fp-timeline",t)[0];i.css(s,"overflow","visible");var c=n.time||n;0>c&&(c=l+c);var f=i.createElement("a",{className:"fp-cuepoint fp-cuepoint"+(e.cuepoints.length-1)});i.css(f,"left",c/l*100+"%"),s.appendChild(f),a.on(f,"mousedown",function(t){t.preventDefault(),t.stopPropagation(),e.seek(c)})}return e},e.removeCuepoint=function(t){var n=e.cuepoints.indexOf(t),o=r(t);if(-1!==n){e.cuepoints=e.cuepoints.slice(0,n).concat(e.cuepoints.slice(n+1));var i=u[o].indexOf(t);if(-1!==i)return u[o]=u[o].slice(0,i).concat(u[o].slice(i+1)),e}}})},{"../common":1,"../flowplayer":18,bean:20,"class-list":21}],7:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=e("bean"),i=e("../common"),a=(e("is-object"),e("extend-object")),l=e("class-list");r(function(e,t){if(e.conf.embed!==!1){var n=(e.conf,i.find(".fp-ui",t)[0]),r=i.createElement("a",{"class":"fp-embed",title:"Copy to your site"}),l=i.createElement("div",{"class":"fp-embed-code"},"<label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea>"),u=i.find("textarea",l)[0];n.appendChild(r),n.appendChild(l),e.embedCode=function(){var n=e.conf.embed||{},r=e.video;if(n.iframe){var o=(e.conf.embed.iframe,n.width||r.width||i.width(t)),l=n.height||r.height||i.height(t);return'<iframe src="'+e.conf.embed.iframe+'" allowfullscreen style="width:'+o+";height:"+l+';border:none;"></iframe>'}var s=["ratio","rtmp","live","bufferTime","origin","analytics","key","subscribe","swf","swfHls","embed","adaptiveRatio","logo"];n.playlist&&s.push("playlist");var u=i.pick(e.conf,s);u.logo&&(u.logo=i.createElement("img",{src:u.logo}).src),n.playlist&&e.conf.playlist.length||(u.clip=a({},e.conf.clip,i.pick(e.video,["sources"])));var c='var w=window,d=document,e;w._fpes||(w._fpes=[],w.addEventListener("load",function(){var s=d.createElement("script");s.src="//foliovision.com/flowplayer/6.0.5/embed.min.js",d.body.appendChild(s)})),e=[].slice.call(d.getElementsByTagName("script"),-1)[0].parentNode,w._fpes.push({e:e,l:"$library",c:$conf});\n'.replace("$conf",JSON.stringify(u)).replace("$library",n.library||"");return'<a href="$href">Watch video!\n<script>$script</script></a>'.replace("$href",e.conf.origin||window.location.href).replace("$script",c)},s(t,".fp-embed","is-embedding"),o.on(t,"click",".fp-embed-code textarea",function(){u.select()}),o.on(t,"click",".fp-embed",function(){u.textContent=e.embedCode().replace(/(\r\n|\n|\r)/gm,""),u.focus(),u.select()})}});var s=function(e,t,n){function r(){a.remove(n),o.off(document,".st")}var a=l(e);o.on(e,"click",t||"a",function(e){e.preventDefault(),a.toggle(n),a.contains(n)&&(o.on(document,"keydown.st",function(e){27==e.which&&r()}),o.on(document,"click.st",function(e){i.hasParent(e.target,"."+n)||r()}))})}},{"../common":1,"../flowplayer":18,bean:20,"class-list":21,"extend-object":25,"is-object":27}],8:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=document.createElement("div"));var n={},r={},o=function(e,o,i){var a=e.split(".")[0],l=function(s){i&&(t.removeEventListener(a,l),n[e].splice(n[e].indexOf(l),1));var u=[s].concat(r[s.timeStamp+s.type]||[]);o&&o.apply(void 0,u)};t.addEventListener(a,l),n[e]||(n[e]=[]),n[e].push(l)};e.on=e.bind=function(t,n){var r=t.split(" ");return r.forEach(function(e){o(e,n)}),e},e.one=function(t,n){var r=t.split(" ");return r.forEach(function(e){o(e,n,!0)}),e};var i=function(e,t){return 0===t.filter(function(t){return-1===e.indexOf(t)}).length};e.off=e.unbind=function(r){var o=r.split(" ");return o.forEach(function(e){var r=e.split(".").slice(1),o=e.split(".")[0];Object.keys(n).filter(function(e){var t=e.split(".").slice(1);return(!o||0===e.indexOf(o))&&i(t,r)}).forEach(function(e){var r=n[e],o=e.split(".")[0];r.forEach(function(e){t.removeEventListener(o,e),r.splice(r.indexOf(e),1)})})}),e},e.trigger=function(n,o,i){if(n){o=(o||[]).length?o||[]:[o];var a,l=document.createEvent("Event");return a=n.type||n,l.initEvent(a,!1,!0),Object.defineProperty&&(l.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}),r[l.timeStamp+l.type]=o,t.dispatchEvent(l),i?l:e}}},t.exports.EVENTS=["beforeseek","disable","error","finish","fullscreen","fullscreen-exit","load","mute","pause","progress","ready","resume","seek","speed","stop","unload","volume","boot","shutdown"]},{}],9:[function(e,t,n){"use strict";var r,o=e("../flowplayer"),i=e("bean"),a=e("class-list"),l=(e("extend-object"),e("../common")),s=(o.support.browser.mozilla?"moz":"webkit","fullscreen"),u="fullscreen-exit",c=o.support.fullscreen,f=("function"==typeof document.exitFullscreen,navigator.userAgent.toLowerCase()),d=/(safari)[ \/]([\w.]+)/.exec(f)&&!/(chrome)[ \/]([\w.]+)/.exec(f);i.on(document,"fullscreenchange.ffscr webkitfullscreenchange.ffscr mozfullscreenchange.ffscr MSFullscreenChange.ffscr",function(e){var t=document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement||e.target;if(r||t.parentNode&&t.parentNode.getAttribute("data-flowplayer-instance-id")){var n=r||o(t.parentNode);t&&!r?r=n.trigger(s,[t]):(r.trigger(u,[r]),r=null)}}),o(function(e,t){var n=l.createElement("div",{className:"fp-player"});if(Array.prototype.map.call(t.children,l.identity).forEach(function(e){l.matches(e,".fp-ratio,script")||n.appendChild(e)}),t.appendChild(n),e.conf.fullscreen){var o,i,f=window,p=a(t);e.isFullscreen=!1,e.fullscreen=function(t){return e.disabled?void 0:(void 0===t&&(t=!e.isFullscreen),t&&(o=f.scrollY,i=f.scrollX),c?t?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){return"function"==typeof n[e]?(n[e](Element.ALLOW_KEYBOARD_INPUT),!d||document.webkitCurrentFullScreenElement||document.mozFullScreenElement||n[e](),!1):void 0}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){return"function"==typeof document[e]?(document[e](),!1):void 0}):e.trigger(t?s:u,[e]),e)};var m;e.on("mousedown.fs",function(){+new Date-m<150&&e.ready&&e.fullscreen(),m=+new Date}),e.on(s,function(n){p.add("is-fullscreen"),c||l.css(t,"position","fixed"),e.isFullscreen=!0}).on(u,function(n){var r;c||"html5"!==e.engine||(r=t.css("opacity")||"",l.css(t,"opacity",0)),c||l.css(t,"position",""),p.remove("is-fullscreen"),c||"html5"!==e.engine||setTimeout(function(){t.css("opacity",r)}),e.isFullscreen=!1,f.scrollTo(i,o)}).on("unload",function(){e.isFullscreen&&e.fullscreen()}),e.on("shutdown",function(){r=null})}})},{"../common":1,"../flowplayer":18,bean:20,"class-list":21,"extend-object":25}],10:[function(e,t,n){"use strict";var r,o,i=e("../flowplayer"),a=e("bean"),l="is-help",s=e("../common"),u=e("class-list");a.on(document,"keydown.fp",function(e){var t=r,n=e.ctrlKey||e.metaKey||e.altKey,i=e.which,a=t&&t.conf,s=o&&u(o);if(t&&a.keyboard&&!t.disabled){if(-1!=[63,187,191].indexOf(i))return s.toggle(l),!1;if(27==i&&s.contains(l))return s.toggle(l),!1;if(!n&&t.ready){if(e.preventDefault(),e.shiftKey)return void(39==i?t.speed(!0):37==i&&t.speed(!1));if(58>i&&i>47)return t.seekTo(i-48);switch(i){case 38:case 75:t.volume(t.volumeLevel+.15);break;case 40:case 74:t.volume(t.volumeLevel-.15);break;case 39:case 76:t.seeking=!0,t.seek(!0);break;case 37:case 72:t.seeking=!0,t.seek(!1);break;case 190:t.seekTo();break;case 32:t.toggle();break;case 70:a.fullscreen&&t.fullscreen();break;case 77:t.mute();break;case 81:t.unload()}}}}),i(function(e,t){if(e.conf.keyboard){a.on(t,"mouseenter mouseleave",function(n){r=e.disabled||"mouseover"!=n.type?0:e,r&&(o=t)});var n=i.support.video&&"flash"!==e.conf.engine&&document.createElement("video").playbackRate?"<p><em>shift</em> + <em>&#8592;</em><em>&#8594;</em>slower / faster</p>":"";if(t.appendChild(s.createElement("div",{
7
+ className:"fp-help"},' <a class="fp-close"></a> <div class="fp-help-section fp-help-basics"> <p><em>space</em>play / pause</p> <p><em>q</em>unload | stop</p> <p><em>f</em>fullscreen</p>'+n+' </div> <div class="fp-help-section"> <p><em>&#8593;</em><em>&#8595;</em>volume</p> <p><em>m</em>mute</p> </div> <div class="fp-help-section"> <p><em>&#8592;</em><em>&#8594;</em>seek</p> <p><em>&nbsp;. </em>seek to previous </p><p><em>1</em><em>2</em>&hellip; <em>6</em> seek to 10%, 20% &hellip; 60% </p> </div> ')),e.conf.tooltip){var c=s.find(".fp-ui",t)[0];c.setAttribute("title","Hit ? for help"),a.one(t,"mouseout.tip",".fp-ui",function(){c.removeAttribute("title")})}a.on(t,"click",".fp-close",function(){u(t).toggle(l)}),e.bind("shutdown",function(){o==t&&(o=null)})}})},{"../common":1,"../flowplayer":18,bean:20,"class-list":21}],11:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=/IEMobile/.test(window.navigator.userAgent),i=e("class-list"),a=e("../common"),l=e("bean"),s=e("./ui").format,u=window.navigator.userAgent;(r.support.touch||o)&&r(function(e,t){var n=/Android/.test(u)&&!/Firefox/.test(u)&&!/Opera/.test(u),c=/Silk/.test(u),f=n?parseFloat(/Android\ (\d\.\d)/.exec(u)[1],10):0,d=i(t);if(n&&!o){if(!/Chrome/.test(u)&&4>f){var p=e.load;e.load=function(t,n){var r=p.apply(e,arguments);return e.trigger("ready",[e,e.video]),r}}var m,v=0,g=function(e){m=setInterval(function(){e.video.time=++v,e.trigger("progress",[e,v])},1e3)};e.bind("ready pause unload",function(){m&&(clearInterval(m),m=null)}),e.bind("ready",function(){v=0}),e.bind("resume",function(t,n){return n.live?v?g(n):void e.one("progress",function(e,t,n){0===n&&g(t)}):void 0})}r.support.volume||(d.add("no-volume"),d.add("no-mute")),d.add("is-touch"),e.sliders&&e.sliders.timeline&&e.sliders.timeline.disableAnimation(),(!r.support.inlineVideo||e.conf.native_fullscreen)&&(e.conf.nativesubtitles=!0);var h=!1;l.on(t,"touchmove",function(){h=!0}),l.on(t,"touchend click",function(t){return h?void(h=!1):e.playing&&!d.contains("is-mouseover")?(d.add("is-mouseover"),d.remove("is-mouseout"),t.preventDefault(),void t.stopPropagation()):void(e.playing||e.splash||!d.contains("is-mouseout")||d.contains("is-mouseover")||setTimeout(function(){e.playing||e.splash||e.resume()},400))}),e.conf.native_fullscreen&&"function"==typeof document.createElement("video").webkitEnterFullScreen&&(e.fullscreen=function(){var e=a.find("video.fp-engine",t)[0];e.webkitEnterFullScreen(),l.one(e,"webkitendfullscreen",function(){a.prop(e,"controls",!0),a.prop(e,"controls",!1)})}),(n||c)&&e.bind("ready",function(){var n=a.find("video.fp-engine",t)[0];l.one(n,"canplay",function(){n.play()}),n.play(),e.bind("progress.dur",function(){var r=n.duration;1!==r&&(e.video.duration=r,a.find(".fp-duration",t)[0].innerHTML=s(r),e.unbind("progress.dur"))})})})},{"../common":1,"../flowplayer":18,"./ui":17,bean:20,"class-list":21}],12:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=e("extend-object"),i=e("bean"),a=e("class-list"),l=e("../common"),s=e("./resolve"),u=new s,c=window.jQuery,f=/^#/;r(function(e,t){function n(){return l.find(v.query,r())}function r(){return f.test(v.query)?void 0:t}function d(){return l.find(v.query+"."+g,r())}function p(){var n=l.find(".fp-playlist",t)[0];if(!n){n=l.createElement("div",{className:"fp-playlist"});var r=l.find(".fp-next,.fp-prev",t);r.length?r[0].parentElement.insertBefore(n,r[0]):l.insertAfter(t,l.find("video",t)[0],n)}n.innerHTML="",e.conf.playlist[0].length&&(e.conf.playlist=e.conf.playlist.map(function(e){if("string"==typeof e){var t=e.split(s.TYPE_RE)[1];return{sources:[{type:"m3u8"===t.toLowerCase()?"application/x-mpegurl":"video/"+t,src:e}]}}return{sources:e.map(function(e){var t={};return Object.keys(e).forEach(function(n){t.type=/mpegurl/i.test(n)?"application/x-mpegurl":"video/"+n,t.src=e[n]}),t})}})),e.conf.playlist.forEach(function(e,t){var r=e.sources[0].src;n.appendChild(l.createElement("a",{href:r,"data-index":t}))})}function m(t){return"undefined"!=typeof t.index?t.index:"undefined"!=typeof e.video.index?e.video.index:e.conf.startIndex||0}var v=o({active:"is-active",advance:!0,query:".fp-playlist a"},e.conf),g=v.active,h=a(t);e.play=function(t){if(void 0===t)return e.resume();if("number"==typeof t&&!e.conf.playlist[t])return e;if("number"!=typeof t)return e.load.apply(null,arguments);var n=o({index:t},e.conf.playlist[t]);return t===e.video.index?e.load(n,function(){e.resume()}):(e.off("resume.fromfirst"),e.load(n,function(){e.video.index=t}),e)},e.next=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=n===e.conf.playlist.length-1?0:n+1,e.play(n)),e},e.prev=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=0===n?e.conf.playlist.length-1:n-1,e.play(n)),e},e.setPlaylist=function(t){return e.conf.playlist=t,delete e.video.index,p(),e},e.addPlaylistItem=function(t){return e.setPlaylist(e.conf.playlist.concat([t]))},e.removePlaylistItem=function(t){var n=e.conf.playlist;return e.setPlaylist(n.slice(0,t).concat(n.slice(t+1)))},i.on(t,"click",".fp-next",e.next),i.on(t,"click",".fp-prev",e.prev),v.advance&&e.off("finish.pl").on("finish.pl",function(e,t){if(t.video.loop)return t.seek(0,function(){t.resume()});var n=t.video.index>=0?t.video.index+1:void 0;n<t.conf.playlist.length||v.loop?(n=n===t.conf.playlist.length?0:n,h.remove("is-finished"),setTimeout(function(){t.play(n)})):t.conf.playlist.length>1&&t.one("resume.fromfirst",function(){return t.play(0),!1})});var y=!1;e.conf.playlist.length&&(y=!0,p(),e.conf.clip&&e.conf.clip.sources.length||(e.conf.clip=e.conf.playlist[e.conf.startIndex||0])),n().length&&!y&&(e.conf.playlist=[],delete e.conf.startIndex,n().forEach(function(t){var n=t.href;t.setAttribute("data-index",e.conf.playlist.length);var r=u.resolve(n,e.conf.clip.sources);c&&o(r,c(t).data()),e.conf.playlist.push(r)})),i.on(f.test(v.query)?document:t,"click",v.query,function(t){t.preventDefault();var n=t.currentTarget,r=Number(n.getAttribute("data-index"));-1!=r&&e.play(r)}),e.on("load",function(n,o,i){if(e.conf.playlist.length){var s=d()[0],u=s&&s.getAttribute("data-index"),c=i.index=m(i),f=l.find(v.query+'[data-index="'+c+'"]',r())[0],p=c==e.conf.playlist.length-1;s&&a(s).remove(g),f&&a(f).add(g),h.remove("video"+u),h.add("video"+c),l.toggleClass(t,"last-video",p),i.index=o.video.index=c,i.is_last=o.video.is_last=p}}).on("unload.pl",function(){e.conf.playlist.length&&(d().forEach(function(e){a(e).toggle(g)}),e.conf.playlist.forEach(function(e,t){h.remove("video"+t)}))}),e.conf.playlist.length&&(e.conf.loop=!1)})},{"../common":1,"../flowplayer":18,"./resolve":13,bean:20,"class-list":21,"extend-object":25}],13:[function(e,t,n){"use strict";function r(e){var t=e.attr("src"),n=e.attr("type")||"",r=t.split(i)[1];return n=n.toLowerCase(),a(e.data(),{src:t,suffix:r||n,type:n||r})}function o(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}var i=/\.(\w{3,4})(\?.*)?$/i,a=e("extend-object");t.exports=function(){var e=this;e.sourcesFromVideoTag=function(e,t){var n=[];return t("source",e).each(function(){n.push(r(t(this)))}),!n.length&&e.length&&n.push(r(e)),n},e.resolve=function(e,t){return e?("string"==typeof e&&(e={src:e,sources:[]},e.sources=(t||[]).map(function(t){var n=t.src.split(i)[1];return{type:t.type,src:e.src.replace(i,"."+n+"$2")}})),e instanceof Array&&(e={sources:e.map(function(e){return e.type&&e.src?e:Object.keys(e).reduce(function(t,n){return a(t,{type:o(n),src:e[n]})},{})})}),e):{sources:t}}},t.exports.TYPE_RE=i},{"extend-object":25}],14:[function(e,t,n){"use strict";var r=e("class-list"),o=e("bean"),i=e("../common"),a=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},l=function(e,t){var n,l,s,u,c,f,d,p,m=(/iPad/.test(navigator.userAgent)&&!/CriOS/.test(navigator.userAgent),i.lastChild(e)),v=r(e),g=r(m),h=!1,y=function(){l=i.offset(e),s=i.width(e),u=i.height(e),f=c?u:s,p=E(d)},b=function(t){n||t==k.value||d&&!(d>t)||(o.fire(e,"slide",[t]),k.value=t)},w=function(e){var n=e.pageX||e.clientX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var r=c?e.pageY-l.top:n-l.left;r=Math.max(0,Math.min(p||f,r));var o=r/f;return c&&(o=1-o),t&&(o=1-o),x(o,0,!0)},x=function(e,t){void 0===t&&(t=0),e>1&&(e=1);var n=Math.round(1e3*e)/10+"%";return(!d||d>=e)&&(g.remove("animated"),h?g.remove("animated"):(g.add("animated"),i.css(m,"transition-duration",(t||0)+"ms")),i.css(m,"width",n)),e},E=function(e){return Math.max(0,Math.min(f,c?(1-e)*u:e*s))},k={max:function(e){d=e},disable:function(e){n=e},slide:function(e,t,n){y(),n&&b(e),x(e,t)},disableAnimation:function(t,n){h=t!==!1,i.toggleClass(e,"no-animation",!!n)}};return y(),o.on(e,"mousedown.sld touchstart",function(e){if(e.preventDefault(),!n){var t=a(b,100);y(),k.dragging=!0,v.add("is-dragging"),b(w(e)),o.on(document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),t(w(e))}),o.one(document,"mouseup touchend",function(){k.dragging=!1,v.remove("is-dragging"),o.off(document,"mousemove.sld touchmove.sld")})}}),k};t.exports=l},{"../common":1,bean:20,"class-list":21}],15:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=e("../common"),i=e("bean"),a=e("class-list");r.defaults.subtitleParser=function(e){function t(e){var t=e.split(":");return 2==t.length&&t.unshift(0),60*t[0]*60+60*t[1]+parseFloat(t[2].replace(",","."))}for(var n,r,o,i=/^(([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/,a=[],l=0,s=e.split("\n"),u=s.length,c={};u>l;l++)if(r=i.exec(s[l])){for(n=s[l-1],o="<span class='fp-subtitle-line'>"+s[++l]+"</span><br/>";"string"==typeof s[++l]&&s[l].trim()&&l<s.length;)o+="<span class='fp-subtitle-line'>"+s[l]+"</span><br/>";c={title:n,startTime:t(r[1]),endTime:t(r[3]),text:o},a.push(c)}return a},r(function(e,t){var n,l,s,u,c=a(t),f=function(){u=o.createElement("a",{className:"fp-menu"});var n=o.createElement("ul",{className:"fp-dropdown fp-dropup"});return n.appendChild(o.createElement("li",{"data-subtitle-index":-1},"No subtitles")),(e.video.subtitles||[]).forEach(function(e,t){var r=e.srclang||"en",i=e.label||"Default ("+r+")",a=o.createElement("li",{"data-subtitle-index":t},i);n.appendChild(a)}),u.appendChild(n),o.find(".fp-controls",t)[0].appendChild(u),u};i.on(t,"click",".fp-menu",function(e){a(u).toggle("dropdown-open")}),i.on(t,"click",".fp-menu li[data-subtitle-index]",function(t){var n=t.target.getAttribute("data-subtitle-index");return"-1"===n?e.disableSubtitles():void e.loadSubtitles(n)});var d=function(){var e=o.find(".fp-player",t)[0];s=o.find(".fp-subtitle",t)[0],s=s||o.appendTo(o.createElement("div",{"class":"fp-subtitle"}),e),Array.prototype.forEach.call(s.children,o.removeNode),n=a(s),o.find(".fp-menu",t).forEach(o.removeNode),f()};e.on("ready",function(n,i,a){var l=i.conf;if(r.support.subtitles&&l.nativesubtitles&&"html5"==i.engine.engineName){var s=function(e){var n=o.find("video",t)[0].textTracks;n.length&&(n[0].mode=e)};if(!a.subtitles||!a.subtitles.length)return;var u=o.find("video.fp-engine",t)[0];return a.subtitles.some(function(e){return!o.isSameDomain(e.src)})&&o.attr(u,"crossorigin","anonymous"),u.textTracks.addEventListener("addtrack",function(){s("disabled"),s("showing")}),void a.subtitles.forEach(function(e){u.appendChild(o.createElement("track",{kind:"subtitles",srclang:e.srclang||"en",label:e.label||"en",src:e.src,"default":e["default"]}))})}if(i.subtitles=[],d(),c.remove("has-menu"),e.disableSubtitles(),a.subtitles&&a.subtitles.length){c.add("has-menu");var f=a.subtitles.filter(function(e){return e["default"]})[0];f&&i.loadSubtitles(a.subtitles.indexOf(f))}}),e.bind("cuepoint",function(e,t,r){r.subtitle?(l=r.index,o.html(s,r.subtitle.text),n.add("fp-active")):r.subtitleEnd&&(n.remove("fp-active"),l=r.index)}),e.bind("seek",function(t,r,o){l&&e.cuepoints[l]&&e.cuepoints[l].time>o&&(n.remove("fp-active"),l=null),(e.cuepoints||[]).forEach(function(t){var n=t.subtitle;n&&l!=t.index?o>=t.time&&(!n.endTime||o<=n.endTime)&&e.trigger("cuepoint",[e,t]):t.subtitleEnd&&o>=t.time&&t.index==l+1&&e.trigger("cuepoint",[e,t])})});var p=function(e){o.toggleClass(o.find("li.active",t)[0],"active"),o.toggleClass(o.find('li[data-subtitle-index="'+e+'"]',t)[0],"active")};e.disableSubtitles=function(){return e.subtitles=[],(e.cuepoints||[]).forEach(function(t){(t.subtitle||t.subtitleEnd)&&e.removeCuepoint(t)}),s&&Array.prototype.forEach.call(s.children,o.removeNode),p(-1),e},e.loadSubtitles=function(t){e.disableSubtitles();var n=e.video.subtitles[t],r=n.src;return r?(p(t),o.xhrGet(r,function(t){var n=e.conf.subtitleParser(t);n.forEach(function(t){var n={time:t.startTime,subtitle:t,visible:!1};e.subtitles.push(t),e.addCuepoint(n),e.addCuepoint({time:t.endTime,subtitleEnd:t.title,visible:!1}),0!==t.startTime||e.video.time||e.trigger("cuepoint",[e,n])})},function(){return e.trigger("error",{code:8,url:r}),!1}),e):void 0}})},{"../common":1,"../flowplayer":18,bean:20,"class-list":21}],16:[function(e,t,n){"use strict";var r=e("../flowplayer"),o=e("extend-object");!function(){var e=function(e){var t=/Version\/(\d\.\d)/.exec(e);return t&&t.length>1?parseFloat(t[1],10):0},t=function(){var e=document.createElement("video");return e.loop=!0,e.autoplay=!0,e.preload=!0,e},n={},i=navigator.userAgent.toLowerCase(),a=/(chrome)[ \/]([\w.]+)/.exec(i)||/(safari)[ \/]([\w.]+)/.exec(i)||/(webkit)[ \/]([\w.]+)/.exec(i)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(i)||/(msie) ([\w.]+)/.exec(i)||i.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(i)||[];a[1]&&(n[a[1]]=!0,n.version=a[2]||"0");var l=t(),s=navigator.userAgent,u=n.msie||/Trident\/7/.test(s),c=/iPad|MeeGo/.test(s)&&!/CriOS/.test(s),f=/iPad/.test(s)&&/CriOS/.test(s),d=/iP(hone|od)/i.test(s)&&!/iPad/.test(s)&&!/IEMobile/i.test(s),p=/Android/.test(s)&&!/Firefox/.test(s),m=/Android/.test(s)&&/Firefox/.test(s),v=/Silk/.test(s),g=/IEMobile/.test(s),h=g?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(s)[1],10):0,y=g?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(s)[1],10):0,b=(c?e(s):0,p?parseFloat(/Android\ (\d\.\d)/.exec(s)[1],10):0),w=o(r.support,{browser:n,subtitles:!!l.addTextTrack,fullscreen:"function"==typeof document.webkitCancelFullScreen&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(s)||document.mozFullScreenEnabled||"function"==typeof document.exitFullscreen||"function"==typeof document.msExitFullscreen,inlineBlock:!(u&&n.version<8),touch:"ontouchstart"in window,dataload:!c&&!d&&!g,zeropreload:!u&&!p,volume:!(c||p||d||v||f),cachedVideoTag:!(c||d||f||g),firstframe:!(d||c||p||v||f||g||m),inlineVideo:!d&&(!g||h>=8.1&&y>=11)&&(!p||b>=3),hlsDuration:!p&&(!n.safari||c||d||f),seekable:!c&&!f});try{var x=navigator.plugins["Shockwave Flash"],E=u?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):x.description;u||x[0].enabledPlugin?(E=E.split(/\D+/),E.length&&!E[0]&&(E=E.slice(1)),w.flashVideo=E[0]>9||9==E[0]&&E[3]>=115):w.flashVideo=!1}catch(k){}try{w.video=!!l.canPlayType,w.video&&l.canPlayType("video/mp4")}catch(T){w.video=!1}w.animation=function(){for(var e=["","Webkit","Moz","O","ms","Khtml"],t=document.createElement("p"),n=0;n<e.length;n++)if("undefined"!=typeof t.style[e[n]+"AnimationName"])return!0}()}()},{"../flowplayer":18,"extend-object":25}],17:[function(e,t,n){"use strict";function r(e){return e=parseInt(e,10),e>=10?e:"0"+e}function o(e){e=e||0;var t=Math.floor(e/3600),n=Math.floor(e/60);return e-=60*n,t>=1?(n-=60*t,t+":"+r(n)+":"+r(e)):r(n)+":"+r(e)}var i=e("../flowplayer"),a=e("../common"),l=e("class-list"),s=e("bean"),u=e("./slider");i(function(e,t){function n(e){return a.find(".fp-"+e,t)[0]}function r(e){a.css(w,"padding-top",100*e+"%"),p.inlineBlock||a.height(a.find("object",t)[0],a.height(t))}function c(e){e?(m.add("is-mouseover"),m.remove("is-mouseout")):(m.add("is-mouseout"),m.remove("is-mouseover"))}var f,d=e.conf,p=i.support,m=l(t);a.find(".fp-ratio,.fp-ui",t).forEach(a.removeNode),m.add("flowplayer"),t.appendChild(a.createElement("div",{className:"fp-ratio"}));var v=a.createElement("div",{className:"fp-ui"},' <div class="waiting"><em></em><em></em><em></em></div> <a class="fullscreen"></a> <a class="unload"></a> <p class="speed"></p> <div class="controls"> <a class="play"></a> <div class="timeline"> <div class="buffer"></div> <div class="progress"></div> </div> <div class="timeline-tooltip fp-tooltip"></div> <div class="volume"> <a class="mute"></a> <div class="volumeslider"> <div class="volumelevel"></div> </div> </div> </div> <div class="time"> <em class="elapsed">00:00</em> <em class="remaining"></em> <em class="duration">00:00</em> </div> <div class="message"><h2></h2><p></p></div>'.replace(/class="/g,'class="fp-'));t.appendChild(v);var g=(n("progress"),n("buffer")),h=n("elapsed"),y=n("remaining"),b=n("waiting"),w=n("ratio"),x=n("speed"),E=l(x),k=n("duration"),T=n("controls"),S=n("timeline-tooltip"),N=a.css(w,"padding-top"),C=n("timeline"),j=u(C,e.rtl),O=(n("volume"),n("fullscreen")),P=n("volumeslider"),A=u(P,e.rtl),_=m.contains("fixed-controls")||m.contains("no-toggle");j.disableAnimation(m.contains("is-touch")),e.sliders=e.sliders||{},e.sliders.timeline=j,e.sliders.volume=A,p.animation||a.html(b,"<p>loading &hellip;</p>"),d.ratio&&r(d.ratio);try{d.fullscreen||a.removeNode(O)}catch(D){a.removeNode(O)}e.on("ready",function(e,n,i){var l=n.video.duration;j.disable(n.disabled||!l),d.adaptiveRatio&&!isNaN(i.height/i.width)&&r(i.height/i.width,!0),a.html([k,y],o(l)),a.toggleClass(t,"is-long",l>=3600),A.slide(n.volumeLevel),"flash"===n.engine.engineName?j.disableAnimation(!0,!0):j.disableAnimation(!1),a.find(".fp-title",v).forEach(a.removeNode),i.title&&a.prepend(v,a.createElement("div",{className:"fp-title"},i.title))}).on("unload",function(){N||d.splash||a.css(w,"paddingTop",""),j.slide(0)}).on("buffer",function(){var t=e.video,n=t.buffer/t.duration;!t.seekable&&p.seekable&&j.max(n),1>n?a.css(g,"width",100*n+"%"):a.css(g,"width","100%")}).on("speed",function(e,t,n){a.text(x,n+"x"),E.add("fp-hilite"),setTimeout(function(){E.remove("fp-hilite")},1e3)}).on("buffered",function(){a.css(g,"width","100%"),j.max(1)}).on("progress",function(){var t=e.video.time,n=e.video.duration;j.dragging||j.slide(t/n,e.seeking?0:250),a.html(h,o(t)),a.html(y,"-"+o(n-t))}).on("finish resume seek",function(e){a.toggleClass(t,"is-finished","finish"==e.type)}).on("stop",function(){a.html(h,o(0)),j.slide(0,100)}).on("finish",function(){a.html(h,o(e.video.duration)),j.slide(1,100),m.remove("is-seeking")}).on("beforeseek",function(){}).on("volume",function(){A.slide(e.volumeLevel)}).on("disable",function(){var n=e.disabled;j.disable(n),A.disable(n),a.toggleClass(t,"is-disabled",e.disabled)}).on("mute",function(e,n,r){a.toggleClass(t,"is-muted",r)}).on("error",function(e,n,r){if(a.removeClass(t,"is-loading"),a.removeClass(t,"is-seeking"),a.addClass(t,"is-error"),r){r.message=d.errors[r.code],n.error=!0;var o=a.find(".fp-message",t)[0],i=r.video||n.video;a.find("h2",o)[0].innerHTML=(n.engine&&n.engine.engineName||"html5")+": "+r.message,a.find("p",o)[0].innerHTML=r.url||i.url||i.src||d.errorUrls[r.code],n.off("mouseenter click"),m.remove("is-mouseover")}}),s.on(t,"mouseenter mouseleave",function(n){if(!_){var r,o="mouseover"==n.type;if(c(o),o){var i=function(){c(!0),r=new Date};e.on("pause.x volume.x",i),s.on(t,"mousemove.x",i),f=setInterval(function(){new Date-r>d.mouseoutTimeout&&(c(!1),r=new Date)},100)}else s.off(t,"mousemove.x"),e.off("pause.x volume.x"),clearInterval(f)}}),s.on(t,"mouseleave",function(){(j.dragging||A.dragging)&&(m.add("is-mouseover"),m.remove("is-mouseout"))}),s.on(t,"click.player",function(t){if(!e.disabled){var n=l(t.target);return n.contains("fp-ui")||n.contains("fp-engine")||t.flash?(t.preventDefault&&t.preventDefault(),e.toggle()):void 0}}),s.on(t,"mousemove",".fp-timeline",function(t){var n=t.pageX||t.clientX,r=n-a.offset(C).left,i=r/a.width(C),l=i*e.video.duration;0>i||(a.html(S,o(l)),a.css(S,"left",n-a.offset(T).left-a.width(S)/2+"px"))}),s.on(t,"contextmenu",function(e){var n=a.offset(a.find(".fp-player",t)[0]),r=window,o=e.clientX-(n.left+r.scrollX),i=e.clientY-(n.top+r.scrollY);if(!m.contains("is-flash-disabled")){var l=a.find(".fp-context-menu",t)[0];l&&(e.preventDefault(),a.css(l,{left:o+"px",top:i+"px",display:"block"}),s.on(t,"click",".fp-context-menu",function(e){e.stopPropagation()}),s.on(document,"click.outsidemenu",function(e){a.css(l,"display","none"),s.off(document,"click.outsidemenu")}))}}),e.on("flashdisabled",function(){m.add("is-flash-disabled"),e.one("ready progress",function(){m.remove("is-flash-disabled"),a.find(".fp-flash-disabled",t).forEach(a.removeNode)}),t.appendChild(a.createElement("div",{className:"fp-flash-disabled"},"Adobe Flash is disabled for this page, click player area to enable"))}),d.poster&&a.css(t,"background-image","url("+d.poster+")");var M=a.css(t,"background-color"),L="none"!=a.css(t,"background-image")||M&&"rgba(0, 0, 0, 0)"!=M&&"transparent"!=M;L&&!d.splash&&(d.poster||(d.poster=!0),e.on("ready stop",function(){m.add("is-poster"),e.poster=!0,e.one("progress",function(){m.remove("is-poster"),e.poster=!1})})),"string"==typeof d.splash&&a.css(t,"background-image","url('"+d.splash+"')"),!L&&e.forcedSplash&&a.css(t,"background-color","#555"),s.on(t,"click",".fp-toggle, .fp-play",function(){e.disabled||e.toggle()}),s.on(t,"click",".fp-mute",function(){e.mute()}),s.on(t,"click",".fp-fullscreen",function(){e.fullscreen()}),s.on(t,"click",".fp-unload",function(){e.unload()}),s.on(C,"slide",function(t){e.seeking=!0,e.seek(t*e.video.duration)}),s.on(P,"slide",function(t){e.volume(t)});var I=n("time");s.on(t,"click",".fp-time",function(){l(I).toggle("is-inverted")}),c(_),e.on("shutdown",function(){s.off(C),s.off(P)})}),t.exports.format=o},{"../common":1,"../flowplayer":18,"./slider":14,bean:20,"class-list":21}],18:[function(e,t,n){"use strict";function r(e,t,n){t&&t.embed&&(t.embed=o({},y.defaults.embed,t.embed));var r,d,m=e,v=a(m),g=o({},y.defaults,y.conf,t),h={},x=new w;v.add("is-loading");try{h=p?window.localStorage:h}catch(E){}var k=m.currentStyle&&"rtl"===m.currentStyle.direction||window.getComputedStyle&&null!==window.getComputedStyle(m,null)&&"rtl"===window.getComputedStyle(m,null).getPropertyValue("direction");k&&v.add("is-rtl");var T={conf:g,currentSpeed:1,volumeLevel:g.muted?0:"undefined"==typeof g.volume?1*h.volume:g.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:"true"==h.muted||g.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:k,load:function(e,t){if(!T.error&&!T.loading){T.video={},T.finished=!1,e=e||g.clip,e=o({},x.resolve(e,g.clip.sources)),(T.playing||T.engine)&&(e.autoplay=!0);var n=S(e);if(!n)return T.trigger("error",[T,{code:y.support.flashVideo?5:10}]);if(!n.engineName)throw new Error("engineName property of factory should be exposed");if(T.engine&&n.engineName===T.engine.engineName||(T.ready=!1,T.engine&&(T.engine.unload(),T.conf.autoplay=!0),d=T.engine=n(T,m),T.one("ready",function(){d.volume(T.volumeLevel)})),o(e,d.pick(e.sources.filter(function(e){return e.engine?e.engine===d.engineName:!0}))),e.src){var r=T.trigger("load",[T,e,d],!0);r.defaultPrevented?T.loading=!1:(d.load(e),i(e)&&(t=e),t&&T.one("ready",t))}return T}},pause:function(e){return!T.ready||T.seeking||T.loading||(d.pause(),T.one("pause",e)),T},resume:function(){return T.ready&&T.paused&&(d.resume(),T.finished&&(T.trigger("resume",[T]),T.finished=!1)),T},toggle:function(){return T.ready?T.paused?T.resume():T.pause():T.load()},seek:function(e,t){if(T.ready&&!T.live){if("boolean"==typeof e){var n=.1*T.video.duration;e=T.video.time+(e?n:-n)}e=r=Math.min(Math.max(e,0),T.video.duration-.1).toFixed(1);var o=T.trigger("beforeseek",[T,e],!0);o.defaultPrevented?(T.seeking=!1,s.toggleClass(m,"is-seeking",T.seeking)):(d.seek(e),i(t)&&T.one("seek",t))}return T},seekTo:function(e,t){var n=void 0===e?r:.1*T.video.duration*e;return T.seek(n,t)},mute:function(e,t){return void 0===e&&(e=!T.muted),t||(h.muted=T.muted=e,h.volume=isNaN(h.volume)?g.volume:h.volume),T.volume(e?0:h.volume,!0),T.trigger("mute",[T,e]),T},volume:function(e,t){return T.ready&&(e=Math.min(Math.max(e,0),1),t||(h.volume=e),d.volume(e)),T},speed:function(e,t){return T.ready&&("boolean"==typeof e&&(e=g.speeds[g.speeds.indexOf(T.currentSpeed)+(e?1:-1)]||T.currentSpeed),d.speed(e),t&&m.one("speed",t)),T},stop:function(){return T.ready&&(T.pause(),T.seek(0,function(){T.trigger("stop",[T])})),T},unload:function(){return v.contains("is-embedding")||(g.splash?(T.trigger("unload",[T]),d&&(d.unload(),T.engine=d=0)):T.stop()),T},shutdown:function(){T.unload(),T.trigger("shutdown",[T]),l.off(m),delete c[m.getAttribute("data-flowplayer-instance-id")],m.removeAttribute("data-flowplayer-instance-id")},disable:function(e){return void 0===e&&(e=!T.disabled),e!=T.disabled&&(T.disabled=e,T.trigger("disable",e)),T}};T.conf=o(T.conf,g),u(T);var S=function(e){var t,n=y.engines;if(g.engine){var r=n.filter(function(e){return e.engineName===g.engine})[0];if(r&&e.sources.some(function(e){return e.engine&&e.engine!==r.engineName?!1:r.canPlay(e.type,T.conf)}))return r}return g.enginePreference&&(n=y.engines.filter(function(e){return g.enginePreference.indexOf(e.engineName)>-1}).sort(function(e,t){return g.enginePreference.indexOf(e.engineName)-g.enginePreference.indexOf(t.engineName)})),e.sources.some(function(e){var r=n.filter(function(t){return e.engine&&e.engine!==t.engineName?!1:t.canPlay(e.type,T.conf)}).shift();return r&&(t=r),!!r}),t};return m.getAttribute("data-flowplayer-instance-id")||(m.setAttribute("data-flowplayer-instance-id",b++),T.on("boot",function(){(g.splash||v.contains("is-splash")||!y.support.firstframe)&&(T.forcedSplash=!g.splash&&!v.contains("is-splash"),T.splash=g.autoplay=!0,g.splash||(g.splash=!0),v.add("is-splash")),g.splash&&s.find("video",m).forEach(s.removeNode),(g.live||v.contains("is-live"))&&(T.live=g.live=!0,v.add("is-live")),f.forEach(function(e){e(T,m)}),c.push(T),g.splash?T.unload():T.load(),g.disabled&&T.disable(),T.one("ready",n)}).on("load",function(e,t,n){g.splash&&s.find(".flowplayer.is-ready,.flowplayer.is-loading").forEach(function(e){var t=e.getAttribute("data-flowplayer-instance-id");if(t!==m.getAttribute("data-flowplayer-instance-id")){var n=c[Number(t)];n&&n.conf.splash&&n.unload()}}),v.add("is-loading"),t.loading=!0,"undefined"!=typeof n.live&&(s.toggleClass(m,"is-live",n.live),t.live=n.live)}).on("ready",function(e,t,n){n.time=0,t.video=n,v.remove("is-loading"),t.loading=!1,t.muted?t.mute(!0,!0):t.volume(t.volumeLevel);var r=t.conf.hlsFix&&/mpegurl/i.exec(n.type);s.toggleClass(m,"hls-fix",!!r)}).on("unload",function(e){v.remove("is-loading"),T.loading=!1}).on("ready unload",function(e){var t="ready"==e.type;s.toggleClass(m,"is-splash",!t),s.toggleClass(m,"is-ready",t),T.ready=t,T.splash=!t}).on("progress",function(e,t,n){t.video.time=n}).on("speed",function(e,t,n){t.currentSpeed=n}).on("volume",function(e,t,n){t.volumeLevel=Math.round(100*n)/100,t.muted?n&&t.mute(!1):h.volume=n}).on("beforeseek seek",function(e){T.seeking="beforeseek"==e.type,s.toggleClass(m,"is-seeking",T.seeking)}).on("ready pause resume unload finish stop",function(e,t,n){T.paused=/pause|finish|unload|stop/.test(e.type),T.paused=T.paused||"ready"===e.type&&!g.autoplay&&!T.playing,T.playing=!T.paused,s.toggleClass(m,"is-paused",T.paused),s.toggleClass(m,"is-playing",T.playing),T.load.ed||T.pause()}).on("finish",function(e){T.finished=!0}).on("error",function(){})),T.trigger("boot",[T,m]),T}var o=e("extend-object"),i=e("is-function"),a=e("class-list"),l=e("bean"),s=e("./common"),u=e("./ext/events"),c=[],f=[],d=(window.navigator.userAgent,window.onbeforeunload);window.onbeforeunload=function(e){return c.forEach(function(e){e.conf.splash?e.unload():e.bind("error",function(){s.find(".flowplayer.is-error .fp-message").forEach(s.removeNode)})}),d?d(e):void 0};var p=!1;try{"object"==typeof window.localStorage&&(window.localStorage.flowplayerTestStorage="test",p=!0)}catch(m){}var v=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent),g=/(\d+\.\d+) Safari/.exec(navigator.userAgent),h=g?Number(g[1]):100,y=t.exports=function(e,t,n){if(i(e))return f.push(e);if("number"==typeof e||"undefined"==typeof e)return c[e||0];if(e.nodeType){if(null!==e.getAttribute("data-flowplayer-instance-id"))return c[e.getAttribute("data-flowplayer-instance-id")];if(!t)return;return r(e,t,n)}if(e.jquery)return y(e[0],t,n);if("string"==typeof e){var o=s.find(e)[0];return o&&y(o,t,n)}};o(y,{version:"6.0.5",engines:[],conf:{},set:function(e,t){"string"==typeof e?y.conf[e]=t:o(y.conf,e)},support:{},defaults:{debug:p?!!localStorage.flowplayerDebug:!1,disabled:!1,fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,rtmp:0,proxy:"best",splash:!1,live:!1,swf:"//releases.flowplayer.org/6.0.5/commercial/flowplayer.swf",swfHls:"//releases.flowplayer.org/6.0.5/commercial/flowplayerhls.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,mouseoutTimeout:5e3,volume:p?"true"==localStorage.muted?0:isNaN(localStorage.volume)?1:localStorage.volume||1:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:v&&8>h},bean:l,common:s,extend:o});var b=0,w=e("./ext/resolve");if("undefined"!=typeof window.jQuery){var x=window.jQuery;x(function(){"function"==typeof x.fn.flowplayer&&x('.flowplayer:has(video,script[type="application/json"])').flowplayer()});var E=function(e){if(!e.length)return{};var t=e.data()||{},n={};return x.each(["autoplay","loop","preload","poster"],function(r,o){var i=e.attr(o);void 0!==i&&-1!==["autoplay","poster"].indexOf(o)?n[o]=i?i:!0:void 0!==i&&(t[o]=i?i:!0)}),t.subtitles=e.find("track").map(function(){var e=x(this);return{src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label"),srclang:e.attr("srclang"),"default":e.prop("default")}}).get(),t.sources=(new w).sourcesFromVideoTag(e,x),o(n,{clip:t})};x.fn.flowplayer=function(e,t){return this.each(function(){"string"==typeof e&&(e={swf:e}),i(e)&&(t=e,e={});var n=x(this),o=n.find('script[type="application/json"]'),a=o.length?JSON.parse(o.text()):E(n.find("video")),l=x.extend({},e||{},a,n.data()),s=r(this,l,t);u.EVENTS.forEach(function(e){s.on(e+".jquery",function(e){n.trigger.call(n,e.type,e.detail&&e.detail.args)})}),n.data("flowplayer",s)})}}},{"./common":1,"./ext/events":8,"./ext/resolve":13,bean:20,"class-list":21,"extend-object":25,"is-function":26}],19:[function(e,t,n){e("es5-shim");var r=t.exports=e("./flowplayer");e("./ext/support"),e("./engine/embed"),e("./engine/html5"),e("./engine/flash"),e("./ext/ui"),e("./ext/keyboard"),e("./ext/playlist"),e("./ext/cuepoint"),e("./ext/subtitle"),e("./ext/analytics"),e("./ext/embed"),e("./ext/fullscreen"),e("./ext/mobile"),r(function(e,t){function n(e){var t=document.createElement("a");return t.href=e,u.hostname(t.hostname)}function o(e){var t="ab.ca,ac.ac,ac.at,ac.be,ac.cn,ac.il,ac.in,ac.jp,ac.kr,ac.sg,ac.th,ac.uk,ad.jp,adm.br,adv.br,ah.cn,am.br,arq.br,art.br,arts.ro,asn.au,asso.fr,asso.mc,bc.ca,bio.br,biz.pl,biz.tr,bj.cn,br.com,cn.com,cng.br,cnt.br,co.ac,co.at,co.de,co.gl,co.hk,co.id,co.il,co.in,co.jp,co.kr,co.mg,co.ms,co.nz,co.th,co.uk,co.ve,co.vi,co.za,com.ag,com.ai,com.ar,com.au,com.br,com.cn,com.co,com.cy,com.de,com.do,com.ec,com.es,com.fj,com.fr,com.gl,com.gt,com.hk,com.hr,com.hu,com.kg,com.ki,com.lc,com.mg,com.mm,com.ms,com.mt,com.mu,com.mx,com.my,com.na,com.nf,com.ng,com.ni,com.pa,com.ph,com.pl,com.pt,com.qa,com.ro,com.ru,com.sb,com.sc,com.sg,com.sv,com.tr,com.tw,com.ua,com.uy,com.ve,com.vn,cp.tz,cq.cn,de.com,de.org,ecn.br,ed.jp,edu.au,edu.cn,edu.hk,edu.mm,edu.my,edu.pl,edu.pt,edu.qa,edu.sg,edu.tr,edu.tw,eng.br,ernet.in,esp.br,etc.br,eti.br,eu.com,eu.int,eu.lv,firm.in,firm.ro,fm.br,fot.br,fst.br,g12.br,gb.com,gb.net,gd.cn,gen.in,go.jp,go.kr,go.th,gov.au,gov.az,gov.br,gov.cn,gov.il,gov.in,gov.mm,gov.my,gov.qa,gov.sg,gov.tr,gov.tw,gov.uk,gr.jp,gs.cn,gv.ac,gv.at,gx.cn,gz.cn,he.cn,hi.cn,hk.cn,hl.cn,hu.com,id.au,idv.tw,in.ua,ind.br,ind.in,inf.br,info.pl,info.ro,info.tr,info.ve,iwi.nz,jl.cn,jor.br,js.cn,jus.br,k12.il,k12.tr,kr.com,lel.br,lg.jp,ln.cn,ltd.uk,maori.nz,mb.ca,me.uk,med.br,mi.th,mil.br,mil.uk,mo.cn,mod.uk,muni.il,nb.ca,ne.jp,ne.kr,net.ag,net.ai,net.au,net.br,net.cn,net.do,net.gl,net.hk,net.il,net.in,net.kg,net.ki,net.lc,net.mg,net.mm,net.mu,net.ni,net.nz,net.pl,net.ru,net.sb,net.sc,net.sg,net.th,net.tr,net.tw,net.uk,net.ve,nf.ca,nhs.uk,nm.cn,nm.kr,no.com,nom.br,nom.ni,nom.ro,ns.ca,nt.ca,nt.ro,ntr.br,nx.cn,odo.br,off.ai,on.ca,or.ac,or.at,or.jp,or.kr,or.th,org.ag,org.ai,org.au,org.br,org.cn,org.do,org.es,org.gl,org.hk,org.in,org.kg,org.ki,org.lc,org.mg,org.mm,org.ms,org.nf,org.ni,org.nz,org.pl,org.ro,org.ru,org.sb,org.sc,org.sg,org.tr,org.tw,org.uk,org.ve,pe.ca,plc.uk,police.uk,ppg.br,presse.fr,pro.br,psc.br,psi.br,qc.ca,qc.com,qh.cn,rec.br,rec.ro,res.in,sa.com,sc.cn,sch.uk,se.com,se.net,sh.cn,sk.ca,slg.br,sn.cn,store.ro,tj.cn,tm.fr,tm.mc,tm.ro,tmp.br,tur.br,tv.br,tv.tr,tw.cn,uk.com,uk.net,us.com,uy.com,vet.br,waw.pl,web.ve,www.ro,xj.cn,xz.cn,yk.ca,yn.cn,zj.cn,zlg.br".split(",");
8
+ e=e.toLowerCase();var n=e.split("."),r=n.length;if(2>r||/^\d+$/.test(n[r-1]))return e;var o=n.slice(-2).join(".");return r>=3&&t.indexOf(o)>=0?n.slice(-3).join("."):o}function i(e,t){t=o(t);for(var n=0,r=t.length-1;r>=0;r--)n+=55436413178*t.charCodeAt(r);for(n=(""+n).substring(0,7),r=0;r<e.length;r++)if(n===e[r].substring(1,8))return 1}var a=function(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(e.className+=" "+t)},l=function(e){return"none"!==window.getComputedStyle(e).display},s=e.conf,u=r.common,c=u.createElement,f=s.swf.indexOf("flowplayer.org")&&s.e&&t.getAttribute("data-origin"),d=f?n(f):u.hostname(),p=(document,s.key);"file:"==location.protocol&&(d="localhost"),e.load.ed=1,s.hostname=d,s.origin=f||location.href,f&&a(t,"is-embedded"),"string"==typeof p&&(p=p.split(/,\s*/));var m=function(e,n){var r=c("a",{href:n,className:"fp-brand"});r.innerHTML=e,u.find(".fp-controls",t)[0].appendChild(r)};if(p&&"function"==typeof i&&i(p,d)){if(s.logo){var v=u.find(".fp-player",t)[0],g=c("a",{className:"fp-logo"});f&&(g.href=f),s.embed&&s.embed.popup&&(g.target="_blank");var h=c("img",{src:s.logo});g.appendChild(h),(v||t).appendChild(g)}s.brand&&f||s.brand&&s.brand.showOnOrigin?m(s.brand.text||s.brand,f||location.href):u.addClass(t,"no-brand")}else{m("flowplayer","http://flowplayer.org");var g=c("a",{onclick:""});t.appendChild(g);var y=c("div",{className:"fp-context-menu"},'<ul><li class="copyright">&copy; 2015</li><li><a href="http://flowplayer.org">About Flowplayer</a></li><li><a href="http://flowplayer.org/license">GPL based license</a></li></ul>'),b=window.location.href.indexOf("localhost"),v=u.find(".fp-player",t)[0];7!==b&&(v||t).appendChild(y),e.on("pause resume finish unload ready",function(e,n){u.removeClass(t,"no-brand");var r=-1;if(n.video.src)for(var o=[["org","flowplayer","drive"],["org","flowplayer","my"],["org","flowplayer","cdn"]],i=0;i<o.length&&(r=n.video.src.indexOf("://"+o[i].reverse().join(".")),-1===r);i++);if((4===r||5===r)&&u.addClass(t,"no-brand"),/pause|resume/.test(e.type)&&"flash"!=n.engine.engineName&&4!=r&&5!=r){var a={display:"block",position:"absolute",left:"16px",bottom:"46px",zIndex:99999,width:"120px",height:"27px",backgroundImage:"url("+[".png","fplogo","/",".com","foliovision","//"].reverse().join("")+")"};for(var s in a)a.hasOwnProperty(s)&&(g.style[s]=a[s]);n.load.ed=l(g)&&(7===b||y.parentNode==t||y.parentNode==v)&&!u.hasClass(t,"no-brand"),n.load.ed||n.pause()}else g.style.display="none"})}})},{"./engine/embed":2,"./engine/flash":3,"./engine/html5":4,"./ext/analytics":5,"./ext/cuepoint":6,"./ext/embed":7,"./ext/fullscreen":9,"./ext/keyboard":10,"./ext/mobile":11,"./ext/playlist":12,"./ext/subtitle":15,"./ext/support":16,"./ext/ui":17,"./flowplayer":18,"es5-shim":24}],20:[function(t,n,r){!function(t,r,o){"undefined"!=typeof n&&n.exports?n.exports=o():"function"==typeof e&&e.amd?e(o):r[t]=o()}("bean",this,function(e,t){e=e||"bean",t=t||this;var n,r=window,o=t[e],i=/[^\.]*(?=\..*)\.|.*/,a=/\..*/,l="addEventListener",s="removeEventListener",u=document||{},c=u.documentElement||{},f=c[l],d=f?l:"attachEvent",p={},m=Array.prototype.slice,v=function(e,t){return e.split(t||" ")},g=function(e){return"string"==typeof e},h=function(e){return"function"==typeof e},y="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",b="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",w=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},v(y+(f?b:""))),x=function(){var e="compareDocumentPosition"in c?function(e,t){return t.compareDocumentPosition&&16===(16&t.compareDocumentPosition(e))}:"contains"in c?function(e,t){return t=9===t.nodeType||t===window?c:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),E=function(){var e=v("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),t=e.concat(v("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),n=t.concat(v("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),o=e.concat(v("char charCode key keyCode keyIdentifier keyLocation location")),i=e.concat(v("data")),a=e.concat(v("touches targetTouches changedTouches scale rotation")),l=e.concat(v("data origin source")),s=e.concat(v("state")),f=/over|out/,d=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,o}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+u.body.scrollLeft+c.scrollLeft,n.clientY=e.clientY+u.body.scrollTop+c.scrollTop),f.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return i}},{reg:/^touch|^gesture/i,fix:function(){return a}},{reg:/^message$/i,fix:function(){return l}},{reg:/^popstate$/i,fix:function(){return s}},{reg:/.*/,fix:function(){return e}}],p={},m=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var o,i,a,l,s,u=e.type,c=e.target||e.srcElement;if(this.target=c&&3===c.nodeType?c.parentNode:c,n){if(s=p[u],!s)for(o=0,i=d.length;i>o;o++)if(d[o].reg.test(u)){p[u]=s=d[o].fix;break}for(l=s(e,this,u),o=l.length;o--;)!((a=l[o])in this)&&a in e&&(this[a]=e[a])}}};return m.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},m.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},m.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},m.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},m.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},m.prototype.clone=function(e){var t=new m(this,this.element,this.isNative);return t.currentTarget=e,t},m}(),k=function(e,t){return f||t||e!==u&&e!==r?e:c},T=function(){var e=function(e,t,n,r){var o=function(n,o){return t.apply(e,r?m.call(o,n?0:1).concat(r):o)},i=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=i(e,this);return n.apply(t,arguments)?(e&&(e.currentTarget=t),o(e,arguments)):void 0}:function(e){return t.__beanDel&&(e=e.clone(i(e))),o(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,o,i,a,l){var s,u=x[n];"unload"==n&&(r=O(P,t,n,r,o)),u&&(u.condition&&(r=e(t,r,u.condition,a)),n=u.base||n),this.isNative=s=w[n]&&!!t[d],this.customType=!f&&!s&&n,this.element=t,this.type=n,this.original=o,this.namespaces=i,this.eventType=f||s?n:"propertychange",this.target=k(t,s),this[d]=!!this.target[d],this.root=l,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),S=function(){var e={},t=function(n,r,o,i,a,l){var s=a?"r":"$";if(r&&"*"!=r){var u,c=0,f=e[s+r],d="*"==n;if(!f)return;for(u=f.length;u>c;c++)if((d||f[c].matches(n,o,i))&&!l(f[c],f,c,r))return}else for(var p in e)p.charAt(0)==s&&t(n,p.substr(1),o,i,a,l)},n=function(t,n,r,o){var i,a=e[(o?"r":"$")+n];if(a)for(i=a.length;i--;)if(!a[i].root&&a[i].matches(t,r,null))return!0;return!1},r=function(e,n,r,o){var i=[];return t(e,n,r,null,o,function(e){return i.push(e)}),i},o=function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},i=function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},a=function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n};return{has:n,get:r,put:o,del:i,entries:a}}(),N=function(e){n=arguments.length?e:u.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},C=function(e,t){if(f||!t||!e||e.propertyName=="_on"+t){var n=S.get(this,t||e.type,null,!1),r=n.length,o=0;for(e=new E(e,this,!0),t&&(e.type=t);r>o&&!e.isImmediatePropagationStopped();o++)n[o].removed||n[o].handler.call(this,e)}},j=f?function(e,t,n){e[n?l:s](t,C,!1)}:function(e,t,n,r){var o;n?(S.put(o=new T(e,r||t,function(t){C.call(e,t,r)},C,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),o.target.attachEvent("on"+o.eventType,o.handler)):(o=S.get(e,r||t,C,!0)[0],o&&(o.target.detachEvent("on"+o.eventType,o.handler),S.del(o)))},O=function(e,t,n,r,o){return function(){r.apply(this,arguments),e(t,n,o)}},P=function(e,t,n,r){var o,i,l=t&&t.replace(a,""),s=S.get(e,l,null,!1),u={};for(o=0,i=s.length;i>o;o++)n&&s[o].original!==n||!s[o].inNamespaces(r)||(S.del(s[o]),!u[s[o].eventType]&&s[o][d]&&(u[s[o].eventType]={t:s[o].eventType,c:s[o].type}));for(o in u)S.has(e,u[o].t,null,!1)||j(e,u[o].t,!1,u[o].c)},A=function(e,t){var r=function(t,r){for(var o,i=g(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(o=i.length;o--;)if(i[o]===t)return t},o=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return o.__beanDel={ft:r,selector:e},o},_=f?function(e,t,n){var o=u.createEvent(e?"HTMLEvents":"UIEvents");o[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(o)}:function(e,t,n){n=k(n,e),e?n.fireEvent("on"+t,u.createEventObject()):n["_on"+t]++},D=function(e,t,n){var r,o,l,s,u=g(t);if(u&&t.indexOf(" ")>0){for(t=v(t),s=t.length;s--;)D(e,t[s],n);return e}if(o=u&&t.replace(a,""),o&&x[o]&&(o=x[o].base),!t||u)(l=u&&t.replace(i,""))&&(l=v(l,".")),P(e,o,n,l);else if(h(t))P(e,null,t);else for(r in t)t.hasOwnProperty(r)&&D(e,r,t[r]);return e},M=function(e,t,r,o){var l,s,u,c,f,g,y;{if(void 0!==r||"object"!=typeof t){for(h(r)?(f=m.call(arguments,3),o=l=r):(l=o,f=m.call(arguments,4),o=A(r,l,n)),u=v(t),this===p&&(o=O(D,e,t,o,l)),c=u.length;c--;)y=S.put(g=new T(e,u[c].replace(a,""),o,l,v(u[c].replace(i,""),"."),f,!1)),g[d]&&y&&j(e,g.eventType,!0,g.customType);return e}for(s in t)t.hasOwnProperty(s)&&M.call(this,e,s,t[s])}},L=function(e,t,n,r){return M.apply(null,g(n)?[e,n,t,r].concat(arguments.length>3?m.call(arguments,5):[]):m.call(arguments))},I=function(){return M.apply(p,arguments)},F=function(e,t,n){var r,o,l,s,u,c=v(t);for(r=c.length;r--;)if(t=c[r].replace(a,""),(s=c[r].replace(i,""))&&(s=v(s,".")),s||n||!e[d])for(u=S.get(e,t,null,!1),n=[!1].concat(n),o=0,l=u.length;l>o;o++)u[o].inNamespaces(s)&&u[o].handler.apply(e,n);else _(w[t],t,e);return e},z=function(e,t,n){for(var r,o,i=S.get(t,n,null,!1),a=i.length,l=0;a>l;l++)i[l].original&&(r=[e,i[l].type],(o=i[l].handler.__beanDel)&&r.push(o.selector),r.push(i[l].original),M.apply(null,r));return e},R={on:M,add:L,one:I,off:D,remove:D,clone:z,fire:F,Event:E,setSelectorEngine:N,noConflict:function(){return t[e]=o,this}};if(r.attachEvent){var q=function(){var e,t=S.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&D(t[e].element,t[e].type);r.detachEvent("onunload",q),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",q)}return N(),R})},{}],21:[function(e,t,n){function r(e){function t(e){var t=c();a(t,e)>-1||(t.push(e),f(t))}function n(e){var t=c(),n=a(t,e);-1!==n&&(t.splice(n,1),f(t))}function r(e){return a(c(),e)>-1}function l(e){return r(e)?(n(e),!1):(t(e),!0)}function s(){return e.className}function u(e){var t=c();return t[e]||null}function c(){var t=e.className;return o(t.split(" "),i)}function f(t){var n=t.length;e.className=t.join(" "),p.length=n;for(var r=0;r<t.length;r++)p[r]=t[r];delete t[n]}var d=e.classList;if(d)return d;var p={add:t,remove:n,contains:r,toggle:l,toString:s,length:0,item:u};return p}function o(e,t){for(var n=[],r=0;r<e.length;r++)t(e[r])&&n.push(e[r]);return n}function i(e){return!!e}var a=e("indexof");t.exports=r},{indexof:22}],22:[function(e,t,n){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],23:[function(e,t,n){function r(e,t,n,r){return n=window.getComputedStyle,r=n?n(e):e.currentStyle,r?r[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]:void 0}t.exports=r},{}],24:[function(t,n,r){!function(t,o){"use strict";"function"==typeof e&&e.amd?e(o):"object"==typeof r?n.exports=o():t.returnExports=o()}(this,function(){var e,t=Array.prototype,n=Object.prototype,r=Function.prototype,o=String.prototype,i=Number.prototype,a=t.slice,l=t.splice,s=t.push,u=t.unshift,c=t.concat,f=r.call,d=n.toString,p=Array.isArray||function(e){return"[object Array]"===d.call(e)},m="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,v=Function.prototype.toString,g=function(e){try{return v.call(e),!0}catch(t){return!1}},h="[object Function]",y="[object GeneratorFunction]";e=function(e){if("function"!=typeof e)return!1;if(m)return g(e);var t=d.call(e);return t===h||t===y};var b,w=RegExp.prototype.exec,x=function(e){try{return w.call(e),!0}catch(t){return!1}},E="[object RegExp]";b=function(e){return"object"!=typeof e?!1:m?x(e):d.call(e)===E};var k,T=String.prototype.valueOf,S=function(e){try{return T.call(e),!0}catch(t){return!1}},N="[object String]";k=function(e){return"string"==typeof e?!0:"object"!=typeof e?!1:m?S(e):d.call(e)===N};var C=function(t){var n=d.call(t),r="[object Arguments]"===n;return r||(r=!p(t)&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&e(t.callee)),r},j=function(e){var t,n=Object.defineProperty&&function(){try{var e={};Object.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}();return t=n?function(e,t,n,r){!r&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,o){for(var i in r)e.call(r,i)&&t(n,i,r[i],o)}}(n.hasOwnProperty),O=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},P={ToInteger:function(e){var t=+e;return t!==t?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,o;if(O(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),O(n)))return n;if(o=t.toString,e(o)&&(n=o.call(t),O(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)},ToUint32:function(e){return e>>>0}},A=function(){};j(r,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=a.call(arguments,1),i=function(){if(this instanceof r){var e=n.apply(this,c.call(o,a.call(arguments)));return Object(e)===e?e:this}return n.apply(t,c.call(o,a.call(arguments)))},l=Math.max(0,n.length-o.length),s=[],u=0;l>u;u++)s.push("$"+u);return r=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this, arguments); }")(i),n.prototype&&(A.prototype=n.prototype,r.prototype=new A,A.prototype=null),r}});var _=f.bind(n.hasOwnProperty),D=function(){var e=[1,2],t=e.splice();return 2===e.length&&p(t)&&0===t.length}();j(t,{splice:function(e,t){return 0===arguments.length?[]:l.apply(this,arguments)}},!D);var M=function(){var e={};return t.splice.call(e,0,0,1),1===e.length}();j(t,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=Math.max(P.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=a.call(arguments),n.length<2?n.push(this.length-e):n[1]=P.ToInteger(t)),l.apply(this,n)}},!M);var L=1!==[].unshift(0);j(t,{unshift:function(){return u.apply(this,arguments),this.length}},L),j(Array,{isArray:p});var I=Object("a"),F="a"!==I[0]||!(0 in I),z=function(e){var t=!0,n=!0;return e&&(e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")),!!e&&t&&n};j(t,{forEach:function(t){var n,r=P.ToObject(this),o=F&&k(this)?this.split(""):r,i=-1,a=o.length>>>0;if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++i<a;)i in o&&("undefined"!=typeof n?t.call(n,o[i],i,r):t(o[i],i,r))}},!z(t.forEach)),j(t,{map:function(t){var n,r=P.ToObject(this),o=F&&k(this)?this.split(""):r,i=o.length>>>0,a=Array(i);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;i>l;l++)l in o&&("undefined"!=typeof n?a[l]=t.call(n,o[l],l,r):a[l]=t(o[l],l,r));return a}},!z(t.map)),j(t,{filter:function(t){var n,r,o=P.ToObject(this),i=F&&k(this)?this.split(""):o,a=i.length>>>0,l=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var s=0;a>s;s++)s in i&&(n=i[s],("undefined"==typeof r?t(n,s,o):t.call(r,n,s,o))&&l.push(n));return l}},!z(t.filter)),j(t,{every:function(t){var n,r=P.ToObject(this),o=F&&k(this)?this.split(""):r,i=o.length>>>0;if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;i>a;a++)if(a in o&&!("undefined"==typeof n?t(o[a],a,r):t.call(n,o[a],a,r)))return!1;return!0}},!z(t.every)),j(t,{some:function(t){var n,r=P.ToObject(this),o=F&&k(this)?this.split(""):r,i=o.length>>>0;if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;i>a;a++)if(a in o&&("undefined"==typeof n?t(o[a],a,r):t.call(n,o[a],a,r)))return!0;return!1}},!z(t.some));var R=!1;t.reduce&&(R="object"==typeof t.reduce.call("es5",function(e,t,n,r){return r})),j(t,{reduce:function(t){var n=P.ToObject(this),r=F&&k(this)?this.split(""):n,o=r.length>>>0;if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,a=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;o>a;a++)a in r&&(i=t(i,r[a],a,n));return i}},!R);var q=!1;t.reduceRight&&(q="object"==typeof t.reduceRight.call("es5",function(e,t,n,r){return r})),j(t,{reduceRight:function(t){var n=P.ToObject(this),r=F&&k(this)?this.split(""):n,o=r.length>>>0;if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,a=o-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return i;do a in r&&(i=t(i,r[a],a,n));while(a--);return i}},!q);var V=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);j(t,{indexOf:function(e){var t=F&&k(this)?this.split(""):P.ToObject(this),n=t.length>>>0;if(0===n)return-1;var r=0;for(arguments.length>1&&(r=P.ToInteger(arguments[1])),r=r>=0?r:Math.max(0,n+r);n>r;r++)if(r in t&&t[r]===e)return r;return-1}},V);var H=Array.prototype.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);j(t,{lastIndexOf:function(e){var t=F&&k(this)?this.split(""):P.ToObject(this),n=t.length>>>0;if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,P.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},H);var U=!{toString:null}.propertyIsEnumerable("toString"),$=function(){}.propertyIsEnumerable("prototype"),X=!_("x","0"),Y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],B=Y.length;j(Object,{keys:function(t){var n=e(t),r=C(t),o=null!==t&&"object"==typeof t,i=o&&k(t);if(!o&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],l=$&&n;if(i&&X||r)for(var s=0;s<t.length;++s)a.push(String(s));if(!r)for(var u in t)l&&"prototype"===u||!_(t,u)||a.push(String(u));if(U)for(var c=t.constructor,f=c&&c.prototype===t,d=0;B>d;d++){var p=Y[d];f&&"constructor"===p||!_(t,p)||a.push(p)}return a}});var W=Object.keys&&function(){return 2===Object.keys(arguments).length}(1,2),K=Object.keys;j(Object,{keys:function(e){return K(C(e)?t.slice.call(e):e)}},!W);var G=-621987552e5,Z="-000001",J=Date.prototype.toISOString&&-1===new Date(G).toISOString().indexOf(Z);j(Date.prototype,{toISOString:function(){var e,t,n,r,o;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(r=this.getUTCFullYear(),o=this.getUTCMonth(),r+=Math.floor(o/12),o=(o%12+12)%12,e=[o+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],r=(0>r?"-":r>9999?"+":"")+("00000"+Math.abs(r)).slice(r>=0&&9999>=r?-4:-6),t=e.length;t--;)n=e[t],10>n&&(e[t]="0"+n);return r+"-"+e.slice(0,2).join("-")+"T"+e.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}},J);var Q=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(G).toJSON().indexOf(Z)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();Q||(Date.prototype.toJSON=function(t){var n=Object(this),r=P.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var o=n.toISOString;if(!e(o))throw new TypeError("toISOString property is not callable");return o.call(n)});var ee=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),te=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ne=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));(!Date.parse||ne||te||!ee)&&(Date=function(e){var t=function(n,r,o,i,a,l,s){var u,c=arguments.length;return u=this instanceof e?1===c&&String(n)===n?new e(t.parse(n)):c>=7?new e(n,r,o,i,a,l,s):c>=6?new e(n,r,o,i,a,l):c>=5?new e(n,r,o,i,a):c>=4?new e(n,r,o,i):c>=3?new e(n,r,o):c>=2?new e(n,r):c>=1?new e(n):new e:e.apply(this,arguments),j(u,{constructor:t},!0),u},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},i=function(t){return Number(new e(1970,0,1,0,0,0,t))};for(var a in e)_(e,a)&&(t[a]=e[a]);return j(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,j(t.prototype,{constructor:t},!0),t.parse=function(t){var r=n.exec(t);if(r){var a,l=Number(r[1]),s=Number(r[2]||1)-1,u=Number(r[3]||1)-1,c=Number(r[4]||0),f=Number(r[5]||0),d=Number(r[6]||0),p=Math.floor(1e3*Number(r[7]||0)),m=Boolean(r[4]&&!r[8]),v="-"===r[9]?1:-1,g=Number(r[10]||0),h=Number(r[11]||0);return(f>0||d>0||p>0?24:25)>c&&60>f&&60>d&&1e3>p&&s>-1&&12>s&&24>g&&60>h&&u>-1&&u<o(l,s+1)-o(l,s)&&(a=60*(24*(o(l,s)+u)+c+g*v),a=1e3*(60*(a+f+h*v)+d)+p,m&&(a=i(a)),a>=-864e13&&864e13>=a)?a:NaN}return e.parse.apply(this,arguments)},t}(Date)),Date.now||(Date.now=function(){return(new Date).getTime()});var re=i.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),oe={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<oe.size;)r+=e*oe.data[n],oe.data[n]=r%oe.base,r=Math.floor(r/oe.base)},divide:function(e){for(var t=oe.size,n=0;--t>=0;)n+=oe.data[t],oe.data[t]=Math.floor(n/e),n=n%e*oe.base},numToString:function(){for(var e=oe.size,t="";--e>=0;)if(""!==t||0===e||0!==oe.data[e]){var n=String(oe.data[e]);""===t?t=n:t+="0000000".slice(0,7-n.length)+n}return t},pow:function ge(e,t,n){return 0===t?n:t%2===1?ge(e,t-1,n*e):ge(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}};j(i,{toFixed:function(e){var t,n,r,o,i,a,l,s;if(t=Number(e),t=t!==t?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=Number(this),n!==n)return"NaN";if(-1e21>=n||n>=1e21)return String(n);if(r="",0>n&&(r="-",n=-n),o="0",n>1e-21)if(i=oe.log(n*oe.pow(2,69,1))-69,a=0>i?n*oe.pow(2,-i,1):n/oe.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(oe.multiply(0,a),l=t;l>=7;)oe.multiply(1e7,0),l-=7;for(oe.multiply(oe.pow(10,l,1),0),l=i-1;l>=23;)oe.divide(1<<23),l-=23;oe.divide(1<<l),oe.multiply(1,1),oe.divide(2),o=oe.numToString()}else oe.multiply(0,a),oe.multiply(1<<-i,0),o=oe.numToString()+"0.00000000000000000000".slice(2,2+t);return t>0?(s=o.length,o=t>=s?r+"0.0000000000000000000".slice(0,t-s+2)+o:r+o.slice(0,s-t)+"."+o.slice(s-t)):o=r+o,o}},re);var ie=o.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1];o.split=function(t,n){var r=this;if("undefined"==typeof t&&0===n)return[];if(!b(t))return ie.call(this,t,n);var o,i,a,l,u=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":""),f=0,d=new RegExp(t.source,c+"g");r+="",e||(o=new RegExp("^"+d.source+"$(?!\\s)",c));var p="undefined"==typeof n?-1>>>0:P.ToUint32(n);for(i=d.exec(r);i&&(a=i.index+i[0].length,!(a>f&&(u.push(r.slice(f,i.index)),!e&&i.length>1&&i[0].replace(o,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(i[e]=void 0)}),i.length>1&&i.index<r.length&&s.apply(u,i.slice(1)),l=i[0].length,f=a,u.length>=p)));)d.lastIndex===i.index&&d.lastIndex++,i=d.exec(r);return f===r.length?(l||!d.test(""))&&u.push(""):u.push(r.slice(f)),u.length>p?u.slice(0,p):u}}():"0".split(void 0,0).length&&(o.split=function(e,t){return"undefined"==typeof e&&0===t?[]:ie.call(this,e,t)});var ae=o.replace,le=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){e.push(n)}),1===e.length&&"undefined"==typeof e[0]}();le||(o.replace=function(t,n){var r=e(n),o=b(t)&&/\)[*?]/.test(t.source);if(r&&o){var i=function(e){var r=arguments.length,o=t.lastIndex;t.lastIndex=0;var i=t.exec(e)||[];return t.lastIndex=o,i.push(arguments[r-2],arguments[r-1]),n.apply(this,i)};return ae.call(this,t,i)}return ae.call(this,t,n)});var se=o.substr,ue="".substr&&"b"!=="0b".substr(-1);j(o,{substr:function(e,t){var n=e;return 0>e&&(n=Math.max(this.length+e,0)),se.call(this,n,t)}},ue);var ce=" \n\f\r   ᠎              \u2028\u2029\ufeff",fe="​",de="["+ce+"]",pe=new RegExp("^"+de+de+"*"),me=new RegExp(de+de+"*$"),ve=o.trim&&(ce.trim()||!fe.trim());j(o,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(pe,"").replace(me,"")}},ve),(8!==parseInt(ce+"08")||22!==parseInt(ce+"0x16"))&&(parseInt=function(e){var t=/^0[xX]/;return function(n,r){var o=String(n).trim(),i=Number(r)||(t.test(o)?16:10);return e(o,i)}}(parseInt))})},{}],25:[function(e,t,n){var r=[],o=r.forEach,i=r.slice;t.exports=function(e){return o.call(i.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e}},{}],26:[function(e,t,n){function r(e){var t=o.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=r;var o=Object.prototype.toString},{}],27:[function(e,t,n){"use strict";t.exports=function(e){return"object"==typeof e&&null!==e}},{}],28:[function(t,n,r){!function(t,r){"undefined"!=typeof n&&n.exports?n.exports=r():"function"==typeof e&&e.amd?e(r):this[t]=r()}("$script",function(){function e(e,t){for(var n=0,r=e.length;r>n;++n)if(!t(e[n]))return s;return 1}function t(t,n){e(t,function(e){return!n(e)})}function n(i,a,l){function s(e){return e.call?e():d[e]}function c(){if(!--y){d[h]=1,g&&g();for(var n in m)e(n.split("|"),s)&&!t(m[n],s)&&(m[n]=[])}}i=i[u]?i:[i];var f=a&&a.call,g=f?a:l,h=f?i.join(""):a,y=i.length;return setTimeout(function(){t(i,function e(t,n){return null===t?c():(t=n||-1!==t.indexOf(".js")||/^https?:\/\//.test(t)||!o?t:o+t+".js",v[t]?(h&&(p[h]=1),2==v[t]?c():setTimeout(function(){e(t,!0)},0)):(v[t]=1,h&&(p[h]=1),void r(t,c)))})},0),n}function r(e,t){var n,r=a.createElement("script");r.onload=r.onerror=r[f]=function(){r[c]&&!/^c|loade/.test(r[c])||n||(r.onload=r[f]=null,n=1,v[e]=2,t())},r.async=1,r.src=i?e+(-1===e.indexOf("?")?"?":"&")+i:e,l.insertBefore(r,l.lastChild)}var o,i,a=document,l=a.getElementsByTagName("head")[0],s=!1,u="push",c="readyState",f="onreadystatechange",d={},p={},m={},v={};return n.get=r,n.order=function(e,t,r){!function o(i){i=e.shift(),e.length?n(i,o):n(i,t,r)}()},n.path=function(e){o=e},n.urlArgs=function(e){i=e},n.ready=function(r,o,i){r=r[u]?r:[r];var a=[];return!t(r,function(e){d[e]||a[u](e)})&&e(r,function(e){return d[e]})?o():!function(e){m[e]=m[e]||[],m[e][u](o),i&&i(a)}(r.join("|")),n},n.done=function(e){n([null],e)},n})},{}],29:[function(t,n,r){(function(t){!function(o){function i(e){throw RangeError(M[e])}function a(e,t){for(var n=e.length;n--;)e[n]=t(e[n]);return e}function l(e,t){return a(e.split(D),t).join(".")}function s(e){for(var t,n,r=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(n=e.charCodeAt(o++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--)):r.push(t);return r}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=F(e>>>10&1023|55296),e=56320|1023&e),t+=F(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:k}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?I(e/C):e>>1,e+=I(e/t);e>L*S>>1;r+=k)e=I(e/L);return I(r+(L+1)*e/(e+N))}function p(e){var t,n,r,o,a,l,s,f,p,m,v=[],g=e.length,h=0,y=O,b=j;for(n=e.lastIndexOf(P),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&i("not-basic"),v.push(e.charCodeAt(r));for(o=n>0?n+1:0;g>o;){for(a=h,l=1,s=k;o>=g&&i("invalid-input"),f=c(e.charCodeAt(o++)),(f>=k||f>I((E-h)/l))&&i("overflow"),h+=f*l,p=b>=s?T:s>=b+S?S:s-b,!(p>f);s+=k)m=k-p,l>I(E/m)&&i("overflow"),l*=m;t=v.length+1,b=d(h-a,t,0==a),I(h/t)>E-y&&i("overflow"),y+=I(h/t),h%=t,v.splice(h++,0,y)}return u(v)}function m(e){var t,n,r,o,a,l,u,c,p,m,v,g,h,y,b,w=[];for(e=s(e),g=e.length,t=O,n=0,a=j,l=0;g>l;++l)v=e[l],128>v&&w.push(F(v));for(r=o=w.length,o&&w.push(P);g>r;){for(u=E,l=0;g>l;++l)v=e[l],v>=t&&u>v&&(u=v);for(h=r+1,u-t>I((E-n)/h)&&i("overflow"),n+=(u-t)*h,t=u,l=0;g>l;++l)if(v=e[l],t>v&&++n>E&&i("overflow"),v==t){for(c=n,p=k;m=a>=p?T:p>=a+S?S:p-a,!(m>c);p+=k)b=c-m,y=k-m,w.push(F(f(m+b%y,0))),c=I(b/y);w.push(F(f(c,0))),a=d(n,h,r==o),n=0,++r}++n,++t}return w.join("")}function v(e){return l(e,function(e){
9
+ return A.test(e)?p(e.slice(4).toLowerCase()):e})}function g(e){return l(e,function(e){return _.test(e)?"xn--"+m(e):e})}var h="object"==typeof r&&r,y="object"==typeof n&&n&&n.exports==h&&n,b="object"==typeof t&&t;(b.global===b||b.window===b)&&(o=b);var w,x,E=2147483647,k=36,T=1,S=26,N=38,C=700,j=72,O=128,P="-",A=/^xn--/,_=/[^ -~]/,D=/\x2E|\u3002|\uFF0E|\uFF61/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=k-T,I=Math.floor,F=String.fromCharCode;if(w={version:"1.2.4",ucs2:{decode:s,encode:u},decode:p,encode:m,toASCII:g,toUnicode:v},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return w});else if(h&&!h.nodeType)if(y)y.exports=w;else for(x in w)w.hasOwnProperty(x)&&(h[x]=w[x]);else o.punycode=w}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[19])(19)});
10
 
11