From 80a90aca7b006baf4b1885cd887705df0662a3e2 Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Tue, 14 Mar 2023 15:42:47 +0200 Subject: [PATCH] video.js to 8.2.0 update --- frontend/config/mediacms.config.pages.js | 4 +- .../components/video-player/VideoPlayer.scss | 2 +- .../lib/video-js/7.20.2/video-js.min.css | 1 - .../static/lib/video-js/7.20.2/video.min.js | 25 - .../video-js/{7.20.2 => 8.2.0}/video-js.css | 503 +- .../lib/video-js/8.2.0/video-js.min.css | 1 + .../video-js/{7.20.2 => 8.2.0}/video.cjs.js | 32707 ++++----- .../video-js/{7.20.2 => 8.2.0}/video.es.js | 32389 ++++----- .../lib/video-js/{7.20.2 => 8.2.0}/video.js | 37669 ++++------ .../static/lib/video-js/8.2.0/video.min.js | 40 + static/lib/video-js/7.20.2/video-js.min.css | 1 - static/lib/video-js/7.20.2/video.cjs.js | 2 - .../video-js/7.20.2/video.cjs.js.LICENSE.txt | 17 - static/lib/video-js/7.20.2/video.es.js | 2 - .../video-js/7.20.2/video.es.js.LICENSE.txt | 17 - static/lib/video-js/7.20.2/video.js | 2 - .../lib/video-js/7.20.2/video.js.LICENSE.txt | 29 - static/lib/video-js/7.20.2/video.min.js | 2 - .../video-js/7.20.2/video.min.js.LICENSE.txt | 25 - .../video-js/{7.20.2 => 8.2.0}/video-js.css | 503 +- static/lib/video-js/8.2.0/video-js.min.css | 1 + static/lib/video-js/8.2.0/video.cjs.js | 49953 +++++++++++++ static/lib/video-js/8.2.0/video.es.js | 49939 +++++++++++++ static/lib/video-js/8.2.0/video.js | 60497 ++++++++++++++++ static/lib/video-js/8.2.0/video.min.js | 40 + templates/root.html | 4 +- 26 files changed, 204010 insertions(+), 60365 deletions(-) delete mode 100644 frontend/src/static/lib/video-js/7.20.2/video-js.min.css delete mode 100644 frontend/src/static/lib/video-js/7.20.2/video.min.js rename frontend/src/static/lib/video-js/{7.20.2 => 8.2.0}/video-js.css (76%) create mode 100644 frontend/src/static/lib/video-js/8.2.0/video-js.min.css rename frontend/src/static/lib/video-js/{7.20.2 => 8.2.0}/video.cjs.js (68%) rename frontend/src/static/lib/video-js/{7.20.2 => 8.2.0}/video.es.js (69%) rename frontend/src/static/lib/video-js/{7.20.2 => 8.2.0}/video.js (72%) create mode 100644 frontend/src/static/lib/video-js/8.2.0/video.min.js delete mode 100644 static/lib/video-js/7.20.2/video-js.min.css delete mode 100644 static/lib/video-js/7.20.2/video.cjs.js delete mode 100644 static/lib/video-js/7.20.2/video.cjs.js.LICENSE.txt delete mode 100644 static/lib/video-js/7.20.2/video.es.js delete mode 100644 static/lib/video-js/7.20.2/video.es.js.LICENSE.txt delete mode 100644 static/lib/video-js/7.20.2/video.js delete mode 100644 static/lib/video-js/7.20.2/video.js.LICENSE.txt delete mode 100644 static/lib/video-js/7.20.2/video.min.js delete mode 100644 static/lib/video-js/7.20.2/video.min.js.LICENSE.txt rename static/lib/video-js/{7.20.2 => 8.2.0}/video-js.css (76%) create mode 100644 static/lib/video-js/8.2.0/video-js.min.css create mode 100644 static/lib/video-js/8.2.0/video.cjs.js create mode 100644 static/lib/video-js/8.2.0/video.es.js create mode 100644 static/lib/video-js/8.2.0/video.js create mode 100644 static/lib/video-js/8.2.0/video.min.js diff --git a/frontend/config/mediacms.config.pages.js b/frontend/config/mediacms.config.pages.js index 3d58e75..58725c2 100644 --- a/frontend/config/mediacms.config.pages.js +++ b/frontend/config/mediacms.config.pages.js @@ -20,11 +20,11 @@ const formatPage = (page) => { ? templates.renderPageContent({ page: { id: pageContentId, component: page.component } }) : undefined; const headLinks = [ - { rel: 'preload', href: './static/lib/video-js/7.20.2/video.min.js', as: 'script' }, + { rel: 'preload', href: './static/lib/video-js/8.2.0/video.min.js', as: 'script' }, ...(page.headLinks ? page.headLinks : []), ]; const bodyScripts = [ - { src: './static/lib/video-js/7.20.2/video.min.js' }, + { src: './static/lib/video-js/8.2.0/video.min.js' }, ...(page.bodyScripts ? page.bodyScripts : []), ]; diff --git a/frontend/src/static/js/components/video-player/VideoPlayer.scss b/frontend/src/static/js/components/video-player/VideoPlayer.scss index b5436ca..8432985 100755 --- a/frontend/src/static/js/components/video-player/VideoPlayer.scss +++ b/frontend/src/static/js/components/video-player/VideoPlayer.scss @@ -1,5 +1,5 @@ @use "sass:math"; -@import '../../../lib/video-js/7.20.2/video-js.min.css'; +@import '../../../lib/video-js/8.2.0/video-js.min.css'; @import '../../../css/includes/_variables.scss'; @keyframes up-next-circle-countdown { diff --git a/frontend/src/static/lib/video-js/7.20.2/video-js.min.css b/frontend/src/static/lib/video-js/7.20.2/video-js.min.css deleted file mode 100644 index 8026ccf..0000000 --- a/frontend/src/static/lib/video-js/7.20.2/video-js.min.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,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) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\f102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\f103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\f104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\f105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\f106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\f107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\f108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\f109"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\f10a"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\f10b"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\f10c"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\f10d"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\f10e"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\f10f"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\f110"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\f111"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\f112"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\f113"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\f114"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\f115"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\f116"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\f117"}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:"\f118"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\f119"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\f11a"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\f11b"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\f11c"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\f11d"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\f11e"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\f11f"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\f120"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\f121"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\f122"}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:0}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{width:100%;max-width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs){width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.81666em;margin-left:-1.5em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:0 0}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em 0;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;top:-.3333333333em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em 0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;visibility:visible;opacity:1;position:relative;transition:none}.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute;bottom:3em;left:.5em}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.vjs-no-flex .vjs-volume-control .vjs-mouse-display{z-index:0}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-volume-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster{display:block}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.vjs-no-flex .vjs-seek-to-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control{display:none}.video-js .vjs-current-time,.vjs-no-flex .vjs-current-time{display:none}.video-js .vjs-duration,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{100%{transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" ";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.video-js.vjs-layout-x-small.vjs-no-flex .vjs-custom-control-spacer{width:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px 0}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px 0;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0}.video-js :focus:not(:focus-visible){outline:0} \ No newline at end of file diff --git a/frontend/src/static/lib/video-js/7.20.2/video.min.js b/frontend/src/static/lib/video-js/7.20.2/video.min.js deleted file mode 100644 index 3bc604f..0000000 --- a/frontend/src/static/lib/video-js/7.20.2/video.min.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @license - * Video.js 7.20.2 - * Copyright Brightcove, Inc. - * Available under Apache License Version 2.0 - * - * - * Includes vtt.js - * Available under Apache License Version 2.0 - * - */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojs=t()}(this,function(){"use strict";for(var e,u="7.20.2",i={},a=function(e,t){return i[e]=i[e]||[],t&&(i[e]=i[e].concat(t)),i[e]},n=function(e,t){t=a(e).indexOf(t);return!(t<=-1)&&(i[e]=i[e].slice(),i[e].splice(t,1),!0)},l={prefixed:!0},t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],r=t[0],s=0;s - * Copyright (c) 2014 David Björklund - * Available under the MIT license - * - */ -var $t=function(e){var n={};return e&&e.trim().split("\n").forEach(function(e){var t=e.indexOf(":"),i=e.slice(0,t).trim().toLowerCase(),t=e.slice(t+1).trim();"undefined"==typeof n[i]?n[i]=t:Array.isArray(n[i])?n[i].push(t):n[i]=[n[i],t]}),n},Jt=ei,I=ei;function Zt(e,t,i){var n=e;return Yt(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=g({},t,{uri:e}),n.callback=i,n}function ei(e,t,i){return ti(t=Zt(e,t,i))}function ti(n){if("undefined"==typeof n.callback)throw new Error("callback argument missing");var r=!1,a=function(e,t,i){r||(r=!0,n.callback(e,t,i))};function s(){var e=void 0,e=l.response||l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l);if(m)try{e=JSON.parse(e)}catch(e){}return e}function t(e){return clearTimeout(u),(e=!(e instanceof Error)?new Error(""+(e||"Unknown XMLHttpRequest Error")):e).statusCode=0,a(e,g)}function e(){if(!o){clearTimeout(u);var e=n.useXDR&&void 0===l.status?200:1223===l.status?204:l.status,t=g,i=null;return 0!==e?(t={body:s(),statusCode:e,method:d,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(t.headers=$t(l.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,t,t.body)}}var i,o,u,l=n.xhr||null,c=(l=l||new(n.cors||n.useXDR?ei.XDomainRequest:ei.XMLHttpRequest)).url=n.uri||n.url,d=l.method=n.method||"GET",h=n.body||n.data,p=l.headers=n.headers||{},f=!!n.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:l};if("json"in n&&!1!==n.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===n.json?h:n.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(e,0)},l.onload=e,l.onerror=t,l.onprogress=function(){},l.onabort=function(){o=!0},l.ontimeout=t,l.open(d,c,!f,n.username,n.password),f||(l.withCredentials=!!n.withCredentials),!f&&0=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a]*>?)?/);return e=e[1]||e[2],t=t.substr(e.length),e}());)"<"!==i[0]?p.appendChild(e.document.createTextNode((s=i,yi.innerHTML=s,s=yi.textContent,yi.textContent="",s))):"/"!==i[1]?(a=pi(i.substr(1,i.length-2)))?(n=e.document.createProcessingInstruction("timestamp",a),p.appendChild(n)):(r=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/))&&(l=r[1],c=r[3],d=void 0,d=vi[l],(n=d?(d=e.document.createElement(d),(l=bi[l])&&c&&(d[l]=c.trim()),d):null)&&(o=p,Ti[(u=n).localName]&&Ti[u.localName]!==o.localName||(r[2]&&((a=r[2].split(".")).forEach(function(e){var t=/^bg_/.test(e),e=t?e.slice(3):e;_i.hasOwnProperty(e)&&(e=_i[e],n.style[t?"background-color":"color"]=e)}),n.className=a.join(" ")),f.push(r[1]),p.appendChild(n),p=n))):f.length&&f[f.length-1]===i.substr(2).replace(">","")&&(f.pop(),p=p.parentNode);return h}var wi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Ei(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function a(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}for(a(t,e);i=function e(t){if(!t||!t.length)return null;var i=t.pop(),n=i.textContent||i.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?r[t.length=0]:n}return"ruby"===i.tagName?e(t):i.childNodes?(a(t,i),e(t)):void 0}(t);)for(var n=0;n=i[0]&&e<=i[1])return 1}}(i.charCodeAt(n)))return"rtl";return"ltr"}function ki(){}function Ci(e,t,i){ki.call(this),this.cue=t,this.cueDiv=Si(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:Ei(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function Ii(e){var t,i,n,r;e.div&&(t=e.div.offsetHeight,i=e.div.offsetWidth,n=e.div.offsetTop,r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects(),e=e.div.getBoundingClientRect(),r=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0),this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||t,this.bottom=e.bottom||n+(e.height||t),this.width=e.width||i,this.lineHeight=void 0!==r?r:e.lineHeight}function xi(e,t,o,u){var i,n=new Ii(t),r=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;rd&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===r.vertical?o.height:o.width,s=s.reverse()),n.move(h,c)}else{var p=n.lineHeight/o.height*100;switch(r.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],n=new Ii(t)}n=function(e,t){for(var i,n=new Ii(e),r=1,a=0;ae.left&&this.tope.top},Ii.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Ii.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Ii.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Ii.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Ii.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},Ai.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Ai.convertCueToDOMTree=function(e,t){return e&&t?Si(e,t):null};Ai.processCues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var a=n.document.createElement("div");if(a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin="1.5%",e.appendChild(a),function(e){for(var t=0;tt.length;u--)l.el_.removeChild(n[u-1]);n.length=t.length})},e}(pt)),pt.registerComponent("TimeTooltip",function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=We(Ve(ft(t),t.update),30),t}mt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,i){var n=he(this.el_),r=de(this.player_.el()),a=e.width*t;r&&n&&(t=e.left-r.left+a,r=e.width-a+(r.right-e.right),t<(e=n.width/2)?e+=e-t:rn.width&&(e=n.width),e=Math.round(e),this.el_.style.right="-"+e+"px",this.write(i))},t.write=function(e){J(this.el_,e)},t.updateTime=function(n,r,a,s){var o=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var e,t,i=o.player_.duration();i=o.player_.liveTracker&&o.player_.liveTracker.isLive()?((t=(e=o.player_.liveTracker.liveWindow())-r*e)<1?"":"-")+ln(t,e):ln(a,i),o.update(n,r,i),s&&s()})},e}(pt));Xt=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=We(Ve(ft(t),t.update),30),t}mt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,t){var i,n=this.getChild("timeTooltip");n&&(i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),n.updateTime(e,t,i))},e}(pt);Xt.prototype.options_={children:[]},q||A||Xt.prototype.options_.children.push("timeTooltip"),pt.registerComponent("PlayProgressBar",Xt);I=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=We(Ve(ft(t),t.update),30),t}mt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var i=this,n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,function(){i.el_.style.left=e.width*t+"px"})},e}(pt);I.prototype.options_={children:["timeTooltip"]},pt.registerComponent("MouseTimeDisplay",I);Bt=function(a){function e(e,t){t=a.call(this,e,t)||this;return t.setEventHandlers_(),t}mt(e,a);var t=e.prototype;return t.setEventHandlers_=function(){var t=this;this.update_=Ve(this,this.update),this.update=We(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(e){return t.enableInterval_(e)},this.disableIntervalHandler_=function(e){return t.disableInterval_(e)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.on(document,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===document.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var n=this;if("hidden"!==document.visibilityState){var r=a.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ln(e,i),ln(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(de(n.el()),n.getProgress())}),r}},t.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},t.handleMouseDown=function(e){_e(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),_e(e)){t||this.player_.scrubbing()||this.player_.scrubbing(!0);var i=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(.99<=i)return void n.seekToLiveEdge();var r,t=n.seekableStart(),e=n.liveCurrentTime();if((r=(r=e<=(r=t+i*n.liveWindow())?e:r)<=t?t+.1:r)===1/0)return}else(r=i*this.player_.duration())===this.player_.duration()&&(r-=.1);this.userSeek_(r)}},t.enable=function(){a.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){a.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){a.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Et(this.player_.play()):this.update_()},t.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},t.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var t,i=this.player_.liveTracker;ht.isEventKey(e,"Space")||ht.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.handleAction(e)):ht.isEventKey(e,"Home")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(0)):ht.isEventKey(e,"End")?(e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration())):/^[0-9]$/.test(ht(e))?(e.preventDefault(),e.stopPropagation(),t=10*(ht.codes[ht(e)]-ht.codes[0])/100,i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*t):this.userSeek_(this.player_.duration()*t)):ht.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):ht.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):a.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.off(document,"visibilitychange",this.toggleVisibility_),a.prototype.dispose.call(this)},e}(li);Bt.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},q||A||Bt.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),pt.registerComponent("SeekBar",Bt);Ft=function(n){function e(e,t){var i=n.call(this,e,t)||this;return i.handleMouseMove=We(Ve(ft(i),i.handleMouseMove),30),i.throttledHandleMouseSeek=We(Ve(ft(i),i.handleMouseSeek),30),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.handleMouseDownHandler_=function(e){return i.handleMouseDown(e)},i.enable(),i}mt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t,i,n,r,a=this.getChild("seekBar");a&&(t=a.getChild("playProgressBar"),i=a.getChild("mouseTimeDisplay"),(t||i)&&(r=he(n=a.el()),e=pe(n,e).x,e=cn(e,0,1),i&&i.update(r,e),t&&t.update(r,a.getProgress())))},t.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){var e;this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing()&&(e=this.getChild("seekBar"),this.player_.scrubbing(!1),e.videoWasPlaying&&Et(this.player_.play())))},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},t.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},e}(pt);Ft.prototype.options_={children:["seekBar"]},pt.registerComponent("ProgressControl",Ft);jt=function(n){function e(e,t){var i=n.call(this,e,t)||this;return i.on(e,["enterpictureinpicture","leavepictureinpicture"],function(e){return i.handlePictureInPictureChange(e)}),i.on(e,["disablepictureinpicturechanged","loadedmetadata"],function(e){return i.handlePictureInPictureEnabledChange(e)}),i.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){"audio"===e.currentType().substring(0,5)||e.audioPosterMode()||e.audioOnlyMode()?(e.isInPictureInPicture()&&e.exitPictureInPicture(),i.hide()):i.show()}),i.disable(),i}mt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+n.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){document.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(sn);jt.prototype.controlText_="Picture-in-Picture",pt.registerComponent("PictureInPictureToggle",jt);j=function(n){function e(e,t){var i=n.call(this,e,t)||this;return i.on(e,"fullscreenchange",function(e){return i.handleFullscreenChange(e)}),!1===document[e.fsApi_.fullscreenEnabled]&&i.disable(),i}mt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+n.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(sn);j.prototype.controlText_="Fullscreen",pt.registerComponent("FullscreenToggle",j);pt.registerComponent("VolumeLevel",function(t){function e(){return t.apply(this,arguments)||this}return mt(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(t.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},e}(pt)),pt.registerComponent("VolumeLevelTooltip",function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=We(Ve(ft(t),t.update),30),t}mt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,i,n){if(!i){var r=de(this.el_),a=de(this.player_.el()),i=e.width*t;if(!a||!r)return;t=e.left-a.left+i,a=e.width-i+(a.right-e.right),e=r.width/2;tr.width&&(e=r.width),this.el_.style.right="-"+e+"px"}this.write(n+"%")},t.write=function(e){J(this.el_,e)},t.updateVolume=function(e,t,i,n,r){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){a.update(e,t,i,n.toFixed(0)),r&&r()})},e}(pt));k=function(i){function e(e,t){t=i.call(this,e,t)||this;return t.update=We(Ve(ft(t),t.update),30),t}mt(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t,i){var n=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,function(){i?n.el_.style.bottom=e.height*t+"px":n.el_.style.left=e.width*t+"px"})},e}(pt);k.prototype.options_={children:["volumeLevelTooltip"]},pt.registerComponent("MouseVolumeLevelDisplay",k);f=function(n){function e(e,t){var i=n.call(this,e,t)||this;return i.on("slideractive",function(e){return i.updateLastVolume_(e)}),i.on(e,"volumechange",function(e){return i.updateARIAAttributes(e)}),e.ready(function(){return i.updateARIAAttributes()}),i}mt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){_e(e)&&n.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){var t,i,n,r=this.getChild("mouseVolumeLevelDisplay");r&&(t=de(n=this.el()),i=this.vertical(),n=pe(n,e),n=i?n.y:n.x,n=cn(n,0,1),r.update(t,n,i)),_e(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(li);f.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},q||A||f.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),f.prototype.playerEvent="volumechange",pt.registerComponent("VolumeBar",f);ui=function(a){function e(e,t){var i,n,r;return(t=void 0===t?{}:t).vertical=t.vertical||!1,"undefined"!=typeof t.volumeBar&&!S(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),i=a.call(this,e,t)||this,n=ft(i),(r=e).tech_&&!r.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),i.throttledHandleMouseMove=We(Ve(ft(i),i.handleMouseMove),30),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.on("mousedown",function(e){return i.handleMouseDown(e)}),i.on("touchstart",function(e){return i.handleMouseDown(e)}),i.on("mousemove",function(e){return i.handleMouseMove(e)}),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}mt(e,a);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(pt);ui.prototype.options_={children:["volumeBar"]},pt.registerComponent("VolumeControl",ui);Xt=function(a){function e(e,t){var i,n,r=a.call(this,e,t)||this;return i=ft(r),(n=e).tech_&&!n.tech_.featuresMuteControl&&i.addClass("vjs-hidden"),i.on(n,"loadstart",function(){n.tech_.featuresMuteControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),r.on(e,["loadstart","volumechange"],function(e){return r.update(e)}),r}mt(e,a);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();0===t?(this.player_.volume(i<.1?.1:i),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;q&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)ie(this.el_,"vjs-vol-"+i);te(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(sn);Xt.prototype.controlText_="Mute",pt.registerComponent("MuteToggle",Xt);I=function(n){function e(e,t){var i;return"undefined"!=typeof(t=void 0===t?{}:t).inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumeControl&&!S(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(i=n.call(this,e,t)||this).handleKeyPressHandler_=function(e){return i.handleKeyPress(e)},i.on(e,["loadstart"],function(e){return i.volumePanelState_(e)}),i.on(i.muteToggle,"keyup",function(e){return i.handleKeyPress(e)}),i.on(i.volumeControl,"keyup",function(e){return i.handleVolumeControlKeyUp(e)}),i.on("keydown",function(e){return i.handleKeyPress(e)}),i.on("mouseover",function(e){return i.handleMouseOver(e)}),i.on("mouseout",function(e){return i.handleMouseOut(e)}),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}mt(e,n);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),n.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){ht.isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),Be(document,"keyup",this.handleKeyPressHandler_)},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),Fe(document,"keyup",this.handleKeyPressHandler_)},t.handleKeyPress=function(e){ht.isEventKey(e,"Esc")&&this.handleMouseOut()},e}(pt);I.prototype.options_={children:["muteToggle","volumeControl"]},pt.registerComponent("VolumePanel",I);var hn=function(n){function e(e,t){var i=n.call(this,e,t)||this;return t&&(i.menuButton_=t.menuButton),i.focusedChild_=-1,i.on("keydown",function(e){return i.handleKeyDown(e)}),i.boundHandleBlur_=function(e){return i.handleBlur(e)},i.boundHandleTapClick_=function(e){return i.handleTapClick(e)},i}mt(e,n);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof pt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof pt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),n.prototype.removeChild.call(this,e)},t.addItem=function(e){e=this.addChild(e);e&&this.addEventListenerForItem(e)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=$(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");e=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),Be(e,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),e},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,n.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||document.activeElement;this.children().some(function(e){return e.el()===t})||(e=this.menuButton_)&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()},t.handleTapClick=function(t){var e;this.menuButton_&&(this.menuButton_.unpressButton(),e=this.children(),!Array.isArray(e)||(e=e.filter(function(e){return e.el()===t.target})[0])&&"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())},t.handleKeyDown=function(e){ht.isEventKey(e,"Left")||ht.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(ht.isEventKey(e,"Right")||ht.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),0=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(pt);pt.registerComponent("Menu",hn);Bt=function(n){function e(e,t){var i;(i=n.call(this,e,t=void 0===t?{}:t)||this).menuButton_=new sn(e,t),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");t=sn.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+t,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;t=function(e){return i.handleClick(e)};return i.handleMenuKeyUp_=function(e){return i.handleMenuKeyUp(e)},i.on(i.menuButton_,"tap",t),i.on(i.menuButton_,"click",t),i.on(i.menuButton_,"keydown",function(e){return i.handleKeyDown(e)}),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),Be(document,"keyup",i.handleMenuKeyUp_)}),i.on("mouseleave",function(e){return i.handleMouseLeave(e)}),i.on("keydown",function(e){return i.handleSubmenuKeyDown(e)}),i}mt(e,n);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},t.createMenu=function(){var e,t=new hn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title&&(e=$("li",{className:"vjs-menu-title",textContent:ut(this.options_.title),tabIndex:-1}),e=new pt(this.player_,{el:e}),t.addItem(e)),this.items=this.createItems(),this.items)for(var i=0;i select",id:"captions-background-color-%s",label:"Color",options:[ui,Bt,jt,Ft,j,C,I,Xt]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[k,li,f]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Bt,ui,jt,Ft,j,C,I,Xt]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[k,li]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[f,li,k]}};function wn(e,t){if((e=t?t(e):e)&&"none"!==e)return e}Sn.windowColor.options=Sn.backgroundColor.options,pt.registerComponent("TextTrackSettings",function(n){function e(e,t){var i;return t.temporary=!1,(i=n.call(this,e,t)||this).updateDisplay=i.updateDisplay.bind(ft(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=$("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===t.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),_(Sn,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}mt(e,n);var t=e.prototype;return t.dispose=function(){this.endDialog=null,n.prototype.dispose.call(this)},t.createElSelect_=function(e,t,i){var n=this;void 0===t&&(t=""),void 0===i&&(i="label");var e=Sn[e],r=e.id.replace("%s",this.id_),a=[t,r].join(" ").trim();return["<"+i+' id="'+r+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(e.label),"",'").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},t.createElColors_=function(){return $("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return $("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return $("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var i,n,e,r=this;return n=function(e,t,i){var n,t=(n=r.$(t.selector),t=t.parser,wn(n.options[n.options.selectedIndex].value,t));return void 0!==t&&(e[i]=t),e},void 0===(e={})&&(e=0),v(i=Sn).reduce(function(e,t){return n(e,i[t],t)},e)},t.setValues=function(i){var n=this;_(Sn,function(e,t){!function(e,t,i){if(t)for(var n=0;nthis.options_.liveTolerance,(t=!this.timeupdateSeen_||e===1/0?!1:t)!==this.behindLiveEdge_&&(this.behindLiveEdge_=t,this.trigger("liveedgechange")))},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&2=e.length&&n.call(e,function(e,t){return e===(a[t]?a[t]&i[r+t]:i[r+t])})}var Er=function(t){function e(){var e=t.call(this)||this;return e.buffer="",e}return mt(e,t),e.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function ga(e,t){if(t(e))return 1;if(e=e.firstChild)do{if(ga(e,t))return 1}while(e=e.nextSibling)}function ya(){}function va(e,t,i){e&&e._inc++,i.namespaceURI===Hr.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function _a(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,a=0;r;)r=(n[a++]=r).nextSibling;n.length=a}}}function ba(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,_a(e.ownerDocument,e),t}function Ta(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===ia){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;n=i?i.previousSibling:e.lastChild;for(r.previousSibling=n,a.nextSibling=i,n?n.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;r.parentNode=e,r!==a&&(r=r.nextSibling););return _a(e.ownerDocument||e,e),t.nodeType==ia&&(t.firstChild=t.lastChild=null),t}function Sa(){this._nsMap={}}function wa(){}function Ea(){}function ka(){}function Ca(){}function Ia(){}function xa(){}function Aa(){}function Pa(){}function La(){}function Da(){}function Oa(){}function Ma(){}function Ra(e,t){var i,n=[],r=9==this.nodeType&&this.documentElement||this,a=r.prefix,s=r.namespaceURI;return Ba(this,n,e,t,i=s&&null==a&&null==(a=r.lookupPrefix(s))?[{namespace:s,prefix:null}]:i),n.join("")}function Na(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(r&&("xml"!==n||r!==Hr.XML)&&r!==Hr.XMLNS){for(var a=i.length;a--;){var s=i[a];if(s.prefix===n)return s.namespace!==r}return 1}}function Ua(e,t,i){e.push(" ",t,'="',i.replace(/[<&"]/g,ma),'"')}function Ba(e,t,i,n,r){if(r=r||[],n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Xr:var a=e.attributes,s=a.length,o=e.firstChild,u=e.tagName,l=u;if(!(i=Hr.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var c,d=0;d"),i&&/^script$/i.test(u))for(;o;)o.data?t.push(o.data):Ba(o,t,i,n,r.slice()),o=o.nextSibling;else for(;o;)Ba(o,t,i,n,r.slice()),o=o.nextSibling;t.push("")}else t.push("/>");return;case ea:case ia:for(o=e.firstChild;o;)Ba(o,t,i,n,r.slice()),o=o.nextSibling;return;case Kr:return Ua(t,e.name,e.value),0;case Yr:return t.push(e.data.replace(/[<&]/g,ma).replace(/]]>/g,"]]>"));case Qr:return t.push("");case Zr:return t.push("\x3c!--",e.data,"--\x3e");case ta:var v=e.publicId,_=e.systemId;return t.push("")):_&&"."!=_?t.push(" SYSTEM ",_,">"):((_=e.internalSubset)&&t.push(" [",_,"]"),t.push(">")));case Jr:return t.push("");case $r:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Fa(e,t,i){e[t]=i}x.INVALID_STATE_ERR=(na[11]="Invalid state",11),x.SYNTAX_ERR=(na[12]="Syntax error",12),x.INVALID_MODIFICATION_ERR=(na[13]="Invalid modification",13),x.NAMESPACE_ERR=(na[14]="Invalid namespace",14),x.INVALID_ACCESS_ERR=(na[15]="Invalid access",15),aa.prototype=Error.prototype,Gr(x,aa),sa.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES});ja.XML_ENTITIES,ja.HTML_ENTITIES,ja.entityMap;var Ha=jr.NAMESPACE,zt=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ar=new RegExp("[\\-\\.0-9"+zt.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),qa=new RegExp("^"+zt.source+ar.source+"*(?::"+zt.source+ar.source+"*)?$"),Va=0,Wa=1,Ga=2,za=3,Xa=4,Ka=5,Ya=6,Qa=7;function $a(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,$a)}function Ja(){}function Za(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function es(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value,o=0<(c=o.indexOf(":"))?(l=s.prefix=o.slice(0,c),d=o.slice(c+1),"xmlns"===l&&d):(l=null,"xmlns"===(d=o)&&"");s.localName=d,!1!==o&&(null==r&&(r={},ts(i,i={})),i[o]=r[o]=u,s.uri=Ha.XMLNS,t.startPrefixMapping(o,u))}for(var l,a=e.length;a--;)(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri=Ha.XML),"xmlns"!==l&&(s.uri=i[l||""]));var c,d=0<(c=n.indexOf(":"))?(l=e.prefix=n.slice(0,c),e.localName=n.slice(c+1)):(l=null,e.localName=n),h=e.uri=i[l||""];if(t.startElement(h,d,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,1;if(t.endElement(h,d,n),r)for(l in r)t.endPrefixMapping(l)}function ts(e,t){for(var i in e)t[i]=e[i]}function is(){this.attributeNames={}}($a.prototype=new Error).name=$a.name,Ja.prototype={parse:function(e,t,i){var n=this.domBuilder;n.startDocument(),ts(t,t={}),function(i,e,n,r,a){function s(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?65535<(t=parseInt(t.substr(1).replace("x","0x")))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):String.fromCharCode(t):(a.error("entity not found:"+e),e)}function t(e){var t;f",y+3),_=i.substring(y+2,v).replace(/[ \t\n\r]+$/g,""),b=h.pop();v<0?(_=i.substring(y+2).replace(/[\s<].*/,""),a.error("end tag name: "+_+" is not complete:"+b.tagName),v=y+1+_.length):_.match(/\s",t);if(n){t=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return t?(t[0].length,i.processingInstruction(t[1],t[2]),n+2):-1}return-1}(i,y,r);break;case"!":d&&o(y),v=function(e,t,i,n){{if("-"===e.charAt(t+2)){if("-"!==e.charAt(t+3))return-1;var r=e.indexOf("--\x3e",t+4);return t",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var a=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),n=a.length;if(1":switch(l){case Va:n.setTagName(e.slice(t,u));case Ka:case Ya:case Qa:break;case Xa:case Wa:"/"===(d=e.slice(t,u)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case Ga:l===Ga&&(d=o),l==Xa?(a.warning('attribute "'+d+'" missed quot(")!'),s(o,d.replace(/&#?\w+;/g,r),t)):(Ha.isHTML(i[""])&&d.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case za:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(l){case Va:n.setTagName(e.slice(t,u)),l=Ya;break;case Wa:o=e.slice(t,u),l=Ga;break;case Xa:var d=e.slice(t,u).replace(/&#?\w+;/g,r);a.warning('attribute "'+d+'" missed quot(")!!'),s(o,d,t);case Ka:l=Ya}else switch(l){case Ga:n.tagName,Ha.isHTML(i[""])&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),s(o,o,t),t=u,l=Wa;break;case Ka:a.warning('attribute space is required"'+o+'"!!');case Ya:l=Wa,t=u;break;case za:l=Xa,t=u;break;case Qa:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}(i,y,E,k,s,a),C=E.length;if(!E.closed&&function(e,t,i,n){var r=n[i];null==r&&((r=e.lastIndexOf(""))",t),e=e.substring(t+1,a);if(/[&<]/.test(e))return/^script$/i.test(i)||(e=e.replace(/&#?\w+;/g,n)),r.characters(e,0,e.length),a}return t+1}(i,v,E.tagName,s,r):v++}}catch(e){if(e instanceof $a)throw e;a.error("element parse error: "+e),v=-1}f=t+i||t?new java.lang.String(e,t,i)+"":e}function hs(e,t){(e.currentElement||e.doc).appendChild(t)}os.prototype.parseFromString=function(e,t){var i=this.options,n=new ss,r=i.domBuilder||new us,a=i.errorHandler,s=i.locator,o=i.xmlns||{},u=/\/x?html?$/.test(t),t=u?ja.HTML_ENTITIES:ja.XML_ENTITIES;return s&&r.setDocumentLocator(s),n.errorHandler=function(n,e,r){if(!n){if(e instanceof us)return e;n=e}var a={},s=n instanceof Function;function t(t){var i=n[t];!i&&s&&(i=2==n.length?function(e){n(t,e)}:n),a[t]=i?function(e){i("[xmldom "+t+"]\t"+e+cs(r))}:function(){}}return r=r||{},t("warning"),t("error"),t("fatalError"),a}(a,r,s),n.domBuilder=i.domBuilder||r,u&&(o[""]=rs.HTML),o.xml=o.xml||rs.XML,e&&"string"==typeof e?n.parse(e,o,t):n.errorHandler.error("invalid doc source"),r.doc},us.prototype={startDocument:function(){this.doc=(new ns).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,a=r.createElementNS(e,i||t),s=n.length;hs(this,a),this.currentElement=a,this.locator&&ls(this.locator,a);for(var o=0;ot.timeline?1:-1});var i}function ks(e){var r,a,s=[];return r=e,a=function(e,t,i,n){s=s.concat(e.playlists||[])},yo.forEach(function(e){for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var n=r.mediaGroups[e][t][i];a(n,e,t,i)}}),s}function Cs(e){var i=e.playlist,e=e.mediaSequence;i.mediaSequence=e,i.segments.forEach(function(e,t){e.number=i.mediaSequence+t})}function Is(e){var r,a,t=e.oldManifest,i=e.newManifest,n=t.playlists.concat(ks(t)),e=i.playlists.concat(ks(i));return i.timelineStarts=Es([t.timelineStarts,i.timelineStarts]),n={oldPlaylists:n,newPlaylists:e,timelineStarts:i.timelineStarts},r=n.oldPlaylists,e=n.newPlaylists,a=n.timelineStarts,e.forEach(function(t){t.discontinuitySequence=vs(a,function(e){return e.timeline===t.timeline});var e=function(e,t){for(var i=0;ie.timeline||e.segments.length&&t.timeline>e.segments[e.segments.length-1].timeline)&&t.discontinuitySequence--);e.segments[n].discontinuity&&!i.discontinuity&&(i.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Cs({playlist:t,mediaSequence:e.segments[n].number})}}),i}function xs(e){return e&&e.uri+"-"+(t=e.byterange,e="bigint"==typeof t.offset||"bigint"==typeof t.length?window.BigInt(t.offset)+window.BigInt(t.length)-window.BigInt(1):t.offset+t.length-1,t.offset+"-"+e);var t}function As(e){return ms(e.reduce(function(e,t){var i,n=t.attributes.id+(t.attributes.lang||"");return e[n]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments)),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):(e[n]=t,e[n].attributes.timelineStarts=[]),e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{})).map(function(e){var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce(function(e,t,i){return t[n]&&e.push(i),e},[])),e})}function Ps(e,t){var i=xs(e.sidx);return(i=i&&t[i]&&t[i].sidx)&&ws(e,i,e.sidx.resolvedUri),e}function Ls(e,h,p){var f;return void 0===h&&(h={}),void 0===p&&(p=!1),e=e.reduce(function(e,t){var i=t.attributes.role&&t.attributes.role.value||"",n=t.attributes.lang||"",r=t.attributes.label||"main";e[r=n&&!t.attributes.label?t.attributes.lang+(i?" ("+i+")":""):r]||(e[r]={language:n,autoselect:!0,default:"main"===i,playlists:[],uri:""});var a,s,o,u,l,c,d,u=Ps((s=p,o=(a=t).attributes,u=a.segments,l=a.sidx,c=a.mediaSequence,d=a.discontinuitySequence,n=a.discontinuityStarts,u={attributes:((a={NAME:o.id,BANDWIDTH:o.bandwidth,CODECS:o.codecs})["PROGRAM-ID"]=1,a),uri:"",endList:"static"===o.type,timeline:o.periodStart,resolvedUri:"",targetDuration:o.duration,discontinuitySequence:d,discontinuityStarts:n,timelineStarts:o.timelineStarts,mediaSequence:c,segments:u},o.contentProtection&&(u.contentProtection=o.contentProtection),l&&(u.sidx=l),s&&(u.attributes.AUDIO="audio",u.attributes.SUBTITLES="subs"),u),h);return e[r].playlists.push(u),"undefined"==typeof f&&"main"===i&&((f=t).default=!0),e},{}),f||(e[Object.keys(e)[0]].default=!0),e}function Ds(e){var t=e.attributes,i=e.segments,n=e.sidx,r=e.discontinuityStarts,i={attributes:((e={NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth})["PROGRAM-ID"]=1,e),uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:"",targetDuration:t.duration,discontinuityStarts:r,timelineStarts:t.timelineStarts,segments:i};return t.contentProtection&&(i.contentProtection=t.contentProtection),n&&(i.sidx=n),i}function Os(e){return"video/mp4"===(e=e.attributes).mimeType||"video/webm"===e.mimeType||"video"===e.contentType}function Ms(e){return"audio/mp4"===(e=e.attributes).mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType}function Rs(e){return"text/vtt"===(e=e.attributes).mimeType||"text"===e.contentType}function Ns(i){return i?Object.keys(i).reduce(function(e,t){t=i[t];return e.concat(t.playlists)},[]):[]}function Us(e){var t=e.dashPlaylists,i=e.locations,n=void 0===(c=e.sidxMapping)?{}:c,r=e.previousManifest;if(!t.length)return{};var a=(d=t[0].attributes).sourceDuration,s=d.type,o=d.suggestedPresentationDelay,u=d.minimumUpdatePeriod,l=As(t.filter(Os)).map(Ds),c=As(t.filter(Ms)),e=As(t.filter(Rs)),d=t.map(function(e){return e.attributes.captionServices}).filter(Boolean),a={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:((t={AUDIO:{},VIDEO:{}})["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:a,playlists:function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e)e[i]=Ps(e[i],t);return e}(l,n)};0<=u&&(a.minimumUpdatePeriod=1e3*u),i&&(a.locations=i),"dynamic"===s&&(a.suggestedPresentationDelay=o);var h,p,o=0===a.playlists.length,o=c.length?Ls(c,n,o):null,n=e.length?(void 0===(h=n)&&(h={}),e.reduce(function(e,t){var i=t.attributes.lang||"text";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(Ps(function(e){var t=e.attributes,i=e.segments,n=e.mediaSequence,r=e.discontinuityStarts,a=e.discontinuitySequence;"undefined"==typeof i&&(i=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);(e={NAME:t.id,BANDWIDTH:t.bandwidth})["PROGRAM-ID"]=1;return t.codecs&&(e.CODECS=t.codecs),{attributes:e,uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:r,discontinuitySequence:a,mediaSequence:n,segments:i}}(t),h)),e},{})):null,l=(e=l.concat(Ns(o),Ns(n))).map(function(e){return e.timelineStarts});return a.timelineStarts=Es(l),e=e,p=a.timelineStarts,e.forEach(function(t){t.mediaSequence=0,t.discontinuitySequence=vs(p,function(e){return e.timeline===t.timeline}),t.segments&&t.segments.forEach(function(e,t){e.number=t})}),o&&(a.mediaGroups.AUDIO.audio=o),n&&(a.mediaGroups.SUBTITLES.subs=n),d.length&&(a.mediaGroups["CLOSED-CAPTIONS"].cc=d.reduce(function(n,e){return e&&e.forEach(function(e){var t=e.channel,i=e.language;n[i]={autoselect:!1,default:!1,instreamId:t,language:i},e.hasOwnProperty("aspectRatio")&&(n[i].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(n[i].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(n[i]["3D"]=e["3D"])}),n},{})),r?Is({oldManifest:r,newManifest:a}):a}function Bs(e,t){for(var i,n,r,a,s,o,u=e.type,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=void 0===(l=e.media)?"":l,h=e.sourceDuration,p=void 0===(l=e.timescale)?1:l,f=void 0===(l=e.startNumber)?1:l,m=e.periodStart,g=[],y=-1,v=0;v>4?20+t:10+t}(e,t))}function to(e){return"string"==typeof e?Sr(e):e}function io(e,t,i){var n;void 0===i&&(i=!1),n=t,t=Array.isArray(n)?n.map(to):[to(n)],e=br(e);var r=[];if(!t.length)return r;for(var a=0;a>>0,o=e.subarray(a+4,a+8);if(0==s)break;var u=a+s;if(u>e.length){if(i)break;u=e.length}s=e.subarray(a+8,u);wr(o,t[0])&&(1===t.length?r.push(s):r.push.apply(r,io(s,t.slice(1),i))),a=u}return r}function no(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1);var r=function(e){for(var t=1,i=0;i=t.length)return t.length;var n=no(t,i,!1);if(wr(e.bytes,n.bytes))return i;var r=no(t,i+n.length);return ao(e,t,i+r.length+r.value+n.length)}function so(e,t){var i;i=t,t=Array.isArray(i)?i.map(ro):[ro(i)],e=br(e);var n=[];if(!t.length)return n;for(var r=0;re.length?e.length:o+s.value,u=e.subarray(o,u);wr(t[0],a.bytes)&&(1===t.length?n.push(u):n=n.concat(so(u,t.slice(1)))),r+=a.length+s.length+u.length}return n}function oo(e,t,i,n){void 0===n&&(n=1/0),e=br(e),i=[].concat(i);for(var r,a=0,s=0;a>1&63),-1!==i.indexOf(u)&&(r=a+o),a+=o+("h264"===t?1:2)}else a++}return e.subarray(0,0)}var uo={__DOMHandler:us,DOMParser:os,DOMImplementation:U.DOMImplementation,XMLSerializer:U.XMLSerializer}.DOMParser,lo="INVALID_NUMBER_OF_PERIOD",co="DASH_EMPTY_MANIFEST",ho="DASH_INVALID_XML",po="NO_BASE_URL",fo="SEGMENT_TIME_UNSPECIFIED",mo="UNSUPPORTED_UTC_TIMING_SCHEME",go={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration,i=e.periodDuration,e=bs(e.endNumber),n=t/n;return"number"==typeof e?{start:0,end:e}:"number"==typeof i?{start:0,end:i/n}:{start:0,end:r/n}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.periodStart,u=void 0===o?0:o,r=e.minimumUpdatePeriod,o=void 0===r?0:r,r=e.timeShiftBufferDepth,r=void 0===r?1/0:r,e=bs(e.endNumber),i=(t+i)/1e3,u=n+u,o=Math.ceil((i+o-u)*a/s),r=Math.floor((i-u-r)*a/s),s=Math.floor((i-u)*a/s);return{start:Math.max(0,r),end:"number"==typeof e?e:Math.min(o,s)}}},yo=["AUDIO","SUBTITLES"],vo=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,_o={mediaPresentationDuration:Gs,availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=e)&&(e+="Z"),Date.parse(e)/1e3},minimumUpdatePeriod:Gs,suggestedPresentationDelay:Gs,type:function(e){return e},timeShiftBufferDepth:Gs,start:Gs,width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Gs(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},bo={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},To=Math.pow(2,32),So=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return t.getBigUint64?(e=t.getBigUint64(0))>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i},Eo=br([73,68,51]),ko={EBML:br([26,69,223,163]),DocType:br([66,130]),Segment:br([24,83,128,103]),SegmentInfo:br([21,73,169,102]),Tracks:br([22,84,174,107]),Track:br([174]),TrackNumber:br([215]),DefaultDuration:br([35,227,131]),TrackEntry:br([174]),TrackType:br([131]),FlagDefault:br([136]),CodecID:br([134]),CodecPrivate:br([99,162]),VideoTrack:br([224]),AudioTrack:br([225]),Cluster:br([31,67,182,117]),Timestamp:br([231]),TimestampScale:br([42,215,177]),BlockGroup:br([160]),BlockDuration:br([155]),Block:br([161]),SimpleBlock:br([163])},Co=[128,64,32,16,8,4,2,1],Io=br([0,0,0,1]),xo=br([0,0,1]),Ao=br([0,0,3]),Po={webm:br([119,101,98,109]),matroska:br([109,97,116,114,111,115,107,97]),flac:br([102,76,97,67]),ogg:br([79,103,103,83]),ac3:br([11,119]),riff:br([82,73,70,70]),avi:br([65,86,73]),wav:br([87,65,86,69]),"3gp":br([102,116,121,112,51,103]),mp4:br([102,116,121,112]),fmp4:br([115,116,121,112]),mov:br([102,116,121,112,113,116]),moov:br([109,111,111,118]),moof:br([109,111,111,102])},Lo={aac:function(e){var t=eo(e);return wr(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=eo(e);return wr(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){e=so(e,[ko.EBML,ko.DocType])[0];return wr(e,Po.webm)},mkv:function(e){e=so(e,[ko.EBML,ko.DocType])[0];return wr(e,Po.matroska)},mp4:function(e){return!Lo["3gp"](e)&&!Lo.mov(e)&&(!(!wr(e,Po.mp4,{offset:4})&&!wr(e,Po.fmp4,{offset:4}))||(!(!wr(e,Po.moof,{offset:4})&&!wr(e,Po.moov,{offset:4}))||void 0))},mov:function(e){return wr(e,Po.mov,{offset:4})},"3gp":function(e){return wr(e,Po["3gp"],{offset:4})},ac3:function(e){var t=eo(e);return wr(e,Po.ac3,{offset:t})},ts:function(e){if(e.length<189&&1<=e.length)return 71===e[0];for(var t=0;t+188"):function(){}}function No(e,t){var i,n=[];if(e&&e.length)for(i=0;i "+e.end(i));return t.join(", ")}function jo(e){for(var t=[],i=0;iDate.now()}function Zo(e){return e.excludeUntil&&e.excludeUntil===1/0}function eu(e){var t=Jo(e);return!e.disabled&&!t}function tu(e,t){return t.attributes&&t.attributes[e]}function iu(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!eu(e)&&(e.attributes.BANDWIDTH||0)n+.25*a.duration)return null;i=a}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(n,t))?"estimate"===e.type?i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:e.estimatedStart}):(t={mediaSeconds:n},(e=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*i)}(n,e.segment))&&(t.programDateTime=e.toISOString()),i(null,t)):i({message:"valid programTime was not found"}):i({message:"getProgramTime: playlist and time must be provided"})}function Cu(e){var t=e.programTime,i=e.playlist,n=e.retryCount,r=void 0===n?2:n,a=e.seekTo,s=e.pauseAfterSeek,o=void 0===s||s,u=e.tech,l=e.callback;if(!l)throw new Error("seekToProgramTime: callback must be provided");return"undefined"!=typeof t&&i&&a?i.endList||u.hasStarted_?function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;ti||e.height>n})).filter(function(e){return e.width===h[0].width&&e.height===h[0].height}),c=p[p.length-1],p=p.filter(function(e){return e.bandwidth===c.bandwidth})[0]),a.experimentalLeastPixelDiffSelector&&(m=d.map(function(e){return e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-n),e}),el(m,function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff}),f=m[0]);var m=f||p||e||o||l[0]||u[0];if(m&&m.playlist){u="sortedPlaylistReps";return f?u="leastPixelDiffRep":p?u="resolutionPlusOneRep":e?u="resolutionBestRep":o?u="bandwidthBestRep":l[0]&&(u="enabledPlaylistReps"),Ol("choosing "+Ju(m)+" using "+u+" with options",s),m.playlist}return Ol("could not choose a playlist with options",s),null}}function nl(e){var t=e.inbandTextTracks,i=e.metadataArray,r=e.timestampOffset,n=e.videoDuration;if(i){var a=window.WebKitDataCue||window.VTTCue,s=t.metadataTrack_;if(s&&(i.forEach(function(e){var n=e.cueTime+r;!("number"!=typeof n||window.isNaN(n)||n<0)&&n<1/0&&e.frames.forEach(function(e){var t,i=new a(n,n,e.value||e.url||e.data||"");i.frame=e,i.value=e,t=i,Object.defineProperties(t.frame,{id:{get:function(){return tr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return tr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return tr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}}),s.addCue(i)})}),s.cues&&s.cues.length)){for(var o=s.cues,u=[],l=0;l=e&&r.endTime<=t&&i.removeCue(r)}function al(e){return"number"==typeof e&&isFinite(e)}function sl(e){var t=e.startOfSegment,i=e.duration,n=e.segment,r=e.part,a=e.playlist,s=a.mediaSequence,o=a.id,u=a.segments,l=e.mediaIndex,c=e.partIndex,d=e.timeline,h=(void 0===u?[]:u).length-1,p="mediaIndex/partIndex increment";return e.getMediaInfoForTime?p="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(p="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(p+=" with independent "+e.independent),a="number"==typeof c,u=e.segment.uri?"segment":"pre-segment",e=a?zo({preloadSegment:n})-1:0,u+" ["+(s+l)+"/"+(s+h)+"]"+(a?" part ["+c+"/"+e+"]":"")+" segment start/end ["+n.start+" => "+n.end+"]"+(a?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+i+"] timeline ["+d+"] selected by ["+p+"] playlist ["+o+"]"}function ol(e){return e+"TimingInfo"}function ul(e){var t=e.timelineChangeController,i=e.currentTimeline,n=e.segmentTimeline,r=e.loaderType,e=e.audioDisabled;if(i!==n){if("audio"===r){i=t.lastTimelineChange({type:"main"});return!i||i.to!==n}if("main"===r&&e){t=t.pendingTimelineChange({type:"audio"});return t&&t.to===n?!1:!0}}}function ll(e){var t=e.segmentDuration,e=e.maxDuration;return!!t&&Math.round(t)>e+fl}function cl(e,t){if("hls"!==t)return null;var n,r,i=(n={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},r=0,["video","audio"].forEach(function(e){var t,i=n[e+"TimingInfo"];i&&(e=i.start,i=i.end,"bigint"==typeof e||"bigint"==typeof i?t=window.BigInt(i)-window.BigInt(e):"number"==typeof e&&"number"==typeof i&&(t=i-e),"undefined"!=typeof t&&r=r+i)return o(e,{response:n.subarray(i,i+r),status:t.status,uri:t.uri});u.request=u.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:vu({byterange:a.sidx.byterange})},o)})):this.mediaRequest_=window.setTimeout(function(){return r(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},window.clearTimeout(this.minimumUpdatePeriodTimeout_),window.clearTimeout(this.mediaRequest_),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())},t.media=function(t){var i=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof t){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.masterPlaylistLoader_.master.playlists[t]}var e=!this.media_||t.id!==this.media_.id;if(e&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state="HAVE_METADATA",this.media_=t,void(e&&(this.trigger("mediachanging"),this.trigger("mediachange")));e&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,n,function(e){i.haveMetadata({startingState:n,playlist:t})}))},t.haveMetadata=function(e){var t=e.startingState,e=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[e.id]=e,this.mediaRequest_=null,this.refreshMedia_(e.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(window.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var t=this;window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var i=this.media();e?(e=i?i.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=window.setTimeout(function(){return t.load()},e)):this.started?i&&!i.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},t.start=function(){var i=this;this.started=!0,this.isMaster_?this.requestMaster_(function(e,t){i.haveMaster_(),i.hasPendingRequest()||i.media_||i.media(i.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=window.setTimeout(function(){return i.haveMaster_()},0)},t.requestMaster_=function(n){var r=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(e,t){if(!r.requestErrored_(e,t)){var i=t.responseText!==r.masterPlaylistLoader_.masterXml_;return r.masterPlaylistLoader_.masterXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?r.masterLoaded_=Date.parse(t.responseHeaders.date):r.masterLoaded_=Date.now(),r.masterPlaylistLoader_.srcUrl=Mo(r.handleManifestRedirects,r.masterPlaylistLoader_.srcUrl,t),i?(r.handleMaster_(),void r.syncClientServerClock_(function(){return n(t,i)})):n(t,i)}"HAVE_NOTHING"===r.state&&(r.started=!1)})},t.syncClientServerClock_=function(i){var n=this,r=Zs(this.masterPlaylistLoader_.masterXml_);return null===r?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),i()):"DIRECT"===r.method?(this.masterPlaylistLoader_.clientOffset_=r.value-Date.now(),i()):void(this.request=this.vhs_.xhr({uri:pl(this.masterPlaylistLoader_.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},function(e,t){if(n.request){if(e)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),i();t="HEAD"===r.method?t.responseHeaders&&t.responseHeaders.date?Date.parse(t.responseHeaders.date):n.masterLoaded_:Date.parse(t.responseText);n.masterPlaylistLoader_.clientOffset_=t-Date.now(),i()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e,t,i,n,r=this.masterPlaylistLoader_.master,t=(a={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:r},e=a.masterXml,t=a.srcUrl,i=a.clientOffset,n=a.sidxMapping,a=a.previousManifest,a=Js(e,{manifestUri:t,clientOffset:i,sidxMapping:n,previousManifest:a}),lu(a,t),a);r&&(t=function(e,t,i){for(var a=!0,s=Sl(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),n=0;n>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return u(T.hdlr,I[e])},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),u(T.mdhd,t)},h=function(e){return u(T.mdia,p(e),f(e.type),a(e))},r=function(e){return u(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},a=function(e){return u(T.minf,"video"===e.type?u(T.vmhd,x):u(T.smhd,A),t(),g(e))},We=function(e,t){for(var i=[],n=t.length;n--;)i[n]=v(t[n]);return u.apply(null,[T.moof,r(e)].concat(i))},s=function(e){for(var t=e.length,i=[];t--;)i[t]=c(e[t]);return u.apply(null,[T.moov,l(4294967295)].concat(i).concat(o(e)))},o=function(e){for(var t=e.length,i=[];t--;)i[t]=_(e[t]);return u.apply(null,[T.mvex].concat(i))},l=function(e){e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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 u(T.mvhd,e)},m=function(e){for(var t,i=e.samples||[],n=new Uint8Array(4+i.length),r=0;r>>8),a.push(255&n[o].byteLength),a=a.concat(Array.prototype.slice.call(n[o]));for(o=0;o>>8),s.push(255&r[o].byteLength),s=s.concat(Array.prototype.slice.call(r[o]));return t=[T.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,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u(T.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],s))),u(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio&&(i=e.sarRatio[0],e=e.sarRatio[1],t.push(u(T.pasp,new Uint8Array([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])))),u.apply(null,t)},N=function(e){return u(T.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},d=function(e){e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return u(T.tkhd,e)},v=function(e){var t,i=u(T.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),n=Math.floor(e.baseMediaDecodeTime/V),r=Math.floor(e.baseMediaDecodeTime%V),n=u(T.tfdt,new Uint8Array([1,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r]));return"audio"===e.type?(t=b(e,92),u(T.traf,i,n,t)):(r=m(e),t=b(e,r.length+92),u(T.traf,i,n,t,r))},c=function(e){return e.duration=e.duration||4294967295,u(T.trak,d(e),h(e))},_=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),u(T.trex,t)},U=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},B=function(e,t){var i,n,r,a,s=e.samples||[];for(t+=20+16*s.length,t=U(s,t),(n=new Uint8Array(t.length+16*s.length)).set(t),i=t.length,a=0;a>>24,n[i++]=(16711680&r.duration)>>>16,n[i++]=(65280&r.duration)>>>8,n[i++]=255&r.duration,n[i++]=(4278190080&r.size)>>>24,n[i++]=(16711680&r.size)>>>16,n[i++]=(65280&r.size)>>>8,n[i++]=255&r.size,n[i++]=r.flags.isLeading<<2|r.flags.dependsOn,n[i++]=r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,n[i++]=61440&r.flags.degradationPriority,n[i++]=15&r.flags.degradationPriority,n[i++]=(4278190080&r.compositionTimeOffset)>>>24,n[i++]=(16711680&r.compositionTimeOffset)>>>16,n[i++]=(65280&r.compositionTimeOffset)>>>8,n[i++]=255&r.compositionTimeOffset;return u(T.trun,n)},F=function(e,t){var i,n,r,a,s=e.samples||[];for(t+=20+8*s.length,t=U(s,t),(i=new Uint8Array(t.length+8*s.length)).set(t),n=t.length,a=0;a>>24,i[n++]=(16711680&r.duration)>>>16,i[n++]=(65280&r.duration)>>>8,i[n++]=255&r.duration,i[n++]=(4278190080&r.size)>>>24,i[n++]=(16711680&r.size)>>>16,i[n++]=(65280&r.size)>>>8,i[n++]=255&r.size;return u(T.trun,i)},b=function(e,t){return("audio"===e.type?F:B)(e,t)};n=function(){return u(T.ftyp,S,w,S,E)};function W(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i}function G(e){for(var t=[];e--;)t.push(0);return t}function z(){var e,i;return X||(e={96e3:[ie,[227,64],G(154),[56]],88200:[ie,[231],G(170),[56]],64e3:[ie,[248,192],G(240),[56]],48e3:[ie,[255,192],G(268),[55,148,128],G(54),[112]],44100:[ie,[255,192],G(268),[55,163,128],G(84),[112]],32e3:[ie,[255,192],G(268),[55,234],G(226),[112]],24e3:[ie,[255,192],G(268),[55,255,128],G(268),[111,112],G(126),[224]],16e3:[ie,[255,192],G(268),[55,255,128],G(268),[111,255],G(269),[223,108],G(195),[1,192]],12e3:[ne,G(268),[3,127,248],G(268),[6,255,240],G(268),[13,255,224],G(268),[27,253,128],G(259),[56]],11025:[ne,G(268),[3,127,248],G(268),[6,255,240],G(268),[13,255,224],G(268),[27,255,192],G(268),[55,175,128],G(108),[112]],8e3:[ne,G(268),[3,121,16],G(47),[7]]},i=e,X=Object.keys(i).reduce(function(e,t){return e[t]=new Uint8Array(i[t].reduce(function(e,t){return e.concat(t)},[])),e},{})),X}var X,K=function(e){return u(T.mdat,e)},Y=We,Q=function(e){var t=n(),i=s(e),e=new Uint8Array(t.byteLength+i.byteLength);return e.set(t),e.set(i,t.byteLength),e},$=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,t=n.byteLength=0;t=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},ge=function(e){for(var t,i=[],n=0;n=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),0this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ae.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ae.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ae.prototype.backspace=function(){var e;this.isEmpty()||(e=this.rows[this.rowIdx],this.rows[this.rowIdx]=e.substr(0,e.length-1))};function Le(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new Ae(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)}Le.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new Ae(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Le.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Le.prototype.createTextDecoder=function(t){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(t)}catch(e){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+t+" encoding. "+e})}};var De=function e(t){t=t||{},e.prototype.init.call(this);var i,n=this,r=t.captionServices||{},a={};Object.keys(r).forEach(function(e){i=r[e],/^SERVICE/.test(e)&&(a[e]=i.encoding)}),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){(3===e.type||null===n.current708Packet)&&n.new708Packet(),n.add708Bytes(e)}};De.prototype=new j,De.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},De.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,t=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(t)},De.prototype.push708Packet=function(){var e,t=this.current708Packet,i=t.data,n=null,r=0,a=i[r++];for(t.seq=a>>6,t.sizeCode=63&a;r>5)&&0>5,t.rowLock=(16&n)>>4,t.columnLock=(8&n)>>3,t.priority=7&n,n=i[++e],t.relativePositioning=(128&n)>>7,t.anchorVertical=127&n,n=i[++e],t.anchorHorizontal=n,n=i[++e],t.anchorPoint=(240&n)>>4,t.rowCount=15&n,n=i[++e],t.columnCount=63&n,n=i[++e],t.windowStyle=(56&n)>>3,t.penStyle=7&n,t.virtualRowCount=t.rowCount+1,e},De.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],t=t.currentWindow.winAttr,n=i[++e];return t.fillOpacity=(192&n)>>6,t.fillRed=(48&n)>>4,t.fillGreen=(12&n)>>2,t.fillBlue=3&n,n=i[++e],t.borderType=(192&n)>>6,t.borderRed=(48&n)>>4,t.borderGreen=(12&n)>>2,t.borderBlue=3&n,n=i[++e],t.borderType+=(128&n)>>5,t.wordWrap=(64&n)>>6,t.printDirection=(48&n)>>4,t.scrollDirection=(12&n)>>2,t.justify=3&n,n=i[++e],t.effectSpeed=(240&n)>>4,t.effectDirection=(12&n)>>2,t.displayEffect=3&n,e},De.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},De.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},De.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<>4,t.offset=(12&n)>>2,t.penSize=3&n,n=i[++e],t.italics=(128&n)>>7,t.underline=(64&n)>>6,t.edgeType=(56&n)>>3,t.fontStyle=7&n,e},De.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],t=t.currentWindow.penColor,n=i[++e];return t.fgOpacity=(192&n)>>6,t.fgRed=(48&n)>>4,t.fgGreen=(12&n)>>2,t.fgBlue=3&n,n=i[++e],t.bgOpacity=(192&n)>>6,t.bgRed=(48&n)>>4,t.bgGreen=(12&n)>>2,t.bgBlue=3&n,n=i[++e],t.edgeRed=(48&n)>>4,t.edgeGreen=(12&n)>>2,t.edgeBlue=3&n,e},De.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},De.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};function Oe(e){return null===e?"":(e=Re[e]||e,String.fromCharCode(e))}function Me(){for(var e=[],t=15;t--;)e.push("");return e}var Re={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ne=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ue=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a=32639&e.ccData;a!==this.lastControlCode_?(4096==(61440&a)?this.lastControlCode_=a:a!==this.PADDING_&&(this.lastControlCode_=null),t=a>>>8,i=255&a,a===this.PADDING_||(a===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":a===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),r=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=r,this.startPts_=e.pts):a===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(e.pts)):a===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(e.pts)):a===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(e.pts)):a===this.CARRIAGE_RETURN_?(this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts):a===this.BACKSPACE_?"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1):a===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(e.pts),this.displayed_=Me()):a===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=Me():a===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Me()),this.mode_="paintOn",this.startPts_=e.pts):this.isSpecialCharacter(t,i)?(n=Oe((t=(3&t)<<8)|i),this[this.mode_](e.pts,n),this.column_++):this.isExtCharacter(t,i)?("popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),n=Oe((t=(3&t)<<8)|i),this[this.mode_](e.pts,n),this.column_++):this.isMidRowCode(t,i)?(this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"])):this.isOffsetControlCode(t,i)?this.column_+=3&i:this.isPAC(t,i)?(r=Ne.indexOf(7968&a),"rollUp"===this.mode_&&(r-this.rollUpRows_+1<0&&(r=this.rollUpRows_-1),this.setRollUp(e.pts,r)),r!==this.row_&&(this.clearFormatting(e.pts),this.row_=r),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&a)&&(this.column_=4*((14&a)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])):this.isNormalChar(t)&&(0===i&&(i=null),n=Oe(t),n+=Oe(i),this[this.mode_](e.pts,n),this.column_+=n.length))):this.lastControlCode_=null}};Ue.prototype=new j,Ue.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},Ue.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Me(),this.nonDisplayed_=Me(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ue.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ue.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},Ue.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},Ue.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},Ue.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},Ue.prototype.isPAC=function(e,t){return e>=this.BASE_&&e"},"");this[this.mode_](e,t)},Ue.prototype.clearFormatting=function(e){var t;this.formatting_.length&&(t=this.formatting_.reverse().reduce(function(e,t){return e+""},""),this.formatting_=[],this[this.mode_](e,t))},Ue.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=i+=t},Ue.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];this.displayed_[this.row_]=i+=t},Ue.prototype.shiftRowsUp_=function(){for(var e=0;e>>2,s*=4,s+=3&a[7],o.timeStamp=s,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o))),t.frames.push(o),i+=10,(i+=n)>>4&&(i+=e[i]+1),0===t.pid)t.type="pat",n(e.subarray(i),t),this.trigger("data",t);else if(t.pid===this.pmtPid)for(t.type="pmt",n(e.subarray(i),t),this.trigger("data",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new j,Xe.STREAM_TYPES={h264:27,adts:15},(Ke=function(){function n(e,t,i){var n,r,a,s,o=new Uint8Array(e.size),u={type:t},l=0,c=0;if(e.data.length&&!(e.size<9)){for(u.trackId=e.data[0].pid,l=0;l>>3,a.pts*=4,a.pts+=(6&r[13])>>>1,a.dts=a.pts,64&s&&(a.dts=(14&r[14])<<27|(255&r[15])<<20|(254&r[16])<<12|(255&r[17])<<5|(254&r[18])>>>3,a.dts*=4,a.dts+=(6&r[18])>>>1)),a.data=r.subarray(9+r[8])),t="video"===t||u.packetLength<=e.size,(i||t)&&(e.size=0,e.data.length=0),t&&d.trigger("data",u)}}var t,d=this,r=!1,a={data:[],size:0},s={data:[],size:0},o={data:[],size:0};Ke.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case je.H264_STREAM_TYPE:e=a,t="video";break;case je.ADTS_STREAM_TYPE:e=s,t="audio";break;case je.METADATA_STREAM_TYPE:e=o,t="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&n(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]};null!==(t=i.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),r=!0,d.trigger("data",e)}})[i.type]()},this.reset=function(){a.size=0,a.data.length=0,s.size=0,s.data.length=0,this.trigger("reset")},this.flushStreams_=function(){n(a,"video"),n(s,"audio"),n(o,"timed-metadata")},this.flush=function(){var e;!r&&t&&(e={type:"metadata",tracks:[]},null!==t.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),d.trigger("data",e)),r=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new j;var Qe,$e={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ye,TransportParseStream:Xe,ElementaryStream:Ke,TimestampRolloverStream:We,CaptionStream:Fe.CaptionStream,Cea608Stream:Fe.Cea608Stream,Cea708Stream:Fe.Cea708Stream,MetadataStream:e};for(Qe in je)je.hasOwnProperty(Qe)&&($e[Qe]=je[Qe]);var Je=$e,Ze=ue,et=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],tt=function(u){var l,c=0;tt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+c+" outside syncword"})},this.push=function(e){var t,i,n,r,a,s,o=0;if(u||(c=0),"audio"===e.type){for(l&&l.length?(n=l,(l=new Uint8Array(n.byteLength+e.data.byteLength)).set(n),l.set(e.data,n.byteLength)):l=e.data;o+7>5,a=(r=1024*(1+(3&l[o+6])))*Ze/et[(60&l[o+2])>>>2],l.byteLength-o>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:et[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,o+t)}),c++,o+=t}else"number"!=typeof s&&(s=o),o++;"number"==typeof s&&(this.skipWarn_(s,o),s=null),l=l.subarray(o)}},this.flush=function(){c=0,this.trigger("done")},this.reset=function(){l=void 0,this.trigger("reset")},this.endTimeline=function(){l=void 0,this.trigger("endedtimeline")}};tt.prototype=new j;var it,nt,rt=tt,at=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var e=n.byteLength-r,t=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");t.set(n.subarray(e,e+i)),a=new DataView(t.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(e){var t;e>>32-t;return 0<(s-=t)?a<<=t:0>>e))return a<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},st=function(){var n,r,a=0;st.prototype.init.call(this),this.push=function(e){for(var t,i=(r=r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),t):e.data).byteLength;a>4?i+20:i+10}function ut(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:ut(e,t+=ot(e,t))}function lt(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var e={H264Stream:it,NalByteStream:st},ct=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],dt={isLikelyAacData:function(e){var t=ut(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:ot,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,i=10;64&e[5]&&(i+=4,i+=lt(e.subarray(10,14)));do{if((t=lt(e.subarray(i+4,i+8)))<1)return null;if("PRIV"===String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]))for(var n=e.subarray(i+10,i+t+10),r=0;r>>2;return s*=4,s+=3&a[7]}}while(i+=10,(i+=t)a.length)break;t={type:"audio",data:a.subarray(r,r+n),pts:s,dts:s},this.trigger("data",t),r+=n}else{if(a.length-r<10)break;if(r+(n=dt.parseId3TagSize(a,r))>a.length)break;t={type:"timed-metadata",data:a.subarray(r,r+n)},this.trigger("data",t),r+=n}e=a.length-r,a=0i.pts?u++:(t++,a-=n.byteLength,s-=n.nalCount,o-=n.duration);return 0===t?e:t===e.length?null:((r=e.slice(t)).byteLength=a,r.duration=o,r.nalCount=s,r.pts=r[0].pts,r.dts=r[0].dts,r)},this.alignGopsAtEnd_=function(e){for(var t,i,n=l.length-1,r=e.length-1,a=null,s=!1;0<=n&&0<=r;){if(t=l[n],i=e[r],t.pts===i.pts){s=!0;break}t.pts>i.pts?n--:(n===l.length-1&&(a=r),r--)}if(!s&&null===a)return null;if(0===(u=s?r:a))return e;var o=e.slice(u),u=o.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return o.byteLength=u.byteLength,o.duration=u.duration,o.nalCount=u.nalCount,o.pts=o[0].pts,o.dts=o[0].dts,o},this.alignGopsWith=function(e){l=e}}).prototype=new j,(_t=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!=typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,_t.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new j,_t.prototype.flush=function(e){var t,i,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,St.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,Tt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,e=Q(this.pendingTracks),a.initSegment=new Uint8Array(e.byteLength),a.initSegment.set(e),a.data=new Uint8Array(this.pendingBytes),n=0;n=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},_t.prototype.setRemux=function(e){this.remuxTracks=e},(vt=function(n){var r,a,s=this,i=!0;vt.prototype.init.call(this),this.baseMediaDecodeTime=(n=n||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type="aac",t.metadataStream=new Je.MetadataStream,t.aacStream=new bt,t.audioTimestampRolloverStream=new Je.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new Je.TimestampRolloverStream("timed-metadata"),t.adtsStream=new rt,t.coalesceStream=new _t(n,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type&&"audio"!==e.type||t.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new Ct(a,n),t.audioSegmentStream.on("log",s.getLogTrigger_("audioSegmentStream")),t.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream),s.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!r}))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done")),ft(this,t)},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Je.MetadataStream,i.packetStream=new Je.TransportPacketStream,i.parseStream=new Je.TransportParseStream,i.elementaryStream=new Je.ElementaryStream,i.timestampRolloverStream=new Je.TimestampRolloverStream,i.adtsStream=new rt,i.h264Stream=new wt,i.captionStream=new Je.CaptionStream(n),i.coalesceStream=new _t(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(e){var t;if("metadata"===e.type){for(t=e.tracks.length;t--;)r||"video"!==e.tracks[t].type?a||"audio"!==e.tracks[t].type||((a=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new yt(r,n),i.videoSegmentStream.on("log",s.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",function(e){a&&!n.keepOriginalTimestamps&&(a.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts-s.baseMediaDecodeTime))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(e){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.videoSegmentStream.on("timingInfo",s.trigger.bind(s,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Ct(a,n),i.audioSegmentStream.on("log",s.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),s.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!r})}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",function(e){e.dispatchType=i.metadataStream.dispatchType,s.trigger("id3Frame",e)}),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),ft(this,i)},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=e),a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,_e(a),t.audioTimestampRolloverStream&&t.audioTimestampRolloverStream.discontinuity()),r&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,_e(r),t.captionStream.reset()),t.timestampRolloverStream&&t.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(e){var t=this.transmuxPipeline_;n.remux=e,t&&t.coalesceStream&&t.coalesceStream.setRemux(e)},this.alignGopsWith=function(e){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(t){var i=this;return function(e){e.stream=t,i.trigger("log",e)}},this.push=function(e){var t;i&&((t=Et(e))&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1),this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new j;function It(e,c){var i=Rt(e,["moof","traf"]),e=Rt(e,["mdat"]),d={},n=[];return e.forEach(function(e,t){t=i[t];n.push({mdat:e,traf:t})}),n.forEach(function(e){var t,i,n,r,a,s=e.mdat,o=e.traf,u=Rt(o,["tfhd"]),l=Ht(u[0]),e=l.trackId,u=Rt(o,["tfdt"]),u=0>>4&&(t+=e[4]+1),t}function Lt(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}}var Dt={Transmuxer:vt,VideoSegmentStream:yt,AudioSegmentStream:Ct,AUDIO_PROPERTIES:Tt,VIDEO_PROPERTIES:St,generateSegmentTimingInfo:gt},e=function(e){return e>>>0},Ot=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Mt=e,Rt=function e(t,i){var n,r,a,s=[];if(!i.length)return null;for(n=0;n>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},jt=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),a&&c&&(t={flags:Ft(e.subarray(d,d+4))},d+=4,s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(t.flags=Ft(e.subarray(d,d+4)),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);return i},Ht=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4)},n=1&i.flags[2],r=2&i.flags[2],a=8&i.flags[2],s=16&i.flags[2],o=32&i.flags[2],u=65536&i.flags[0],l=131072&i.flags[0],e=8;return n&&(e+=4,i.baseDataOffset=t.getUint32(12),e+=4),r&&(i.sampleDescriptionIndex=t.getUint32(e),e+=4),a&&(i.defaultSampleDuration=t.getUint32(e),e+=4),s&&(i.defaultSampleSize=t.getUint32(e),e+=4),o&&(i.defaultSampleFlags=t.getUint32(e)),u&&(i.durationIsEmpty=!0),!n&&l&&(i.baseDataOffsetIsMoof=!0),i},j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},j="undefined"!=typeof window?window:"undefined"!=typeof j?j:"undefined"!=typeof self?self:{},qt=j,Vt=ke,Wt=Fe.CaptionStream,Gt=function(){var t,r,a,s,o,i,n=!1;this.isInitialized=function(){return n},this.init=function(e){t=new Wt,n=!0,i=!!e&&e.isPartial,t.on("data",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,o.captions.push(e),o.captionStreams[e.stream]=!0}),t.on("log",function(e){o.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(a!==e[0]||s!==t[a])},this.parse=function(e,t,i){if(!this.isInitialized())return null;if(!t||!i)return null;if(this.isNewInit(t,i))a=t[0],s=i[a];else if(null===a||!s)return r.push(e),null;for(;0>>2&63).replace(/^0/,"")):t.codec="mp4a.40.2"):t.codec=t.codec.toLowerCase()));e=Rt(e,["mdia","mdhd"])[0];e&&(t.timescale=Yt(e)),s.push(t)}),s},Qt=ke,$t=q,Jt=Ie,Zt={};Zt.ts={parseType:function(e,t){e=xt(e);return 0===e?"pat":e===t?"pmt":t?"pes":null},parsePat:function(e){var t=At(e),i=4+Pt(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=At(e),n=4+Pt(e);if(i&&(n+=e[n]+1),1&e[n+5]){for(var r=3+((15&e[n+1])<<8|e[n+2])-4,a=12+((15&e[n+10])<<8|e[n+11]);a=e.byteLength)return null;var i=null,n=e[t+7];return 192&n&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+Pt(e),i=e.subarray(t),n=0,r=0,a=!1;re.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=Zt.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){i=!0;break}if((s=Zt.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+s),r=Zt.aac.parseSampleRate(t)),n++,o+=s;break;default:o++}if(i)return null}if(null===r||null===a)return null;var u=ii/r;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*u,pts:a+1024*n*u}]}}:ti)(e);return r&&(r.audio||r.video)?(e=t,(t=r).audio&&t.audio.length&&("undefined"!=typeof(i=e)&&!isNaN(i)||(i=t.audio[0].dts),t.audio.forEach(function(e){e.dts=Jt(e.dts,i),e.pts=Jt(e.pts,i),e.dtsTime=e.dts/ii,e.ptsTime=e.pts/ii})),t.video&&t.video.length&&("undefined"!=typeof(n=e)&&!isNaN(n)||(n=t.video[0].dts),t.video.forEach(function(e){e.dts=Jt(e.dts,n),e.pts=Jt(e.pts,n),e.dtsTime=e.dts/ii,e.ptsTime=e.pts/ii}),t.firstKeyFrame&&((t=t.firstKeyFrame).dts=Jt(t.dts,n),t.pts=Jt(t.pts,n),t.dtsTime=t.dts/ii,t.ptsTime=t.pts/ii)),r):null},ri=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){var i,e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Dt.Transmuxer(this.options),i=this.self,(e=this.transmuxer).on("data",function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};t=e.data;e.data=t.buffer,i.postMessage({action:"data",segment:e,byteOffset:t.byteOffset,byteLength:t.byteLength},[e.data])}),e.on("done",function(e){i.postMessage({action:"done"})}),e.on("gopInfo",function(e){i.postMessage({action:"gopInfo",gopInfo:e})}),e.on("videoSegmentTimingInfo",function(e){var t={start:{decode:ce(e.start.dts),presentation:ce(e.start.pts)},end:{decode:ce(e.end.dts),presentation:ce(e.end.pts)},baseMediaDecodeTime:ce(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=ce(e.prependedContentDuration)),i.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}),e.on("audioSegmentTimingInfo",function(e){var t={start:{decode:ce(e.start.dts),presentation:ce(e.start.pts)},end:{decode:ce(e.end.dts),presentation:ce(e.end.pts)},baseMediaDecodeTime:ce(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=ce(e.prependedContentDuration)),i.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:t})}),e.on("id3Frame",function(e){i.postMessage({action:"id3Frame",id3Frame:e})}),e.on("caption",function(e){i.postMessage({action:"caption",caption:e})}),e.on("trackinfo",function(e){i.postMessage({action:"trackinfo",trackInfo:e})}),e.on("audioTimingInfo",function(e){i.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ce(e.start),end:ce(e.end)}})}),e.on("videoTimingInfo",function(e){i.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ce(e.start),end:ce(e.end)}})}),e.on("log",function(e){i.postMessage({action:"log",log:e})})},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Gt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),e=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:e&&e.captions||[],logs:e&&e.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,e=e.data,t=Qt(t,e);this.self.postMessage({action:"probeMp4StartTime",startTime:t,data:e},[e.buffer])},t.probeMp4Tracks=function(e){var t=e.data,e=$t(t);this.self.postMessage({action:"probeMp4Tracks",tracks:e,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,i=e.baseStartTime,e="number"!=typeof i||isNaN(i)?void 0:i*ue,i=ni(t,e),e=null;i&&((e={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(e.videoStart=i.video[0].ptsTime),e.hasAudio&&(e.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:e,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){e=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(e)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){e=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(le(e)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(le(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new ri(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ri(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),Cl=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Du(e.currentTransmux))},Il=function(e){Mu("reset",e)},xl=function(e){var t=new kl;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:"init",options:e}),t},Al=2,Pl=-101,Ll=-102,Dl=Ro("CodecUtils"),Ol=Ro("PlaylistSelector"),ar=function(){var e=this.useDevicePixelRatio&&window.devicePixelRatio||1;return il(this.playlists.master,this.systemBandwidth,parseInt(Zu(this.tech_.el(),"width"),10)*e,parseInt(Zu(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Ml=function(n){function e(e,t){var i=n.call(this)||this;if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return i.bandwidth=e.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.partIndex=null,i.hasPlayed_=e.hasPlayed,i.currentTime_=e.currentTime,i.seekable_=e.seekable,i.seeking_=e.seeking,i.duration_=e.duration,i.mediaSource_=e.mediaSource,i.vhs_=e.vhs,i.loaderType_=e.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=e.segmentMetadataTrack,i.goalBufferLength_=e.goalBufferLength,i.sourceType_=e.sourceType,i.sourceUpdater_=e.sourceUpdater,i.inbandTextTracks_=e.inbandTextTracks,i.state_="INIT",i.timelineChangeController_=e.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=e.parse708captions,i.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,i.captionServices_=e.captionServices,i.experimentalExactManifestTimings=e.experimentalExactManifestTimings,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=tr.browser.IE_VERSION,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=e.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=e.decrypter,i.syncController_=e.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",function(){i.isEndOfStream_()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=Ro("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(ft(i),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}mt(e,n);var t=e.prototype;return t.createTransmuxer_=function(){return xl({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},t.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,window.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},t.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},t.error=function(e){return"undefined"!=typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Il(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},t.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return tr.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,i=e.hasVideo,e=e.isMuxed;if(i&&t&&!this.audioDisabled_&&!e)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Su(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e},t.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=wu(e),n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});e={resolvedUri:(n||e).resolvedUri};return n&&(e.bytes=n.bytes),e},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,t){if(void 0===t&&(t={}),e){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_("playlist update ["+r+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");t=e.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+t+"]"),null!==this.mediaIndex&&(this.mediaIndex-=t,this.mediaIndex<0?(this.mediaIndex=null,this.partIndex=null):(r=this.playlist_.segments[this.mediaIndex],!this.partIndex||r.parts&&r.parts.length&&r.parts[this.partIndex]||(r=this.mediaIndex,this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=r))),n&&(n.mediaIndex-=t,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(0<=n.mediaIndex&&(n.segment=e.segments[n.mediaIndex]),0<=n.partIndex&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}},t.pause=function(){this.checkBufferTimeout_&&(window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&Il(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},t.remove=function(e,t,i,n){if(void 0===i&&(i=function(){}),void 0===n&&(n=!1),(t=t===1/0?this.duration_():t)<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var r,a=1,s=function(){0===--a&&i()};for(r in!n&&this.audioDisabled_||(a++,this.sourceUpdater_.removeAudio(e,t,s)),!n&&"main"!==this.loaderType_||(this.gopBuffer_=function(e,t,i,n){for(var r=Math.ceil((t-n)*hl),a=Math.ceil((i-n)*hl),n=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return n;for(var o=s+1;o--&&!(e[o].pts<=r););return o=Math.max(o,0),n.splice(o,s-o+1),n}(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,s)),this.inbandTextTracks_)rl(e,t,this.inbandTextTracks_[r]);rl(e,t,this.segmentMetadataTrack_),s()}else this.logger_("skipping remove because no source updater or starting media info")},t.monitorBuffer_=function(){this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){var e;this.sourceUpdater_.updating()||(e=this.chooseNextRequest_())&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))},t.isEndOfStream_=function(e,t,i){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===i&&(i=this.partIndex),!t||!this.mediaSource_)return!1;var n="number"==typeof e&&t.segments[e],e=e+1===t.segments.length,n=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&e&&n},t.chooseNextRequest_=function(){var e=this.buffered_(),t=Ho(e)||0,i=qo(e,this.currentTime_()),n=!this.hasPlayed_()&&1<=i,r=i>=this.goalBufferLength_(),e=this.playlist_.segments;if(!e.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a,n={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};n.isSyncRequest?n.mediaIndex=function(e,t,i){t=t||[];for(var n=[],r=0,a=0;a=e.length-1&&s&&!this.seeking_()?null:this.generateSegmentInfo_(n)},t.generateSegmentInfo_=function(e){var t=e.independent,i=e.playlist,n=e.mediaIndex,r=e.startOfSegment,a=e.isSyncRequest,s=e.partIndex,o=e.forceTimestampOffset,u=e.getMediaInfoForTime,l=i.segments[n],e="number"==typeof s&&l.parts[s],t={requestId:"segment-loader-"+Math.random(),uri:e&&e.resolvedUri||l.resolvedUri,mediaIndex:n,partIndex:e?s:null,isSyncRequest:a,startOfSegment:r,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:e&&e.duration||l.duration,segment:l,part:e,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},o="undefined"!=typeof o?o:this.isPendingTimestampOffset_;t.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:o});o=Ho(this.sourceUpdater_.audioBuffered());return"number"==typeof o&&(t.audioAppendStart=o-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(t.gopsToAlignWith=function(e,t,i){if("undefined"==typeof t||null===t||!e.length)return[];for(var n=Math.ceil((t-i+3)*hl),r=0;rn);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),t},t.timestampOffsetForSegment_=function(e){return i=(t=e).segmentTimeline,n=t.currentTimeline,r=t.startOfSegment,e=t.buffered,t.overrideCheck||i!==n?!(i "+p+" for "+e),t=m,i=v.vhs_.tech_,t[n=e]||(i.trigger({type:"usage",name:"vhs-608"}),i.trigger({type:"usage",name:"hls-608"}),/^cc708_/.test(r=n)&&(r="SERVICE"+n.split("_")[1]),(o=i.textTracks().getTrackById(r))?t[n]=o:(s=a=n,d=!1,(o=(i.options_.vhs&&i.options_.vhs.captionServices||{})[r])&&(a=o.label,s=o.language,d=o.default),t[n]=i.addRemoteTextTrack({kind:"captions",id:r,default:d,label:a,language:s},!1).track)),rl(h,p,m[e]),l=(f={captionArray:f,inbandTextTracks:m,timestampOffset:g}).inbandTextTracks,m=f.captionArray,c=f.timestampOffset,m&&(u=window.WebKitDataCue||window.VTTCue,m.forEach(function(e){var t=e.stream;l[t].addCue(new u(e.startTime+c,e.endTime+c,e.text))}))}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})):this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t)):this.logger_("SegmentLoader received no captions from a caption event"))},t.handleId3_=function(e,t,i){var n,r,a,s;this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(this.pendingSegment_.hasAppendedData_?(n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),r=this.inbandTextTracks_,a=i,s=this.vhs_.tech_,r.metadataTrack_||(r.metadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,r.metadataTrack_.inBandMetadataTrackDispatchType=a),nl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:this.duration_()})):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))},t.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},t.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(e){return e()})},t.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(e){return e()})},t.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!ul({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},t.getCurrentMediaInfo_=function(e){return(e=void 0===e?this.pendingSegment_:e)&&e.trackInfo||this.currentMediaInfo_},t.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},t.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var i=t.hasAudio,n=t.hasVideo,t=t.isMuxed;return!(n&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!t&&!e.audioTimingInfo)&&!ul({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},t.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var i,n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4?(this.trigger("fmp4"),n.timingInfo.start=n[ol(t.type)].start):(i=this.getCurrentMediaInfo_(),(i="main"===this.loaderType_&&i&&i.hasVideo)&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})),this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var r=this.chooseNextRequest_();if(r.mediaIndex!==n.mediaIndex||r.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},t.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},t.getInitSegmentAndUpdateState_=function(e){var t=e.type,i=e.initSegment,n=e.map,r=e.playlist;if(n){e=Su(n);if(this.activeInitSegmentId_===e)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=e}return i&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,i):null},t.handleQuotaExceededError_=function(e,t){var i=this,n=e.segmentInfo,r=e.type,a=e.bytes,s=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();1=n);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(e)}},t.setTimeMapping_=function(e){e=this.syncController_.mappingForTimeline(e);null!==e&&(this.timeMapping_=e)},t.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var t=e.currentStart,i=e.playlist,n=e.mediaIndex,r=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,e=e.audioTimingInfo;if("undefined"!=typeof t)return t;if(!s)return e.start;i=i.segments[n-1];return 0!==n&&i&&"undefined"!=typeof i.start&&i.end===r+a?o.start:r},t.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var i=t.hasAudio,n=t.hasVideo,t=t.isMuxed,n="main"===this.loaderType_&&n,t=!this.audioDisabled_&&i&&!t;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);n&&e.waitingOnAppends++,t&&e.waitingOnAppends++,n&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),t&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var t,i,e=(t=this.loaderType_,i=this.getCurrentMediaInfo_(),e=e,"main"===t&&i&&e?e.hasAudio||e.hasVideo?i.hasVideo&&!e.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!i.hasVideo&&e.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null);return!!e&&(this.error({message:e,blacklistDuration:1/0}),this.trigger("error"),!0)},t.updateSourceBufferTimestampOffset_=function(e){var t;null===e.timestampOffset||"number"!=typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_||(t=!1,e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset"))},t.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,i=e.audioTimingInfo,e=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i&&"number"==typeof i.transmuxedDecodeStart?i.transmuxedDecodeStart:e.start:e.start},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),t="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=cl(e,this.sourceType_);if(t&&("warn"===t.severity?tr.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+sl(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var i=e.segment,t=e.part,i=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,t=t&&t.end&&this.currentTime_()-t.end>3*e.playlist.partTargetDuration;if(i||t)return this.logger_("bad "+(i?"segment":"part")+" "+sl(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+sl(e))},t.recordThroughput_=function(e){var t,i;e.duration<1/60?this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60):(t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/i*8*1e3),this.throughput.rate+=(i-t)/++this.throughput.count)},t.addSegmentMetadataCue_=function(e){var t,i,n,r;this.segmentMetadataTrack_&&(i=(t=e.segment).start,r=t.end,al(i)&&al(r)&&(rl(i,r,this.segmentMetadataTrack_),n=window.WebKitDataCue||window.VTTCue,e={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:r},(r=new n(i,r,JSON.stringify(e))).value=e,this.segmentMetadataTrack_.addCue(r)))},e}(tr.EventTarget);function Rl(){}function Nl(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function Ul(e,t){var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]}function Bl(e,t){if(0!==t.queue.length){var i=0,n=t.queue[i];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!Ul(e,t)){if(n.type!==e){if(null===(i=function(e,t){for(var i=0;i=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},t.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},t.segmentRequestFinished_=function(e,t,i){var n=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Pl&&this.handleTimeout_(),e.code===Ll?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),this.state="APPENDING",this.trigger("appending");var a=r.segment;if(a.map&&(a.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!=typeof window.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s=function(){n.subtitlesTrack_.tech_.off("vttjsloaded",o),n.stopForError({message:"Error loading vtt.js"})},o=function(){n.subtitlesTrack_.tech_.off("vttjserror",s),n.segmentRequestFinished_(e,t,i)};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",s)}a.requested=!0;try{this.parseVTTCues_(r)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,r.cues.forEach(function(e){n.subtitlesTrack_.addCue(n.featuresNativeTextTracks_?new window.VTTCue(e.startTime,e.endTime,e.text):e)}),function(t){var e=t.cues;if(e)for(var i=0;iu)&&(r=void 0,r=o<0?i.start-Qo({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):i.end+Qo({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[s]={time:r,accuracy:u})}},t.dispose=function(){this.trigger("dispose"),this.off()},e}(tr.EventTarget),pc=function(t){function e(){var e=t.call(this)||this;return e.pendingTimelineChanges_={},e.lastTimelineChanges_={},e}mt(e,t);var i=e.prototype;return i.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(e){var t=e.type,i=e.from,e=e.to;return"number"==typeof i&&"number"==typeof e&&(this.pendingTimelineChanges_[t]={type:t,from:i,to:e},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},i.lastTimelineChange=function(e){var t=e.type,i=e.from,e=e.to;return"number"==typeof i&&"number"==typeof e&&(this.lastTimelineChanges_[t]={type:t,from:i,to:e},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},e}(tr.EventTarget),fc=x(U(W(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var i=t(function(e){function n(e,t){for(var i=0;i>7))^f]=f;for(e=t=0;!c[e];e^=i||1,t=p[t]||1)for(s=16843009*h[n=h[i=h[d[c[e]=r=(r=t^t<<1^t<<2^t<<3^t<<4)>>8^255&r^99]=e]]]^65537*n^257*i^16843008*e,a=257*h[r]^16843008*r,f=0;f<4;f++)u[f][e]=a=a<<24^a>>>8,l[f][r]=s=s<<24^s>>>8;for(f=0;f<5;f++)u[f]=u[f].slice(0),l[f]=l[f].slice(0);return o}(),this._tables=[[c[0][0].slice(),c[0][1].slice(),c[0][2].slice(),c[0][3].slice(),c[0][4].slice()],[c[1][0].slice(),c[1][1].slice(),c[1][2].slice(),c[1][3].slice(),c[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],s=e.length,o=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var u=e.slice(0),l=[];for(this._key=[u,l],t=s;t<4*s+28;t++)n=u[t-1],(t%s==0||8===s&&t%s==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],t%s==0&&(n=n<<8^n>>>24^o<<24,o=o<<1^283*(o>>7))),u[t]=u[t-s]^n;for(i=0;t;i++,t--)n=u[3&i?t:t-4],l[i]=t<=4||i<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}return e.prototype.decrypt=function(e,t,i,n,r,a){for(var s,o,u,l=this._key[1],c=e^l[0],d=n^l[1],h=i^l[2],p=t^l[3],f=l.length/4-2,m=4,t=this._tables[1],g=t[0],y=t[1],v=t[2],_=t[3],b=t[4],T=0;T>>24]^y[d>>16&255]^v[h>>8&255]^_[255&p]^l[m],o=g[d>>>24]^y[h>>16&255]^v[p>>8&255]^_[255&c]^l[m+1],u=g[h>>>24]^y[p>>16&255]^v[c>>8&255]^_[255&d]^l[m+2],p=g[p>>>24]^y[c>>16&255]^v[d>>8&255]^_[255&h]^l[m+3],m+=4,c=s,d=o,h=u;for(T=0;T<4;T++)r[(3&-T)+a]=b[c>>>24]<<24^b[d>>16&255]<<16^b[h>>8&255]<<8^b[255&p]^l[m++],s=c,c=d,d=h,h=p,p=s},e}(),l=function(t){function e(){var e=t.call(this,a)||this;return e.jobs=[],e.delay=1,e.timeout_=null,e}r(e,t);var i=e.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(a),g=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},s=function(){function u(e,t,i,n){var r=u.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s)),o=r;o>2),u=new m(Array.prototype.slice.call(t)),e=new Uint8Array(e.byteLength),l=new Int32Array(e.buffer),c=i[0],d=i[1],h=i[2],p=i[3],f=0;f "+n+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,i)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=window.setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(window.clearInterval(this.abrTimer_),this.abrTimer_=null)},t.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var i,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)i=this.mediaTypes_.AUDIO.activeTrack();else{var a,s=n.main||r.length&&n[r[0]];for(a in s)if(s[a].default){i={label:a};break}}if(!i)return t;var o,u=[];for(o in n)if(n[o][i.label]){var l=n[o][i.label];if(l.playlists&&l.playlists.length)u.push.apply(u,l.playlists);else if(l.uri)u.push(l);else if(e.playlists.length)for(var c=0;c "+r.id;if(!t)return l(c+" as current playlist is not set"),!0;if(r.id===t.id)return!1;e=Boolean(Uo(i,n).length);if(!t.endList)return e||"number"!=typeof t.partTargetDuration?(l(c+" as current playlist is live"),!0):(l("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);i=qo(i,n),n=u?El.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:El.MAX_BUFFER_LOW_WATER_LINE;if(o= bufferLowWaterLine ("+i+" >= "+a+")";return u&&(a+=" and next bandwidth > current bandwidth ("+n+" > "+r+")"),l(a),!0}return l("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var t=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=t.selectPlaylist();t.shouldSwitchToMedia_(e)&&t.switchMedia_(e,"bandwidthupdate"),t.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){t.error=t.mainSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){t.error=t.audioSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){t.logger_("main segment loader ended"),t.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(e){t.experimentalBufferBasedABR||(t.delegateLoaders_("all",["abort"]),t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});function e(){if(!t.sourceUpdater_.hasCreatedSourceBuffers())return t.tryToCreateSourceBuffers_();var e=t.getCodecsOrExclude_();e&&t.sourceUpdater_.addOrChangeSourceBuffers(e)}this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){t.logger_("audioSegmentLoader ended"),t.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},t.fastQualityChange_=function(e){var t=this;(e=void 0===e?this.selectPlaylist():e)!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){tr.browser.IE_VERSION||tr.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*t,i.excludeUntil=a,e.reason&&(i.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});r=this.selectPlaylist();if(!r)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");t=e.internal?this.logger_:tr.log.warn,a=e.message?" "+e.message:"";t((e.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+a+" Switching to playlist "+r.id+"."),r.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),r.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);a=r.targetDuration/2*1e3||5e3,a="number"==typeof r.lastRequest&&Date.now()-r.lastRequest<=a;return this.switchMedia_(r,"exclude",s||a)},t.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},t.delegateLoaders_=function(i,e){var n=this,r=[],t="all"===i;!t&&"main"!==i||r.push(this.masterPlaylistLoader_);var a=[];!t&&"audio"!==i||a.push("AUDIO"),!t&&"subtitle"!==i||(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(function(e){e=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;e&&r.push(e)}),["main","audio","subtitle"].forEach(function(e){var t=n[e+"SegmentLoader_"];!t||i!==e&&"all"!==i||r.push(t)}),r.forEach(function(t){return e.forEach(function(e){"function"==typeof t[e]&&t[e]()})})},t.setCurrentTime=function(e){var t=Uo(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ql.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.duration());if(null!==i){var n,r,a=this.masterPlaylistLoader_.master,s=Ql.Playlist.seekable(t,i,Ql.Playlist.liveEdgeDelay(a,t));if(0!==s.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=Ql.Playlist.seekable(t,i,Ql.Playlist.liveEdgeDelay(a,t))).length)return}this.seekable_&&this.seekable_.length&&(n=this.seekable_.end(0),r=this.seekable_.start(0)),!e||e.start(0)>s.end(0)||s.start(0)>e.end(0)?this.seekable_=s:this.seekable_=tr.createTimeRanges([[(e.start(0)>s.start(0)?e:s).start(0),(e.end(0) "'+a[e]+'"')}),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return a}t=Object.keys(o).reduce(function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:t,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){var e;"open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_()||(e=this.getCodecsOrExclude_())&&(this.sourceUpdater_.createSourceBuffers(e),e=[e.video,e.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(e))},t.excludeUnsupportedVariants_=function(){var n=this,r=this.master().playlists,a=[];Object.keys(r).forEach(function(e){var t,i=r[e];-1===a.indexOf(i.id)&&(a.push(i.id),t=[],!(e=$u(n.master,i)).audio||yr(e.audio)||gr(e.audio)||t.push("audio codec "+e.audio),!e.video||yr(e.video)||gr(e.video)||t.push("video codec "+e.video),e.text&&"stpp.ttml.im1t"===e.text&&t.push("text codec "+e.text),t.length&&(i.excludeUntil=1/0,n.logger_("excluding "+i.id+" for unsupported: "+t.join(", "))))})},t.excludeIncompatibleVariants_=function(e){var r=this,a=[],s=this.master().playlists,e=Yu(pr(e)),o=Qu(e),u=e.video&&pr(e.video)[0]||null,l=e.audio&&pr(e.audio)[0]||null;Object.keys(s).forEach(function(e){var t,i,n=s[e];-1===a.indexOf(n.id)&&n.excludeUntil!==1/0&&(a.push(n.id),t=[],i=$u(r.masterPlaylistLoader_.master,n),e=Qu(i),(i.audio||i.video)&&(e!==o&&t.push('codec count "'+e+'" !== "'+o+'"'),r.sourceUpdater_.canChangeType()||(e=i.video&&pr(i.video)[0]||null,i=i.audio&&pr(i.audio)[0]||null,e&&u&&e.type.toLowerCase()!==u.type.toLowerCase()&&t.push('video codec "'+e.type+'" !== "'+u.type+'"'),i&&l&&i.type.toLowerCase()!==l.type.toLowerCase()&&t.push('audio codec "'+i.type+'" !== "'+l.type+'"')),t.length&&(n.excludeUntil=1/0,r.logger_("blacklisting "+n.id+": "+t.join(" && ")))))})},t.updateAdCues_=function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){if(void 0===i&&(i=0),e.segments)for(var n=i,r=0;r=r.adStartTime&&t<=r.adEndTime)return r}return null}(t,n+u.duration/2)){if("cueIn"in u){o.endTime=n,o.adEndTime=n,n+=u.duration,o=null;continue}if(n=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),i=this.tech_.currentTime();if(this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),"undefined"!=typeof(e=this.beforeSeekableWindow_(t,i)?(a=t.start(0))+(a===t.end(0)?0:.1):e))return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+Fo(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var n=this.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered(),a=n.audioBuffer?n.audioBuffered():null,t=n.videoBuffer?n.videoBuffered():null,n=this.media(),s=n.partTargetDuration||2*(n.targetDuration-fl),o=[a,t],u=0;u "+t.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})))},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}e=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:e.audioBuffered(),videoBuffered:e.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;e=Bo(i,t);if(0 .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before { position: absolute; top: 0; @@ -13,7 +12,7 @@ @font-face { font-family: VideoJS; - src: url(data:application/font-woff;charset=utf-8;base64,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) format("woff"); + src: url(data:application/font-woff;charset=utf-8;base64,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) format("woff"); font-weight: normal; font-style: normal; } @@ -98,22 +97,13 @@ content: "\f109"; } -.vjs-icon-square { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-square:before { - content: "\f10a"; -} - .vjs-icon-spinner { font-family: VideoJS; font-weight: normal; font-style: normal; } .vjs-icon-spinner:before { - content: "\f10b"; + content: "\f10a"; } .vjs-icon-subtitles, .video-js .vjs-subs-caps-button .vjs-icon-placeholder, @@ -130,7 +120,7 @@ .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before { - content: "\f10c"; + content: "\f10b"; } .vjs-icon-captions, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder, @@ -141,6 +131,15 @@ } .vjs-icon-captions:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-captions-button .vjs-icon-placeholder:before { + content: "\f10c"; +} + +.vjs-icon-hd { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-hd:before { content: "\f10d"; } @@ -153,13 +152,49 @@ content: "\f10e"; } +.vjs-icon-downloading { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-downloading:before { + content: "\f10f"; +} + +.vjs-icon-file-download { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-file-download:before { + content: "\f110"; +} + +.vjs-icon-file-download-done { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-file-download-done:before { + content: "\f111"; +} + +.vjs-icon-file-download-off { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-file-download-off:before { + content: "\f112"; +} + .vjs-icon-share { font-family: VideoJS; font-weight: normal; font-style: normal; } .vjs-icon-share:before { - content: "\f10f"; + content: "\f113"; } .vjs-icon-cog { @@ -168,7 +203,16 @@ font-style: normal; } .vjs-icon-cog:before { - content: "\f110"; + content: "\f114"; +} + +.vjs-icon-square { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-square:before { + content: "\f115"; } .vjs-icon-circle, .vjs-seek-to-live-control .vjs-icon-placeholder, .video-js .vjs-volume-level, .video-js .vjs-play-progress { @@ -177,7 +221,7 @@ font-style: normal; } .vjs-icon-circle:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before, .video-js .vjs-volume-level:before, .video-js .vjs-play-progress:before { - content: "\f111"; + content: "\f116"; } .vjs-icon-circle-outline { @@ -186,7 +230,7 @@ font-style: normal; } .vjs-icon-circle-outline:before { - content: "\f112"; + content: "\f117"; } .vjs-icon-circle-inner-circle { @@ -195,16 +239,7 @@ font-style: normal; } .vjs-icon-circle-inner-circle:before { - content: "\f113"; -} - -.vjs-icon-hd { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-hd:before { - content: "\f114"; + content: "\f118"; } .vjs-icon-cancel, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder { @@ -213,7 +248,16 @@ font-style: normal; } .vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before { - content: "\f115"; + content: "\f119"; +} + +.vjs-icon-repeat { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-repeat:before { + content: "\f11a"; } .vjs-icon-replay, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder { @@ -222,79 +266,70 @@ font-style: normal; } .vjs-icon-replay:before, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before { - content: "\f116"; -} - -.vjs-icon-facebook { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-facebook:before { - content: "\f117"; -} - -.vjs-icon-gplus { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-gplus:before { - content: "\f118"; -} - -.vjs-icon-linkedin { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-linkedin:before { - content: "\f119"; -} - -.vjs-icon-twitter { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-twitter:before { - content: "\f11a"; -} - -.vjs-icon-tumblr { - font-family: VideoJS; - font-weight: normal; - font-style: normal; -} -.vjs-icon-tumblr:before { content: "\f11b"; } -.vjs-icon-pinterest { +.vjs-icon-replay-5, .video-js .vjs-skip-backward-5 .vjs-icon-placeholder { font-family: VideoJS; font-weight: normal; font-style: normal; } -.vjs-icon-pinterest:before { +.vjs-icon-replay-5:before, .video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before { content: "\f11c"; } -.vjs-icon-audio-description, .video-js .vjs-descriptions-button .vjs-icon-placeholder { +.vjs-icon-replay-10, .video-js .vjs-skip-backward-10 .vjs-icon-placeholder { font-family: VideoJS; font-weight: normal; font-style: normal; } -.vjs-icon-audio-description:before, .video-js .vjs-descriptions-button .vjs-icon-placeholder:before { +.vjs-icon-replay-10:before, .video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before { content: "\f11d"; } +.vjs-icon-replay-30, .video-js .vjs-skip-backward-30 .vjs-icon-placeholder { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-replay-30:before, .video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before { + content: "\f11e"; +} + +.vjs-icon-forward-5, .video-js .vjs-skip-forward-5 .vjs-icon-placeholder { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-forward-5:before, .video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before { + content: "\f11f"; +} + +.vjs-icon-forward-10, .video-js .vjs-skip-forward-10 .vjs-icon-placeholder { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-forward-10:before, .video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before { + content: "\f120"; +} + +.vjs-icon-forward-30, .video-js .vjs-skip-forward-30 .vjs-icon-placeholder { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-forward-30:before, .video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before { + content: "\f121"; +} + .vjs-icon-audio, .video-js .vjs-audio-button .vjs-icon-placeholder { font-family: VideoJS; font-weight: normal; font-style: normal; } .vjs-icon-audio:before, .video-js .vjs-audio-button .vjs-icon-placeholder:before { - content: "\f11e"; + content: "\f122"; } .vjs-icon-next-item { @@ -303,7 +338,7 @@ font-style: normal; } .vjs-icon-next-item:before { - content: "\f11f"; + content: "\f123"; } .vjs-icon-previous-item { @@ -312,7 +347,25 @@ font-style: normal; } .vjs-icon-previous-item:before { - content: "\f120"; + content: "\f124"; +} + +.vjs-icon-shuffle { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-shuffle:before { + content: "\f125"; +} + +.vjs-icon-cast { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-cast:before { + content: "\f126"; } .vjs-icon-picture-in-picture-enter, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder { @@ -321,7 +374,7 @@ font-style: normal; } .vjs-icon-picture-in-picture-enter:before, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before { - content: "\f121"; + content: "\f127"; } .vjs-icon-picture-in-picture-exit, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder { @@ -330,11 +383,65 @@ font-style: normal; } .vjs-icon-picture-in-picture-exit:before, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before { - content: "\f122"; + content: "\f128"; +} + +.vjs-icon-facebook { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-facebook:before { + content: "\f129"; +} + +.vjs-icon-linkedin { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-linkedin:before { + content: "\f12a"; +} + +.vjs-icon-twitter { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-twitter:before { + content: "\f12b"; +} + +.vjs-icon-tumblr { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-tumblr:before { + content: "\f12c"; +} + +.vjs-icon-pinterest { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-pinterest:before { + content: "\f12d"; +} + +.vjs-icon-audio-description, .video-js .vjs-descriptions-button .vjs-icon-placeholder { + font-family: VideoJS; + font-weight: normal; + font-style: normal; +} +.vjs-icon-audio-description:before, .video-js .vjs-descriptions-button .vjs-icon-placeholder:before { + content: "\f12e"; } .video-js { - display: block; + display: inline-block; vertical-align: top; box-sizing: border-box; color: #fff; @@ -500,9 +607,11 @@ body.vjs-full-window { width: 3em; display: block; position: absolute; - top: 10px; - left: 10px; + top: 50%; + left: 50%; padding: 0; + margin-top: -0.81666em; + margin-left: -1.5em; cursor: pointer; opacity: 1; border: 0.06666em solid #fff; @@ -511,13 +620,6 @@ body.vjs-full-window { border-radius: 0.3em; transition: all 0.4s; } -.vjs-big-play-centered .vjs-big-play-button { - top: 50%; - left: 50%; - margin-top: -0.81666em; - margin-left: -1.5em; -} - .video-js:hover .vjs-big-play-button, .video-js .vjs-big-play-button:focus { border-color: #fff; @@ -706,8 +808,7 @@ body.vjs-full-window { .video-js .vjs-menu-button-inline:hover, .video-js .vjs-menu-button-inline:focus, -.video-js .vjs-menu-button-inline.vjs-slider-active, -.video-js.vjs-no-flex .vjs-menu-button-inline { +.video-js .vjs-menu-button-inline.vjs-slider-active { width: 12em; } @@ -730,19 +831,6 @@ body.vjs-full-window { opacity: 1; } -.vjs-no-flex .vjs-menu-button-inline .vjs-menu { - display: block; - opacity: 1; - position: relative; - width: auto; -} - -.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu, -.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu, -.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu { - width: auto; -} - .vjs-menu-button-inline .vjs-menu-content { width: auto; height: 100%; @@ -790,10 +878,6 @@ body.vjs-full-window { pointer-events: auto; } -.vjs-has-started.vjs-no-flex .vjs-control-bar { - display: table; -} - .video-js .vjs-control { position: relative; text-align: center; @@ -835,11 +919,6 @@ body.vjs-full-window { width: 1px; } -.vjs-no-flex .vjs-control { - display: table-cell; - vertical-align: middle; -} - .video-js .vjs-custom-control-spacer { display: none; } @@ -866,10 +945,6 @@ body.vjs-full-window { align-items: center; } -.vjs-no-flex .vjs-progress-control { - width: auto; -} - .video-js .vjs-progress-holder { flex: auto; transition: all 0.2s; @@ -906,7 +981,7 @@ body.vjs-full-window { font-size: 0.9em; position: absolute; right: -0.5em; - top: -0.3333333333em; + line-height: 0.35em; z-index: 1; } @@ -958,10 +1033,6 @@ body.vjs-full-window { z-index: 1; } -.vjs-no-flex .vjs-progress-control .vjs-mouse-display { - z-index: 0; -} - .video-js .vjs-progress-control:hover .vjs-mouse-display { display: block; } @@ -972,10 +1043,6 @@ body.vjs-full-window { transition: visibility 1s, opacity 1s; } -.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display { - display: none; -} - .vjs-mouse-display .vjs-time-tooltip { color: #fff; background-color: #000; @@ -995,7 +1062,6 @@ body.vjs-full-window { /* Firefox */ -moz-user-select: none; /* Internet Explorer/Edge */ - -ms-user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */ user-select: none; background-color: #73859f; @@ -1070,22 +1136,6 @@ body.vjs-full-window { transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s; } -.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal { - width: 5em; - height: 3em; - visibility: visible; - opacity: 1; - position: relative; - transition: none; -} - -.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical, -.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical { - position: absolute; - bottom: 3em; - left: 0.5em; -} - .video-js .vjs-volume-panel { display: flex; } @@ -1130,7 +1180,7 @@ body.vjs-full-window { height: 0.3em; } .vjs-slider-horizontal .vjs-volume-level:before { - top: -0.3em; + line-height: 0.35em; right: -0.5em; } @@ -1205,10 +1255,6 @@ body.vjs-full-window { height: 100%; } -.vjs-no-flex .vjs-volume-control .vjs-mouse-display { - z-index: 0; -} - .video-js .vjs-volume-control:hover .vjs-mouse-display { display: block; } @@ -1219,10 +1265,6 @@ body.vjs-full-window { transition: visibility 1s, opacity 1s; } -.video-js.vjs-user-inactive.vjs-no-flex .vjs-volume-control .vjs-mouse-display { - display: none; -} - .vjs-mouse-display .vjs-volume-tooltip { color: #fff; background-color: #000; @@ -1232,10 +1274,6 @@ body.vjs-full-window { .vjs-poster { display: inline-block; vertical-align: middle; - background-repeat: no-repeat; - background-position: 50% 50%; - background-size: contain; - background-color: #000000; cursor: pointer; margin: 0; padding: 0; @@ -1257,6 +1295,13 @@ body.vjs-full-window { display: block; } +.vjs-poster img { + width: 100%; + height: 100%; + -o-object-fit: contain; + object-fit: contain; +} + .video-js .vjs-live-control { display: flex; align-items: flex-start; @@ -1265,12 +1310,6 @@ body.vjs-full-window { line-height: 3em; } -.vjs-no-flex .vjs-live-control { - display: table-cell; - width: auto; - text-align: left; -} - .video-js:not(.vjs-live) .vjs-live-control, .video-js.vjs-liveui .vjs-live-control { display: none; @@ -1290,12 +1329,6 @@ body.vjs-full-window { min-width: 4em; } -.vjs-no-flex .vjs-seek-to-live-control { - display: table-cell; - width: auto; - text-align: left; -} - .video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control, .video-js:not(.vjs-live) .vjs-seek-to-live-control { display: none; @@ -1324,17 +1357,10 @@ body.vjs-full-window { padding-right: 1em; } -.vjs-live .vjs-time-control { - display: none; -} - +.vjs-live .vjs-time-control, +.vjs-live .vjs-time-divider, .video-js .vjs-current-time, -.vjs-no-flex .vjs-current-time { - display: none; -} - -.video-js .vjs-duration, -.vjs-no-flex .vjs-duration { +.video-js .vjs-duration { display: none; } @@ -1343,10 +1369,6 @@ body.vjs-full-window { line-height: 3em; } -.vjs-live .vjs-time-divider { - display: none; -} - .video-js .vjs-play-control { cursor: pointer; } @@ -1474,8 +1496,7 @@ video::-webkit-media-text-track-display { .vjs-seeking .vjs-loading-spinner, .vjs-waiting .vjs-loading-spinner { display: block; - -webkit-animation: vjs-spinner-show 0s linear 0.3s forwards; - animation: vjs-spinner-show 0s linear 0.3s forwards; + animation: vjs-spinner-show 0s linear 0.3s forwards; } .vjs-loading-spinner:before, @@ -1497,19 +1518,17 @@ video::-webkit-media-text-track-display { .vjs-seeking .vjs-loading-spinner:after, .vjs-waiting .vjs-loading-spinner:before, .vjs-waiting .vjs-loading-spinner:after { - -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; } .vjs-seeking .vjs-loading-spinner:before, .vjs-waiting .vjs-loading-spinner:before { - border-top-color: white; + border-top-color: rgb(255, 255, 255); } .vjs-seeking .vjs-loading-spinner:after, .vjs-waiting .vjs-loading-spinner:after { - border-top-color: white; - -webkit-animation-delay: 0.44s; + border-top-color: rgb(255, 255, 255); animation-delay: 0.44s; } @@ -1518,21 +1537,11 @@ video::-webkit-media-text-track-display { visibility: visible; } } -@-webkit-keyframes vjs-spinner-show { - to { - visibility: visible; - } -} @keyframes vjs-spinner-spin { 100% { transform: rotate(360deg); } } -@-webkit-keyframes vjs-spinner-spin { - 100% { - -webkit-transform: rotate(360deg); - } -} @keyframes vjs-spinner-fade { 0% { border-top-color: #73859f; @@ -1550,23 +1559,6 @@ video::-webkit-media-text-track-display { border-top-color: #73859f; } } -@-webkit-keyframes vjs-spinner-fade { - 0% { - border-top-color: #73859f; - } - 20% { - border-top-color: #73859f; - } - 35% { - border-top-color: white; - } - 60% { - border-top-color: #73859f; - } - 100% { - border-top-color: #73859f; - } -} .video-js.vjs-audio-only-mode .vjs-captions-button { display: none; } @@ -1587,7 +1579,7 @@ video::-webkit-media-text-track-display { .video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before { font-family: VideoJS; - content: ""; + content: "\f10c"; font-size: 1.5em; line-height: inherit; } @@ -1604,7 +1596,7 @@ video::-webkit-media-text-track-display { .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before { font-family: VideoJS; - content: " "; + content: " \f12e"; font-size: 1.5em; line-height: inherit; } @@ -1638,9 +1630,6 @@ video::-webkit-media-text-track-display { flex: auto; display: block; } -.video-js.vjs-layout-x-small.vjs-no-flex .vjs-custom-control-spacer { - width: auto; -} .vjs-modal-dialog.vjs-text-track-settings { background-color: #2B333F; @@ -1671,18 +1660,15 @@ video::-webkit-media-text-track-display { grid-template-rows: 1fr; padding: 20px 24px 0px 24px; } - .vjs-track-settings-controls .vjs-default-button { margin-bottom: 20px; } - .vjs-text-track-settings .vjs-track-settings-controls { grid-column: 1/-1; } - .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content, -.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content, -.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content { + .vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content, + .vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content { grid-template-columns: 1fr; } } @@ -1692,13 +1678,13 @@ video::-webkit-media-text-track-display { } .vjs-text-track-settings fieldset { - margin: 5px; - padding: 3px; + margin: 10px; border: none; } .vjs-text-track-settings fieldset span { display: inline-block; + padding: 0 6px 8px; } .vjs-text-track-settings fieldset span > select { @@ -1707,16 +1693,14 @@ video::-webkit-media-text-track-display { .vjs-text-track-settings legend { color: #fff; - margin: 0 0 5px 0; + font-weight: bold; + font-size: 14px; } .vjs-text-track-settings .vjs-label { - position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); - display: block; - margin: 0 0 5px 0; - padding: 0; + margin: 0 5px 5px 0; border: 0; height: 1px; width: 1px; @@ -1746,6 +1730,55 @@ video::-webkit-media-text-track-display { margin-right: 1em; } +.vjs-title-bar { + background: rgba(0, 0, 0, 0.9); + background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0) 100%); + font-size: 1.2em; + line-height: 1.5; + transition: opacity 0.1s; + padding: 0.666em 1.333em 4em; + pointer-events: none; + position: absolute; + top: 0; + width: 100%; +} + +.vjs-title-bar-title, +.vjs-title-bar-description { + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.vjs-title-bar-title { + font-weight: bold; + margin-bottom: 0.333em; +} + +.vjs-playing.vjs-user-inactive .vjs-title-bar { + opacity: 0; + transition: opacity 1s; +} + +.video-js .vjs-skip-forward-5 { + cursor: pointer; +} +.video-js .vjs-skip-forward-10 { + cursor: pointer; +} +.video-js .vjs-skip-forward-30 { + cursor: pointer; +} +.video-js .vjs-skip-backward-5 { + cursor: pointer; +} +.video-js .vjs-skip-backward-10 { + cursor: pointer; +} +.video-js .vjs-skip-backward-30 { + cursor: pointer; +} @media print { .video-js > *:not(.vjs-tech):not(.vjs-poster) { visibility: hidden; diff --git a/frontend/src/static/lib/video-js/8.2.0/video-js.min.css b/frontend/src/static/lib/video-js/8.2.0/video-js.min.css new file mode 100644 index 0000000..02429d8 --- /dev/null +++ b/frontend/src/static/lib/video-js/8.2.0/video-js.min.css @@ -0,0 +1 @@ +.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1gUV5auc6urCmxEGrq6VRD6ATQP5dHPKK8GRIyoKApoEBUDAiGzGmdUfKNRM4qLZrUZdGKcGN/GZJKd0SyOWTbfbmZ2NxqzM5IxRtNZd78vwYlJdtREoO7sudVNq6PmmxmKqrqPU+eee173P80Bh39Cu9DOEY4DHZBK3i20D/QRLcfxbE5sEVtwLpZzclw4ibFIkSCJUcZ4MBpMnnzwuKNsGWBL5i3qy6kO2dVpvUpKbkAP9fq62rdeGJ+TM/7C1nbIutfuWrWk5ci4zMxxR1qW/N+9JsmCGXj9VKWhFx/6tr/nz78INDm2C9yPF/fDcxLuyKxLBZ1ZBz2QTi+RSkiH5RrDQJ/GgGQadX9m0YSURs7GpSG905Zsk41uj14yul1OtieZ7QUk5GRG/YiS7PYYPSAZNRed9sq3+bOpz00rKb7pe/ZEZvbALxZAHT3AFoH8GXP3rt67QFn40kt8W13FjLTDb48c+fSi5/7h0P4dL5yz7DPtbmgmYxfQA9RL2+EOfTcvdp+1vmuBpvOll1As1S6ak0IvJzC7sKWJFtJgBd2uWcg+0Zyg7dzQfhcjXRgXGZRf5/a4A58IDU777Nl252AUk4m2ByRRjqTNqIDCEJeAnU3iCFwrkrNwXEzg4yFevBwypzxkcX+AIfk3VEKl3XmWbT8788SzvpvFJaiOezL6QyuSr9VNf97csNu0z3LuhR0wATUxZAfVBwVOy+nQFhxYdWaXlXe4HC4zWGWzzsrLDtmhI9pOWOHv7PTT7XybH1Z0+v2d5Abd3kmG+TsH23CS/KwTxx/JkzEwx6jcQOUc42LLwHJ/J93uZ9ygh3HuZGwqsY9dWDHQ58dxNqyqKRQTYdxwTubiOSs3FiMDkq0WSZQgCT0GBDOg2lxOAd1FlPVGs4AKBAcYHHaP2wPkHaivmLF5zYqnIZrvcHx5gN4k/6tchNW1DtdgNL2KrxEkS/kfnIHoVnp1VjmjpTf5r0lTzLj0mdS28tX+XGorU364eMPmnWVl8J36nlKGw3CZhjEiuMw8h8mKvhGD+4/lElBWjAhLJMg6fTw4zPZ8cOmcGQBm2Qxml1nAm13CpYGq1JKUlJJUzQn1PTAO0mgv6VMMpA/DuRfSWEu4lDIxdbAtdWIKvnn2Vk766CWfz9fpY0sH/UpdP50rfszaVpdVRmvIejEdLMk45s4Bu0EWHjeOySmFyZSiMahvZdNSn29peoI/YexYfKQTLeurTXXwEVLeSfInTWHkkMaeUx7sBvOCSTSj3AlcKjfueyS36tCrXDlgRtF0etFq9jhc1kfKuBT/OwMr0F4UUTTh1AN0g20+H/ScPcsIEsYu9d/zN5PmjprPtNwI1ZZcDK6iC97Mcjp2y2aX36f+QbpGHrgRuHlXJ+Zf6PFRL2uQSp8vxHeF2IoRb8Rd2rhMzsNxSRmEuKK4JFnkojhMcx6jzqHzGMGFcW+MhBj0bhf6cowN+45I4LHvwT6fteu7M42wGRI/pxcg6/MZdEvt1U1XaulHFXuLmqov/MukvRVL35/b3ODM1+4aPjtzeK7zmUkV2h3DN54HaQ9GzJvxHRb6Ks2gB81fwqraT+A7GvZJrRLRofU6G0urNL+zFw3v0FaVDFxsKEZW56F31r6ip6vOL+FCObBPuIMRiXld9RaMdLzRIOGhPey2T9vA/35DmZPK9IWaT9d/WgOGMieYqJ/dzjLIhZU118gbysxrNUGefxD6UO/hyNNllpFTOIbx32kSFQctnweV5PxTMHLjRqiAN+fQE9gL+Xy5WB6MOS4GJJuYbDUHhcKDhHGRbLzOpjsjdM1+iwAZLGeieehACX2hhI7SjK/ZUTNrvVje31TxJiFBGYViWFkCn9PMeX9fS6qVbzfCj4fOCTzDnuWy2c4xA7mdNkA3RS9FH2VeqzdCBlixxbzXjvkHU1I8BOYFb1pZvPIHSSIj4svT8xpzcxtXN+ZKyjdDvbz08niiF3PqV9Tn5NST8vg48MTaY8E5xqSSIsWoWHo+LtAzxdH/GDUyp37CBEYfso04F/NlMTcDJUTpECLY0HFGQHImE8xsEUdgnrQlixIvGhJA1BvxpDHGxEMBYFeNOHcBJlSjwe2JcSfbBEsGOPPBHg/6SBBOCsLLw0SpUxod0Z1bFMfLkbQ3UiZxEyd0Dx8t+SRBu18Q9msFbI4e3p1THEfkSEh7kEJ5orR10qTWDvbgPWn5aWvCYyOAjwgXyjJi34uMjo58L25cmRAeQZWI2PA1QQLsPESAH8WGFwZZ4SPoR73BHPzIPMJj9AreBzKUmrH4todT18ANvi1oc3YGjUT/0j+ExUwq8PI9BLaCQIpvewwYu2evAG/Vo/5avPdY7o+BemLLXw3y+AdkzP9bpIxB1wm5EYq8fesHbPEPtm6HrHvtx4jcGPR8fDDpkZBefIjB46QnlUNRltv4Z/pO/J6dxEjhYAtmoMeq+GozvUVvNYOW3m6GCIhoprcfr97B8AcIQYsfD8ljUvGNjvkrpj0ETA48ZMIxCeqsRIsQALE0gi2GB+glSOfbOjW3GSBM9yPq8/rpJXrJDz0BPxV6xdN4uiCGDQed3WhgFkBUZEFsmeyyBpzXrm7UGTBZG8Lh5aubFufk5eUsbrrFGr7McYdbltxa0nKYqRKbQjvikXYkTGM0f2xuyM3Ly21oXnWfvf6I1BmZwfh7EWWIYsg2nHhsDhOnczhJcmI6eBAmy3jZ3RiJmKQR/JA99FcwsfaVbNDDyi1rL9NPj9hfo61wjM6BjzOLijLpeTgk/pL+ip6tfYWupzeOgPny2tcUu9J/9mhxJlgyi985NFRbvCVewXUNXLJaW0RxZqtRYtnfYdcYomXQWdnJHQA3jiEEkeTQWcWxdDP9IvvVWvo2TK553XEMEq+s69/QDU1Q7p0zxwsm9qS379whr8NI2PJqLUyGyfNeX3eFfnJU2U+uHR9cVV1IqgurqwuV44XVp0h2qN55X5XJwtk59yP0IZuHrqBOBIuIYhkcoT6Kx79Pu2HS/IPZIMOqLWs/pteOOk4NPgEb6QAIdAPsyZk5Mwd+wVaHMexJv719W7xCu2l37UG6lvYdBcvHa08p89741zd63phTRGqL5ggo6SlvdbWXzCqsPq78NnSu7wnKy2HNZbVoRCI7UJEOyRj+sPE002tOOY7Qa5fXboFWkLNeqYUSZRocp9XwSUZxcQZ9Hw6LV2pOoVmvHQEDbGIENEG5i6bLgMSM4n8+FNLTtAds99DaWEvgcf4o5SyYe9x+kF6/tGoTPAdRmS/XQIEy//QxKC2oqioAI3tS5auvxCtzT6y6RK8fhChYcwCJaMJhxc0vqSxQ/qmgsrKAlBZUHlauheTpvd9uj5DnLzJct6qfq5fXbYHVIGcfrIVJihbaVLu1wW7Vbs8zK0A8e9Jvb91S9cVMjPrazD6gpfeZTXzYbCFMcppVRsGMpp55OWgx1/3JeAxW1Y7AORgM/m3rWrsdLkQVmEVSU16cX/e7uvkvpqRiQsG06XJ0t64Tf+l0nG1dt025gyOIZlvq5u9KSU1N2TW/rsWnnMRPyTDkctbhvIcNvYIXWyLzdwYLoYesUbaQG4iK2cWO2gdpeUYLqDD0MUTOPhDIGnZEs58yArR86FznuWEsU4YDi2x26dA4klkn8Qa6vhk2QUfX4Jxm/ngX9r7ogn1dmlmwqZmuhxtdg9XN/DEcUgqb+9hMyNansfaQET2mcROCmGEMVqxm5u+h6kN2MOwgqykV2wH9yQG9DvVFU38Pogaf4FVuE62KI/oJ02RDdWW2w5dqQwU/8+N1q1DlvsL863u61KLE7x/o8w0VJQM/Y/SQ3unIrqxueEa1BqT5VFNsO7p39/UC771a77RowpaKe9nvJQIT1Pog5LGx8XblBKmCNGTf3xMogAQvPnz9PYKX/08sVDTG1OKUlOLUgS/UaZtm1NAaYTsl7i9ZQ+L6O4Rl0OGa577LuWvc+C+x96/vYh0lLBuM+7XwI/dTLtdT7v4d6rRTWDnku0IBrqFnZ5bVIqKP8lasJlithWnaLhTsr8qFJBulF/70p4undou36HeTJ5+jv1fCybeQ8nH3+Xv6aENczmOFlab+hqMDg1rLOt12A+tiUFrYDwQ6c3RUJp601nzegTNX6WlYAI2zSUV945F6zU56ZmZVQaWspWcIADxJ9GmljQUnL2p2Dpr5T8H+5KJFu+vqBq8qvyHRzStLHPEO5SPYCV9nZe0yZT2RcH0oHvegSzNEJ0oGWU8iQWM12dgPEugngVceGIwZgPFp0BiT1a0a3R5Rcot7ihfA1J/20v96jX7zmTX9s583H0kwx6WnLd09cXrR9LGroOa9sHNbdyz8wcKk5lqhaVFJZNwmqtw884MXNdvJujpBa3xzuSaZH9sxa06Z7x+HJSduPbdYHv/DgmEhfbehvlmGN7JUkcG78GDM12CeyFFTPNqVeNxC1gzjz+c2nVo63Xxs8rKJWXoBJM0tmEbfGm4qzpoOH3xpzQfyxLzW1gnE9NHo6tol1eMEic4ZVPrjnVi0kqAe2sQ2bgqupScaq8WGlUWgWHI51SKJl/UYT6zccNsCSkBtiVZLsiefuFSDYT3Fi8Zk7EUnmjTRYtsFeuDDJS05MW79M3mr3mla+d8dzac31KTPmBYfFiYSUef48PhPjm9ryZsSGZZkdNvzq0Y9rdNcwDq5Dg5C3QW+7UN64IKptvS3tvHbvu5c9pv1Exau21rc9LIpwpQwUjTq8576yeVDz5+4WZ1nXT43wV60rPLJbDp/UksNrP3iQ2SA63Pst058gOYDbhRnRUw8l/sRt4HbxPzO4WYpInCpuVgSbVh6JXuwnnJngKTTCwaPWmG5Xbhpm1U0Yt3FyBGpGYemPM77p2TD904JjgJ2QFpFLeYpGx8X15Qx1Zk31p5ki9ZLUuXE0lmuJlcakJMVLeFS1iIvrB8drY0aloilakqCZwzwRORtxlgwxS4IThggJd4TDxoiaAIT80fFPGrCPPru+puFn504P/ybr4ihA/6dKASLshEJic7xE8tmzu3KzA7TABBe8y5fNbWo3ilQn/SuFKM16b2l5bOeayqfGhYmhIulU+fVNDdWVv4NMzX10MBHyPR5uhWUu8D9P1VnIMt4nGNgZGBgAOJ/1bf64vltvjJwszOAwAOlmqvINEc/WJyDgQlEAQA+dgnjAHicY2BkYGBnAAGOPgaG//85+hkYGVCBPgBGJwNkAAAAeJxjYGBgYB/EmKMPtxwAhg4B0gAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAe4CLgKKAtAC/ANiA4wDqAPgBDAEsATaBQgFWgXABggGLgZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\f102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\f103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\f104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\f105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\f106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\f107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\f108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\f109"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\f10a"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\f10b"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\f10c"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\f10d"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\f10e"}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:"\f10f"}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:"\f110"}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:"\f111"}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:"\f112"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\f113"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\f114"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\f115"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\f116"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\f117"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\f118"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\f119"}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:"\f11a"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\f11b"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:"\f11c"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:"\f11d"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:"\f11e"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:"\f11f"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:"\f120"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:"\f121"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\f122"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\f123"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\f124"}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:"\f125"}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:"\f126"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\f127"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\f128"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\f129"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\f12a"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\f12b"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\f12c"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\f12d"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\f12e"}.video-js{display:inline-block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:0}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{width:100%;max-width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs){width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:0 0}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em 0;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em 0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{100%{transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\f10c";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \f12e";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 6px 8px}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:14px}.vjs-text-track-settings .vjs-label{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);margin:0 5px 5px 0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9) 0,rgba(0,0,0,.7) 60%,rgba(0,0,0,0) 100%);font-size:1.2em;line-height:1.5;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-skip-forward-10{cursor:pointer}.video-js .vjs-skip-forward-30{cursor:pointer}.video-js .vjs-skip-backward-5{cursor:pointer}.video-js .vjs-skip-backward-10{cursor:pointer}.video-js .vjs-skip-backward-30{cursor:pointer}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0}.video-js :focus:not(:focus-visible){outline:0} \ No newline at end of file diff --git a/frontend/src/static/lib/video-js/7.20.2/video.cjs.js b/frontend/src/static/lib/video-js/8.2.0/video.cjs.js similarity index 68% rename from frontend/src/static/lib/video-js/7.20.2/video.cjs.js rename to frontend/src/static/lib/video-js/8.2.0/video.cjs.js index daaf9cc..39858e6 100644 --- a/frontend/src/static/lib/video-js/7.20.2/video.cjs.js +++ b/frontend/src/static/lib/video-js/8.2.0/video.cjs.js @@ -1,6 +1,6 @@ /** * @license - * Video.js 7.20.2 + * Video.js 8.2.0 * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * @@ -14,16 +14,12 @@ var window$1 = require('global/window'); var document = require('global/document'); -var _extends = require('@babel/runtime/helpers/extends'); var keycode = require('keycode'); -var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitialized'); -var _inheritsLoose = require('@babel/runtime/helpers/inheritsLoose'); var safeParseTuple = require('safe-json-parse/tuple'); var XHR = require('@videojs/xhr'); var vtt = require('videojs-vtt.js'); -var _construct = require('@babel/runtime/helpers/construct'); -var _inherits = require('@babel/runtime/helpers/inherits'); var _resolveUrl = require('@videojs/vhs-utils/cjs/resolve-url.js'); +var _extends = require('@babel/runtime/helpers/extends'); var m3u8Parser = require('m3u8-parser'); var codecs_js = require('@videojs/vhs-utils/cjs/codecs.js'); var mediaTypes_js = require('@videojs/vhs-utils/cjs/media-types.js'); @@ -38,19 +34,15 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau var window__default = /*#__PURE__*/_interopDefaultLegacy(window$1); var document__default = /*#__PURE__*/_interopDefaultLegacy(document); -var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends); var keycode__default = /*#__PURE__*/_interopDefaultLegacy(keycode); -var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized); -var _inheritsLoose__default = /*#__PURE__*/_interopDefaultLegacy(_inheritsLoose); var safeParseTuple__default = /*#__PURE__*/_interopDefaultLegacy(safeParseTuple); var XHR__default = /*#__PURE__*/_interopDefaultLegacy(XHR); var vtt__default = /*#__PURE__*/_interopDefaultLegacy(vtt); -var _construct__default = /*#__PURE__*/_interopDefaultLegacy(_construct); -var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits); var _resolveUrl__default = /*#__PURE__*/_interopDefaultLegacy(_resolveUrl); +var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends); var parseSidx__default = /*#__PURE__*/_interopDefaultLegacy(parseSidx); -var version$5 = "7.20.2"; +var version$6 = "8.2.0"; /** * An Object that contains lifecycle hooks as keys which point to an array @@ -58,7 +50,8 @@ var version$5 = "7.20.2"; * * @private */ -var hooks_ = {}; +const hooks_ = {}; + /** * Get a list of hooks for a specific lifecycle * @@ -71,16 +64,14 @@ var hooks_ = {}; * @return {Array} * an array of hooks, or an empty array if there are none. */ - -var hooks = function hooks(type, fn) { +const hooks = function (type, fn) { hooks_[type] = hooks_[type] || []; - if (fn) { hooks_[type] = hooks_[type].concat(fn); } - return hooks_[type]; }; + /** * Add a function hook to a specific videojs lifecycle. * @@ -90,11 +81,10 @@ var hooks = function hooks(type, fn) { * @param {Function|Function[]} * The function or array of functions to attach. */ - - -var hook = function hook(type, fn) { +const hook = function (type, fn) { hooks(type, fn); }; + /** * Remove a hook from a specific videojs lifecycle. * @@ -107,19 +97,16 @@ var hook = function hook(type, fn) { * @return {boolean} * The function that was removed or undef */ - - -var removeHook = function removeHook(type, fn) { - var index = hooks(type).indexOf(fn); - +const removeHook = function (type, fn) { + const index = hooks(type).indexOf(fn); if (index <= -1) { return false; } - hooks_[type] = hooks_[type].slice(); hooks_[type].splice(index, 1); return true; }; + /** * Add a function hook that will only run once to a specific videojs lifecycle. * @@ -129,15 +116,12 @@ var removeHook = function removeHook(type, fn) { * @param {Function|Function[]} * The function or array of functions to attach. */ - - -var hookOnce = function hookOnce(type, fn) { - hooks(type, [].concat(fn).map(function (original) { - var wrapper = function wrapper() { +const hookOnce = function (type, fn) { + hooks(type, [].concat(fn).map(original => { + const wrapper = (...args) => { removeHook(type, wrapper); - return original.apply(void 0, arguments); + return original(...args); }; - return wrapper; })); }; @@ -145,8 +129,8 @@ var hookOnce = function hookOnce(type, fn) { /** * @file fullscreen-api.js * @module fullscreen-api - * @private */ + /** * Store the browser-specific methods for the fullscreen API. * @@ -154,32 +138,35 @@ var hookOnce = function hookOnce(type, fn) { * @see [Specification]{@link https://fullscreen.spec.whatwg.org} * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js} */ - -var FullscreenApi = { +const FullscreenApi = { prefixed: true -}; // browser API methods +}; -var apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'], // WebKit -['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen'], // Mozilla -['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror', '-moz-full-screen'], // Microsoft +// browser API methods +const apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'], +// WebKit +['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen'], +// Mozilla +['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror', '-moz-full-screen'], +// Microsoft ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError', '-ms-fullscreen']]; -var specApi = apiMap[0]; -var browserApi; // determine the supported set of functions +const specApi = apiMap[0]; +let browserApi; -for (var i = 0; i < apiMap.length; i++) { +// determine the supported set of functions +for (let i = 0; i < apiMap.length; i++) { // check for exitFullscreen function - if (apiMap[i][1] in document__default['default']) { + if (apiMap[i][1] in document__default["default"]) { browserApi = apiMap[i]; break; } -} // map the browser API names to the spec API names - +} +// map the browser API names to the spec API names if (browserApi) { - for (var _i = 0; _i < browserApi.length; _i++) { - FullscreenApi[specApi[_i]] = browserApi[_i]; + for (let i = 0; i < browserApi.length; i++) { + FullscreenApi[specApi[i]] = browserApi[i]; } - FullscreenApi.prefixed = browserApi[0] !== specApi[0]; } @@ -188,7 +175,9 @@ if (browserApi) { * @module create-logger */ -var history = []; +// This is the private tracking variable for the logging history. +let history = []; + /** * Log messages to the console and history based on the type of message * @@ -199,59 +188,56 @@ var history = []; * @param {Array} args * The arguments to be passed to the matching console method. */ +const LogByTypeFactory = (name, log) => (type, level, args) => { + const lvl = log.levels[level]; + const lvlRegExp = new RegExp(`^(${lvl})$`); + if (type !== 'log') { + // Add the type to the front of the message when it's not "log". + args.unshift(type.toUpperCase() + ':'); + } -var LogByTypeFactory = function LogByTypeFactory(name, log) { - return function (type, level, args) { - var lvl = log.levels[level]; - var lvlRegExp = new RegExp("^(" + lvl + ")$"); + // Add console prefix after adding to history. + args.unshift(name + ':'); - if (type !== 'log') { - // Add the type to the front of the message when it's not "log". - args.unshift(type.toUpperCase() + ':'); - } // Add console prefix after adding to history. + // Add a clone of the args at this point to history. + if (history) { + history.push([].concat(args)); + // only store 1000 history entries + const splice = history.length - 1000; + history.splice(0, splice > 0 ? splice : 0); + } - args.unshift(name + ':'); // Add a clone of the args at this point to history. + // If there's no console then don't try to output messages, but they will + // still be stored in history. + if (!window__default["default"].console) { + return; + } - if (history) { - history.push([].concat(args)); // only store 1000 history entries + // Was setting these once outside of this function, but containing them + // in the function makes it easier to test cases where console doesn't exist + // when the module is executed. + let fn = window__default["default"].console[type]; + if (!fn && type === 'debug') { + // Certain browsers don't have support for console.debug. For those, we + // should default to the closest comparable log. + fn = window__default["default"].console.info || window__default["default"].console.log; + } - var splice = history.length - 1000; - history.splice(0, splice > 0 ? splice : 0); - } // If there's no console then don't try to output messages, but they will - // still be stored in history. - - - if (!window__default['default'].console) { - return; - } // Was setting these once outside of this function, but containing them - // in the function makes it easier to test cases where console doesn't exist - // when the module is executed. - - - var fn = window__default['default'].console[type]; - - if (!fn && type === 'debug') { - // Certain browsers don't have support for console.debug. For those, we - // should default to the closest comparable log. - fn = window__default['default'].console.info || window__default['default'].console.log; - } // Bail out if there's no console or if this type is not allowed by the - // current logging level. - - - if (!fn || !lvl || !lvlRegExp.test(type)) { - return; - } - - fn[Array.isArray(args) ? 'apply' : 'call'](window__default['default'].console, args); - }; + // Bail out if there's no console or if this type is not allowed by the + // current logging level. + if (!fn || !lvl || !lvlRegExp.test(type)) { + return; + } + fn[Array.isArray(args) ? 'apply' : 'call'](window__default["default"].console, args); }; - function createLogger$1(name) { // This is the private tracking variable for logging level. - var level = 'info'; // the curried logByType bound to the specific log and history + let level = 'info'; + + // the curried logByType bound to the specific log and history + let logByType; - var logByType; /** * Logs plain debug messages. Similar to `console.log`. * @@ -261,7 +247,7 @@ function createLogger$1(name) { * * #### Arguments * ##### *args - * Mixed[] + * *[] * * Any combination of values that could be passed to `console.log()`. * @@ -270,20 +256,16 @@ function createLogger$1(name) { * `undefined` * * @namespace - * @param {Mixed[]} args + * @param {(*|*[])} args * One or more messages or objects that should be logged. */ - - var log = function log() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - + const log = function (...args) { logByType('log', level, args); - }; // This is the logByType helper that the logging methods below use - + }; + // This is the logByType helper that the logging methods below use logByType = LogByTypeFactory(name, log); + /** * Create a new sublogger which chains the old name to the new name. * @@ -297,10 +279,8 @@ function createLogger$1(name) { * The name to add call the new logger * @return {Object} */ + log.createLogger = subname => createLogger$1(name + ': ' + subname); - log.createLogger = function (subname) { - return createLogger$1(name + ': ' + subname); - }; /** * Enumeration of available logging levels, where the keys are the level names * and the values are `|`-separated strings containing logging methods allowed @@ -320,8 +300,6 @@ function createLogger$1(name) { * * @type {Object} */ - - log.levels = { all: 'debug|log|warn|error', off: '', @@ -331,6 +309,7 @@ function createLogger$1(name) { error: 'error', DEFAULT: level }; + /** * Get or set the current logging level. * @@ -343,18 +322,16 @@ function createLogger$1(name) { * @return {string} * The current logging level. */ - - log.level = function (lvl) { + log.level = lvl => { if (typeof lvl === 'string') { if (!log.levels.hasOwnProperty(lvl)) { - throw new Error("\"" + lvl + "\" in not a valid log level"); + throw new Error(`"${lvl}" in not a valid log level`); } - level = lvl; } - return level; }; + /** * Returns an array containing everything that has been logged to the history. * @@ -364,11 +341,8 @@ function createLogger$1(name) { * * @return {Array} */ + log.history = () => history ? [].concat(history) : []; - - log.history = function () { - return history ? [].concat(history) : []; - }; /** * Allows you to filter the history by the given logger name * @@ -378,93 +352,66 @@ function createLogger$1(name) { * @return {Array} * The filtered list to return */ - - - log.history.filter = function (fname) { - return (history || []).filter(function (historyItem) { + log.history.filter = fname => { + return (history || []).filter(historyItem => { // if the first item in each historyItem includes `fname`, then it's a match - return new RegExp(".*" + fname + ".*").test(historyItem[0]); + return new RegExp(`.*${fname}.*`).test(historyItem[0]); }); }; + /** * Clears the internal history tracking, but does not prevent further history * tracking. */ - - - log.history.clear = function () { + log.history.clear = () => { if (history) { history.length = 0; } }; + /** * Disable history tracking if it is currently enabled. */ - - - log.history.disable = function () { + log.history.disable = () => { if (history !== null) { history.length = 0; history = null; } }; + /** * Enable history tracking if it is currently disabled. */ - - - log.history.enable = function () { + log.history.enable = () => { if (history === null) { history = []; } }; + /** * Logs error messages. Similar to `console.error`. * - * @param {Mixed[]} args + * @param {(*|*[])} args * One or more messages or objects that should be logged as an error */ + log.error = (...args) => logByType('error', level, args); - - log.error = function () { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return logByType('error', level, args); - }; /** * Logs warning messages. Similar to `console.warn`. * - * @param {Mixed[]} args + * @param {(*|*[])} args * One or more messages or objects that should be logged as a warning. */ + log.warn = (...args) => logByType('warn', level, args); - - log.warn = function () { - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - return logByType('warn', level, args); - }; /** * Logs debug messages. Similar to `console.debug`, but may also act as a comparable * log if `console.debug` is not available * - * @param {Mixed[]} args + * @param {(*|*[])} args * One or more messages or objects that should be logged as debug. */ - - - log.debug = function () { - for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - return logByType('debug', level, args); - }; - + log.debug = (...args) => logByType('debug', level, args); return log; } @@ -472,8 +419,8 @@ function createLogger$1(name) { * @file log.js * @module log */ -var log$1 = createLogger$1('VIDEOJS'); -var createLogger = log$1.createLogger; +const log$1 = createLogger$1('VIDEOJS'); +const createLogger = log$1.createLogger; /** * @file obj.js @@ -483,7 +430,7 @@ var createLogger = log$1.createLogger; /** * @callback obj:EachCallback * - * @param {Mixed} value + * @param {*} value * The current key for the object that is being iterated over. * * @param {string} key @@ -493,19 +440,20 @@ var createLogger = log$1.createLogger; /** * @callback obj:ReduceCallback * - * @param {Mixed} accum + * @param {*} accum * The value that is accumulating over the reduce loop. * - * @param {Mixed} value + * @param {*} value * The current key for the object that is being iterated over. * * @param {string} key * The current key-value for object that is being iterated over * - * @return {Mixed} + * @return {*} * The new accumulated value. */ -var toString = Object.prototype.toString; +const toString = Object.prototype.toString; + /** * Get the keys of an Object * @@ -518,10 +466,10 @@ var toString = Object.prototype.toString; * * @private */ - -var keys = function keys(object) { +const keys = function (object) { return isObject(object) ? Object.keys(object) : []; }; + /** * Array-like iteration for objects. * @@ -531,13 +479,10 @@ var keys = function keys(object) { * @param {obj:EachCallback} fn * The callback function which is called for each key in the object. */ - - function each(object, fn) { - keys(object).forEach(function (key) { - return fn(object[key], key); - }); + keys(object).forEach(key => fn(object[key], key)); } + /** * Array-like reduce for objects. * @@ -549,50 +494,16 @@ function each(object, fn) { * receives the accumulated value and the per-iteration value and key * as arguments. * - * @param {Mixed} [initial = 0] + * @param {*} [initial = 0] * Starting value * - * @return {Mixed} + * @return {*} * The final accumulated value. */ - -function reduce(object, fn, initial) { - if (initial === void 0) { - initial = 0; - } - - return keys(object).reduce(function (accum, key) { - return fn(accum, object[key], key); - }, initial); +function reduce(object, fn, initial = 0) { + return keys(object).reduce((accum, key) => fn(accum, object[key], key), initial); } -/** - * Object.assign-style object shallow merge/extend. - * - * @param {Object} target - * @param {Object} ...sources - * @return {Object} - */ -function assign(target) { - for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - sources[_key - 1] = arguments[_key]; - } - - if (Object.assign) { - return _extends__default['default'].apply(void 0, [target].concat(sources)); - } - - sources.forEach(function (source) { - if (!source) { - return; - } - - each(source, function (value, key) { - target[key] = value; - }); - }); - return target; -} /** * Returns whether a value is an object of any kind - including DOM nodes, * arrays, regular expressions, etc. Not functions, though. @@ -603,10 +514,10 @@ function assign(target) { * @param {Object} value * @return {boolean} */ - function isObject(value) { return !!value && typeof value === 'object'; } + /** * Returns whether an object appears to be a "plain" object - that is, a * direct instance of `Object`. @@ -614,215 +525,226 @@ function isObject(value) { * @param {Object} value * @return {boolean} */ - function isPlain(value) { return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object; } /** - * @file computed-style.js - * @module computed-style + * Merge two objects recursively. + * + * Performs a deep merge like + * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges + * plain objects (not arrays, elements, or anything else). + * + * Non-plain object values will be copied directly from the right-most + * argument. + * + * @param {Object[]} sources + * One or more objects to merge into a new object. + * + * @return {Object} + * A new object that is the merged result of all sources. */ -/** - * A safe getComputedStyle. - * - * This is needed because in Firefox, if the player is loaded in an iframe with - * `display:none`, then `getComputedStyle` returns `null`, so, we do a - * null-check to make sure that the player doesn't break in these cases. - * - * @function - * @param {Element} el - * The element you want the computed style of - * - * @param {string} prop - * The property name you want - * - * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ - -function computedStyle(el, prop) { - if (!el || !prop) { - return ''; - } - - if (typeof window__default['default'].getComputedStyle === 'function') { - var computedStyleValue; - - try { - computedStyleValue = window__default['default'].getComputedStyle(el); - } catch (e) { - return ''; +function merge$1(...sources) { + const result = {}; + sources.forEach(source => { + if (!source) { + return; } - - return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : ''; - } - - return ''; + each(source, (value, key) => { + if (!isPlain(value)) { + result[key] = value; + return; + } + if (!isPlain(result[key])) { + result[key] = {}; + } + result[key] = merge$1(result[key], value); + }); + }); + return result; } +/** + * Object.defineProperty but "lazy", which means that the value is only set after + * it is retrieved the first time, rather than being set right away. + * + * @param {Object} obj the object to set the property on + * @param {string} key the key for the property to set + * @param {Function} getValue the function used to get the value when it is needed. + * @param {boolean} setter whether a setter should be allowed or not + */ +function defineLazyProperty(obj, key, getValue, setter = true) { + const set = value => Object.defineProperty(obj, key, { + value, + enumerable: true, + writable: true + }); + const options = { + configurable: true, + enumerable: true, + get() { + const value = getValue(); + set(value); + return value; + } + }; + if (setter) { + options.set = set; + } + return Object.defineProperty(obj, key, options); +} + +var Obj = /*#__PURE__*/Object.freeze({ + __proto__: null, + each: each, + reduce: reduce, + isObject: isObject, + isPlain: isPlain, + merge: merge$1, + defineLazyProperty: defineLazyProperty +}); + /** * @file browser.js * @module browser */ -var USER_AGENT = window__default['default'].navigator && window__default['default'].navigator.userAgent || ''; -var webkitVersionMap = /AppleWebKit\/([\d.]+)/i.exec(USER_AGENT); -var appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null; + /** * Whether or not this device is an iPod. * * @static - * @const * @type {Boolean} */ +let IS_IPOD = false; -var IS_IPOD = /iPod/i.test(USER_AGENT); /** * The detected iOS version - or `null`. * * @static - * @const * @type {string|null} */ +let IOS_VERSION = null; -var IOS_VERSION = function () { - var match = USER_AGENT.match(/OS (\d+)_/i); - - if (match && match[1]) { - return match[1]; - } - - return null; -}(); /** * Whether or not this is an Android device. * * @static - * @const * @type {Boolean} */ +let IS_ANDROID = false; -var IS_ANDROID = /Android/i.test(USER_AGENT); /** - * The detected Android version - or `null`. + * The detected Android version - or `null` if not Android or indeterminable. * * @static - * @const * @type {number|string|null} */ +let ANDROID_VERSION; -var ANDROID_VERSION = function () { - // This matches Android Major.Minor.Patch versions - // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned - var match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i); - - if (!match) { - return null; - } - - var major = match[1] && parseFloat(match[1]); - var minor = match[2] && parseFloat(match[2]); - - if (major && minor) { - return parseFloat(match[1] + '.' + match[2]); - } else if (major) { - return major; - } - - return null; -}(); -/** - * Whether or not this is a native Android browser. - * - * @static - * @const - * @type {Boolean} - */ - -var IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537; /** * Whether or not this is Mozilla Firefox. * * @static - * @const * @type {Boolean} */ +let IS_FIREFOX = false; -var IS_FIREFOX = /Firefox/i.test(USER_AGENT); /** * Whether or not this is Microsoft Edge. * * @static - * @const * @type {Boolean} */ +let IS_EDGE = false; -var IS_EDGE = /Edg/i.test(USER_AGENT); /** - * Whether or not this is Google Chrome. + * Whether or not this is any Chromium Browser + * + * @static + * @type {Boolean} + */ +let IS_CHROMIUM = false; + +/** + * Whether or not this is any Chromium browser that is not Edge. * * This will also be `true` for Chrome on iOS, which will have different support * as it is actually Safari under the hood. * - * @static - * @const - * @type {Boolean} - */ - -var IS_CHROME = !IS_EDGE && (/Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT)); -/** - * The detected Google Chrome version - or `null`. + * Depreacted, as the behaviour to not match Edge was to prevent Legacy Edge's UA matching. + * IS_CHROMIUM should be used instead. + * "Chromium but not Edge" could be explicitly tested with IS_CHROMIUM && !IS_EDGE + * + * @static + * @deprecated + * @type {Boolean} + */ +let IS_CHROME = false; + +/** + * The detected Chromium version - or `null`. * * @static - * @const * @type {number|null} */ +let CHROMIUM_VERSION = null; -var CHROME_VERSION = function () { - var match = USER_AGENT.match(/(Chrome|CriOS)\/(\d+)/); +/** + * The detected Google Chrome version - or `null`. + * This has always been the _Chromium_ version, i.e. would return on Chromium Edge. + * Depreacted, use CHROMIUM_VERSION instead. + * + * @static + * @deprecated + * @type {number|null} + */ +let CHROME_VERSION = null; - if (match && match[2]) { - return parseFloat(match[2]); - } - - return null; -}(); /** * The detected Internet Explorer version - or `null`. * * @static - * @const + * @deprecated * @type {number|null} */ +let IE_VERSION = null; -var IE_VERSION = function () { - var result = /MSIE\s(\d+)\.\d/.exec(USER_AGENT); - var version = result && parseFloat(result[1]); - - if (!version && /Trident\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) { - // IE 11 has a different user agent string than other IE versions - version = 11.0; - } - - return version; -}(); /** * Whether or not this is desktop Safari. * * @static - * @const * @type {Boolean} */ +let IS_SAFARI = false; -var IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE; /** * Whether or not this is a Windows machine. * * @static - * @const * @type {Boolean} */ +let IS_WINDOWS = false; + +/** + * Whether or not this device is an iPad. + * + * @static + * @type {Boolean} + */ +let IS_IPAD = false; + +/** + * Whether or not this device is an iPhone. + * + * @static + * @type {Boolean} + */ +// The Facebook app's UIWebView identifies as both an iPhone and iPad, so +// to identify iPhones, we need to exclude iPads. +// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/ +let IS_IPHONE = false; -var IS_WINDOWS = /Windows/i.test(USER_AGENT); /** * Whether or not this device is touch-enabled. * @@ -830,29 +752,77 @@ var IS_WINDOWS = /Windows/i.test(USER_AGENT); * @const * @type {Boolean} */ +const TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window__default["default"] || window__default["default"].navigator.maxTouchPoints || window__default["default"].DocumentTouch && window__default["default"].document instanceof window__default["default"].DocumentTouch)); +const UAD = window__default["default"].navigator && window__default["default"].navigator.userAgentData; +if (UAD) { + // If userAgentData is present, use it instead of userAgent to avoid warnings + // Currently only implemented on Chromium + // userAgentData does not expose Android version, so ANDROID_VERSION remains `null` -var TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window__default['default'] || window__default['default'].navigator.maxTouchPoints || window__default['default'].DocumentTouch && window__default['default'].document instanceof window__default['default'].DocumentTouch)); -/** - * Whether or not this device is an iPad. - * - * @static - * @const - * @type {Boolean} - */ + IS_ANDROID = UAD.platform === 'Android'; + IS_EDGE = Boolean(UAD.brands.find(b => b.brand === 'Microsoft Edge')); + IS_CHROMIUM = Boolean(UAD.brands.find(b => b.brand === 'Chromium')); + IS_CHROME = !IS_EDGE && IS_CHROMIUM; + CHROMIUM_VERSION = CHROME_VERSION = (UAD.brands.find(b => b.brand === 'Chromium') || {}).version || null; + IS_WINDOWS = UAD.platform === 'Windows'; +} -var IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT); -/** - * Whether or not this device is an iPhone. - * - * @static - * @const - * @type {Boolean} - */ -// The Facebook app's UIWebView identifies as both an iPhone and iPad, so -// to identify iPhones, we need to exclude iPads. -// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/ +// If the broser is not Chromium, either userAgentData is not present which could be an old Chromium browser, +// or it's a browser that has added userAgentData since that we don't have tests for yet. In either case, +// the checks need to be made agiainst the regular userAgent string. +if (!IS_CHROMIUM) { + const USER_AGENT = window__default["default"].navigator && window__default["default"].navigator.userAgent || ''; + IS_IPOD = /iPod/i.test(USER_AGENT); + IOS_VERSION = function () { + const match = USER_AGENT.match(/OS (\d+)_/i); + if (match && match[1]) { + return match[1]; + } + return null; + }(); + IS_ANDROID = /Android/i.test(USER_AGENT); + ANDROID_VERSION = function () { + // This matches Android Major.Minor.Patch versions + // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned + const match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i); + if (!match) { + return null; + } + const major = match[1] && parseFloat(match[1]); + const minor = match[2] && parseFloat(match[2]); + if (major && minor) { + return parseFloat(match[1] + '.' + match[2]); + } else if (major) { + return major; + } + return null; + }(); + IS_FIREFOX = /Firefox/i.test(USER_AGENT); + IS_EDGE = /Edg/i.test(USER_AGENT); + IS_CHROMIUM = /Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT); + IS_CHROME = !IS_EDGE && IS_CHROMIUM; + CHROMIUM_VERSION = CHROME_VERSION = function () { + const match = USER_AGENT.match(/(Chrome|CriOS)\/(\d+)/); + if (match && match[2]) { + return parseFloat(match[2]); + } + return null; + }(); + IE_VERSION = function () { + const result = /MSIE\s(\d+)\.\d/.exec(USER_AGENT); + let version = result && parseFloat(result[1]); + if (!version && /Trident\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) { + // IE 11 has a different user agent string than other IE versions + version = 11.0; + } + return version; + }(); + IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE; + IS_WINDOWS = /Windows/i.test(USER_AGENT); + IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT); + IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD; +} -var IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD; /** * Whether or not this is an iOS device. * @@ -860,8 +830,8 @@ var IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD; * @const * @type {Boolean} */ +const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD; -var IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD; /** * Whether or not this is any flavor of Safari - including iOS. * @@ -869,26 +839,26 @@ var IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD; * @const * @type {Boolean} */ - -var IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME; +const IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME; var browser = /*#__PURE__*/Object.freeze({ __proto__: null, - IS_IPOD: IS_IPOD, - IOS_VERSION: IOS_VERSION, - IS_ANDROID: IS_ANDROID, - ANDROID_VERSION: ANDROID_VERSION, - IS_NATIVE_ANDROID: IS_NATIVE_ANDROID, - IS_FIREFOX: IS_FIREFOX, - IS_EDGE: IS_EDGE, - IS_CHROME: IS_CHROME, - CHROME_VERSION: CHROME_VERSION, - IE_VERSION: IE_VERSION, - IS_SAFARI: IS_SAFARI, - IS_WINDOWS: IS_WINDOWS, + get IS_IPOD () { return IS_IPOD; }, + get IOS_VERSION () { return IOS_VERSION; }, + get IS_ANDROID () { return IS_ANDROID; }, + get ANDROID_VERSION () { return ANDROID_VERSION; }, + get IS_FIREFOX () { return IS_FIREFOX; }, + get IS_EDGE () { return IS_EDGE; }, + get IS_CHROMIUM () { return IS_CHROMIUM; }, + get IS_CHROME () { return IS_CHROME; }, + get CHROMIUM_VERSION () { return CHROMIUM_VERSION; }, + get CHROME_VERSION () { return CHROME_VERSION; }, + get IE_VERSION () { return IE_VERSION; }, + get IS_SAFARI () { return IS_SAFARI; }, + get IS_WINDOWS () { return IS_WINDOWS; }, + get IS_IPAD () { return IS_IPAD; }, + get IS_IPHONE () { return IS_IPHONE; }, TOUCH_ENABLED: TOUCH_ENABLED, - IS_IPAD: IS_IPAD, - IS_IPHONE: IS_IPHONE, IS_IOS: IS_IOS, IS_ANY_SAFARI: IS_ANY_SAFARI }); @@ -897,6 +867,7 @@ var browser = /*#__PURE__*/Object.freeze({ * @file dom.js * @module dom */ + /** * Detect if a value is a string with any non-whitespace characters. * @@ -908,7 +879,6 @@ var browser = /*#__PURE__*/Object.freeze({ * Will be `true` if the string is non-blank, `false` otherwise. * */ - function isNonBlankString(str) { // we use str.trim as it will trim any whitespace characters // from the front or back of non-whitespace characters. aka @@ -917,6 +887,7 @@ function isNonBlankString(str) { // will have a length of 0, failing this check. return typeof str === 'string' && Boolean(str.trim()); } + /** * Throws an error if the passed string has whitespace. This is used by * class methods to be relatively consistent with the classList API. @@ -928,55 +899,37 @@ function isNonBlankString(str) { * @throws {Error} * Throws an error if there is whitespace in the string. */ - - function throwIfWhitespace(str) { // str.indexOf instead of regex because str.indexOf is faster performance wise. if (str.indexOf(' ') >= 0) { throw new Error('class has illegal whitespace characters'); } } -/** - * Produce a regular expression for matching a className within an elements className. - * - * @private - * @param {string} className - * The className to generate the RegExp for. - * - * @return {RegExp} - * The RegExp that will check for a specific `className` in an elements - * className. - */ - -function classRegExp(className) { - return new RegExp('(^|\\s)' + className + '($|\\s)'); -} /** * Whether the current DOM interface appears to be real (i.e. not simulated). * * @return {boolean} * Will be `true` if the DOM appears to be real, `false` otherwise. */ - - function isReal() { // Both document and window will never be undefined thanks to `global`. - return document__default['default'] === window__default['default'].document; + return document__default["default"] === window__default["default"].document; } + /** * Determines, via duck typing, whether or not a value is a DOM element. * - * @param {Mixed} value + * @param {*} value * The value to check. * * @return {boolean} * Will be `true` if the value is a DOM element, `false` otherwise. */ - function isEl(value) { return isObject(value) && value.nodeType === 1; } + /** * Determines if the current DOM is embedded in an iframe. * @@ -984,16 +937,16 @@ function isEl(value) { * Will be `true` if the DOM is embedded in an iframe, `false` * otherwise. */ - function isInFrame() { // We need a try/catch here because Safari will throw errors when attempting // to get either `parent` or `self` try { - return window__default['default'].parent !== window__default['default'].self; + return window__default["default"].parent !== window__default["default"].self; } catch (x) { return true; } } + /** * Creates functions to query the DOM using a given method. * @@ -1004,21 +957,19 @@ function isInFrame() { * @return {Function} * The query method */ - function createQuerier(method) { return function (selector, context) { if (!isNonBlankString(selector)) { - return document__default['default'][method](null); + return document__default["default"][method](null); } - if (isNonBlankString(context)) { - context = document__default['default'].querySelector(context); + context = document__default["default"].querySelector(context); } - - var ctx = isEl(context) ? context : document__default['default']; + const ctx = isEl(context) ? context : document__default["default"]; return ctx[method] && ctx[method](selector); }; } + /** * Creates an element and applies properties, attributes, and inserts content. * @@ -1031,38 +982,20 @@ function createQuerier(method) { * @param {Object} [attributes={}] * Element attributes to be applied. * - * @param {module:dom~ContentDescriptor} content + * @param {ContentDescriptor} [content] * A content descriptor object. * * @return {Element} * The element that was created. */ - - -function createEl(tagName, properties, attributes, content) { - if (tagName === void 0) { - tagName = 'div'; - } - - if (properties === void 0) { - properties = {}; - } - - if (attributes === void 0) { - attributes = {}; - } - - var el = document__default['default'].createElement(tagName); +function createEl(tagName = 'div', properties = {}, attributes = {}, content) { + const el = document__default["default"].createElement(tagName); Object.getOwnPropertyNames(properties).forEach(function (propName) { - var val = properties[propName]; // See #2176 - // We originally were accepting both properties and attributes in the - // same object, but that doesn't work so well. + const val = properties[propName]; - if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') { - log$1.warn('Setting attributes in the second argument of createEl()\n' + 'has been deprecated. Use the third argument instead.\n' + ("createEl(type, properties, attributes). Attempting to set " + propName + " to " + val + ".")); - el.setAttribute(propName, val); // Handle textContent since it's not supported everywhere and we have a - // method for it. - } else if (propName === 'textContent') { + // Handle textContent since it's not supported everywhere and we have a + // method for it. + if (propName === 'textContent') { textContent(el, val); } else if (el[propName] !== val || propName === 'tabIndex') { el[propName] = val; @@ -1071,13 +1004,12 @@ function createEl(tagName, properties, attributes, content) { Object.getOwnPropertyNames(attributes).forEach(function (attrName) { el.setAttribute(attrName, attributes[attrName]); }); - if (content) { appendContent(el, content); } - return el; } + /** * Injects text into an element, replacing any existing contents entirely. * @@ -1090,16 +1022,15 @@ function createEl(tagName, properties, attributes, content) { * @return {Element} * The element with added text content. */ - function textContent(el, text) { if (typeof el.textContent === 'undefined') { el.innerText = text; } else { el.textContent = text; } - return el; } + /** * Insert an element as the first child node of another * @@ -1109,7 +1040,6 @@ function textContent(el, text) { * @param {Element} parent * Element to insert child into */ - function prependTo(child, parent) { if (parent.firstChild) { parent.insertBefore(child, parent.firstChild); @@ -1117,6 +1047,7 @@ function prependTo(child, parent) { parent.appendChild(child); } } + /** * Check if an element has a class name. * @@ -1132,70 +1063,50 @@ function prependTo(child, parent) { * @throws {Error} * Throws an error if `classToCheck` has white space. */ - function hasClass(element, classToCheck) { throwIfWhitespace(classToCheck); - - if (element.classList) { - return element.classList.contains(classToCheck); - } - - return classRegExp(classToCheck).test(element.className); + return element.classList.contains(classToCheck); } + /** * Add a class name to an element. * * @param {Element} element * Element to add class name to. * - * @param {string} classToAdd - * Class name to add. + * @param {...string} classesToAdd + * One or more class name to add. * * @return {Element} * The DOM element with the added class name. */ - -function addClass(element, classToAdd) { - if (element.classList) { - element.classList.add(classToAdd); // Don't need to `throwIfWhitespace` here because `hasElClass` will do it - // in the case of classList not being supported. - } else if (!hasClass(element, classToAdd)) { - element.className = (element.className + ' ' + classToAdd).trim(); - } - +function addClass(element, ...classesToAdd) { + element.classList.add(...classesToAdd.reduce((prev, current) => prev.concat(current.split(/\s+/)), [])); return element; } + /** * Remove a class name from an element. * * @param {Element} element * Element to remove a class name from. * - * @param {string} classToRemove - * Class name to remove + * @param {...string} classesToRemove + * One or more class name to remove. * * @return {Element} * The DOM element with class name removed. */ - -function removeClass(element, classToRemove) { +function removeClass(element, ...classesToRemove) { // Protect in case the player gets disposed if (!element) { log$1.warn("removeClass was called with an element that doesn't exist"); return null; } - - if (element.classList) { - element.classList.remove(classToRemove); - } else { - throwIfWhitespace(classToRemove); - element.className = element.className.split(/\s+/).filter(function (c) { - return c !== classToRemove; - }).join(' '); - } - + element.classList.remove(...classesToRemove.reduce((prev, current) => prev.concat(current.split(/\s+/)), [])); return element; } + /** * The callback definition for toggleClass. * @@ -1228,35 +1139,17 @@ function removeClass(element, classToRemove) { * @return {Element} * The element with a class that has been toggled. */ - function toggleClass(element, classToToggle, predicate) { - // This CANNOT use `classList` internally because IE11 does not support the - // second parameter to the `classList.toggle()` method! Which is fine because - // `classList` will be used by the add/remove functions. - var has = hasClass(element, classToToggle); - if (typeof predicate === 'function') { predicate = predicate(element, classToToggle); } - if (typeof predicate !== 'boolean') { - predicate = !has; - } // If the necessary class operation matches the current state of the - // element, no action is required. - - - if (predicate === has) { - return; + predicate = undefined; } - - if (predicate) { - addClass(element, classToToggle); - } else { - removeClass(element, classToToggle); - } - + classToToggle.split(/\s+/).forEach(className => element.classList.toggle(className, predicate)); return element; } + /** * Apply attributes to an HTML element. * @@ -1266,11 +1159,9 @@ function toggleClass(element, classToToggle, predicate) { * @param {Object} [attributes] * Attributes to be applied. */ - function setAttributes(el, attributes) { Object.getOwnPropertyNames(attributes).forEach(function (attrName) { - var attrValue = attributes[attrName]; - + const attrValue = attributes[attrName]; if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) { el.removeAttribute(attrName); } else { @@ -1278,6 +1169,7 @@ function setAttributes(el, attributes) { } }); } + /** * Get an element's attribute values, as defined on the HTML tag. * @@ -1291,35 +1183,33 @@ function setAttributes(el, attributes) { * All attributes of the element. Boolean attributes will be `true` or * `false`, others will be strings. */ - function getAttributes(tag) { - var obj = {}; // known boolean attributes + const obj = {}; + + // known boolean attributes // we can check for matching boolean properties, but not all browsers // and not all tags know about these attributes, so, we still want to check them manually - - var knownBooleans = ',' + 'autoplay,controls,playsinline,loop,muted,default,defaultMuted' + ','; - + const knownBooleans = ',' + 'autoplay,controls,playsinline,loop,muted,default,defaultMuted' + ','; if (tag && tag.attributes && tag.attributes.length > 0) { - var attrs = tag.attributes; + const attrs = tag.attributes; + for (let i = attrs.length - 1; i >= 0; i--) { + const attrName = attrs[i].name; + let attrVal = attrs[i].value; - for (var i = attrs.length - 1; i >= 0; i--) { - var attrName = attrs[i].name; - var attrVal = attrs[i].value; // check for known booleans + // check for known booleans // the matching element property will return a value for typeof - if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) { // the value of an included boolean attribute is typically an empty // string ('') which would equal false if we just check for a false value. // we also don't want support bad code like autoplay='false' attrVal = attrVal !== null ? true : false; } - obj[attrName] = attrVal; } } - return obj; } + /** * Get the value of an element's attribute. * @@ -1332,10 +1222,10 @@ function getAttributes(tag) { * @return {string} * The value of the attribute. */ - function getAttribute(el, attribute) { return el.getAttribute(attribute); } + /** * Set the value of an element's attribute. * @@ -1348,10 +1238,10 @@ function getAttribute(el, attribute) { * @param {string} value * Value to set the attribute to. */ - function setAttribute(el, attribute, value) { el.setAttribute(attribute, value); } + /** * Remove an element's attribute. * @@ -1361,30 +1251,29 @@ function setAttribute(el, attribute, value) { * @param {string} attribute * Attribute to remove. */ - function removeAttribute(el, attribute) { el.removeAttribute(attribute); } + /** * Attempt to block the ability to select text. */ - function blockTextSelection() { - document__default['default'].body.focus(); - - document__default['default'].onselectstart = function () { + document__default["default"].body.focus(); + document__default["default"].onselectstart = function () { return false; }; } + /** * Turn off text selection blocking. */ - function unblockTextSelection() { - document__default['default'].onselectstart = function () { + document__default["default"].onselectstart = function () { return true; }; } + /** * Identical to the native `getBoundingClientRect` function, but ensures that * the method is supported at all (it is in all browsers we claim to support) @@ -1404,28 +1293,25 @@ function unblockTextSelection() { * @return {Object|undefined} * Always returns a plain object - or `undefined` if it cannot. */ - function getBoundingClientRect(el) { if (el && el.getBoundingClientRect && el.parentNode) { - var rect = el.getBoundingClientRect(); - var result = {}; - ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (k) { + const rect = el.getBoundingClientRect(); + const result = {}; + ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(k => { if (rect[k] !== undefined) { result[k] = rect[k]; } }); - if (!result.height) { result.height = parseFloat(computedStyle(el, 'height')); } - if (!result.width) { result.width = parseFloat(computedStyle(el, 'width')); } - return result; } } + /** * Represents the position of a DOM element on the page. * @@ -1451,7 +1337,6 @@ function getBoundingClientRect(el) { * @return {module:dom~Position} * The position of the element that was passed in. */ - function findPosition(el) { if (!el || el && !el.offsetParent) { return { @@ -1461,25 +1346,23 @@ function findPosition(el) { height: 0 }; } - - var width = el.offsetWidth; - var height = el.offsetHeight; - var left = 0; - var top = 0; - - while (el.offsetParent && el !== document__default['default'][FullscreenApi.fullscreenElement]) { + const width = el.offsetWidth; + const height = el.offsetHeight; + let left = 0; + let top = 0; + while (el.offsetParent && el !== document__default["default"][FullscreenApi.fullscreenElement]) { left += el.offsetLeft; top += el.offsetTop; el = el.offsetParent; } - return { - left: left, - top: top, - width: width, - height: height + left, + top, + width, + height }; } + /** * Represents x and y coordinates for a DOM element or mouse pointer. * @@ -1500,76 +1383,67 @@ function findPosition(el) { * @param {Element} el * Element on which to get the pointer position on. * - * @param {EventTarget~Event} event + * @param {Event} event * Event object. * * @return {module:dom~Coordinates} * A coordinates object corresponding to the mouse position. * */ - function getPointerPosition(el, event) { - var translated = { + const translated = { x: 0, y: 0 }; - if (IS_IOS) { - var item = el; - + let item = el; while (item && item.nodeName.toLowerCase() !== 'html') { - var transform = computedStyle(item, 'transform'); - + const transform = computedStyle(item, 'transform'); if (/^matrix/.test(transform)) { - var values = transform.slice(7, -1).split(/,\s/).map(Number); + const values = transform.slice(7, -1).split(/,\s/).map(Number); translated.x += values[4]; translated.y += values[5]; } else if (/^matrix3d/.test(transform)) { - var _values = transform.slice(9, -1).split(/,\s/).map(Number); - - translated.x += _values[12]; - translated.y += _values[13]; + const values = transform.slice(9, -1).split(/,\s/).map(Number); + translated.x += values[12]; + translated.y += values[13]; } - item = item.parentNode; } } - - var position = {}; - var boxTarget = findPosition(event.target); - var box = findPosition(el); - var boxW = box.width; - var boxH = box.height; - var offsetY = event.offsetY - (box.top - boxTarget.top); - var offsetX = event.offsetX - (box.left - boxTarget.left); - + const position = {}; + const boxTarget = findPosition(event.target); + const box = findPosition(el); + const boxW = box.width; + const boxH = box.height; + let offsetY = event.offsetY - (box.top - boxTarget.top); + let offsetX = event.offsetX - (box.left - boxTarget.left); if (event.changedTouches) { offsetX = event.changedTouches[0].pageX - box.left; offsetY = event.changedTouches[0].pageY + box.top; - if (IS_IOS) { offsetX -= translated.x; offsetY -= translated.y; } } - position.y = 1 - Math.max(0, Math.min(1, offsetY / boxH)); position.x = Math.max(0, Math.min(1, offsetX / boxW)); return position; } + /** * Determines, via duck typing, whether or not a value is a text node. * - * @param {Mixed} value + * @param {*} value * Check if this value is a text node. * * @return {boolean} * Will be `true` if the value is a text node, `false` otherwise. */ - function isTextNode(value) { return isObject(value) && value.nodeType === 3; } + /** * Empties the contents of an element. * @@ -1579,14 +1453,13 @@ function isTextNode(value) { * @return {Element} * The element with no children */ - function emptyEl(el) { while (el.firstChild) { el.removeChild(el.firstChild); } - return el; } + /** * This is a mixed value that describes content to be injected into the DOM * via some method. It can be of the following types: @@ -1595,11 +1468,11 @@ function emptyEl(el) { * -----------|------------- * `string` | The value will be normalized into a text node. * `Element` | The value will be accepted as-is. - * `TextNode` | The value will be accepted as-is. + * `Text` | A TextNode. The value will be accepted as-is. * `Array` | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored). * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes. * - * @typedef {string|Element|TextNode|Array|Function} module:dom~ContentDescriptor + * @typedef {string|Element|Text|Array|Function} ContentDescriptor */ /** @@ -1612,60 +1485,54 @@ function emptyEl(el) { * The content for an element can be passed in multiple types and * combinations, whose behavior is as follows: * - * @param {module:dom~ContentDescriptor} content + * @param {ContentDescriptor} content * A content descriptor value. * * @return {Array} * All of the content that was passed in, normalized to an array of * elements or text nodes. */ - function normalizeContent(content) { // First, invoke content if it is a function. If it produces an array, // that needs to happen before normalization. if (typeof content === 'function') { content = content(); - } // Next up, normalize to an array, so one or many items can be normalized, + } + + // Next up, normalize to an array, so one or many items can be normalized, // filtered, and returned. - - - return (Array.isArray(content) ? content : [content]).map(function (value) { + return (Array.isArray(content) ? content : [content]).map(value => { // First, invoke value if it is a function to produce a new value, // which will be subsequently normalized to a Node of some kind. if (typeof value === 'function') { value = value(); } - if (isEl(value) || isTextNode(value)) { return value; } - if (typeof value === 'string' && /\S/.test(value)) { - return document__default['default'].createTextNode(value); + return document__default["default"].createTextNode(value); } - }).filter(function (value) { - return value; - }); + }).filter(value => value); } + /** * Normalizes and appends content to an element. * * @param {Element} el * Element to append normalized content to. * - * @param {module:dom~ContentDescriptor} content + * @param {ContentDescriptor} content * A content descriptor value. * * @return {Element} * The element with appended normalized content. */ - function appendContent(el, content) { - normalizeContent(content).forEach(function (node) { - return el.appendChild(node); - }); + normalizeContent(content).forEach(node => el.appendChild(node)); return el; } + /** * Normalizes and inserts content into an element; this is identical to * `appendContent()`, except it empties the element first. @@ -1673,30 +1540,30 @@ function appendContent(el, content) { * @param {Element} el * Element to insert normalized content into. * - * @param {module:dom~ContentDescriptor} content + * @param {ContentDescriptor} content * A content descriptor value. * * @return {Element} * The element with inserted normalized content. */ - function insertContent(el, content) { return appendContent(emptyEl(el), content); } + /** * Check if an event was a single left click. * - * @param {EventTarget~Event} event + * @param {Event} event * Event object. * * @return {boolean} * Will be `true` if a single left click, `false` otherwise. */ - function isSingleLeftClick(event) { // Note: if you create something draggable, be sure to // call it on both `mousedown` and `mousemove` event, // otherwise `mousedown` should be enough for a button + if (event.button === undefined && event.buttons === undefined) { // Why do we need `buttons` ? // Because, middle mouse sometimes have this: @@ -1705,34 +1572,36 @@ function isSingleLeftClick(event) { // HOLD middlemouse then left click, that would be // e.button === 0, e.buttons === 5 // just `button` is not gonna work + // Alright, then what this block does ? // this is for chrome `simulate mobile devices` // I want to support this as well + return true; } - if (event.button === 0 && event.buttons === undefined) { // Touch screen, sometimes on some specific device, `buttons` // doesn't have anything (safari on ios, blackberry...) - return true; - } // `mouseup` event on a single left click has - // `button` and `buttons` equal to 0 - - if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) { return true; } + // `mouseup` event on a single left click has + // `button` and `buttons` equal to 0 + if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) { + return true; + } if (event.button !== 0 || event.buttons !== 1) { // This is the reason we have those if else block above // if any special case we can catch and let it slide // we do it above, when get to here, this definitely // is-not-left-click + return false; } - return true; } + /** * Finds a single DOM element matching `selector` within the optional * `context` of another DOM element (defaulting to `document`). @@ -1749,8 +1618,8 @@ function isSingleLeftClick(event) { * @return {Element|null} * The element that was found or null. */ +const $ = createQuerier('querySelector'); -var $ = createQuerier('querySelector'); /** * Finds a all DOM elements matching `selector` within the optional * `context` of another DOM element (defaulting to `document`). @@ -1769,8 +1638,38 @@ var $ = createQuerier('querySelector'); * were found. * */ +const $$ = createQuerier('querySelectorAll'); -var $$ = createQuerier('querySelectorAll'); +/** + * A safe getComputedStyle. + * + * This is needed because in Firefox, if the player is loaded in an iframe with + * `display:none`, then `getComputedStyle` returns `null`, so, we do a + * null-check to make sure that the player doesn't break in these cases. + * + * @param {Element} el + * The element you want the computed style of + * + * @param {string} prop + * The property name you want + * + * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397 + */ +function computedStyle(el, prop) { + if (!el || !prop) { + return ''; + } + if (typeof window__default["default"].getComputedStyle === 'function') { + let computedStyleValue; + try { + computedStyleValue = window__default["default"].getComputedStyle(el); + } catch (e) { + return ''; + } + return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : ''; + } + return ''; +} var Dom = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -1801,7 +1700,8 @@ var Dom = /*#__PURE__*/Object.freeze({ insertContent: insertContent, isSingleLeftClick: isSingleLeftClick, $: $, - $$: $$ + $$: $$, + computedStyle: computedStyle }); /** @@ -1810,48 +1710,53 @@ var Dom = /*#__PURE__*/Object.freeze({ * * @module setup */ -var _windowLoaded = false; -var videojs$1; +let _windowLoaded = false; +let videojs$1; + /** * Set up any tags that have a data-setup `attribute` when the player is started. */ - -var autoSetup = function autoSetup() { +const autoSetup = function () { if (videojs$1.options.autoSetup === false) { return; } + const vids = Array.prototype.slice.call(document__default["default"].getElementsByTagName('video')); + const audios = Array.prototype.slice.call(document__default["default"].getElementsByTagName('audio')); + const divs = Array.prototype.slice.call(document__default["default"].getElementsByTagName('video-js')); + const mediaEls = vids.concat(audios, divs); - var vids = Array.prototype.slice.call(document__default['default'].getElementsByTagName('video')); - var audios = Array.prototype.slice.call(document__default['default'].getElementsByTagName('audio')); - var divs = Array.prototype.slice.call(document__default['default'].getElementsByTagName('video-js')); - var mediaEls = vids.concat(audios, divs); // Check if any media elements exist - + // Check if any media elements exist if (mediaEls && mediaEls.length > 0) { - for (var i = 0, e = mediaEls.length; i < e; i++) { - var mediaEl = mediaEls[i]; // Check if element exists, has getAttribute func. + for (let i = 0, e = mediaEls.length; i < e; i++) { + const mediaEl = mediaEls[i]; + // Check if element exists, has getAttribute func. if (mediaEl && mediaEl.getAttribute) { // Make sure this player hasn't already been set up. if (mediaEl.player === undefined) { - var options = mediaEl.getAttribute('data-setup'); // Check if data-setup attr exists. - // We only auto-setup if they've added the data-setup attr. + const options = mediaEl.getAttribute('data-setup'); + // Check if data-setup attr exists. + // We only auto-setup if they've added the data-setup attr. if (options !== null) { // Create new video.js instance. videojs$1(mediaEl); } - } // If getAttribute isn't defined, we need to wait for the DOM. + } + // If getAttribute isn't defined, we need to wait for the DOM. } else { autoSetupTimeout(1); break; } - } // No videos were found, so keep looping unless page is finished loading. + } + // No videos were found, so keep looping unless page is finished loading. } else if (!_windowLoaded) { autoSetupTimeout(1); } }; + /** * Wait until the page is loaded before running autoSetup. This will be called in * autoSetup if `hasLoaded` returns false. @@ -1862,34 +1767,28 @@ var autoSetup = function autoSetup() { * @param {module:videojs} [vjs] * The videojs library function */ - - function autoSetupTimeout(wait, vjs) { // Protect against breakage in non-browser environments if (!isReal()) { return; } - if (vjs) { videojs$1 = vjs; } - - window__default['default'].setTimeout(autoSetup, wait); + window__default["default"].setTimeout(autoSetup, wait); } + /** * Used to set the internal tracking of window loaded state to true. * * @private */ - - function setWindowLoaded() { _windowLoaded = true; - window__default['default'].removeEventListener('load', setWindowLoaded); + window__default["default"].removeEventListener('load', setWindowLoaded); } - if (isReal()) { - if (document__default['default'].readyState === 'complete') { + if (document__default["default"].readyState === 'complete') { setWindowLoaded(); } else { /** @@ -1900,7 +1799,7 @@ if (isReal()) { * * @listens load */ - window__default['default'].addEventListener('load', setWindowLoaded); + window__default["default"].addEventListener('load', setWindowLoaded); } } @@ -1908,6 +1807,7 @@ if (isReal()) { * @file stylesheet.js * @module stylesheet */ + /** * Create a DOM syle element given a className for it. * @@ -1917,12 +1817,12 @@ if (isReal()) { * @return {Element} * The element that was created. */ - -var createStyleElement = function createStyleElement(className) { - var style = document__default['default'].createElement('style'); +const createStyleElement = function (className) { + const style = document__default["default"].createElement('style'); style.className = className; return style; }; + /** * Add text to a DOM element. * @@ -1932,8 +1832,7 @@ var createStyleElement = function createStyleElement(className) { * @param {string} content * The text to add to the element. */ - -var setTextContent = function setTextContent(el, content) { +const setTextContent = function (el, content) { if (el.styleSheet) { el.styleSheet.cssText = content; } else { @@ -1941,91 +1840,11 @@ var setTextContent = function setTextContent(el, content) { } }; -/** - * @file guid.js - * @module guid - */ -// Default value for GUIDs. This allows us to reset the GUID counter in tests. -// -// The initial GUID is 3 because some users have come to rely on the first -// default player ID ending up as `vjs_video_3`. -// -// See: https://github.com/videojs/video.js/pull/6216 -var _initialGuid = 3; -/** - * Unique ID for an element or function - * - * @type {Number} - */ - -var _guid = _initialGuid; -/** - * Get a unique auto-incrementing ID by number that has not been returned before. - * - * @return {number} - * A new unique ID. - */ - -function newGUID() { - return _guid++; -} - /** * @file dom-data.js * @module dom-data */ -var FakeWeakMap; -if (!window__default['default'].WeakMap) { - FakeWeakMap = /*#__PURE__*/function () { - function FakeWeakMap() { - this.vdata = 'vdata' + Math.floor(window__default['default'].performance && window__default['default'].performance.now() || Date.now()); - this.data = {}; - } - - var _proto = FakeWeakMap.prototype; - - _proto.set = function set(key, value) { - var access = key[this.vdata] || newGUID(); - - if (!key[this.vdata]) { - key[this.vdata] = access; - } - - this.data[access] = value; - return this; - }; - - _proto.get = function get(key) { - var access = key[this.vdata]; // we have data, return it - - if (access) { - return this.data[access]; - } // we don't have data, return nothing. - // return undefined explicitly as that's the contract for this method - - - log$1('We have no data for this element', key); - return undefined; - }; - - _proto.has = function has(key) { - var access = key[this.vdata]; - return access in this.data; - }; - - _proto["delete"] = function _delete(key) { - var access = key[this.vdata]; - - if (access) { - delete this.data[access]; - delete key[this.vdata]; - } - }; - - return FakeWeakMap; - }(); -} /** * Element Data Store. * @@ -2036,9 +1855,37 @@ if (!window__default['default'].WeakMap) { * @type {Object} * @private */ +var DomData = new WeakMap(); +/** + * @file guid.js + * @module guid + */ -var DomData = window__default['default'].WeakMap ? new WeakMap() : new FakeWeakMap(); +// Default value for GUIDs. This allows us to reset the GUID counter in tests. +// +// The initial GUID is 3 because some users have come to rely on the first +// default player ID ending up as `vjs_video_3`. +// +// See: https://github.com/videojs/video.js/pull/6216 +const _initialGuid = 3; + +/** + * Unique ID for an element or function + * + * @type {Number} + */ +let _guid = _initialGuid; + +/** + * Get a unique auto-incrementing ID by number that has not been returned before. + * + * @return {number} + * A new unique ID. + */ +function newGUID() { + return _guid++; +} /** * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/) @@ -2049,6 +1896,7 @@ var DomData = window__default['default'].WeakMap ? new WeakMap() : new FakeWeakM * @file events.js * @module events */ + /** * Clean up the listener cache and dispatchers * @@ -2058,38 +1906,39 @@ var DomData = window__default['default'].WeakMap ? new WeakMap() : new FakeWeakM * @param {string} type * Type of event to clean up */ - function _cleanUpEvents(elem, type) { if (!DomData.has(elem)) { return; } + const data = DomData.get(elem); - var data = DomData.get(elem); // Remove the events of a particular type if there are none left - + // Remove the events of a particular type if there are none left if (data.handlers[type].length === 0) { - delete data.handlers[type]; // data.handlers[type] = null; + delete data.handlers[type]; + // data.handlers[type] = null; // Setting to null was causing an error with data.handlers - // Remove the meta-handler from the element + // Remove the meta-handler from the element if (elem.removeEventListener) { elem.removeEventListener(type, data.dispatcher, false); } else if (elem.detachEvent) { elem.detachEvent('on' + type, data.dispatcher); } - } // Remove the events object if there are no types left - + } + // Remove the events object if there are no types left if (Object.getOwnPropertyNames(data.handlers).length <= 0) { delete data.handlers; delete data.dispatcher; delete data.disabled; - } // Finally remove the element data if there is no data left - + } + // Finally remove the element data if there is no data left if (Object.getOwnPropertyNames(data).length === 0) { - DomData["delete"](elem); + DomData.delete(elem); } } + /** * Loops through an array of event types and calls the requested method for each type. * @@ -2102,17 +1951,16 @@ function _cleanUpEvents(elem, type) { * @param {string} type * Type of event to bind to. * - * @param {EventTarget~EventListener} callback + * @param {Function} callback * Event listener. */ - - function _handleMultipleEvents(fn, elem, types, callback) { types.forEach(function (type) { // Call the event method for each one of the types fn(elem, type, callback); }); } + /** * Fix a native event to have standard property values * @@ -2122,35 +1970,31 @@ function _handleMultipleEvents(fn, elem, types, callback) { * @return {Object} * Fixed event object. */ - - function fixEvent(event) { if (event.fixed_) { return event; } - function returnTrue() { return true; } - function returnFalse() { return false; - } // Test if fixing up is needed + } + + // Test if fixing up is needed // Used to check if !event.stopPropagation instead of isPropagationStopped // But native events return true for stopPropagation, but don't have // other expected methods like isPropagationStopped. Seems to be a problem // with the Javascript Ninja code. So we're just overriding all events now. - - if (!event || !event.isPropagationStopped || !event.isImmediatePropagationStopped) { - var old = event || window__default['default'].event; - event = {}; // Clone the old object so that we can modify the values event = {}; + const old = event || window__default["default"].event; + event = {}; + // Clone the old object so that we can modify the values event = {}; // IE8 Doesn't like when you mess with native event properties // Firefox returns false for event.hasOwnProperty('type') and other props // which makes copying more difficult. // TODO: Probably best to create a whitelist of event props - - for (var key in old) { + for (const key in old) { // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation // and webkitMovementX/Y @@ -2162,109 +2006,104 @@ function fixEvent(event) { event[key] = old[key]; } } - } // The event occurred on this element - + } + // The event occurred on this element if (!event.target) { - event.target = event.srcElement || document__default['default']; - } // Handle which other element the event is related to - + event.target = event.srcElement || document__default["default"]; + } + // Handle which other element the event is related to if (!event.relatedTarget) { event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } // Stop the default browser action - + } + // Stop the default browser action event.preventDefault = function () { if (old.preventDefault) { old.preventDefault(); } - event.returnValue = false; old.returnValue = false; event.defaultPrevented = true; }; + event.defaultPrevented = false; - event.defaultPrevented = false; // Stop the event from bubbling - + // Stop the event from bubbling event.stopPropagation = function () { if (old.stopPropagation) { old.stopPropagation(); } - event.cancelBubble = true; old.cancelBubble = true; event.isPropagationStopped = returnTrue; }; + event.isPropagationStopped = returnFalse; - event.isPropagationStopped = returnFalse; // Stop the event from bubbling and executing other handlers - + // Stop the event from bubbling and executing other handlers event.stopImmediatePropagation = function () { if (old.stopImmediatePropagation) { old.stopImmediatePropagation(); } - event.isImmediatePropagationStopped = returnTrue; event.stopPropagation(); }; + event.isImmediatePropagationStopped = returnFalse; - event.isImmediatePropagationStopped = returnFalse; // Handle mouse position - + // Handle mouse position if (event.clientX !== null && event.clientX !== undefined) { - var doc = document__default['default'].documentElement; - var body = document__default['default'].body; + const doc = document__default["default"].documentElement; + const body = document__default["default"].body; event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } // Handle key presses + } + // Handle key presses + event.which = event.charCode || event.keyCode; - event.which = event.charCode || event.keyCode; // Fix button for mouse clicks: + // Fix button for mouse clicks: // 0 == left; 1 == middle; 2 == right - if (event.button !== null && event.button !== undefined) { // The following is disabled because it does not pass videojs-standard // and... yikes. - /* eslint-disable */ event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0; /* eslint-enable */ } } - event.fixed_ = true; // Returns fixed-up instance - + event.fixed_ = true; + // Returns fixed-up instance return event; } + /** * Whether passive event listeners are supported */ - -var _supportsPassive; - -var supportsPassive = function supportsPassive() { +let _supportsPassive; +const supportsPassive = function () { if (typeof _supportsPassive !== 'boolean') { _supportsPassive = false; - try { - var opts = Object.defineProperty({}, 'passive', { - get: function get() { + const opts = Object.defineProperty({}, 'passive', { + get() { _supportsPassive = true; } }); - window__default['default'].addEventListener('test', null, opts); - window__default['default'].removeEventListener('test', null, opts); - } catch (e) {// disregard + window__default["default"].addEventListener('test', null, opts); + window__default["default"].removeEventListener('test', null, opts); + } catch (e) { + // disregard } } - return _supportsPassive; }; + /** * Touch events Chrome expects to be passive */ +const passiveEvents = ['touchstart', 'touchmove']; - -var passiveEvents = ['touchstart', 'touchmove']; /** * Add an event listener to element * It stores the handler function in a separate cache object @@ -2277,51 +2116,41 @@ var passiveEvents = ['touchstart', 'touchmove']; * @param {string|string[]} type * Type of event to bind to. * - * @param {EventTarget~EventListener} fn + * @param {Function} fn * Event listener. */ - function on(elem, type, fn) { if (Array.isArray(type)) { return _handleMultipleEvents(on, elem, type, fn); } - if (!DomData.has(elem)) { DomData.set(elem, {}); } + const data = DomData.get(elem); - var data = DomData.get(elem); // We need a place to store all our handler data - + // We need a place to store all our handler data if (!data.handlers) { data.handlers = {}; } - if (!data.handlers[type]) { data.handlers[type] = []; } - if (!fn.guid) { fn.guid = newGUID(); } - data.handlers[type].push(fn); - if (!data.dispatcher) { data.disabled = false; - data.dispatcher = function (event, hash) { if (data.disabled) { return; } - event = fixEvent(event); - var handlers = data.handlers[event.type]; - + const handlers = data.handlers[event.type]; if (handlers) { // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off. - var handlersCopy = handlers.slice(0); - - for (var m = 0, n = handlersCopy.length; m < n; m++) { + const handlersCopy = handlers.slice(0); + for (let m = 0, n = handlersCopy.length; m < n; m++) { if (event.isImmediatePropagationStopped()) { break; } else { @@ -2335,23 +2164,21 @@ function on(elem, type, fn) { } }; } - if (data.handlers[type].length === 1) { if (elem.addEventListener) { - var options = false; - + let options = false; if (supportsPassive() && passiveEvents.indexOf(type) > -1) { options = { passive: true }; } - elem.addEventListener(type, data.dispatcher, options); } else if (elem.attachEvent) { elem.attachEvent('on' + type, data.dispatcher); } } } + /** * Removes event listeners from an element * @@ -2361,68 +2188,64 @@ function on(elem, type, fn) { * @param {string|string[]} [type] * Type of listener to remove. Don't include to remove all events from element. * - * @param {EventTarget~EventListener} [fn] + * @param {Function} [fn] * Specific listener to remove. Don't include to remove listeners for an event * type. */ - function off(elem, type, fn) { // Don't want to add a cache object through getElData if not needed if (!DomData.has(elem)) { return; } + const data = DomData.get(elem); - var data = DomData.get(elem); // If no events exist, nothing to unbind - + // If no events exist, nothing to unbind if (!data.handlers) { return; } - if (Array.isArray(type)) { return _handleMultipleEvents(off, elem, type, fn); - } // Utility function + } - - var removeType = function removeType(el, t) { + // Utility function + const removeType = function (el, t) { data.handlers[t] = []; - _cleanUpEvents(el, t); - }; // Are we removing all bound events? - + }; + // Are we removing all bound events? if (type === undefined) { - for (var t in data.handlers) { + for (const t in data.handlers) { if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) { removeType(elem, t); } } + return; + } + const handlers = data.handlers[type]; + // If no handlers exist, nothing to unbind + if (!handlers) { return; } - var handlers = data.handlers[type]; // If no handlers exist, nothing to unbind - - if (!handlers) { - return; - } // If no listener was provided, remove all listeners for type - - + // If no listener was provided, remove all listeners for type if (!fn) { removeType(elem, type); return; - } // We're only removing a single handler - + } + // We're only removing a single handler if (fn.guid) { - for (var n = 0; n < handlers.length; n++) { + for (let n = 0; n < handlers.length; n++) { if (handlers[n].guid === fn.guid) { handlers.splice(n--, 1); } } } - _cleanUpEvents(elem, type); } + /** * Trigger an event for an element * @@ -2439,16 +2262,16 @@ function off(elem, type, fn) { * Returns the opposite of `defaultPrevented` if default was * prevented. Otherwise, returns `undefined` */ - function trigger(elem, event, hash) { // Fetches element data and a reference to the parent (for bubbling). // Don't want to add a data object to cache for every parent, // so checking hasElData first. - var elemData = DomData.has(elem) ? DomData.get(elem) : {}; - var parent = elem.parentNode || elem.ownerDocument; // type = event.type || event, + const elemData = DomData.has(elem) ? DomData.get(elem) : {}; + const parent = elem.parentNode || elem.ownerDocument; + // type = event.type || event, // handler; - // If an event name was passed as a string, creates an event out of it + // If an event name was passed as a string, creates an event out of it if (typeof event === 'string') { event = { type: event, @@ -2456,42 +2279,45 @@ function trigger(elem, event, hash) { }; } else if (!event.target) { event.target = elem; - } // Normalizes the event properties. + } + // Normalizes the event properties. + event = fixEvent(event); - event = fixEvent(event); // If the passed element has a dispatcher, executes the established handlers. - + // If the passed element has a dispatcher, executes the established handlers. if (elemData.dispatcher) { elemData.dispatcher.call(elem, event, hash); - } // Unless explicitly stopped or the event does not bubble (e.g. media events) + } + + // Unless explicitly stopped or the event does not bubble (e.g. media events) // recursively calls this function to bubble the event up the DOM. - - if (parent && !event.isPropagationStopped() && event.bubbles === true) { - trigger.call(null, parent, event, hash); // If at the top of the DOM, triggers the default action unless disabled. + trigger.call(null, parent, event, hash); + + // If at the top of the DOM, triggers the default action unless disabled. } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) { if (!DomData.has(event.target)) { DomData.set(event.target, {}); } + const targetData = DomData.get(event.target); - var targetData = DomData.get(event.target); // Checks if the target has a default action for this event. - + // Checks if the target has a default action for this event. if (event.target[event.type]) { // Temporarily disables event dispatching on the target as we have already executed the handler. - targetData.disabled = true; // Executes the default action. - + targetData.disabled = true; + // Executes the default action. if (typeof event.target[event.type] === 'function') { event.target[event.type](); - } // Re-enables event dispatching. - - + } + // Re-enables event dispatching. targetData.disabled = false; } - } // Inform the triggerer if the default was prevented by returning false - + } + // Inform the triggerer if the default was prevented by returning false return !event.defaultPrevented; } + /** * Trigger a listener only once for an event. * @@ -2504,21 +2330,20 @@ function trigger(elem, event, hash) { * @param {Event~EventListener} fn * Event listener function */ - function one(elem, type, fn) { if (Array.isArray(type)) { return _handleMultipleEvents(one, elem, type, fn); } - - var func = function func() { + const func = function () { off(elem, type, func); fn.apply(this, arguments); - }; // copy the guid to the new function so it can removed using the original function's ID - + }; + // copy the guid to the new function so it can removed using the original function's ID func.guid = fn.guid = fn.guid || newGUID(); on(elem, type, func); } + /** * Trigger a listener only once and then turn if off for all * configured events @@ -2532,16 +2357,16 @@ function one(elem, type, fn) { * @param {Event~EventListener} fn * Event listener function */ - function any(elem, type, fn) { - var func = function func() { + const func = function () { off(elem, type, func); fn.apply(this, arguments); - }; // copy the guid to the new function so it can removed using the original function's ID + }; + // copy the guid to the new function so it can removed using the original function's ID + func.guid = fn.guid = fn.guid || newGUID(); - func.guid = fn.guid = fn.guid || newGUID(); // multiple ons, but one off for everything - + // multiple ons, but one off for everything on(elem, type, func); } @@ -2559,16 +2384,17 @@ var Events = /*#__PURE__*/Object.freeze({ * @file fn.js * @module fn */ -var UPDATE_REFRESH_INTERVAL = 30; +const UPDATE_REFRESH_INTERVAL = 30; + /** - * Bind (a.k.a proxy or context). A simple method for changing the context of - * a function. + * A private, internal-only function for changing the context of a function. * * It also stores a unique id on the function so it can be easily removed from * events. * + * @private * @function - * @param {Mixed} context + * @param {*} context * The object to bind as scope. * * @param {Function} fn @@ -2580,24 +2406,25 @@ var UPDATE_REFRESH_INTERVAL = 30; * @return {Function} * The new function that will be bound into the context given */ - -var bind = function bind(context, fn, uid) { +const bind_ = function (context, fn, uid) { // Make sure the function has a unique ID if (!fn.guid) { fn.guid = newGUID(); - } // Create the new function that changes the context + } + // Create the new function that changes the context + const bound = fn.bind(context); - var bound = fn.bind(context); // Allow for the ability to individualize this function + // Allow for the ability to individualize this function // Needed in the case where multiple objects might share the same prototype // IF both items add an event listener with the same function, then you try to remove just one // it will remove both because they both have the same guid. // when using this, you need to use the bind method when you remove the listener as well. // currently used in text tracks - bound.guid = uid ? uid + '_' + fn.guid : fn.guid; return bound; }; + /** * Wraps the given function, `fn`, with a new function that only invokes `fn` * at most once per every `wait` milliseconds. @@ -2611,21 +2438,18 @@ var bind = function bind(context, fn, uid) { * * @return {Function} */ - -var throttle = function throttle(fn, wait) { - var last = window__default['default'].performance.now(); - - var throttled = function throttled() { - var now = window__default['default'].performance.now(); - +const throttle = function (fn, wait) { + let last = window__default["default"].performance.now(); + const throttled = function (...args) { + const now = window__default["default"].performance.now(); if (now - last >= wait) { - fn.apply(void 0, arguments); + fn(...args); last = now; } }; - return throttled; }; + /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was @@ -2652,51 +2476,49 @@ var throttle = function throttle(fn, wait) { * @return {Function} * A debounced function. */ - -var debounce = function debounce(func, wait, immediate, context) { - if (context === void 0) { - context = window__default['default']; - } - - var timeout; - - var cancel = function cancel() { +const debounce = function (func, wait, immediate, context = window__default["default"]) { + let timeout; + const cancel = () => { context.clearTimeout(timeout); timeout = null; }; + /* eslint-disable consistent-this */ - - - var debounced = function debounced() { - var self = this; - var args = arguments; - - var _later = function later() { + const debounced = function () { + const self = this; + const args = arguments; + let later = function () { timeout = null; - _later = null; - + later = null; if (!immediate) { func.apply(self, args); } }; - if (!timeout && immediate) { func.apply(self, args); } - context.clearTimeout(timeout); - timeout = context.setTimeout(_later, wait); + timeout = context.setTimeout(later, wait); }; /* eslint-enable consistent-this */ - debounced.cancel = cancel; return debounced; }; +var Fn = /*#__PURE__*/Object.freeze({ + __proto__: null, + UPDATE_REFRESH_INTERVAL: UPDATE_REFRESH_INTERVAL, + bind_: bind_, + throttle: throttle, + debounce: debounce +}); + /** * @file src/js/event-target.js */ +let EVENT_MAP; + /** * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It * adds shorthand functions that wrap around lengthy functions. For example: @@ -2705,12 +2527,144 @@ var debounce = function debounce(func, wait, immediate, context) { * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget} * @class EventTarget */ +class EventTarget$2 { + /** + * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a + * function that will get called when an event with a certain name gets triggered. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to call with `EventTarget`s + */ + on(type, fn) { + // Remove the addEventListener alias before calling Events.on + // so we don't get into an infinite type loop + const ael = this.addEventListener; + this.addEventListener = () => {}; + on(this, type, fn); + this.addEventListener = ael; + } + /** + * Removes an `event listener` for a specific event from an instance of `EventTarget`. + * This makes it so that the `event listener` will no longer get called when the + * named event happens. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to remove. + */ + off(type, fn) { + off(this, type, fn); + } + /** + * This function will add an `event listener` that gets triggered only once. After the + * first trigger it will get removed. This is like adding an `event listener` + * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to be called once for each event name. + */ + one(type, fn) { + // Remove the addEventListener aliasing Events.on + // so we don't get into an infinite type loop + const ael = this.addEventListener; + this.addEventListener = () => {}; + one(this, type, fn); + this.addEventListener = ael; + } + /** + * This function will add an `event listener` that gets triggered only once and is + * removed from all events. This is like adding an array of `event listener`s + * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the + * first time it is triggered. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to be called once for each event name. + */ + any(type, fn) { + // Remove the addEventListener aliasing Events.on + // so we don't get into an infinite type loop + const ael = this.addEventListener; + this.addEventListener = () => {}; + any(this, type, fn); + this.addEventListener = ael; + } + /** + * This function causes an event to happen. This will then cause any `event listeners` + * that are waiting for that event, to get called. If there are no `event listeners` + * for an event then nothing will happen. + * + * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`. + * Trigger will also call the `on` + `uppercaseEventName` function. + * + * Example: + * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call + * `onClick` if it exists. + * + * @param {string|EventTarget~Event|Object} event + * The name of the event, an `Event`, or an object with a key of type set to + * an event name. + */ + trigger(event) { + const type = event.type || event; + + // deprecation + // In a future version we should default target to `this` + // similar to how we default the target to `elem` in + // `Events.trigger`. Right now the default `target` will be + // `document` due to the `Event.fixEvent` call. + if (typeof event === 'string') { + event = { + type + }; + } + event = fixEvent(event); + if (this.allowedEvents_[type] && this['on' + type]) { + this['on' + type](event); + } + trigger(this, event); + } + queueTrigger(event) { + // only set up EVENT_MAP if it'll be used + if (!EVENT_MAP) { + EVENT_MAP = new Map(); + } + const type = event.type || event; + let map = EVENT_MAP.get(this); + if (!map) { + map = new Map(); + EVENT_MAP.set(this, map); + } + const oldTimeout = map.get(type); + map.delete(type); + window__default["default"].clearTimeout(oldTimeout); + const timeout = window__default["default"].setTimeout(() => { + map.delete(type); + // if we cleared out all timeouts for the current target, delete its map + if (map.size === 0) { + map = null; + EVENT_MAP.delete(this); + } + this.trigger(event); + }, 0); + map.set(type, timeout); + } +} -var EventTarget$2 = function EventTarget() {}; /** * A Custom DOM event. * - * @typedef {Object} EventTarget~Event + * @typedef {CustomEvent} Event * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent} */ @@ -2720,7 +2674,7 @@ var EventTarget$2 = function EventTarget() {}; * @callback EventTarget~EventListener * @this {EventTarget} * - * @param {EventTarget~Event} event + * @param {Event} event * the event that triggered this function * * @param {Object} [hash] @@ -2736,30 +2690,8 @@ var EventTarget$2 = function EventTarget() {}; * @property EventTarget.prototype.allowedEvents_ * @private */ - - EventTarget$2.prototype.allowedEvents_ = {}; -/** - * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a - * function that will get called when an event with a certain name gets triggered. - * - * @param {string|string[]} type - * An event name or an array of event names. - * - * @param {EventTarget~EventListener} fn - * The function to call with `EventTarget`s - */ -EventTarget$2.prototype.on = function (type, fn) { - // Remove the addEventListener alias before calling Events.on - // so we don't get into an infinite type loop - var ael = this.addEventListener; - - this.addEventListener = function () {}; - - on(this, type, fn); - this.addEventListener = ael; -}; /** * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic * the standard DOM API. @@ -2767,24 +2699,8 @@ EventTarget$2.prototype.on = function (type, fn) { * @function * @see {@link EventTarget#on} */ - - EventTarget$2.prototype.addEventListener = EventTarget$2.prototype.on; -/** - * Removes an `event listener` for a specific event from an instance of `EventTarget`. - * This makes it so that the `event listener` will no longer get called when the - * named event happens. - * - * @param {string|string[]} type - * An event name or an array of event names. - * - * @param {EventTarget~EventListener} fn - * The function to remove. - */ -EventTarget$2.prototype.off = function (type, fn) { - off(this, type, fn); -}; /** * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic * the standard DOM API. @@ -2792,81 +2708,8 @@ EventTarget$2.prototype.off = function (type, fn) { * @function * @see {@link EventTarget#off} */ - - EventTarget$2.prototype.removeEventListener = EventTarget$2.prototype.off; -/** - * This function will add an `event listener` that gets triggered only once. After the - * first trigger it will get removed. This is like adding an `event listener` - * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself. - * - * @param {string|string[]} type - * An event name or an array of event names. - * - * @param {EventTarget~EventListener} fn - * The function to be called once for each event name. - */ -EventTarget$2.prototype.one = function (type, fn) { - // Remove the addEventListener aliasing Events.on - // so we don't get into an infinite type loop - var ael = this.addEventListener; - - this.addEventListener = function () {}; - - one(this, type, fn); - this.addEventListener = ael; -}; - -EventTarget$2.prototype.any = function (type, fn) { - // Remove the addEventListener aliasing Events.on - // so we don't get into an infinite type loop - var ael = this.addEventListener; - - this.addEventListener = function () {}; - - any(this, type, fn); - this.addEventListener = ael; -}; -/** - * This function causes an event to happen. This will then cause any `event listeners` - * that are waiting for that event, to get called. If there are no `event listeners` - * for an event then nothing will happen. - * - * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`. - * Trigger will also call the `on` + `uppercaseEventName` function. - * - * Example: - * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call - * `onClick` if it exists. - * - * @param {string|EventTarget~Event|Object} event - * The name of the event, an `Event`, or an object with a key of type set to - * an event name. - */ - - -EventTarget$2.prototype.trigger = function (event) { - var type = event.type || event; // deprecation - // In a future version we should default target to `this` - // similar to how we default the target to `elem` in - // `Events.trigger`. Right now the default `target` will be - // `document` due to the `Event.fixEvent` call. - - if (typeof event === 'string') { - event = { - type: type - }; - } - - event = fixEvent(event); - - if (this.allowedEvents_[type] && this['on' + type]) { - this['on' + type](event); - } - - trigger(this, event); -}; /** * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic * the standard DOM API. @@ -2874,66 +2717,28 @@ EventTarget$2.prototype.trigger = function (event) { * @function * @see {@link EventTarget#trigger} */ - - EventTarget$2.prototype.dispatchEvent = EventTarget$2.prototype.trigger; -var EVENT_MAP; - -EventTarget$2.prototype.queueTrigger = function (event) { - var _this = this; - - // only set up EVENT_MAP if it'll be used - if (!EVENT_MAP) { - EVENT_MAP = new Map(); - } - - var type = event.type || event; - var map = EVENT_MAP.get(this); - - if (!map) { - map = new Map(); - EVENT_MAP.set(this, map); - } - - var oldTimeout = map.get(type); - map["delete"](type); - window__default['default'].clearTimeout(oldTimeout); - var timeout = window__default['default'].setTimeout(function () { - // if we cleared out all timeouts for the current target, delete its map - if (map.size === 0) { - map = null; - EVENT_MAP["delete"](_this); - } - - _this.trigger(event); - }, 0); - map.set(type, timeout); -}; /** * @file mixins/evented.js * @module evented */ - -var objName = function objName(obj) { +const objName = obj => { if (typeof obj.name === 'function') { return obj.name(); } - if (typeof obj.name === 'string') { return obj.name; } - if (obj.name_) { return obj.name_; } - if (obj.constructor && obj.constructor.name) { return obj.constructor.name; } - return typeof obj; }; + /** * Returns whether or not an object has had the evented mixin applied. * @@ -2943,13 +2748,8 @@ var objName = function objName(obj) { * @return {boolean} * Whether or not the object appears to be evented. */ +const isEvented = object => object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(k => typeof object[k] === 'function'); - -var isEvented = function isEvented(object) { - return object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(function (k) { - return typeof object[k] === 'function'; - }); -}; /** * Adds a callback to run after the evented mixin applied. * @@ -2958,19 +2758,17 @@ var isEvented = function isEvented(object) { * @param {Function} callback * The callback to run. */ - - -var addEventedCallback = function addEventedCallback(target, callback) { +const addEventedCallback = (target, callback) => { if (isEvented(target)) { callback(); } else { if (!target.eventedCallbacks) { target.eventedCallbacks = []; } - target.eventedCallbacks.push(callback); } }; + /** * Whether a value is a valid event type - non-empty string or array. * @@ -2981,14 +2779,11 @@ var addEventedCallback = function addEventedCallback(target, callback) { * @return {boolean} * Whether or not the type is a valid event type. */ +const isValidEventType = type => +// The regex here verifies that the `type` contains at least one non- +// whitespace character. +typeof type === 'string' && /\S/.test(type) || Array.isArray(type) && !!type.length; - -var isValidEventType = function isValidEventType(type) { - return (// The regex here verifies that the `type` contains at least one non- - // whitespace character. - typeof type === 'string' && /\S/.test(type) || Array.isArray(type) && !!type.length - ); -}; /** * Validates a value to determine if it is a valid event target. Throws if not. * @@ -3005,13 +2800,12 @@ var isValidEventType = function isValidEventType(type) { * @param {string} fnName * The name of the evented mixin function that called this. */ - - -var validateTarget = function validateTarget(target, obj, fnName) { +const validateTarget = (target, obj, fnName) => { if (!target || !target.nodeName && !isEvented(target)) { - throw new Error("Invalid target for " + objName(obj) + "#" + fnName + "; must be a DOM node or evented object."); + throw new Error(`Invalid target for ${objName(obj)}#${fnName}; must be a DOM node or evented object.`); } }; + /** * Validates a value to determine if it is a valid event target. Throws if not. * @@ -3028,13 +2822,12 @@ var validateTarget = function validateTarget(target, obj, fnName) { * @param {string} fnName * The name of the evented mixin function that called this. */ - - -var validateEventType = function validateEventType(type, obj, fnName) { +const validateEventType = (type, obj, fnName) => { if (!isValidEventType(type)) { - throw new Error("Invalid event type for " + objName(obj) + "#" + fnName + "; must be a non-empty string or array."); + throw new Error(`Invalid event type for ${objName(obj)}#${fnName}; must be a non-empty string or array.`); } }; + /** * Validates a value to determine if it is a valid listener. Throws if not. * @@ -3051,13 +2844,12 @@ var validateEventType = function validateEventType(type, obj, fnName) { * @param {string} fnName * The name of the evented mixin function that called this. */ - - -var validateListener = function validateListener(listener, obj, fnName) { +const validateListener = (listener, obj, fnName) => { if (typeof listener !== 'function') { - throw new Error("Invalid listener for " + objName(obj) + "#" + fnName + "; must be a function."); + throw new Error(`Invalid listener for ${objName(obj)}#${fnName}; must be a function.`); } }; + /** * Takes an array of arguments given to `on()` or `one()`, validates them, and * normalizes them into an object. @@ -3076,43 +2868,37 @@ var validateListener = function validateListener(listener, obj, fnName) { * @return {Object} * An object containing useful values for `on()` or `one()` calls. */ - - -var normalizeListenArgs = function normalizeListenArgs(self, args, fnName) { +const normalizeListenArgs = (self, args, fnName) => { // If the number of arguments is less than 3, the target is always the // evented object itself. - var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_; - var target; - var type; - var listener; - + const isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_; + let target; + let type; + let listener; if (isTargetingSelf) { - target = self.eventBusEl_; // Deal with cases where we got 3 arguments, but we are still listening to - // the evented object itself. + target = self.eventBusEl_; + // Deal with cases where we got 3 arguments, but we are still listening to + // the evented object itself. if (args.length >= 3) { args.shift(); } - - type = args[0]; - listener = args[1]; + [type, listener] = args; } else { - target = args[0]; - type = args[1]; - listener = args[2]; + [target, type, listener] = args; } - validateTarget(target, self, fnName); validateEventType(type, self, fnName); validateListener(listener, self, fnName); - listener = bind(self, listener); + listener = bind_(self, listener); return { - isTargetingSelf: isTargetingSelf, - target: target, - type: type, - listener: listener + isTargetingSelf, + target, + type, + listener }; }; + /** * Adds the listener to the event type(s) on the target, normalizing for * the type of target. @@ -3130,26 +2916,22 @@ var normalizeListenArgs = function normalizeListenArgs(self, args, fnName) { * @param {Function} listener * A listener function. */ - - -var listen = function listen(target, method, type, listener) { +const listen = (target, method, type, listener) => { validateTarget(target, target, method); - if (target.nodeName) { Events[method](target, type, listener); } else { target[method](type, listener); } }; + /** * Contains methods that provide event capabilities to an object which is passed * to {@link module:evented|evented}. * * @mixin EventedMixin */ - - -var EventedMixin = { +const EventedMixin = { /** * Add a listener to an event (or events) on this object or another evented * object. @@ -3173,45 +2955,36 @@ var EventedMixin = { * If the first argument was another evented object, this will be * the listener function. */ - on: function on() { - var _this = this; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _normalizeListenArgs = normalizeListenArgs(this, args, 'on'), - isTargetingSelf = _normalizeListenArgs.isTargetingSelf, - target = _normalizeListenArgs.target, - type = _normalizeListenArgs.type, - listener = _normalizeListenArgs.listener; - - listen(target, 'on', type, listener); // If this object is listening to another evented object. + on(...args) { + const { + isTargetingSelf, + target, + type, + listener + } = normalizeListenArgs(this, args, 'on'); + listen(target, 'on', type, listener); + // If this object is listening to another evented object. if (!isTargetingSelf) { // If this object is disposed, remove the listener. - var removeListenerOnDispose = function removeListenerOnDispose() { - return _this.off(target, type, listener); - }; // Use the same function ID as the listener so we can remove it later it + const removeListenerOnDispose = () => this.off(target, type, listener); + + // Use the same function ID as the listener so we can remove it later it // using the ID of the original listener. + removeListenerOnDispose.guid = listener.guid; - - removeListenerOnDispose.guid = listener.guid; // Add a listener to the target's dispose event as well. This ensures + // Add a listener to the target's dispose event as well. This ensures // that if the target is disposed BEFORE this object, we remove the // removal listener that was just added. Otherwise, we create a memory leak. + const removeRemoverOnTargetDispose = () => this.off('dispose', removeListenerOnDispose); - var removeRemoverOnTargetDispose = function removeRemoverOnTargetDispose() { - return _this.off('dispose', removeListenerOnDispose); - }; // Use the same function ID as the listener so we can remove it later + // Use the same function ID as the listener so we can remove it later // it using the ID of the original listener. - - removeRemoverOnTargetDispose.guid = listener.guid; listen(this, 'on', 'dispose', removeListenerOnDispose); listen(target, 'on', 'dispose', removeRemoverOnTargetDispose); } }, - /** * Add a listener to an event (or events) on this object or another evented * object. The listener will be called once per event and then removed. @@ -3235,44 +3008,35 @@ var EventedMixin = { * If the first argument was another evented object, this will be * the listener function. */ - one: function one() { - var _this2 = this; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - var _normalizeListenArgs2 = normalizeListenArgs(this, args, 'one'), - isTargetingSelf = _normalizeListenArgs2.isTargetingSelf, - target = _normalizeListenArgs2.target, - type = _normalizeListenArgs2.type, - listener = _normalizeListenArgs2.listener; // Targeting this evented object. - + one(...args) { + const { + isTargetingSelf, + target, + type, + listener + } = normalizeListenArgs(this, args, 'one'); + // Targeting this evented object. if (isTargetingSelf) { - listen(target, 'one', type, listener); // Targeting another evented object. + listen(target, 'one', type, listener); + + // Targeting another evented object. } else { // TODO: This wrapper is incorrect! It should only // remove the wrapper for the event type that called it. // Instead all listners are removed on the first trigger! // see https://github.com/videojs/video.js/issues/5962 - var wrapper = function wrapper() { - _this2.off(target, type, wrapper); - - for (var _len3 = arguments.length, largs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - largs[_key3] = arguments[_key3]; - } - + const wrapper = (...largs) => { + this.off(target, type, wrapper); listener.apply(null, largs); - }; // Use the same function ID as the listener so we can remove it later + }; + + // Use the same function ID as the listener so we can remove it later // it using the ID of the original listener. - - wrapper.guid = listener.guid; listen(target, 'one', type, wrapper); } }, - /** * Add a listener to an event (or events) on this object or another evented * object. The listener will only be called once for the first event that is triggered @@ -3297,40 +3061,31 @@ var EventedMixin = { * If the first argument was another evented object, this will be * the listener function. */ - any: function any() { - var _this3 = this; - - for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - var _normalizeListenArgs3 = normalizeListenArgs(this, args, 'any'), - isTargetingSelf = _normalizeListenArgs3.isTargetingSelf, - target = _normalizeListenArgs3.target, - type = _normalizeListenArgs3.type, - listener = _normalizeListenArgs3.listener; // Targeting this evented object. - + any(...args) { + const { + isTargetingSelf, + target, + type, + listener + } = normalizeListenArgs(this, args, 'any'); + // Targeting this evented object. if (isTargetingSelf) { - listen(target, 'any', type, listener); // Targeting another evented object. + listen(target, 'any', type, listener); + + // Targeting another evented object. } else { - var wrapper = function wrapper() { - _this3.off(target, type, wrapper); - - for (var _len5 = arguments.length, largs = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - largs[_key5] = arguments[_key5]; - } - + const wrapper = (...largs) => { + this.off(target, type, wrapper); listener.apply(null, largs); - }; // Use the same function ID as the listener so we can remove it later + }; + + // Use the same function ID as the listener so we can remove it later // it using the ID of the original listener. - - wrapper.guid = listener.guid; listen(target, 'any', type, wrapper); } }, - /** * Removes listener(s) from event(s) on an evented object. * @@ -3350,23 +3105,27 @@ var EventedMixin = { * the listener function; otherwise, _all_ listeners bound to the * event type(s) will be removed. */ - off: function off$1(targetOrType, typeOrListener, listener) { + off(targetOrType, typeOrListener, listener) { // Targeting this evented object. if (!targetOrType || isValidEventType(targetOrType)) { - off(this.eventBusEl_, targetOrType, typeOrListener); // Targeting another evented object. - } else { - var target = targetOrType; - var type = typeOrListener; // Fail fast and in a meaningful way! + off(this.eventBusEl_, targetOrType, typeOrListener); + // Targeting another evented object. + } else { + const target = targetOrType; + const type = typeOrListener; + + // Fail fast and in a meaningful way! validateTarget(target, this, 'off'); validateEventType(type, this, 'off'); - validateListener(listener, this, 'off'); // Ensure there's at least a guid, even if the function hasn't been used + validateListener(listener, this, 'off'); - listener = bind(this, listener); // Remove the dispose listener on this evented object, which was given + // Ensure there's at least a guid, even if the function hasn't been used + listener = bind_(this, listener); + + // Remove the dispose listener on this evented object, which was given // the same guid as the event listener in on(). - this.off('dispose', listener); - if (target.nodeName) { off(target, type, listener); off(target, 'dispose', listener); @@ -3376,7 +3135,6 @@ var EventedMixin = { } } }, - /** * Fire an event on this evented object, causing its listeners to be called. * @@ -3389,23 +3147,16 @@ var EventedMixin = { * @return {boolean} * Whether or not the default behavior was prevented. */ - trigger: function trigger$1(event, hash) { + trigger(event, hash) { validateTarget(this.eventBusEl_, this, 'trigger'); - var type = event && typeof event !== 'string' ? event.type : event; - + const type = event && typeof event !== 'string' ? event.type : event; if (!isValidEventType(type)) { - var error = "Invalid event type for " + objName(this) + "#trigger; " + 'must be a non-empty string or object with a type key that has a non-empty value.'; - - if (event) { - (this.log || log$1).error(error); - } else { - throw new Error(error); - } + throw new Error(`Invalid event type for ${objName(this)}#trigger; ` + 'must be a non-empty string or object with a type key that has a non-empty value.'); } - return trigger(this.eventBusEl_, event, hash); } }; + /** * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object. * @@ -3423,44 +3174,38 @@ var EventedMixin = { * @return {Object} * The target object. */ +function evented(target, options = {}) { + const { + eventBusKey + } = options; -function evented(target, options) { - if (options === void 0) { - options = {}; - } - - var _options = options, - eventBusKey = _options.eventBusKey; // Set or create the eventBusEl_. - + // Set or create the eventBusEl_. if (eventBusKey) { if (!target[eventBusKey].nodeName) { - throw new Error("The eventBusKey \"" + eventBusKey + "\" does not refer to an element."); + throw new Error(`The eventBusKey "${eventBusKey}" does not refer to an element.`); } - target.eventBusEl_ = target[eventBusKey]; } else { target.eventBusEl_ = createEl('span', { className: 'vjs-event-bus' }); } - - assign(target, EventedMixin); - + Object.assign(target, EventedMixin); if (target.eventedCallbacks) { - target.eventedCallbacks.forEach(function (callback) { + target.eventedCallbacks.forEach(callback => { callback(); }); - } // When any evented object is disposed, it removes all its listeners. + } - - target.on('dispose', function () { + // When any evented object is disposed, it removes all its listeners. + target.on('dispose', () => { target.off(); [target, target.el_, target.eventBusEl_].forEach(function (val) { if (val && DomData.has(val)) { - DomData["delete"](val); + DomData.delete(val); } }); - window__default['default'].setTimeout(function () { + window__default["default"].setTimeout(() => { target.eventBusEl_ = null; }, 0); }); @@ -3471,14 +3216,14 @@ function evented(target, options) { * @file mixins/stateful.js * @module stateful */ + /** * Contains methods that provide statefulness to an object which is passed * to {@link module:stateful}. * * @mixin StatefulMixin */ - -var StatefulMixin = { +const StatefulMixin = { /** * A hash containing arbitrary keys and values representing the state of * the object. @@ -3486,7 +3231,6 @@ var StatefulMixin = { * @type {Object} */ state: {}, - /** * Set the state of an object by mutating its * {@link module:stateful~StatefulMixin.state|state} object in place. @@ -3500,31 +3244,28 @@ var StatefulMixin = { * An object containing changes that occurred. If no changes * occurred, returns `undefined`. */ - setState: function setState(stateUpdates) { - var _this = this; - + setState(stateUpdates) { // Support providing the `stateUpdates` state as a function. if (typeof stateUpdates === 'function') { stateUpdates = stateUpdates(); } - - var changes; - each(stateUpdates, function (value, key) { + let changes; + each(stateUpdates, (value, key) => { // Record the change if the value is different from what's in the // current state. - if (_this.state[key] !== value) { + if (this.state[key] !== value) { changes = changes || {}; changes[key] = { - from: _this.state[key], + from: this.state[key], to: value }; } + this.state[key] = value; + }); - _this.state[key] = value; - }); // Only trigger "statechange" if there were changes AND we have a trigger + // Only trigger "statechange" if there were changes AND we have a trigger // function. This allows us to not require that the target object be an // evented object. - if (changes && isEvented(this)) { /** * An event triggered on an object that is both @@ -3538,14 +3279,14 @@ var StatefulMixin = { * the values they were changed `from` and `to`. */ this.trigger({ - changes: changes, + changes, type: 'statechanged' }); } - return changes; } }; + /** * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target * object. @@ -3564,22 +3305,22 @@ var StatefulMixin = { * @return {Object} * Returns the `target`. */ - function stateful(target, defaultState) { - assign(target, StatefulMixin); // This happens after the mixing-in because we need to replace the `state` + Object.assign(target, StatefulMixin); + + // This happens after the mixing-in because we need to replace the `state` // added in that step. + target.state = Object.assign({}, target.state, defaultState); - target.state = assign({}, target.state, defaultState); // Auto-bind the `handleStateChanged` method of the target object if it exists. - + // Auto-bind the `handleStateChanged` method of the target object if it exists. if (typeof target.handleStateChanged === 'function' && isEvented(target)) { target.on('statechanged', target.handleStateChanged); } - return target; } /** - * @file string-cases.js + * @file str.js * @module to-lower-case */ @@ -3592,15 +3333,13 @@ function stateful(target, defaultState) { * @return {string} * The string with a lowercased first letter */ -var toLowerCase = function toLowerCase(string) { +const toLowerCase = function (string) { if (typeof string !== 'string') { return string; } - - return string.replace(/./, function (w) { - return w.toLowerCase(); - }); + return string.replace(/./, w => w.toLowerCase()); }; + /** * Uppercase the first letter of a string. * @@ -3610,16 +3349,13 @@ var toLowerCase = function toLowerCase(string) { * @return {string} * The string with an uppercased first letter */ - -var toTitleCase$1 = function toTitleCase(string) { +const toTitleCase$1 = function (string) { if (typeof string !== 'string') { return string; } - - return string.replace(/./, function (w) { - return w.toUpperCase(); - }); + return string.replace(/./, w => w.toUpperCase()); }; + /** * Compares the TitleCase versions of the two strings for equality. * @@ -3632,132 +3368,28 @@ var toTitleCase$1 = function toTitleCase(string) { * @return {boolean} * Whether the TitleCase versions of the strings are equal */ - -var titleCaseEquals = function titleCaseEquals(str1, str2) { +const titleCaseEquals = function (str1, str2) { return toTitleCase$1(str1) === toTitleCase$1(str2); }; -/** - * @file merge-options.js - * @module merge-options - */ -/** - * Merge two objects recursively. - * - * Performs a deep merge like - * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges - * plain objects (not arrays, elements, or anything else). - * - * Non-plain object values will be copied directly from the right-most - * argument. - * - * @static - * @param {Object[]} sources - * One or more objects to merge into a new object. - * - * @return {Object} - * A new object that is the merged result of all sources. - */ - -function mergeOptions$3() { - var result = {}; - - for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - sources.forEach(function (source) { - if (!source) { - return; - } - - each(source, function (value, key) { - if (!isPlain(value)) { - result[key] = value; - return; - } - - if (!isPlain(result[key])) { - result[key] = {}; - } - - result[key] = mergeOptions$3(result[key], value); - }); - }); - return result; -} - -var MapSham = /*#__PURE__*/function () { - function MapSham() { - this.map_ = {}; - } - - var _proto = MapSham.prototype; - - _proto.has = function has(key) { - return key in this.map_; - }; - - _proto["delete"] = function _delete(key) { - var has = this.has(key); - delete this.map_[key]; - return has; - }; - - _proto.set = function set(key, value) { - this.map_[key] = value; - return this; - }; - - _proto.forEach = function forEach(callback, thisArg) { - for (var key in this.map_) { - callback.call(thisArg, this.map_[key], key, this); - } - }; - - return MapSham; -}(); - -var Map$1 = window__default['default'].Map ? window__default['default'].Map : MapSham; - -var SetSham = /*#__PURE__*/function () { - function SetSham() { - this.set_ = {}; - } - - var _proto = SetSham.prototype; - - _proto.has = function has(key) { - return key in this.set_; - }; - - _proto["delete"] = function _delete(key) { - var has = this.has(key); - delete this.set_[key]; - return has; - }; - - _proto.add = function add(key) { - this.set_[key] = 1; - return this; - }; - - _proto.forEach = function forEach(callback, thisArg) { - for (var key in this.set_) { - callback.call(thisArg, key, key, this); - } - }; - - return SetSham; -}(); - -var Set$1 = window__default['default'].Set ? window__default['default'].Set : SetSham; +var Str = /*#__PURE__*/Object.freeze({ + __proto__: null, + toLowerCase: toLowerCase, + toTitleCase: toTitleCase$1, + titleCaseEquals: titleCaseEquals +}); /** * Player Component - Base class for all UI objects * * @file component.js */ + +/** + * @typedef { import('./player').default } Player + * @typedef { import('./event-target').Event} Event +*/ + /** * Base class for all UI Components. * Components are UI objects which represent both a javascript object and an element @@ -3766,13 +3398,12 @@ var Set$1 = window__default['default'].Set ? window__default['default'].Set : Se * * Components can also use methods from {@link EventTarget} */ - -var Component$1 = /*#__PURE__*/function () { +class Component$1 { /** * A callback that is called when a component is ready. Does not have any - * paramters and any callback value will be ignored. + * parameters and any callback value will be ignored. * - * @callback Component~ReadyCallback + * @callback ReadyCallback * @this Component */ @@ -3793,50 +3424,55 @@ var Component$1 = /*#__PURE__*/function () { * @param {string} [options.className] * A class or space separated list of classes to add the component * - * @param {Component~ReadyCallback} [ready] + * @param {ReadyCallback} [ready] * Function that gets called when the `Component` is ready. */ - function Component(player, options, ready) { - var _this = this; - + constructor(player, options, ready) { // The component might be the player itself and we can't pass `this` to super if (!player && this.play) { this.player_ = player = this; // eslint-disable-line } else { this.player_ = player; } + this.isDisposed_ = false; - this.isDisposed_ = false; // Hold the reference to the parent component via `addChild` method + // Hold the reference to the parent component via `addChild` method + this.parentComponent_ = null; - this.parentComponent_ = null; // Make a copy of prototype.options_ to protect against overriding defaults + // Make a copy of prototype.options_ to protect against overriding defaults + this.options_ = merge$1({}, this.options_); - this.options_ = mergeOptions$3({}, this.options_); // Updated options with supplied options + // Updated options with supplied options + options = this.options_ = merge$1(this.options_, options); - options = this.options_ = mergeOptions$3(this.options_, options); // Get ID from options or options element if one is supplied - - this.id_ = options.id || options.el && options.el.id; // If there was no ID from the options, generate one + // Get ID from options or options element if one is supplied + this.id_ = options.id || options.el && options.el.id; + // If there was no ID from the options, generate one if (!this.id_) { // Don't require the player ID function in the case of mock players - var id = player && player.id && player.id() || 'no_player'; - this.id_ = id + "_component_" + newGUID(); + const id = player && player.id && player.id() || 'no_player'; + this.id_ = `${id}_component_${newGUID()}`; } + this.name_ = options.name || null; - this.name_ = options.name || null; // Create element if one wasn't provided in options - + // Create element if one wasn't provided in options if (options.el) { this.el_ = options.el; } else if (options.createEl !== false) { this.el_ = this.createEl(); } - if (options.className && this.el_) { - options.className.split(' ').forEach(function (c) { - return _this.addClass(c); - }); - } // if evented is anything except false, we want to mixin in evented + options.className.split(' ').forEach(c => this.addClass(c)); + } + // Remove the placeholder event methods. If the component is evented, the + // real methods are added next + ['on', 'off', 'one', 'any', 'trigger'].forEach(fn => { + this[fn] = undefined; + }); + // if evented is anything except false, we want to mixin in evented if (options.evented !== false) { // Make this an evented object and use `el_`, if available, as its event bus evented(this, { @@ -3845,29 +3481,102 @@ var Component$1 = /*#__PURE__*/function () { this.handleLanguagechange = this.handleLanguagechange.bind(this); this.on(this.player_, 'languagechange', this.handleLanguagechange); } - stateful(this, this.constructor.defaultState); this.children_ = []; this.childIndex_ = {}; this.childNameIndex_ = {}; - this.setTimeoutIds_ = new Set$1(); - this.setIntervalIds_ = new Set$1(); - this.rafIds_ = new Set$1(); - this.namedRafs_ = new Map$1(); - this.clearingTimersOnDispose_ = false; // Add any child components in options + this.setTimeoutIds_ = new Set(); + this.setIntervalIds_ = new Set(); + this.rafIds_ = new Set(); + this.namedRafs_ = new Map(); + this.clearingTimersOnDispose_ = false; + // Add any child components in options if (options.initChildren !== false) { this.initChildren(); - } // Don't want to trigger ready here or it will go before init is actually + } + + // Don't want to trigger ready here or it will go before init is actually // finished for all children that run this constructor - - this.ready(ready); - if (options.reportTouchActivity !== false) { this.enableTouchActivity(); } } + + // `on`, `off`, `one`, `any` and `trigger` are here so tsc includes them in definitions. + // They are replaced or removed in the constructor + + /** + * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a + * function that will get called when an event with a certain name gets triggered. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to call with `EventTarget`s + */ + on(type, fn) {} + + /** + * Removes an `event listener` for a specific event from an instance of `EventTarget`. + * This makes it so that the `event listener` will no longer get called when the + * named event happens. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to remove. + */ + off(type, fn) {} + + /** + * This function will add an `event listener` that gets triggered only once. After the + * first trigger it will get removed. This is like adding an `event listener` + * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to be called once for each event name. + */ + one(type, fn) {} + + /** + * This function will add an `event listener` that gets triggered only once and is + * removed from all events. This is like adding an array of `event listener`s + * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the + * first time it is triggered. + * + * @param {string|string[]} type + * An event name or an array of event names. + * + * @param {Function} fn + * The function to be called once for each event name. + */ + any(type, fn) {} + + /** + * This function causes an event to happen. This will then cause any `event listeners` + * that are waiting for that event, to get called. If there are no `event listeners` + * for an event then nothing will happen. + * + * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`. + * Trigger will also call the `on` + `uppercaseEventName` function. + * + * Example: + * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call + * `onClick` if it exists. + * + * @param {string|Event|Object} event + * The name of the event, an `Event`, or an object with a key of type set to + * an event name. + */ + trigger(event) {} + /** * Dispose of the `Component` and all child components. * @@ -3876,55 +3585,45 @@ var Component$1 = /*#__PURE__*/function () { * @param {Object} options * @param {Element} options.originalEl element with which to replace player element */ - - - var _proto = Component.prototype; - - _proto.dispose = function dispose(options) { - if (options === void 0) { - options = {}; - } - + dispose(options = {}) { // Bail out if the component has already been disposed. if (this.isDisposed_) { return; } - if (this.readyQueue_) { this.readyQueue_.length = 0; } + /** * Triggered when a `Component` is disposed. * * @event Component#dispose - * @type {EventTarget~Event} + * @type {Event} * * @property {boolean} [bubbles=false] * set to false so that the dispose event does not * bubble up */ - - this.trigger({ type: 'dispose', bubbles: false }); - this.isDisposed_ = true; // Dispose all children. + this.isDisposed_ = true; + // Dispose all children. if (this.children_) { - for (var i = this.children_.length - 1; i >= 0; i--) { + for (let i = this.children_.length - 1; i >= 0; i--) { if (this.children_[i].dispose) { this.children_[i].dispose(); } } - } // Delete child references - + } + // Delete child references this.children_ = null; this.childIndex_ = null; this.childNameIndex_ = null; this.parentComponent_ = null; - if (this.el_) { // Remove element from DOM if (this.el_.parentNode) { @@ -3934,39 +3633,37 @@ var Component$1 = /*#__PURE__*/function () { this.el_.parentNode.removeChild(this.el_); } } - this.el_ = null; - } // remove reference to the player after disposing of the element - + } + // remove reference to the player after disposing of the element this.player_ = null; } + /** * Determine whether or not this component has been disposed. * * @return {boolean} * If the component has been disposed, will be `true`. Otherwise, `false`. */ - ; - - _proto.isDisposed = function isDisposed() { + isDisposed() { return Boolean(this.isDisposed_); } + /** * Return the {@link Player} that the `Component` has attached to. * * @return {Player} * The player that this `Component` has attached to. */ - ; - - _proto.player = function player() { + player() { return this.player_; } + /** * Deep merge of options objects with new options. * > Note: When both `obj` and `options` contain properties whose values are objects. - * The two properties get merged using {@link module:mergeOptions} + * The two properties get merged using {@link module:obj.merge} * * @param {Object} obj * The object that contains new options. @@ -3974,27 +3671,24 @@ var Component$1 = /*#__PURE__*/function () { * @return {Object} * A new object of `this.options_` and `obj` merged together. */ - ; - - _proto.options = function options(obj) { + options(obj) { if (!obj) { return this.options_; } - - this.options_ = mergeOptions$3(this.options_, obj); + this.options_ = merge$1(this.options_, obj); return this.options_; } + /** * Get the `Component`s DOM element * * @return {Element} * The DOM element for this `Component`. */ - ; - - _proto.el = function el() { + el() { return this.el_; } + /** * Create the `Component`s DOM element. * @@ -4010,11 +3704,10 @@ var Component$1 = /*#__PURE__*/function () { * @return {Element} * The element that gets created. */ - ; - - _proto.createEl = function createEl$1(tagName, properties, attributes) { + createEl(tagName, properties, attributes) { return createEl(tagName, properties, attributes); } + /** * Localize a string given the string in english. * @@ -4053,49 +3746,38 @@ var Component$1 = /*#__PURE__*/function () { * @return {string} * The localized string or if no localization exists the english string. */ - ; - - _proto.localize = function localize(string, tokens, defaultValue) { - if (defaultValue === void 0) { - defaultValue = string; - } - - var code = this.player_.language && this.player_.language(); - var languages = this.player_.languages && this.player_.languages(); - var language = languages && languages[code]; - var primaryCode = code && code.split('-')[0]; - var primaryLang = languages && languages[primaryCode]; - var localizedString = defaultValue; - + localize(string, tokens, defaultValue = string) { + const code = this.player_.language && this.player_.language(); + const languages = this.player_.languages && this.player_.languages(); + const language = languages && languages[code]; + const primaryCode = code && code.split('-')[0]; + const primaryLang = languages && languages[primaryCode]; + let localizedString = defaultValue; if (language && language[string]) { localizedString = language[string]; } else if (primaryLang && primaryLang[string]) { localizedString = primaryLang[string]; } - if (tokens) { localizedString = localizedString.replace(/\{(\d+)\}/g, function (match, index) { - var value = tokens[index - 1]; - var ret = value; - + const value = tokens[index - 1]; + let ret = value; if (typeof value === 'undefined') { ret = match; } - return ret; }); } - return localizedString; } + /** * Handles language change for the player in components. Should be overriden by sub-components. * * @abstract */ - ; + handleLanguagechange() {} - _proto.handleLanguagechange = function handleLanguagechange() {} /** * Return the `Component`s DOM element. This is where children get inserted. * This will usually be the the same as the element returned in {@link Component#el}. @@ -4103,22 +3785,20 @@ var Component$1 = /*#__PURE__*/function () { * @return {Element} * The content element for this `Component`. */ - ; - - _proto.contentEl = function contentEl() { + contentEl() { return this.contentEl_ || this.el_; } + /** * Get this `Component`s ID * * @return {string} * The id of this `Component` */ - ; - - _proto.id = function id() { + id() { return this.id_; } + /** * Get the `Component`s name. The name gets used to reference the `Component` * and is set during registration. @@ -4126,22 +3806,20 @@ var Component$1 = /*#__PURE__*/function () { * @return {string} * The name of this `Component`. */ - ; - - _proto.name = function name() { + name() { return this.name_; } + /** * Get an array of all child components * * @return {Array} * The children */ - ; - - _proto.children = function children() { + children() { return this.children_; } + /** * Returns the child `Component` with the given `id`. * @@ -4151,11 +3829,10 @@ var Component$1 = /*#__PURE__*/function () { * @return {Component|undefined} * The child `Component` with the given `id` or undefined. */ - ; - - _proto.getChildById = function getChildById(id) { + getChildById(id) { return this.childIndex_[id]; } + /** * Returns the child `Component` with the given `name`. * @@ -4165,15 +3842,13 @@ var Component$1 = /*#__PURE__*/function () { * @return {Component|undefined} * The child `Component` with the given `name` or undefined. */ - ; - - _proto.getChild = function getChild(name) { + getChild(name) { if (!name) { return; } - return this.childNameIndex_[name]; } + /** * Returns the descendant `Component` following the givent * descendant `names`. For instance ['foo', 'bar', 'baz'] would @@ -4188,29 +3863,19 @@ var Component$1 = /*#__PURE__*/function () { * The descendant `Component` following the given descendant * `names` or undefined. */ - ; - - _proto.getDescendant = function getDescendant() { - for (var _len = arguments.length, names = new Array(_len), _key = 0; _key < _len; _key++) { - names[_key] = arguments[_key]; - } - + getDescendant(...names) { // flatten array argument into the main array - names = names.reduce(function (acc, n) { - return acc.concat(n); - }, []); - var currentChild = this; - - for (var i = 0; i < names.length; i++) { + names = names.reduce((acc, n) => acc.concat(n), []); + let currentChild = this; + for (let i = 0; i < names.length; i++) { currentChild = currentChild.getChild(names[i]); - if (!currentChild || !currentChild.getChild) { return; } } - return currentChild; } + /** * Add a child `Component` inside the current `Component`. * @@ -4229,72 +3894,60 @@ var Component$1 = /*#__PURE__*/function () { * The `Component` that gets added as a child. When using a string the * `Component` will get created by this process. */ - ; - - _proto.addChild = function addChild(child, options, index) { - if (options === void 0) { - options = {}; - } - - if (index === void 0) { - index = this.children_.length; - } - - var component; - var componentName; // If child is a string, create component with options + addChild(child, options = {}, index = this.children_.length) { + let component; + let componentName; + // If child is a string, create component with options if (typeof child === 'string') { componentName = toTitleCase$1(child); - var componentClassName = options.componentClass || componentName; // Set name through options + const componentClassName = options.componentClass || componentName; - options.name = componentName; // Create a new object & element for this controls set + // Set name through options + options.name = componentName; + + // Create a new object & element for this controls set // If there's no .player_, this is a player - - var ComponentClass = Component.getComponent(componentClassName); - + const ComponentClass = Component$1.getComponent(componentClassName); if (!ComponentClass) { - throw new Error("Component " + componentClassName + " does not exist"); - } // data stored directly on the videojs object may be + throw new Error(`Component ${componentClassName} does not exist`); + } + + // data stored directly on the videojs object may be // misidentified as a component to retain // backwards-compatibility with 4.x. check to make sure the // component class can be instantiated. - - if (typeof ComponentClass !== 'function') { return null; } + component = new ComponentClass(this.player_ || this, options); - component = new ComponentClass(this.player_ || this, options); // child is a component instance + // child is a component instance } else { component = child; } - if (component.parentComponent_) { component.parentComponent_.removeChild(component); } - this.children_.splice(index, 0, component); component.parentComponent_ = this; - if (typeof component.id === 'function') { this.childIndex_[component.id()] = component; - } // If a name wasn't used to create the component, check if we can use the + } + + // If a name wasn't used to create the component, check if we can use the // name function of the component - - componentName = componentName || component.name && toTitleCase$1(component.name()); - if (componentName) { this.childNameIndex_[componentName] = component; this.childNameIndex_[toLowerCase(componentName)] = component; - } // Add the UI object's element to the container div (box) + } + + // Add the UI object's element to the container div (box) // Having an element is not required - - if (typeof component.el === 'function' && component.el()) { // If inserting before a component, insert before that component's element - var refNode = null; - + let refNode = null; if (this.children_[index + 1]) { // Most children are components, but the video tech is an HTML element if (this.children_[index + 1].el_) { @@ -4303,13 +3956,13 @@ var Component$1 = /*#__PURE__*/function () { refNode = this.children_[index + 1]; } } - this.contentEl().insertBefore(component.el(), refNode); - } // Return so it can stored on parent object if desired. - + } + // Return so it can stored on parent object if desired. return component; } + /** * Remove a child `Component` from this `Component`s list of children. Also removes * the child `Component`s element from this `Component`s element. @@ -4317,137 +3970,122 @@ var Component$1 = /*#__PURE__*/function () { * @param {Component} component * The child `Component` to remove. */ - ; - - _proto.removeChild = function removeChild(component) { + removeChild(component) { if (typeof component === 'string') { component = this.getChild(component); } - if (!component || !this.children_) { return; } - - var childFound = false; - - for (var i = this.children_.length - 1; i >= 0; i--) { + let childFound = false; + for (let i = this.children_.length - 1; i >= 0; i--) { if (this.children_[i] === component) { childFound = true; this.children_.splice(i, 1); break; } } - if (!childFound) { return; } - component.parentComponent_ = null; this.childIndex_[component.id()] = null; this.childNameIndex_[toTitleCase$1(component.name())] = null; this.childNameIndex_[toLowerCase(component.name())] = null; - var compEl = component.el(); - + const compEl = component.el(); if (compEl && compEl.parentNode === this.contentEl()) { this.contentEl().removeChild(component.el()); } } + /** * Add and initialize default child `Component`s based upon options. */ - ; - - _proto.initChildren = function initChildren() { - var _this2 = this; - - var children = this.options_.children; - + initChildren() { + const children = this.options_.children; if (children) { // `this` is `parent` - var parentOptions = this.options_; + const parentOptions = this.options_; + const handleAdd = child => { + const name = child.name; + let opts = child.opts; - var handleAdd = function handleAdd(child) { - var name = child.name; - var opts = child.opts; // Allow options for children to be set at the parent options + // Allow options for children to be set at the parent options // e.g. videojs(id, { controlBar: false }); // instead of videojs(id, { children: { controlBar: false }); - if (parentOptions[name] !== undefined) { opts = parentOptions[name]; - } // Allow for disabling default components + } + + // Allow for disabling default components // e.g. options['children']['posterImage'] = false - - if (opts === false) { return; - } // Allow options to be passed as a simple boolean if no configuration + } + + // Allow options to be passed as a simple boolean if no configuration // is necessary. - - if (opts === true) { opts = {}; - } // We also want to pass the original player options + } + + // We also want to pass the original player options // to each component as well so they don't need to // reach back into the player for options later. + opts.playerOptions = this.options_.playerOptions; - - opts.playerOptions = _this2.options_.playerOptions; // Create and add the child component. + // Create and add the child component. // Add a direct reference to the child by name on the parent instance. // If two of the same component are used, different names should be supplied // for each - - var newChild = _this2.addChild(name, opts); - + const newChild = this.addChild(name, opts); if (newChild) { - _this2[name] = newChild; + this[name] = newChild; } - }; // Allow for an array of children details to passed in the options - - - var workingChildren; - var Tech = Component.getComponent('Tech'); + }; + // Allow for an array of children details to passed in the options + let workingChildren; + const Tech = Component$1.getComponent('Tech'); if (Array.isArray(children)) { workingChildren = children; } else { workingChildren = Object.keys(children); } - - workingChildren // children that are in this.options_ but also in workingChildren would + workingChildren + // children that are in this.options_ but also in workingChildren would // give us extra children we do not want. So, we want to filter them out. .concat(Object.keys(this.options_).filter(function (child) { return !workingChildren.some(function (wchild) { if (typeof wchild === 'string') { return child === wchild; } - return child === wchild.name; }); - })).map(function (child) { - var name; - var opts; - + })).map(child => { + let name; + let opts; if (typeof child === 'string') { name = child; - opts = children[name] || _this2.options_[name] || {}; + opts = children[name] || this.options_[name] || {}; } else { name = child.name; opts = child; } - return { - name: name, - opts: opts + name, + opts }; - }).filter(function (child) { + }).filter(child => { // we have to make sure that child.name isn't in the techOrder since // techs are registerd as Components but can't aren't compatible // See https://github.com/videojs/video.js/issues/2772 - var c = Component.getComponent(child.opts.componentClass || toTitleCase$1(child.name)); + const c = Component$1.getComponent(child.opts.componentClass || toTitleCase$1(child.name)); return c && !Tech.isTech(c); }).forEach(handleAdd); } } + /** * Builds the default DOM class name. Should be overriden by sub-components. * @@ -4456,38 +4094,32 @@ var Component$1 = /*#__PURE__*/function () { * * @abstract */ - ; - - _proto.buildCSSClass = function buildCSSClass() { + buildCSSClass() { // Child classes can include a function that does: // return 'CLASS NAME' + this._super(); return ''; } + /** * Bind a listener to the component's ready state. * Different from event listeners in that if the ready event has already happened * it will trigger the function immediately. * + * @param {ReadyCallback} fn + * Function that gets called when the `Component` is ready. + * * @return {Component} * Returns itself; method can be chained. */ - ; - - _proto.ready = function ready(fn, sync) { - if (sync === void 0) { - sync = false; - } - + ready(fn, sync = false) { if (!fn) { return; } - if (!this.isReady_) { this.readyQueue_ = this.readyQueue_ || []; this.readyQueue_.push(fn); return; } - if (sync) { fn.call(this); } else { @@ -4495,38 +4127,38 @@ var Component$1 = /*#__PURE__*/function () { this.setTimeout(fn, 1); } } + /** * Trigger all the ready listeners for this `Component`. * * @fires Component#ready */ - ; - - _proto.triggerReady = function triggerReady() { - this.isReady_ = true; // Ensure ready is triggered asynchronously + triggerReady() { + this.isReady_ = true; + // Ensure ready is triggered asynchronously this.setTimeout(function () { - var readyQueue = this.readyQueue_; // Reset Ready Queue + const readyQueue = this.readyQueue_; + // Reset Ready Queue this.readyQueue_ = []; - if (readyQueue && readyQueue.length > 0) { readyQueue.forEach(function (fn) { fn.call(this); }, this); - } // Allow for using event listeners also + } + // Allow for using event listeners also /** * Triggered when a `Component` is ready. * * @event Component#ready - * @type {EventTarget~Event} + * @type {Event} */ - - this.trigger('ready'); }, 1); } + /** * Find a single DOM element matching a `selector`. This can be within the `Component`s * `contentEl()` or another custom context. @@ -4545,11 +4177,10 @@ var Component$1 = /*#__PURE__*/function () { * * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors) */ - ; - - _proto.$ = function $$1(selector, context) { + $(selector, context) { return $(selector, context || this.contentEl()); } + /** * Finds all DOM element matching a `selector`. This can be within the `Component`s * `contentEl()` or another custom context. @@ -4568,11 +4199,10 @@ var Component$1 = /*#__PURE__*/function () { * * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors) */ - ; - - _proto.$$ = function $$$1(selector, context) { + $$(selector, context) { return $$(selector, context || this.contentEl()); } + /** * Check if a component's element has a CSS class name. * @@ -4583,33 +4213,30 @@ var Component$1 = /*#__PURE__*/function () { * - True if the `Component` has the class. * - False if the `Component` does not have the class` */ - ; - - _proto.hasClass = function hasClass$1(classToCheck) { + hasClass(classToCheck) { return hasClass(this.el_, classToCheck); } + /** * Add a CSS class name to the `Component`s element. * - * @param {string} classToAdd - * CSS class name to add + * @param {...string} classesToAdd + * One or more CSS class name to add. */ - ; - - _proto.addClass = function addClass$1(classToAdd) { - addClass(this.el_, classToAdd); + addClass(...classesToAdd) { + addClass(this.el_, ...classesToAdd); } + /** * Remove a CSS class name from the `Component`s element. * - * @param {string} classToRemove - * CSS class name to remove + * @param {...string} classesToRemove + * One or more CSS class name to remove. */ - ; - - _proto.removeClass = function removeClass$1(classToRemove) { - removeClass(this.el_, classToRemove); + removeClass(...classesToRemove) { + removeClass(this.el_, ...classesToRemove); } + /** * Add or remove a CSS class name from the component's element. * - `classToToggle` gets added when {@link Component#hasClass} would return false. @@ -4621,51 +4248,46 @@ var Component$1 = /*#__PURE__*/function () { * @param {boolean|Dom~predicate} [predicate] * An {@link Dom~predicate} function or a boolean */ - ; - - _proto.toggleClass = function toggleClass$1(classToToggle, predicate) { + toggleClass(classToToggle, predicate) { toggleClass(this.el_, classToToggle, predicate); } + /** * Show the `Component`s element if it is hidden by removing the * 'vjs-hidden' class name from it. */ - ; - - _proto.show = function show() { + show() { this.removeClass('vjs-hidden'); } + /** * Hide the `Component`s element if it is currently showing by adding the * 'vjs-hidden` class name to it. */ - ; - - _proto.hide = function hide() { + hide() { this.addClass('vjs-hidden'); } + /** * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing' * class name to it. Used during fadeIn/fadeOut. * * @private */ - ; - - _proto.lockShowing = function lockShowing() { + lockShowing() { this.addClass('vjs-lock-showing'); } + /** * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing' * class name from it. Used during fadeIn/fadeOut. * * @private */ - ; - - _proto.unlockShowing = function unlockShowing() { + unlockShowing() { this.removeClass('vjs-lock-showing'); } + /** * Get the value of an attribute on the `Component`s element. * @@ -4681,11 +4303,10 @@ var Component$1 = /*#__PURE__*/function () { * * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute} */ - ; - - _proto.getAttribute = function getAttribute$1(attribute) { + getAttribute(attribute) { return getAttribute(this.el_, attribute); } + /** * Set the value of an attribute on the `Component`'s element * @@ -4697,11 +4318,10 @@ var Component$1 = /*#__PURE__*/function () { * * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute} */ - ; - - _proto.setAttribute = function setAttribute$1(attribute, value) { + setAttribute(attribute, value) { setAttribute(this.el_, attribute, value); } + /** * Remove an attribute from the `Component`s element. * @@ -4710,11 +4330,10 @@ var Component$1 = /*#__PURE__*/function () { * * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute} */ - ; - - _proto.removeAttribute = function removeAttribute$1(attribute) { + removeAttribute(attribute) { removeAttribute(this.el_, attribute); } + /** * Get or set the width of the component based upon the CSS styles. * See {@link Component#dimension} for more detailed information. @@ -4729,11 +4348,10 @@ var Component$1 = /*#__PURE__*/function () { * The width when getting, zero if there is no width. Can be a string * postpixed with '%' or 'px'. */ - ; - - _proto.width = function width(num, skipListeners) { + width(num, skipListeners) { return this.dimension('width', num, skipListeners); } + /** * Get or set the height of the component based upon the CSS styles. * See {@link Component#dimension} for more detailed information. @@ -4748,11 +4366,10 @@ var Component$1 = /*#__PURE__*/function () { * The width when getting, zero if there is no width. Can be a string * postpixed with '%' or 'px'. */ - ; - - _proto.height = function height(num, skipListeners) { + height(num, skipListeners) { return this.dimension('height', num, skipListeners); } + /** * Set both the width and height of the `Component` element at the same time. * @@ -4762,13 +4379,12 @@ var Component$1 = /*#__PURE__*/function () { * @param {number|string} height * Height to set the `Component`s element to. */ - ; - - _proto.dimensions = function dimensions(width, height) { + dimensions(width, height) { // Skip componentresize listeners on width for optimization this.width(width, true); this.height(height); } + /** * Get or set width or height of the `Component` element. This is the shared code * for the {@link Component#width} and {@link Component#height}. @@ -4797,58 +4413,55 @@ var Component$1 = /*#__PURE__*/function () { * @return {number} * The dimension when getting or 0 if unset */ - ; - - _proto.dimension = function dimension(widthOrHeight, num, skipListeners) { + dimension(widthOrHeight, num, skipListeners) { if (num !== undefined) { // Set to zero if null or literally NaN (NaN !== NaN) if (num === null || num !== num) { num = 0; - } // Check if using css width/height (% or px) and adjust - + } + // Check if using css width/height (% or px) and adjust if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) { this.el_.style[widthOrHeight] = num; } else if (num === 'auto') { this.el_.style[widthOrHeight] = ''; } else { this.el_.style[widthOrHeight] = num + 'px'; - } // skipListeners allows us to avoid triggering the resize event when setting both width and height - + } + // skipListeners allows us to avoid triggering the resize event when setting both width and height if (!skipListeners) { /** * Triggered when a component is resized. * * @event Component#componentresize - * @type {EventTarget~Event} + * @type {Event} */ this.trigger('componentresize'); } - return; - } // Not setting a value, so getting it + } + + // Not setting a value, so getting it // Make sure element exists - - if (!this.el_) { return 0; - } // Get dimension value from style - - - var val = this.el_.style[widthOrHeight]; - var pxIndex = val.indexOf('px'); + } + // Get dimension value from style + const val = this.el_.style[widthOrHeight]; + const pxIndex = val.indexOf('px'); if (pxIndex !== -1) { // Return the pixel value with no 'px' return parseInt(val.slice(0, pxIndex), 10); - } // No px so using % or no style was set, so falling back to offsetWidth/height + } + + // No px so using % or no style was set, so falling back to offsetWidth/height // If component has display:none, offset will return 0 // TODO: handle display:none and no dimension style using px - - return parseInt(this.el_['offset' + toTitleCase$1(widthOrHeight)], 10); } + /** * Get the computed width or the height of the component's element. * @@ -4861,28 +4474,26 @@ var Component$1 = /*#__PURE__*/function () { * The dimension that gets asked for or 0 if nothing was set * for that dimension. */ - ; - - _proto.currentDimension = function currentDimension(widthOrHeight) { - var computedWidthOrHeight = 0; - + currentDimension(widthOrHeight) { + let computedWidthOrHeight = 0; if (widthOrHeight !== 'width' && widthOrHeight !== 'height') { throw new Error('currentDimension only accepts width or height value'); } + computedWidthOrHeight = computedStyle(this.el_, widthOrHeight); - computedWidthOrHeight = computedStyle(this.el_, widthOrHeight); // remove 'px' from variable and parse as integer + // remove 'px' from variable and parse as integer + computedWidthOrHeight = parseFloat(computedWidthOrHeight); - computedWidthOrHeight = parseFloat(computedWidthOrHeight); // if the computed value is still 0, it's possible that the browser is lying + // if the computed value is still 0, it's possible that the browser is lying // and we want to check the offset values. // This code also runs wherever getComputedStyle doesn't exist. - if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) { - var rule = "offset" + toTitleCase$1(widthOrHeight); + const rule = `offset${toTitleCase$1(widthOrHeight)}`; computedWidthOrHeight = this.el_[rule]; } - return computedWidthOrHeight; } + /** * An object that contains width and height values of the `Component`s * computed style. Uses `window.getComputedStyle`. @@ -4905,14 +4516,13 @@ var Component$1 = /*#__PURE__*/function () { * @return {Component~DimensionObject} * The computed dimensions of the component's element. */ - ; - - _proto.currentDimensions = function currentDimensions() { + currentDimensions() { return { width: this.currentDimension('width'), height: this.currentDimension('height') }; } + /** * Get the computed width of the component's element. * @@ -4921,11 +4531,10 @@ var Component$1 = /*#__PURE__*/function () { * @return {number} * The computed width of the component's element. */ - ; - - _proto.currentWidth = function currentWidth() { + currentWidth() { return this.currentDimension('width'); } + /** * Get the computed height of the component's element. * @@ -4934,61 +4543,55 @@ var Component$1 = /*#__PURE__*/function () { * @return {number} * The computed height of the component's element. */ - ; - - _proto.currentHeight = function currentHeight() { + currentHeight() { return this.currentDimension('height'); } + /** * Set the focus to this component */ - ; - - _proto.focus = function focus() { + focus() { this.el_.focus(); } + /** * Remove the focus from this component */ - ; - - _proto.blur = function blur() { + blur() { this.el_.blur(); } + /** * When this Component receives a `keydown` event which it does not process, * it passes the event to the Player for handling. * - * @param {EventTarget~Event} event + * @param {Event} event * The `keydown` event that caused this function to be called. */ - ; - - _proto.handleKeyDown = function handleKeyDown(event) { + handleKeyDown(event) { if (this.player_) { // We only stop propagation here because we want unhandled events to fall // back to the browser. Exclude Tab for focus trapping. - if (!keycode__default['default'].isEventKey(event, 'Tab')) { + if (!keycode__default["default"].isEventKey(event, 'Tab')) { event.stopPropagation(); } - this.player_.handleKeyDown(event); } } + /** * Many components used to have a `handleKeyPress` method, which was poorly * named because it listened to a `keydown` event. This method name now * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress` * will not see their method calls stop working. * - * @param {EventTarget~Event} event + * @param {Event} event * The event that caused this function to be called. */ - ; - - _proto.handleKeyPress = function handleKeyPress(event) { + handleKeyPress(event) { this.handleKeyDown(event); } + /** * Emit a 'tap' events when touch event support gets detected. This gets used to * support toggling the controls through a tap on the video. They get enabled @@ -5002,19 +4605,19 @@ var Component$1 = /*#__PURE__*/function () { * @listens Component#touchcancel * @listens Component#touchend */ - ; - - _proto.emitTapEvents = function emitTapEvents() { + emitTapEvents() { // Track the start time so we can determine how long the touch lasted - var touchStart = 0; - var firstTouch = null; // Maximum movement allowed during a touch event to still be considered a tap + let touchStart = 0; + let firstTouch = null; + + // Maximum movement allowed during a touch event to still be considered a tap // Other popular libs use anywhere from 2 (hammer.js) to 15, // so 10 seems like a nice, round number. + const tapMovementThreshold = 10; - var tapMovementThreshold = 10; // The maximum length a touch can be while still being considered a tap - - var touchTimeThreshold = 200; - var couldBeTap; + // The maximum length a touch can be while still being considered a tap + const touchTimeThreshold = 200; + let couldBeTap; this.on('touchstart', function (event) { // If more than one finger, don't consider treating this as a click if (event.touches.length === 1) { @@ -5022,10 +4625,10 @@ var Component$1 = /*#__PURE__*/function () { firstTouch = { pageX: event.touches[0].pageX, pageY: event.touches[0].pageY - }; // Record start time so we can detect a tap vs. "touch and hold" - - touchStart = window__default['default'].performance.now(); // Reset couldBeTap tracking - + }; + // Record start time so we can detect a tap vs. "touch and hold" + touchStart = window__default["default"].performance.now(); + // Reset couldBeTap tracking couldBeTap = true; } }); @@ -5036,32 +4639,32 @@ var Component$1 = /*#__PURE__*/function () { } else if (firstTouch) { // Some devices will throw touchmoves for all but the slightest of taps. // So, if we moved only a small distance, this could still be a tap - var xdiff = event.touches[0].pageX - firstTouch.pageX; - var ydiff = event.touches[0].pageY - firstTouch.pageY; - var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff); - + const xdiff = event.touches[0].pageX - firstTouch.pageX; + const ydiff = event.touches[0].pageY - firstTouch.pageY; + const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff); if (touchDistance > tapMovementThreshold) { couldBeTap = false; } } }); - - var noTap = function noTap() { + const noTap = function () { couldBeTap = false; - }; // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s - + }; + // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s this.on('touchleave', noTap); - this.on('touchcancel', noTap); // When the touch ends, measure how long it took and trigger the appropriate + this.on('touchcancel', noTap); + + // When the touch ends, measure how long it took and trigger the appropriate // event - this.on('touchend', function (event) { - firstTouch = null; // Proceed only if the touchmove/leave/cancel event didn't happen - + firstTouch = null; + // Proceed only if the touchmove/leave/cancel event didn't happen if (couldBeTap === true) { // Measure how long the touch lasted - var touchTime = window__default['default'].performance.now() - touchStart; // Make sure the touch was less than the threshold to be considered a tap + const touchTime = window__default["default"].performance.now() - touchStart; + // Make sure the touch was less than the threshold to be considered a tap if (touchTime < touchTimeThreshold) { // Don't let browser turn this into a click event.preventDefault(); @@ -5069,16 +4672,17 @@ var Component$1 = /*#__PURE__*/function () { * Triggered when a `Component` is tapped. * * @event Component#tap - * @type {EventTarget~Event} + * @type {Event} */ - - this.trigger('tap'); // It may be good to copy the touchend event object and change the + this.trigger('tap'); + // It may be good to copy the touchend event object and change the // type to tap, if the other event properties aren't exact after // Events.fixEvent runs (e.g. event.target) } } }); } + /** * This function reports user activity whenever touch events happen. This can get * turned off by any sub-components that wants touch events to act another way. @@ -5102,37 +4706,34 @@ var Component$1 = /*#__PURE__*/function () { * @listens Component#touchend * @listens Component#touchcancel */ - ; - - _proto.enableTouchActivity = function enableTouchActivity() { + enableTouchActivity() { // Don't continue if the root player doesn't support reporting user activity if (!this.player() || !this.player().reportUserActivity) { return; - } // listener for reporting that the user is active + } - - var report = bind(this.player(), this.player().reportUserActivity); - var touchHolding; + // listener for reporting that the user is active + const report = bind_(this.player(), this.player().reportUserActivity); + let touchHolding; this.on('touchstart', function () { - report(); // For as long as the they are touching the device or have their mouse down, + report(); + // For as long as the they are touching the device or have their mouse down, // we consider them active even if they're not moving their finger or mouse. // So we want to continue to update that they are active - - this.clearInterval(touchHolding); // report at the same interval as activityCheck - + this.clearInterval(touchHolding); + // report at the same interval as activityCheck touchHolding = this.setInterval(report, 250); }); - - var touchEnd = function touchEnd(event) { - report(); // stop the interval that maintains activity if the touch is holding - + const touchEnd = function (event) { + report(); + // stop the interval that maintains activity if the touch is holding this.clearInterval(touchHolding); }; - this.on('touchmove', report); this.on('touchend', touchEnd); this.on('touchcancel', touchEnd); } + /** * A callback that has no parameters and is bound into `Component`s context. * @@ -5166,26 +4767,22 @@ var Component$1 = /*#__PURE__*/function () { * @listens Component#dispose * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout} */ - ; - - _proto.setTimeout = function setTimeout(fn, timeout) { - var _this3 = this; - + setTimeout(fn, timeout) { // declare as variables so they are properly available in timeout function // eslint-disable-next-line var timeoutId; - fn = bind(this, fn); + fn = bind_(this, fn); this.clearTimersOnDispose_(); - timeoutId = window__default['default'].setTimeout(function () { - if (_this3.setTimeoutIds_.has(timeoutId)) { - _this3.setTimeoutIds_["delete"](timeoutId); + timeoutId = window__default["default"].setTimeout(() => { + if (this.setTimeoutIds_.has(timeoutId)) { + this.setTimeoutIds_.delete(timeoutId); } - fn(); }, timeout); this.setTimeoutIds_.add(timeoutId); return timeoutId; } + /** * Clears a timeout that gets created via `window.setTimeout` or * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout} @@ -5201,16 +4798,14 @@ var Component$1 = /*#__PURE__*/function () { * * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout} */ - ; - - _proto.clearTimeout = function clearTimeout(timeoutId) { + clearTimeout(timeoutId) { if (this.setTimeoutIds_.has(timeoutId)) { - this.setTimeoutIds_["delete"](timeoutId); - window__default['default'].clearTimeout(timeoutId); + this.setTimeoutIds_.delete(timeoutId); + window__default["default"].clearTimeout(timeoutId); } - return timeoutId; } + /** * Creates a function that gets run every `x` milliseconds. This function is a wrapper * around `window.setInterval`. There are a few reasons to use this one instead though. @@ -5231,15 +4826,14 @@ var Component$1 = /*#__PURE__*/function () { * @listens Component#dispose * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval} */ - ; - - _proto.setInterval = function setInterval(fn, interval) { - fn = bind(this, fn); + setInterval(fn, interval) { + fn = bind_(this, fn); this.clearTimersOnDispose_(); - var intervalId = window__default['default'].setInterval(fn, interval); + const intervalId = window__default["default"].setInterval(fn, interval); this.setIntervalIds_.add(intervalId); return intervalId; } + /** * Clears an interval that gets created via `window.setInterval` or * {@link Component#setInterval}. If you set an inteval via {@link Component#setInterval} @@ -5255,16 +4849,14 @@ var Component$1 = /*#__PURE__*/function () { * * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval} */ - ; - - _proto.clearInterval = function clearInterval(intervalId) { + clearInterval(intervalId) { if (this.setIntervalIds_.has(intervalId)) { - this.setIntervalIds_["delete"](intervalId); - window__default['default'].clearInterval(intervalId); + this.setIntervalIds_.delete(intervalId); + window__default["default"].clearInterval(intervalId); } - return intervalId; } + /** * Queues up a callback to be passed to requestAnimationFrame (rAF), but * with a few extra bonuses: @@ -5290,31 +4882,23 @@ var Component$1 = /*#__PURE__*/function () { * @listens Component#dispose * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame} */ - ; + requestAnimationFrame(fn) { + this.clearTimersOnDispose_(); - _proto.requestAnimationFrame = function requestAnimationFrame(fn) { - var _this4 = this; - - // Fall back to using a timer. - if (!this.supportsRaf_) { - return this.setTimeout(fn, 1000 / 60); - } - - this.clearTimersOnDispose_(); // declare as variables so they are properly available in rAF function + // declare as variables so they are properly available in rAF function // eslint-disable-next-line - var id; - fn = bind(this, fn); - id = window__default['default'].requestAnimationFrame(function () { - if (_this4.rafIds_.has(id)) { - _this4.rafIds_["delete"](id); + fn = bind_(this, fn); + id = window__default["default"].requestAnimationFrame(() => { + if (this.rafIds_.has(id)) { + this.rafIds_.delete(id); } - fn(); }); this.rafIds_.add(id); return id; } + /** * Request an animation frame, but only one named animation * frame will be queued. Another will never be added until @@ -5327,43 +4911,36 @@ var Component$1 = /*#__PURE__*/function () { * A function that will be bound to this component and executed just * before the browser's next repaint. */ - ; - - _proto.requestNamedAnimationFrame = function requestNamedAnimationFrame(name, fn) { - var _this5 = this; - + requestNamedAnimationFrame(name, fn) { if (this.namedRafs_.has(name)) { return; } - this.clearTimersOnDispose_(); - fn = bind(this, fn); - var id = this.requestAnimationFrame(function () { + fn = bind_(this, fn); + const id = this.requestAnimationFrame(() => { fn(); - - if (_this5.namedRafs_.has(name)) { - _this5.namedRafs_["delete"](name); + if (this.namedRafs_.has(name)) { + this.namedRafs_.delete(name); } }); this.namedRafs_.set(name, id); return name; } + /** * Cancels a current named animation frame if it exists. * * @param {string} name * The name of the requestAnimationFrame to cancel. */ - ; - - _proto.cancelNamedAnimationFrame = function cancelNamedAnimationFrame(name) { + cancelNamedAnimationFrame(name) { if (!this.namedRafs_.has(name)) { return; } - this.cancelAnimationFrame(this.namedRafs_.get(name)); - this.namedRafs_["delete"](name); + this.namedRafs_.delete(name); } + /** * Cancels a queued callback passed to {@link Component#requestAnimationFrame} * (rAF). @@ -5380,21 +4957,14 @@ var Component$1 = /*#__PURE__*/function () { * * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame} */ - ; - - _proto.cancelAnimationFrame = function cancelAnimationFrame(id) { - // Fall back to using a timer. - if (!this.supportsRaf_) { - return this.clearTimeout(id); - } - + cancelAnimationFrame(id) { if (this.rafIds_.has(id)) { - this.rafIds_["delete"](id); - window__default['default'].cancelAnimationFrame(id); + this.rafIds_.delete(id); + window__default["default"].cancelAnimationFrame(id); } - return id; } + /** * A function to setup `requestAnimationFrame`, `setTimeout`, * and `setInterval`, clearing on dispose. @@ -5405,31 +4975,22 @@ var Component$1 = /*#__PURE__*/function () { * * @private */ - ; - - _proto.clearTimersOnDispose_ = function clearTimersOnDispose_() { - var _this6 = this; - + clearTimersOnDispose_() { if (this.clearingTimersOnDispose_) { return; } - this.clearingTimersOnDispose_ = true; - this.one('dispose', function () { - [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(function (_ref) { - var idName = _ref[0], - cancelName = _ref[1]; - + this.one('dispose', () => { + [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(([idName, cancelName]) => { // for a `Set` key will actually be the value again // so forEach((val, val) =>` but for maps we want to use // the key. - _this6[idName].forEach(function (val, key) { - return _this6[cancelName](key); - }); + this[idName].forEach((val, key) => this[cancelName](key)); }); - _this6.clearingTimersOnDispose_ = false; + this.clearingTimersOnDispose_ = false; }); } + /** * Register a `Component` with `videojs` given the name and the component. * @@ -5449,56 +5010,46 @@ var Component$1 = /*#__PURE__*/function () { * @return {Component} * The `Component` that was registered. */ - ; - - Component.registerComponent = function registerComponent(name, ComponentToRegister) { + static registerComponent(name, ComponentToRegister) { if (typeof name !== 'string' || !name) { - throw new Error("Illegal component name, \"" + name + "\"; must be a non-empty string."); + throw new Error(`Illegal component name, "${name}"; must be a non-empty string.`); } + const Tech = Component$1.getComponent('Tech'); - var Tech = Component.getComponent('Tech'); // We need to make sure this check is only done if Tech has been registered. - - var isTech = Tech && Tech.isTech(ComponentToRegister); - var isComp = Component === ComponentToRegister || Component.prototype.isPrototypeOf(ComponentToRegister.prototype); - + // We need to make sure this check is only done if Tech has been registered. + const isTech = Tech && Tech.isTech(ComponentToRegister); + const isComp = Component$1 === ComponentToRegister || Component$1.prototype.isPrototypeOf(ComponentToRegister.prototype); if (isTech || !isComp) { - var reason; - + let reason; if (isTech) { reason = 'techs must be registered using Tech.registerTech()'; } else { reason = 'must be a Component subclass'; } - - throw new Error("Illegal component, \"" + name + "\"; " + reason + "."); + throw new Error(`Illegal component, "${name}"; ${reason}.`); } - name = toTitleCase$1(name); - - if (!Component.components_) { - Component.components_ = {}; + if (!Component$1.components_) { + Component$1.components_ = {}; } - - var Player = Component.getComponent('Player'); - + const Player = Component$1.getComponent('Player'); if (name === 'Player' && Player && Player.players) { - var players = Player.players; - var playerNames = Object.keys(players); // If we have players that were disposed, then their name will still be + const players = Player.players; + const playerNames = Object.keys(players); + + // If we have players that were disposed, then their name will still be // in Players.players. So, we must loop through and verify that the value // for each item is not null. This allows registration of the Player component // after all players have been disposed or before any were created. - - if (players && playerNames.length > 0 && playerNames.map(function (pname) { - return players[pname]; - }).every(Boolean)) { + if (players && playerNames.length > 0 && playerNames.map(pname => players[pname]).every(Boolean)) { throw new Error('Can not register Player component after player has been created.'); } } - - Component.components_[name] = ComponentToRegister; - Component.components_[toLowerCase(name)] = ComponentToRegister; + Component$1.components_[name] = ComponentToRegister; + Component$1.components_[toLowerCase(name)] = ComponentToRegister; return ComponentToRegister; } + /** * Get a `Component` based on the name it was registered with. * @@ -5508,35 +5059,20 @@ var Component$1 = /*#__PURE__*/function () { * @return {Component} * The `Component` that got registered under the given name. */ - ; - - Component.getComponent = function getComponent(name) { - if (!name || !Component.components_) { + static getComponent(name) { + if (!name || !Component$1.components_) { return; } - - return Component.components_[name]; - }; - - return Component; -}(); -/** - * Whether or not this component supports `requestAnimationFrame`. - * - * This is exposed primarily for testing purposes. - * - * @private - * @type {Boolean} - */ - - -Component$1.prototype.supportsRaf_ = typeof window__default['default'].requestAnimationFrame === 'function' && typeof window__default['default'].cancelAnimationFrame === 'function'; + return Component$1.components_[name]; + } +} Component$1.registerComponent('Component', Component$1); /** - * @file time-ranges.js - * @module time-ranges + * @file time.js + * @module time */ + /** * Returns the time for the specified index at the start or end * of a TimeRange object. @@ -5554,17 +5090,17 @@ Component$1.registerComponent('Component', Component$1); */ /** - * An object that contains ranges of time. + * An object that contains ranges of time, which mimics {@link TimeRanges}. * * @typedef {Object} TimeRange * * @property {number} length * The number of time ranges represented by this object. * - * @property {module:time-ranges~TimeRangeIndex} start + * @property {module:time~TimeRangeIndex} start * Returns the time offset at which a specified time range begins. * - * @property {module:time-ranges~TimeRangeIndex} end + * @property {module:time~TimeRangeIndex} end * Returns the time offset at which a specified time range ends. * * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges @@ -5585,12 +5121,12 @@ Component$1.registerComponent('Component', Component$1); * * @throws {Error} if the timeRanges provided are over the maxIndex */ - function rangeCheck(fnName, index, maxIndex) { if (typeof index !== 'number' || index < 0 || index > maxIndex) { - throw new Error("Failed to execute '" + fnName + "' on 'TimeRanges': The index provided (" + index + ") is non-numeric or out of bounds (0-" + maxIndex + ")."); + throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is non-numeric or out of bounds (0-${maxIndex}).`); } } + /** * Get the time for the specified index at the start or end * of a TimeRange object. @@ -5615,31 +5151,29 @@ function rangeCheck(fnName, index, maxIndex) { * @deprecated rangeIndex must be set to a value, in the future this will throw an error. * @throws {Error} if rangeIndex is more than the length of ranges */ - - function getRange(fnName, valueIndex, ranges, rangeIndex) { rangeCheck(fnName, rangeIndex, ranges.length - 1); return ranges[rangeIndex][valueIndex]; } + /** * Create a time range object given ranges of time. * * @private * @param {Array} [ranges] * An array of time ranges. + * + * @return {TimeRange} */ - - function createTimeRangesObj(ranges) { - var timeRangesObj; - + let timeRangesObj; if (ranges === undefined || ranges.length === 0) { timeRangesObj = { length: 0, - start: function start() { + start() { throw new Error('This TimeRanges object is empty'); }, - end: function end() { + end() { throw new Error('This TimeRanges object is empty'); } }; @@ -5650,15 +5184,12 @@ function createTimeRangesObj(ranges) { end: getRange.bind(null, 'end', 1, ranges) }; } - - if (window__default['default'].Symbol && window__default['default'].Symbol.iterator) { - timeRangesObj[window__default['default'].Symbol.iterator] = function () { - return (ranges || []).values(); - }; + if (window__default["default"].Symbol && window__default["default"].Symbol.iterator) { + timeRangesObj[window__default["default"].Symbol.iterator] = () => (ranges || []).values(); } - return timeRangesObj; } + /** * Create a `TimeRange` object which mimics an * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}. @@ -5670,28 +5201,127 @@ function createTimeRangesObj(ranges) { * @param {number} end * The end of a single range. Cannot be used with the array form of * the `start` argument. + * + * @return {TimeRange} */ - - -function createTimeRanges(start, end) { +function createTimeRanges$1(start, end) { if (Array.isArray(start)) { return createTimeRangesObj(start); } else if (start === undefined || end === undefined) { return createTimeRangesObj(); } - return createTimeRangesObj([[start, end]]); } +/** + * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in + * seconds) will force a number of leading zeros to cover the length of the + * guide. + * + * @private + * @param {number} seconds + * Number of seconds to be turned into a string + * + * @param {number} guide + * Number (in seconds) to model the string after + * + * @return {string} + * Time formatted as H:MM:SS or M:SS + */ +const defaultImplementation = function (seconds, guide) { + seconds = seconds < 0 ? 0 : seconds; + let s = Math.floor(seconds % 60); + let m = Math.floor(seconds / 60 % 60); + let h = Math.floor(seconds / 3600); + const gm = Math.floor(guide / 60 % 60); + const gh = Math.floor(guide / 3600); + + // handle invalid times + if (isNaN(seconds) || seconds === Infinity) { + // '-' is false for all relational operators (e.g. <, >=) so this setting + // will add the minimum number of fields specified by the guide + h = m = s = '-'; + } + + // Check if we need to show hours + h = h > 0 || gh > 0 ? h + ':' : ''; + + // If hours are showing, we may need to add a leading zero. + // Always show at least one digit of minutes. + m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; + + // Check if leading zero is need for seconds + s = s < 10 ? '0' + s : s; + return h + m + s; +}; + +// Internal pointer to the current implementation. +let implementation = defaultImplementation; + +/** + * Replaces the default formatTime implementation with a custom implementation. + * + * @param {Function} customImplementation + * A function which will be used in place of the default formatTime + * implementation. Will receive the current time in seconds and the + * guide (in seconds) as arguments. + */ +function setFormatTime(customImplementation) { + implementation = customImplementation; +} + +/** + * Resets formatTime to the default implementation. + */ +function resetFormatTime() { + implementation = defaultImplementation; +} + +/** + * Delegates to either the default time formatting function or a custom + * function supplied via `setFormatTime`. + * + * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a + * guide (in seconds) will force a number of leading zeros to cover the + * length of the guide. + * + * @example formatTime(125, 600) === "02:05" + * @param {number} seconds + * Number of seconds to be turned into a string + * + * @param {number} guide + * Number (in seconds) to model the string after + * + * @return {string} + * Time formatted as H:MM:SS or M:SS + */ +function formatTime(seconds, guide = seconds) { + return implementation(seconds, guide); +} + +var Time = /*#__PURE__*/Object.freeze({ + __proto__: null, + createTimeRanges: createTimeRanges$1, + createTimeRange: createTimeRanges$1, + setFormatTime: setFormatTime, + resetFormatTime: resetFormatTime, + formatTime: formatTime +}); + /** * @file buffer.js * @module buffer */ + +/** + * @typedef { import('./time').TimeRange } TimeRange + */ + /** * Compute the percentage of the media that has been buffered. * * @param {TimeRange} buffered - * The current `TimeRange` object representing buffered time ranges + * The current `TimeRanges` object representing buffered time ranges * * @param {number} duration * Total duration of the media @@ -5699,37 +5329,33 @@ function createTimeRanges(start, end) { * @return {number} * Percent buffered of the total duration in decimal form. */ - function bufferedPercent(buffered, duration) { - var bufferedDuration = 0; - var start; - var end; - + let bufferedDuration = 0; + let start; + let end; if (!duration) { return 0; } - if (!buffered || !buffered.length) { - buffered = createTimeRanges(0, 0); + buffered = createTimeRanges$1(0, 0); } - - for (var i = 0; i < buffered.length; i++) { + for (let i = 0; i < buffered.length; i++) { start = buffered.start(i); - end = buffered.end(i); // buffered end can be bigger than duration by a very small fraction + end = buffered.end(i); + // buffered end can be bigger than duration by a very small fraction if (end > duration) { end = duration; } - bufferedDuration += end - start; } - return bufferedDuration / duration; } /** * @file media-error.js */ + /** * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class. * @@ -5747,14 +5373,12 @@ function bufferedPercent(buffered, duration) { * * @class MediaError */ - function MediaError(value) { // Allow redundant calls to this constructor to avoid having `instanceof` // checks peppered around the code. if (value instanceof MediaError) { return value; } - if (typeof value === 'number') { this.code = value; } else if (typeof value === 'string') { @@ -5766,30 +5390,28 @@ function MediaError(value) { if (typeof value.code === 'number') { this.code = value.code; } - - assign(this, value); + Object.assign(this, value); } - if (!this.message) { this.message = MediaError.defaultMessages[this.code] || ''; } } + /** * The error code that refers two one of the defined `MediaError` types * * @type {Number} */ - - MediaError.prototype.code = 0; + /** * An optional message that to show with the error. Message is not part of the HTML5 * video spec but allows for more informative custom errors. * * @type {String} */ - MediaError.prototype.message = ''; + /** * An optional status code that can be set by plugins to allow even more detail about * the error. For example a plugin might provide a specific HTTP status code and an @@ -5799,8 +5421,8 @@ MediaError.prototype.message = ''; * * @type {Array} */ - MediaError.prototype.status = null; + /** * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the * specification listed under {@link MediaError} for more information. @@ -5814,29 +5436,29 @@ MediaError.prototype.status = null; * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED * @property {string} 5 - MEDIA_ERR_ENCRYPTED */ - MediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED']; + /** * The default `MediaError` messages based on the {@link MediaError.errorTypes}. * * @type {Array} * @constant */ - MediaError.defaultMessages = { 1: 'You aborted the media playback', 2: 'A network error caused the media download to fail part-way.', 3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.', 4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.', 5: 'The media is encrypted and we do not have the keys to decrypt it.' -}; // Add types as properties on MediaError +}; + +// Add types as properties on MediaError // e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4; - -for (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) { - MediaError[MediaError.errorTypes[errNum]] = errNum; // values should be accessible on both the class and instance - +for (let errNum = 0; errNum < MediaError.errorTypes.length; errNum++) { + MediaError[MediaError.errorTypes[errNum]] = errNum; + // values should be accessible on both the class and instance MediaError.prototype[MediaError.errorTypes[errNum]] = errNum; -} // jsdocs for instance/static members added above +} /** * Returns whether an object is `Promise`-like (i.e. has a `then` method). @@ -5850,6 +5472,7 @@ for (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) { function isPromise(value) { return value !== undefined && value !== null && typeof value.then === 'function'; } + /** * Silence a Promise-like object. * @@ -5859,10 +5482,9 @@ function isPromise(value) { * @param {Object} value * An object that may or may not be `Promise`-like. */ - function silencePromise(value) { if (isPromise(value)) { - value.then(null, function (e) {}); + value.then(null, e => {}); } } @@ -5873,6 +5495,10 @@ function silencePromise(value) { * @module text-track-list-converter */ +/** + * @typedef { import('../tech/tech').default } Tech + */ + /** * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that * represents the {@link TextTrack}'s state. @@ -5884,12 +5510,11 @@ function silencePromise(value) { * A serializable javascript representation of the TextTrack. * @private */ -var trackToJson_ = function trackToJson_(track) { - var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) { +const trackToJson_ = function (track) { + const ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce((acc, prop, i) => { if (track[prop]) { acc[prop] = track[prop]; } - return acc; }, { cues: track.cues && Array.prototype.map.call(track.cues, function (cue) { @@ -5903,6 +5528,7 @@ var trackToJson_ = function trackToJson_(track) { }); return ret; }; + /** * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the * state of all {@link TextTrack}s currently configured. The return array is compatible with @@ -5915,26 +5541,21 @@ var trackToJson_ = function trackToJson_(track) { * A serializable javascript representation of the {@link Tech}s * {@link TextTrackList}. */ - - -var textTracksToJson = function textTracksToJson(tech) { - var trackEls = tech.$$('track'); - var trackObjs = Array.prototype.map.call(trackEls, function (t) { - return t.track; - }); - var tracks = Array.prototype.map.call(trackEls, function (trackEl) { - var json = trackToJson_(trackEl.track); - +const textTracksToJson = function (tech) { + const trackEls = tech.$$('track'); + const trackObjs = Array.prototype.map.call(trackEls, t => t.track); + const tracks = Array.prototype.map.call(trackEls, function (trackEl) { + const json = trackToJson_(trackEl.track); if (trackEl.src) { json.src = trackEl.src; } - return json; }); return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) { return trackObjs.indexOf(track) === -1; }).map(trackToJson_)); }; + /** * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript * object {@link TextTrack} representations. @@ -5946,28 +5567,32 @@ var textTracksToJson = function textTracksToJson(tech) { * @param {Tech} tech * The `Tech` to create the `TextTrack`s on. */ - - -var jsonToTextTracks = function jsonToTextTracks(json, tech) { +const jsonToTextTracks = function (json, tech) { json.forEach(function (track) { - var addedTrack = tech.addRemoteTextTrack(track).track; - + const addedTrack = tech.addRemoteTextTrack(track).track; if (!track.src && track.cues) { - track.cues.forEach(function (cue) { - return addedTrack.addCue(cue); - }); + track.cues.forEach(cue => addedTrack.addCue(cue)); } }); return tech.textTracks(); }; - var textTrackConverter = { - textTracksToJson: textTracksToJson, - jsonToTextTracks: jsonToTextTracks, - trackToJson_: trackToJson_ + textTracksToJson, + jsonToTextTracks, + trackToJson_ }; -var MODAL_CLASS_NAME = 'vjs-modal-dialog'; +/** + * @file modal-dialog.js + */ + +/** + * @typedef { import('./player').default } Player + * @typedef { import('./utils/dom').ContentDescriptor} ContentDescriptor + */ + +const MODAL_CLASS_NAME = 'vjs-modal-dialog'; + /** * The `ModalDialog` displays over the video and its controls, which blocks * interaction with the player until it is closed. @@ -5977,10 +5602,7 @@ var MODAL_CLASS_NAME = 'vjs-modal-dialog'; * * @extends Component */ - -var ModalDialog = /*#__PURE__*/function (_Component) { - _inheritsLoose__default['default'](ModalDialog, _Component); - +class ModalDialog extends Component$1 { /** * Create an instance of this class. * @@ -5990,7 +5612,7 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * @param {Object} [options] * The key/value store of player options. * - * @param {Mixed} [options.content=undefined] + * @param {ContentDescriptor} [options.content=undefined] * Provide customized content for this modal. * * @param {string} [options.description] @@ -6017,96 +5639,75 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * through the UI in the normal ways. Programmatic closing is * still possible. */ - function ModalDialog(player, options) { - var _this; + constructor(player, options) { + super(player, options); + this.handleKeyDown_ = e => this.handleKeyDown(e); + this.close_ = e => this.close(e); + this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false; + this.closeable(!this.options_.uncloseable); + this.content(this.options_.content); - _this = _Component.call(this, player, options) || this; - - _this.handleKeyDown_ = function (e) { - return _this.handleKeyDown(e); - }; - - _this.close_ = function (e) { - return _this.close(e); - }; - - _this.opened_ = _this.hasBeenOpened_ = _this.hasBeenFilled_ = false; - - _this.closeable(!_this.options_.uncloseable); - - _this.content(_this.options_.content); // Make sure the contentEl is defined AFTER any children are initialized + // Make sure the contentEl is defined AFTER any children are initialized // because we only want the contents of the modal in the contentEl // (not the UI elements like the close button). - - - _this.contentEl_ = createEl('div', { - className: MODAL_CLASS_NAME + "-content" + this.contentEl_ = createEl('div', { + className: `${MODAL_CLASS_NAME}-content` }, { role: 'document' }); - _this.descEl_ = createEl('p', { - className: MODAL_CLASS_NAME + "-description vjs-control-text", - id: _this.el().getAttribute('aria-describedby') + this.descEl_ = createEl('p', { + className: `${MODAL_CLASS_NAME}-description vjs-control-text`, + id: this.el().getAttribute('aria-describedby') }); - textContent(_this.descEl_, _this.description()); - - _this.el_.appendChild(_this.descEl_); - - _this.el_.appendChild(_this.contentEl_); - - return _this; + textContent(this.descEl_, this.description()); + this.el_.appendChild(this.descEl_); + this.el_.appendChild(this.contentEl_); } + /** * Create the `ModalDialog`'s DOM element * * @return {Element} * The DOM element that gets created. */ - - - var _proto = ModalDialog.prototype; - - _proto.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { + createEl() { + return super.createEl('div', { className: this.buildCSSClass(), tabIndex: -1 }, { - 'aria-describedby': this.id() + "_description", + 'aria-describedby': `${this.id()}_description`, 'aria-hidden': 'true', 'aria-label': this.label(), 'role': 'dialog' }); - }; - - _proto.dispose = function dispose() { + } + dispose() { this.contentEl_ = null; this.descEl_ = null; this.previouslyActiveEl_ = null; - - _Component.prototype.dispose.call(this); + super.dispose(); } + /** * Builds the default DOM `className`. * * @return {string} * The DOM `className` for this object. */ - ; - - _proto.buildCSSClass = function buildCSSClass() { - return MODAL_CLASS_NAME + " vjs-hidden " + _Component.prototype.buildCSSClass.call(this); + buildCSSClass() { + return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`; } + /** * Returns the label string for this modal. Primarily used for accessibility. * * @return {string} * the localized or raw label of this modal. */ - ; - - _proto.label = function label() { + label() { return this.localize(this.options_.label || 'Modal Window'); } + /** * Returns the description string for this modal. Primarily used for * accessibility. @@ -6114,69 +5715,67 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * @return {string} * The localized or raw description of this modal. */ - ; - - _proto.description = function description() { - var desc = this.options_.description || this.localize('This is a modal window.'); // Append a universal closeability message if the modal is closeable. + description() { + let desc = this.options_.description || this.localize('This is a modal window.'); + // Append a universal closeability message if the modal is closeable. if (this.closeable()) { desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.'); } - return desc; } + /** * Opens the modal. * * @fires ModalDialog#beforemodalopen * @fires ModalDialog#modalopen */ - ; - - _proto.open = function open() { + open() { if (!this.opened_) { - var player = this.player(); + const player = this.player(); + /** * Fired just before a `ModalDialog` is opened. * * @event ModalDialog#beforemodalopen - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('beforemodalopen'); - this.opened_ = true; // Fill content if the modal has never opened before and - // never been filled. + this.opened_ = true; + // Fill content if the modal has never opened before and + // never been filled. if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) { this.fill(); - } // If the player was playing, pause it and take note of its previously + } + + // If the player was playing, pause it and take note of its previously // playing state. - - this.wasPlaying_ = !player.paused(); - if (this.options_.pauseOnOpen && this.wasPlaying_) { player.pause(); } + this.on('keydown', this.handleKeyDown_); - this.on('keydown', this.handleKeyDown_); // Hide controls and note if they were enabled. - + // Hide controls and note if they were enabled. this.hadControls_ = player.controls(); player.controls(false); this.show(); this.conditionalFocus_(); this.el().setAttribute('aria-hidden', 'false'); + /** * Fired just after a `ModalDialog` is opened. * * @event ModalDialog#modalopen - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('modalopen'); this.hasBeenOpened_ = true; } } + /** * If the `ModalDialog` is currently open or closed. * @@ -6186,15 +5785,13 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * @return {boolean} * the current open state of the modaldialog */ - ; - - _proto.opened = function opened(value) { + opened(value) { if (typeof value === 'boolean') { this[value ? 'open' : 'close'](); } - return this.opened_; } + /** * Closes the modal, does nothing if the `ModalDialog` is * not open. @@ -6202,50 +5799,43 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * @fires ModalDialog#beforemodalclose * @fires ModalDialog#modalclose */ - ; - - _proto.close = function close() { + close() { if (!this.opened_) { return; } + const player = this.player(); - var player = this.player(); /** * Fired just before a `ModalDialog` is closed. * * @event ModalDialog#beforemodalclose - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('beforemodalclose'); this.opened_ = false; - if (this.wasPlaying_ && this.options_.pauseOnOpen) { player.play(); } - this.off('keydown', this.handleKeyDown_); - if (this.hadControls_) { player.controls(true); } - this.hide(); this.el().setAttribute('aria-hidden', 'true'); + /** * Fired just after a `ModalDialog` is closed. * * @event ModalDialog#modalclose - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('modalclose'); this.conditionalBlur_(); - if (this.options_.temporary) { this.dispose(); } } + /** * Check to see if the `ModalDialog` is closeable via the UI. * @@ -6255,44 +5845,42 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * @return {boolean} * Returns the final value of the closable option. */ - ; - - _proto.closeable = function closeable(value) { + closeable(value) { if (typeof value === 'boolean') { - var closeable = this.closeable_ = !!value; - var close = this.getChild('closeButton'); // If this is being made closeable and has no close button, add one. + const closeable = this.closeable_ = !!value; + let close = this.getChild('closeButton'); + // If this is being made closeable and has no close button, add one. if (closeable && !close) { // The close button should be a child of the modal - not its // content element, so temporarily change the content element. - var temp = this.contentEl_; + const temp = this.contentEl_; this.contentEl_ = this.el_; close = this.addChild('closeButton', { controlText: 'Close Modal Dialog' }); this.contentEl_ = temp; this.on(close, 'close', this.close_); - } // If this is being made uncloseable and has a close button, remove it. - + } + // If this is being made uncloseable and has a close button, remove it. if (!closeable && close) { this.off(close, 'close', this.close_); this.removeChild(close); close.dispose(); } } - return this.closeable_; } + /** * Fill the modal's content element with the modal's "content" option. * The content element will be emptied before this change takes place. */ - ; - - _proto.fill = function fill() { + fill() { this.fillWith(this.content()); } + /** * Fill the modal's content element with arbitrary content. * The content element will be emptied before this change takes place. @@ -6300,26 +5888,25 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * @fires ModalDialog#beforemodalfill * @fires ModalDialog#modalfill * - * @param {Mixed} [content] + * @param {ContentDescriptor} [content] * The same rules apply to this as apply to the `content` option. */ - ; + fillWith(content) { + const contentEl = this.contentEl(); + const parentEl = contentEl.parentNode; + const nextSiblingEl = contentEl.nextSibling; - _proto.fillWith = function fillWith(content) { - var contentEl = this.contentEl(); - var parentEl = contentEl.parentNode; - var nextSiblingEl = contentEl.nextSibling; /** * Fired just before a `ModalDialog` is filled with content. * * @event ModalDialog#beforemodalfill - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('beforemodalfill'); - this.hasBeenFilled_ = true; // Detach the content element from the DOM before performing - // manipulation to avoid modifying the live DOM multiple times. + this.hasBeenFilled_ = true; + // Detach the content element from the DOM before performing + // manipulation to avoid modifying the live DOM multiple times. parentEl.removeChild(contentEl); this.empty(); insertContent(contentEl, content); @@ -6327,50 +5914,49 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * Fired just after a `ModalDialog` is filled with content. * * @event ModalDialog#modalfill - * @type {EventTarget~Event} + * @type {Event} */ + this.trigger('modalfill'); - this.trigger('modalfill'); // Re-inject the re-filled content element. - + // Re-inject the re-filled content element. if (nextSiblingEl) { parentEl.insertBefore(contentEl, nextSiblingEl); } else { parentEl.appendChild(contentEl); - } // make sure that the close button is last in the dialog DOM - - - var closeButton = this.getChild('closeButton'); + } + // make sure that the close button is last in the dialog DOM + const closeButton = this.getChild('closeButton'); if (closeButton) { parentEl.appendChild(closeButton.el_); } } + /** * Empties the content element. This happens anytime the modal is filled. * * @fires ModalDialog#beforemodalempty * @fires ModalDialog#modalempty */ - ; - - _proto.empty = function empty() { + empty() { /** * Fired just before a `ModalDialog` is emptied. * * @event ModalDialog#beforemodalempty - * @type {EventTarget~Event} + * @type {Event} */ this.trigger('beforemodalempty'); emptyEl(this.contentEl()); + /** * Fired just after a `ModalDialog` is emptied. * * @event ModalDialog#modalempty - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('modalempty'); } + /** * Gets or sets the modal content, which gets normalized before being * rendered into the DOM. @@ -6378,90 +5964,78 @@ var ModalDialog = /*#__PURE__*/function (_Component) { * This does not update the DOM or fill the modal, but it is called during * that process. * - * @param {Mixed} [value] + * @param {ContentDescriptor} [value] * If defined, sets the internal content value to be used on the * next call(s) to `fill`. This value is normalized before being * inserted. To "clear" the internal content value, pass `null`. * - * @return {Mixed} + * @return {ContentDescriptor} * The current content of the modal dialog */ - ; - - _proto.content = function content(value) { + content(value) { if (typeof value !== 'undefined') { this.content_ = value; } - return this.content_; } + /** * conditionally focus the modal dialog if focus was previously on the player. * * @private */ - ; - - _proto.conditionalFocus_ = function conditionalFocus_() { - var activeEl = document__default['default'].activeElement; - var playerEl = this.player_.el_; + conditionalFocus_() { + const activeEl = document__default["default"].activeElement; + const playerEl = this.player_.el_; this.previouslyActiveEl_ = null; - if (playerEl.contains(activeEl) || playerEl === activeEl) { this.previouslyActiveEl_ = activeEl; this.focus(); } } + /** * conditionally blur the element and refocus the last focused element * * @private */ - ; - - _proto.conditionalBlur_ = function conditionalBlur_() { + conditionalBlur_() { if (this.previouslyActiveEl_) { this.previouslyActiveEl_.focus(); this.previouslyActiveEl_ = null; } } + /** * Keydown handler. Attached when modal is focused. * * @listens keydown */ - ; - - _proto.handleKeyDown = function handleKeyDown(event) { + handleKeyDown(event) { // Do not allow keydowns to reach out of the modal dialog. event.stopPropagation(); - - if (keycode__default['default'].isEventKey(event, 'Escape') && this.closeable()) { + if (keycode__default["default"].isEventKey(event, 'Escape') && this.closeable()) { event.preventDefault(); this.close(); return; - } // exit early if it isn't a tab key - - - if (!keycode__default['default'].isEventKey(event, 'Tab')) { - return; } - var focusableEls = this.focusableEls_(); - var activeEl = this.el_.querySelector(':focus'); - var focusIndex; - - for (var i = 0; i < focusableEls.length; i++) { + // exit early if it isn't a tab key + if (!keycode__default["default"].isEventKey(event, 'Tab')) { + return; + } + const focusableEls = this.focusableEls_(); + const activeEl = this.el_.querySelector(':focus'); + let focusIndex; + for (let i = 0; i < focusableEls.length; i++) { if (activeEl === focusableEls[i]) { focusIndex = i; break; } } - - if (document__default['default'].activeElement === this.el_) { + if (document__default["default"].activeElement === this.el_) { focusIndex = 0; } - if (event.shiftKey && focusIndex === 0) { focusableEls[focusableEls.length - 1].focus(); event.preventDefault(); @@ -6470,46 +6044,47 @@ var ModalDialog = /*#__PURE__*/function (_Component) { event.preventDefault(); } } + /** * get all focusable elements * * @private */ - ; - - _proto.focusableEls_ = function focusableEls_() { - var allChildren = this.el_.querySelectorAll('*'); - return Array.prototype.filter.call(allChildren, function (child) { - return (child instanceof window__default['default'].HTMLAnchorElement || child instanceof window__default['default'].HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window__default['default'].HTMLInputElement || child instanceof window__default['default'].HTMLSelectElement || child instanceof window__default['default'].HTMLTextAreaElement || child instanceof window__default['default'].HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window__default['default'].HTMLIFrameElement || child instanceof window__default['default'].HTMLObjectElement || child instanceof window__default['default'].HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable'); + focusableEls_() { + const allChildren = this.el_.querySelectorAll('*'); + return Array.prototype.filter.call(allChildren, child => { + return (child instanceof window__default["default"].HTMLAnchorElement || child instanceof window__default["default"].HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window__default["default"].HTMLInputElement || child instanceof window__default["default"].HTMLSelectElement || child instanceof window__default["default"].HTMLTextAreaElement || child instanceof window__default["default"].HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window__default["default"].HTMLIFrameElement || child instanceof window__default["default"].HTMLObjectElement || child instanceof window__default["default"].HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable'); }); - }; + } +} - return ModalDialog; -}(Component$1); /** * Default options for `ModalDialog` default options. * * @type {Object} * @private */ - - ModalDialog.prototype.options_ = { pauseOnOpen: true, temporary: true }; Component$1.registerComponent('ModalDialog', ModalDialog); +/** + * @file track-list.js + */ + +/** + * @typedef { import('./track').default } Track + */ + /** * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and * {@link VideoTrackList} * * @extends EventTarget */ - -var TrackList = /*#__PURE__*/function (_EventTarget) { - _inheritsLoose__default['default'](TrackList, _EventTarget); - +class TrackList extends EventTarget$2 { /** * Create an instance of this class * @@ -6518,34 +6093,26 @@ var TrackList = /*#__PURE__*/function (_EventTarget) { * * @abstract */ - function TrackList(tracks) { - var _this; + constructor(tracks = []) { + super(); + this.tracks_ = []; - if (tracks === void 0) { - tracks = []; - } - - _this = _EventTarget.call(this) || this; - _this.tracks_ = []; /** * @memberof TrackList * @member {number} length * The current number of `Track`s in the this Trackist. * @instance */ - - Object.defineProperty(_assertThisInitialized__default['default'](_this), 'length', { - get: function get() { + Object.defineProperty(this, 'length', { + get() { return this.tracks_.length; } }); - - for (var i = 0; i < tracks.length; i++) { - _this.addTrack(tracks[i]); + for (let i = 0; i < tracks.length; i++) { + this.addTrack(tracks[i]); } - - return _this; } + /** * Add a {@link Track} to the `TrackList` * @@ -6554,63 +6121,54 @@ var TrackList = /*#__PURE__*/function (_EventTarget) { * * @fires TrackList#addtrack */ - - - var _proto = TrackList.prototype; - - _proto.addTrack = function addTrack(track) { - var _this2 = this; - - var index = this.tracks_.length; - + addTrack(track) { + const index = this.tracks_.length; if (!('' + index in this)) { Object.defineProperty(this, index, { - get: function get() { + get() { return this.tracks_[index]; } }); - } // Do not add duplicate tracks - + } + // Do not add duplicate tracks if (this.tracks_.indexOf(track) === -1) { this.tracks_.push(track); /** * Triggered when a track is added to a track list. * * @event TrackList#addtrack - * @type {EventTarget~Event} + * @type {Event} * @property {Track} track * A reference to track that was added. */ - this.trigger({ - track: track, + track, type: 'addtrack', target: this }); } + /** * Triggered when a track label is changed. * * @event TrackList#addtrack - * @type {EventTarget~Event} + * @type {Event} * @property {Track} track * A reference to track that was added. */ - - - track.labelchange_ = function () { - _this2.trigger({ - track: track, + track.labelchange_ = () => { + this.trigger({ + track, type: 'labelchange', - target: _this2 + target: this }); }; - if (isEvented(track)) { track.addEventListener('labelchange', track.labelchange_); } } + /** * Remove a {@link Track} from the `TrackList` * @@ -6619,43 +6177,37 @@ var TrackList = /*#__PURE__*/function (_EventTarget) { * * @fires TrackList#removetrack */ - ; - - _proto.removeTrack = function removeTrack(rtrack) { - var track; - - for (var i = 0, l = this.length; i < l; i++) { + removeTrack(rtrack) { + let track; + for (let i = 0, l = this.length; i < l; i++) { if (this[i] === rtrack) { track = this[i]; - if (track.off) { track.off(); } - this.tracks_.splice(i, 1); break; } } - if (!track) { return; } + /** * Triggered when a track is removed from track list. * * @event TrackList#removetrack - * @type {EventTarget~Event} + * @type {Event} * @property {Track} track * A reference to track that was removed. */ - - this.trigger({ - track: track, + track, type: 'removetrack', target: this }); } + /** * Get a Track from the TrackList by a tracks id * @@ -6664,30 +6216,24 @@ var TrackList = /*#__PURE__*/function (_EventTarget) { * @return {Track} * @private */ - ; - - _proto.getTrackById = function getTrackById(id) { - var result = null; - - for (var i = 0, l = this.length; i < l; i++) { - var track = this[i]; - + getTrackById(id) { + let result = null; + for (let i = 0, l = this.length; i < l; i++) { + const track = this[i]; if (track.id === id) { result = track; break; } } - return result; - }; + } +} - return TrackList; -}(EventTarget$2); /** * Triggered when a different track is selected/enabled. * * @event TrackList#change - * @type {EventTarget~Event} + * @type {Event} */ /** @@ -6696,19 +6242,26 @@ var TrackList = /*#__PURE__*/function (_EventTarget) { * @property {Object} TrackList#allowedEvents_ * @private */ - - TrackList.prototype.allowedEvents_ = { change: 'change', addtrack: 'addtrack', removetrack: 'removetrack', labelchange: 'labelchange' -}; // emulate attribute EventHandler support to allow for feature detection +}; -for (var event in TrackList.prototype.allowedEvents_) { +// emulate attribute EventHandler support to allow for feature detection +for (const event in TrackList.prototype.allowedEvents_) { TrackList.prototype['on' + event] = null; } +/** + * @file audio-track-list.js + */ + +/** + * @typedef { import('./audio-track').default } AudioTrack + */ + /** * Anywhere we call this function we diverge from the spec * as we only support one enabled audiotrack at a time @@ -6721,54 +6274,42 @@ for (var event in TrackList.prototype.allowedEvents_) { * * @private */ - -var disableOthers$1 = function disableOthers(list, track) { - for (var i = 0; i < list.length; i++) { +const disableOthers$1 = function (list, track) { + for (let i = 0; i < list.length; i++) { if (!Object.keys(list[i]).length || track.id === list[i].id) { continue; - } // another audio track is enabled, disable it - - + } + // another audio track is enabled, disable it list[i].enabled = false; } }; + /** * The current list of {@link AudioTrack} for a media file. * * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist} * @extends TrackList */ - - -var AudioTrackList = /*#__PURE__*/function (_TrackList) { - _inheritsLoose__default['default'](AudioTrackList, _TrackList); - +class AudioTrackList extends TrackList { /** * Create an instance of this class. * * @param {AudioTrack[]} [tracks=[]] * A list of `AudioTrack` to instantiate the list with. */ - function AudioTrackList(tracks) { - var _this; - - if (tracks === void 0) { - tracks = []; - } - + constructor(tracks = []) { // make sure only 1 track is enabled // sorted from last index to first index - for (var i = tracks.length - 1; i >= 0; i--) { + for (let i = tracks.length - 1; i >= 0; i--) { if (tracks[i].enabled) { disableOthers$1(tracks, tracks[i]); break; } } - - _this = _TrackList.call(this, tracks) || this; - _this.changing_ = false; - return _this; + super(tracks); + this.changing_ = false; } + /** * Add an {@link AudioTrack} to the `AudioTrackList`. * @@ -6777,58 +6318,50 @@ var AudioTrackList = /*#__PURE__*/function (_TrackList) { * * @fires TrackList#addtrack */ - - - var _proto = AudioTrackList.prototype; - - _proto.addTrack = function addTrack(track) { - var _this2 = this; - + addTrack(track) { if (track.enabled) { disableOthers$1(this, track); } - - _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this - - + super.addTrack(track); + // native tracks don't have this if (!track.addEventListener) { return; } - - track.enabledChange_ = function () { + track.enabledChange_ = () => { // when we are disabling other tracks (since we don't support // more than one track at a time) we will set changing_ // to true so that we don't trigger additional change events - if (_this2.changing_) { + if (this.changing_) { return; } - - _this2.changing_ = true; - disableOthers$1(_this2, track); - _this2.changing_ = false; - - _this2.trigger('change'); + this.changing_ = true; + disableOthers$1(this, track); + this.changing_ = false; + this.trigger('change'); }; + /** * @listens AudioTrack#enabledchange * @fires TrackList#change */ - - track.addEventListener('enabledchange', track.enabledChange_); - }; - - _proto.removeTrack = function removeTrack(rtrack) { - _TrackList.prototype.removeTrack.call(this, rtrack); - + } + removeTrack(rtrack) { + super.removeTrack(rtrack); if (rtrack.removeEventListener && rtrack.enabledChange_) { rtrack.removeEventListener('enabledchange', rtrack.enabledChange_); rtrack.enabledChange_ = null; } - }; + } +} - return AudioTrackList; -}(TrackList); +/** + * @file video-track-list.js + */ + +/** + * @typedef { import('./video-track').default } VideoTrack + */ /** * Un-select all other {@link VideoTrack}s that are selected. @@ -6841,71 +6374,58 @@ var AudioTrackList = /*#__PURE__*/function (_TrackList) { * * @private */ - -var disableOthers = function disableOthers(list, track) { - for (var i = 0; i < list.length; i++) { +const disableOthers = function (list, track) { + for (let i = 0; i < list.length; i++) { if (!Object.keys(list[i]).length || track.id === list[i].id) { continue; - } // another video track is enabled, disable it - - + } + // another video track is enabled, disable it list[i].selected = false; } }; + /** * The current list of {@link VideoTrack} for a video. * * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist} * @extends TrackList */ - - -var VideoTrackList = /*#__PURE__*/function (_TrackList) { - _inheritsLoose__default['default'](VideoTrackList, _TrackList); - +class VideoTrackList extends TrackList { /** * Create an instance of this class. * * @param {VideoTrack[]} [tracks=[]] * A list of `VideoTrack` to instantiate the list with. */ - function VideoTrackList(tracks) { - var _this; - - if (tracks === void 0) { - tracks = []; - } - + constructor(tracks = []) { // make sure only 1 track is enabled // sorted from last index to first index - for (var i = tracks.length - 1; i >= 0; i--) { + for (let i = tracks.length - 1; i >= 0; i--) { if (tracks[i].selected) { disableOthers(tracks, tracks[i]); break; } } + super(tracks); + this.changing_ = false; - _this = _TrackList.call(this, tracks) || this; - _this.changing_ = false; /** * @member {number} VideoTrackList#selectedIndex * The current index of the selected {@link VideoTrack`}. */ - - Object.defineProperty(_assertThisInitialized__default['default'](_this), 'selectedIndex', { - get: function get() { - for (var _i = 0; _i < this.length; _i++) { - if (this[_i].selected) { - return _i; + Object.defineProperty(this, 'selectedIndex', { + get() { + for (let i = 0; i < this.length; i++) { + if (this[i].selected) { + return i; } } - return -1; }, - set: function set() {} + set() {} }); - return _this; } + /** * Add a {@link VideoTrack} to the `VideoTrackList`. * @@ -6914,55 +6434,47 @@ var VideoTrackList = /*#__PURE__*/function (_TrackList) { * * @fires TrackList#addtrack */ - - - var _proto = VideoTrackList.prototype; - - _proto.addTrack = function addTrack(track) { - var _this2 = this; - + addTrack(track) { if (track.selected) { disableOthers(this, track); } - - _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this - - + super.addTrack(track); + // native tracks don't have this if (!track.addEventListener) { return; } - - track.selectedChange_ = function () { - if (_this2.changing_) { + track.selectedChange_ = () => { + if (this.changing_) { return; } - - _this2.changing_ = true; - disableOthers(_this2, track); - _this2.changing_ = false; - - _this2.trigger('change'); + this.changing_ = true; + disableOthers(this, track); + this.changing_ = false; + this.trigger('change'); }; + /** * @listens VideoTrack#selectedchange * @fires TrackList#change */ - - track.addEventListener('selectedchange', track.selectedChange_); - }; - - _proto.removeTrack = function removeTrack(rtrack) { - _TrackList.prototype.removeTrack.call(this, rtrack); - + } + removeTrack(rtrack) { + super.removeTrack(rtrack); if (rtrack.removeEventListener && rtrack.selectedChange_) { rtrack.removeEventListener('selectedchange', rtrack.selectedChange_); rtrack.selectedChange_ = null; } - }; + } +} - return VideoTrackList; -}(TrackList); +/** + * @file text-track-list.js + */ + +/** + * @typedef { import('./text-track').default } TextTrack + */ /** * The current list of {@link TextTrack} for a media file. @@ -6970,16 +6482,7 @@ var VideoTrackList = /*#__PURE__*/function (_TrackList) { * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist} * @extends TrackList */ - -var TextTrackList = /*#__PURE__*/function (_TrackList) { - _inheritsLoose__default['default'](TextTrackList, _TrackList); - - function TextTrackList() { - return _TrackList.apply(this, arguments) || this; - } - - var _proto = TextTrackList.prototype; - +class TextTrackList extends TrackList { /** * Add a {@link TextTrack} to the `TextTrackList` * @@ -6988,53 +6491,39 @@ var TextTrackList = /*#__PURE__*/function (_TrackList) { * * @fires TrackList#addtrack */ - _proto.addTrack = function addTrack(track) { - var _this = this; - - _TrackList.prototype.addTrack.call(this, track); - + addTrack(track) { + super.addTrack(track); if (!this.queueChange_) { - this.queueChange_ = function () { - return _this.queueTrigger('change'); - }; + this.queueChange_ = () => this.queueTrigger('change'); + } + if (!this.triggerSelectedlanguagechange) { + this.triggerSelectedlanguagechange_ = () => this.trigger('selectedlanguagechange'); } - if (!this.triggerSelectedlanguagechange) { - this.triggerSelectedlanguagechange_ = function () { - return _this.trigger('selectedlanguagechange'); - }; - } /** * @listens TextTrack#modechange * @fires TrackList#change */ - - track.addEventListener('modechange', this.queueChange_); - var nonLanguageTextTrackKind = ['metadata', 'chapters']; - + const nonLanguageTextTrackKind = ['metadata', 'chapters']; if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) { track.addEventListener('modechange', this.triggerSelectedlanguagechange_); } - }; - - _proto.removeTrack = function removeTrack(rtrack) { - _TrackList.prototype.removeTrack.call(this, rtrack); // manually remove the event handlers we added - + } + removeTrack(rtrack) { + super.removeTrack(rtrack); + // manually remove the event handlers we added if (rtrack.removeEventListener) { if (this.queueChange_) { rtrack.removeEventListener('modechange', this.queueChange_); } - if (this.selectedlanguagechange_) { rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_); } } - }; - - return TextTrackList; -}(TrackList); + } +} /** * @file html-track-element-list.js @@ -7043,36 +6532,32 @@ var TextTrackList = /*#__PURE__*/function (_TrackList) { /** * The current list of {@link HtmlTrackElement}s. */ -var HtmlTrackElementList = /*#__PURE__*/function () { +class HtmlTrackElementList { /** * Create an instance of this class. * * @param {HtmlTrackElement[]} [tracks=[]] * A list of `HtmlTrackElement` to instantiate the list with. */ - function HtmlTrackElementList(trackElements) { - if (trackElements === void 0) { - trackElements = []; - } - + constructor(trackElements = []) { this.trackElements_ = []; + /** * @memberof HtmlTrackElementList * @member {number} length * The current number of `Track`s in the this Trackist. * @instance */ - Object.defineProperty(this, 'length', { - get: function get() { + get() { return this.trackElements_.length; } }); - - for (var i = 0, length = trackElements.length; i < length; i++) { + for (let i = 0, length = trackElements.length; i < length; i++) { this.addTrackElement_(trackElements[i]); } } + /** * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList` * @@ -7081,26 +6566,22 @@ var HtmlTrackElementList = /*#__PURE__*/function () { * * @private */ - - - var _proto = HtmlTrackElementList.prototype; - - _proto.addTrackElement_ = function addTrackElement_(trackElement) { - var index = this.trackElements_.length; - + addTrackElement_(trackElement) { + const index = this.trackElements_.length; if (!('' + index in this)) { Object.defineProperty(this, index, { - get: function get() { + get() { return this.trackElements_[index]; } }); - } // Do not add duplicate elements - + } + // Do not add duplicate elements if (this.trackElements_.indexOf(trackElement) === -1) { this.trackElements_.push(trackElement); } } + /** * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an * {@link TextTrack}. @@ -7113,20 +6594,17 @@ var HtmlTrackElementList = /*#__PURE__*/function () { * * @private */ - ; - - _proto.getTrackElementByTrack_ = function getTrackElementByTrack_(track) { - var trackElement_; - - for (var i = 0, length = this.trackElements_.length; i < length; i++) { + getTrackElementByTrack_(track) { + let trackElement_; + for (let i = 0, length = this.trackElements_.length; i < length; i++) { if (track === this.trackElements_[i].track) { trackElement_ = this.trackElements_[i]; break; } } - return trackElement_; } + /** * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList` * @@ -7135,27 +6613,21 @@ var HtmlTrackElementList = /*#__PURE__*/function () { * * @private */ - ; - - _proto.removeTrackElement_ = function removeTrackElement_(trackElement) { - for (var i = 0, length = this.trackElements_.length; i < length; i++) { + removeTrackElement_(trackElement) { + for (let i = 0, length = this.trackElements_.length; i < length; i++) { if (trackElement === this.trackElements_[i]) { if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') { this.trackElements_[i].track.off(); } - if (typeof this.trackElements_[i].off === 'function') { this.trackElements_[i].off(); } - this.trackElements_.splice(i, 1); break; } } - }; - - return HtmlTrackElementList; -}(); + } +} /** * @file text-track-cue-list.js @@ -7184,28 +6656,29 @@ var HtmlTrackElementList = /*#__PURE__*/function () { * * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist} */ -var TextTrackCueList = /*#__PURE__*/function () { +class TextTrackCueList { /** * Create an instance of this class.. * * @param {Array} cues * A list of cues to be initialized with */ - function TextTrackCueList(cues) { + constructor(cues) { TextTrackCueList.prototype.setCues_.call(this, cues); + /** * @memberof TextTrackCueList * @member {number} length * The current number of `TextTrackCue`s in the TextTrackCueList. * @instance */ - Object.defineProperty(this, 'length', { - get: function get() { + get() { return this.length_; } }); } + /** * A setter for cues in this list. Creates getters * an an index for the cues. @@ -7215,35 +6688,29 @@ var TextTrackCueList = /*#__PURE__*/function () { * * @private */ - - - var _proto = TextTrackCueList.prototype; - - _proto.setCues_ = function setCues_(cues) { - var oldLength = this.length || 0; - var i = 0; - var l = cues.length; + setCues_(cues) { + const oldLength = this.length || 0; + let i = 0; + const l = cues.length; this.cues_ = cues; this.length_ = cues.length; - - var defineProp = function defineProp(index) { + const defineProp = function (index) { if (!('' + index in this)) { Object.defineProperty(this, '' + index, { - get: function get() { + get() { return this.cues_[index]; } }); } }; - if (oldLength < l) { i = oldLength; - for (; i < l; i++) { defineProp.call(this, i); } } } + /** * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id. * @@ -7253,25 +6720,18 @@ var TextTrackCueList = /*#__PURE__*/function () { * @return {TextTrackCueList~TextTrackCue|null} * A single cue or null if none was found. */ - ; - - _proto.getCueById = function getCueById(id) { - var result = null; - - for (var i = 0, l = this.length; i < l; i++) { - var cue = this[i]; - + getCueById(id) { + let result = null; + for (let i = 0, l = this.length; i < l; i++) { + const cue = this[i]; if (cue.id === id) { result = cue; break; } } - return result; - }; - - return TextTrackCueList; -}(); + } +} /** * @file track-kinds.js @@ -7284,7 +6744,7 @@ var TextTrackCueList = /*#__PURE__*/function () { * @typedef VideoTrack~Kind * @enum */ -var VideoTrackKind = { +const VideoTrackKind = { alternative: 'alternative', captions: 'captions', main: 'main', @@ -7292,6 +6752,7 @@ var VideoTrackKind = { subtitles: 'subtitles', commentary: 'commentary' }; + /** * All possible `AudioTrackKind`s * @@ -7299,8 +6760,7 @@ var VideoTrackKind = { * @typedef AudioTrack~Kind * @enum */ - -var AudioTrackKind = { +const AudioTrackKind = { 'alternative': 'alternative', 'descriptions': 'descriptions', 'main': 'main', @@ -7308,6 +6768,7 @@ var AudioTrackKind = { 'translation': 'translation', 'commentary': 'commentary' }; + /** * All possible `TextTrackKind`s * @@ -7315,14 +6776,14 @@ var AudioTrackKind = { * @typedef TextTrack~Kind * @enum */ - -var TextTrackKind = { +const TextTrackKind = { subtitles: 'subtitles', captions: 'captions', descriptions: 'descriptions', chapters: 'chapters', metadata: 'metadata' }; + /** * All possible `TextTrackMode`s * @@ -7330,13 +6791,16 @@ var TextTrackKind = { * @typedef TextTrack~Mode * @enum */ - -var TextTrackMode = { +const TextTrackMode = { disabled: 'disabled', hidden: 'hidden', showing: 'showing' }; +/** + * @file track.js + */ + /** * A Track class that contains all of the common functionality for {@link AudioTrack}, * {@link VideoTrack}, and {@link TextTrack}. @@ -7347,10 +6811,7 @@ var TextTrackMode = { * @extends EventTarget * @abstract */ - -var Track = /*#__PURE__*/function (_EventTarget) { - _inheritsLoose__default['default'](Track, _EventTarget); - +class Track extends EventTarget$2 { /** * Create an instance of this class. * @@ -7371,20 +6832,15 @@ var Track = /*#__PURE__*/function (_EventTarget) { * * @abstract */ - function Track(options) { - var _this; - - if (options === void 0) { - options = {}; - } - - _this = _EventTarget.call(this) || this; - var trackProps = { + constructor(options = {}) { + super(); + const trackProps = { id: options.id || 'vjs_track_' + newGUID(), kind: options.kind || '', language: options.language || '' }; - var label = options.label || ''; + let label = options.label || ''; + /** * @memberof Track * @member {string} id @@ -7413,18 +6869,15 @@ var Track = /*#__PURE__*/function (_EventTarget) { * @readonly */ - var _loop = function _loop(key) { - Object.defineProperty(_assertThisInitialized__default['default'](_this), key, { - get: function get() { + for (const key in trackProps) { + Object.defineProperty(this, key, { + get() { return trackProps[key]; }, - set: function set() {} + set() {} }); - }; - - for (var key in trackProps) { - _loop(key); } + /** * @memberof Track * @member {string} label @@ -7433,38 +6886,34 @@ var Track = /*#__PURE__*/function (_EventTarget) { * * @fires Track#labelchange */ - - - Object.defineProperty(_assertThisInitialized__default['default'](_this), 'label', { - get: function get() { + Object.defineProperty(this, 'label', { + get() { return label; }, - set: function set(newLabel) { + set(newLabel) { if (newLabel !== label) { label = newLabel; + /** * An event that fires when label changes on this track. * * > Note: This is not part of the spec! * * @event Track#labelchange - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('labelchange'); } } }); - return _this; } - - return Track; -}(EventTarget$2); +} /** * @file url.js * @module url */ + /** * @typedef {Object} url:URLObject * @@ -7500,46 +6949,44 @@ var Track = /*#__PURE__*/function (_EventTarget) { * @return {url:URLObject} * An object of url details */ - -var parseUrl = function parseUrl(url) { +const parseUrl = function (url) { // This entire method can be replace with URL once we are able to drop IE11 - var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; // add the url to an anchor and let the browser parse the URL - var a = document__default['default'].createElement('a'); - a.href = url; // Copy the specific URL properties to a new object + const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; + + // add the url to an anchor and let the browser parse the URL + const a = document__default["default"].createElement('a'); + a.href = url; + + // Copy the specific URL properties to a new object // This is also needed for IE because the anchor loses its // properties when it's removed from the dom - - var details = {}; - - for (var i = 0; i < props.length; i++) { + const details = {}; + for (let i = 0; i < props.length; i++) { details[props[i]] = a[props[i]]; - } // IE adds the port to the host property unlike everyone else. If + } + + // IE adds the port to the host property unlike everyone else. If // a port identifier is added for standard ports, strip it. - - if (details.protocol === 'http:') { details.host = details.host.replace(/:80$/, ''); } - if (details.protocol === 'https:') { details.host = details.host.replace(/:443$/, ''); } - if (!details.protocol) { - details.protocol = window__default['default'].location.protocol; + details.protocol = window__default["default"].location.protocol; } + /* istanbul ignore if */ - - if (!details.host) { - details.host = window__default['default'].location.host; + details.host = window__default["default"].location.host; } - return details; }; + /** - * Get absolute version of relative URL. Used to tell Flash the correct URL. + * Get absolute version of relative URL. * * @function * @param {string} url @@ -7550,19 +6997,17 @@ var parseUrl = function parseUrl(url) { * * @see http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue */ - -var getAbsoluteURL = function getAbsoluteURL(url) { +const getAbsoluteURL = function (url) { // Check if absolute URL if (!url.match(/^https?:\/\//)) { - // Convert to absolute URL. Flash hosted off-site needs an absolute URL. - // add the url to an anchor and let the browser parse the URL - var a = document__default['default'].createElement('a'); + // Add the url to an anchor and let the browser parse it to convert to an absolute url + const a = document__default["default"].createElement('a'); a.href = url; url = a.href; } - return url; }; + /** * Returns the extension of the passed file name. It will return an empty string * if passed an invalid path. @@ -7575,19 +7020,17 @@ var getAbsoluteURL = function getAbsoluteURL(url) { * The extension in lower case or an empty string if no * extension could be found. */ - -var getFileExtension = function getFileExtension(path) { +const getFileExtension = function (path) { if (typeof path === 'string') { - var splitPathRe = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/; - var pathParts = splitPathRe.exec(path); - + const splitPathRe = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/; + const pathParts = splitPathRe.exec(path); if (pathParts) { return pathParts.pop().toLowerCase(); } } - return ''; }; + /** * Returns whether the url passed is a cross domain request or not. * @@ -7607,18 +7050,15 @@ var getFileExtension = function getFileExtension(path) { * @return {boolean} * Whether it is a cross domain request or not. */ +const isCrossOrigin = function (url, winLoc = window__default["default"].location) { + const urlInfo = parseUrl(url); -var isCrossOrigin = function isCrossOrigin(url, winLoc) { - if (winLoc === void 0) { - winLoc = window__default['default'].location; - } + // IE8 protocol relative urls will return ':' for protocol + const srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; - var urlInfo = parseUrl(url); // IE8 protocol relative urls will return ':' for protocol - - var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; // Check if url is for another domain/origin + // Check if url is for another domain/origin // IE8 doesn't know location.origin, so we won't rely on it here - - var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host; + const crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host; return crossOrigin; }; @@ -7630,6 +7070,14 @@ var Url = /*#__PURE__*/Object.freeze({ isCrossOrigin: isCrossOrigin }); +/** + * @file text-track.js + */ + +/** + * @typedef { import('../tech/tech').default } Tech + */ + /** * Takes a webvtt file contents and parses it into cues * @@ -7641,44 +7089,34 @@ var Url = /*#__PURE__*/Object.freeze({ * * @private */ - -var parseCues = function parseCues(srcContent, track) { - var parser = new window__default['default'].WebVTT.Parser(window__default['default'], window__default['default'].vttjs, window__default['default'].WebVTT.StringDecoder()); - var errors = []; - +const parseCues = function (srcContent, track) { + const parser = new window__default["default"].WebVTT.Parser(window__default["default"], window__default["default"].vttjs, window__default["default"].WebVTT.StringDecoder()); + const errors = []; parser.oncue = function (cue) { track.addCue(cue); }; - parser.onparsingerror = function (error) { errors.push(error); }; - parser.onflush = function () { track.trigger({ type: 'loadeddata', target: track }); }; - parser.parse(srcContent); - if (errors.length > 0) { - if (window__default['default'].console && window__default['default'].console.groupCollapsed) { - window__default['default'].console.groupCollapsed("Text Track parsing errors for " + track.src); + if (window__default["default"].console && window__default["default"].console.groupCollapsed) { + window__default["default"].console.groupCollapsed(`Text Track parsing errors for ${track.src}`); } - - errors.forEach(function (error) { - return log$1.error(error); - }); - - if (window__default['default'].console && window__default['default'].console.groupEnd) { - window__default['default'].console.groupEnd(); + errors.forEach(error => log$1.error(error)); + if (window__default["default"].console && window__default["default"].console.groupEnd) { + window__default["default"].console.groupEnd(); } } - parser.flush(); }; + /** * Load a `TextTrack` from a specified url. * @@ -7690,42 +7128,35 @@ var parseCues = function parseCues(srcContent, track) { * * @private */ - - -var loadTrack = function loadTrack(src, track) { - var opts = { +const loadTrack = function (src, track) { + const opts = { uri: src }; - var crossOrigin = isCrossOrigin(src); - + const crossOrigin = isCrossOrigin(src); if (crossOrigin) { opts.cors = crossOrigin; } - - var withCredentials = track.tech_.crossOrigin() === 'use-credentials'; - + const withCredentials = track.tech_.crossOrigin() === 'use-credentials'; if (withCredentials) { opts.withCredentials = withCredentials; } - - XHR__default['default'](opts, bind(this, function (err, response, responseBody) { + XHR__default["default"](opts, bind_(this, function (err, response, responseBody) { if (err) { return log$1.error(err, response); } + track.loaded_ = true; - track.loaded_ = true; // Make sure that vttjs has loaded, otherwise, wait till it finished loading + // Make sure that vttjs has loaded, otherwise, wait till it finished loading // NOTE: this is only used for the alt/video.novtt.js build - - if (typeof window__default['default'].WebVTT !== 'function') { + if (typeof window__default["default"].WebVTT !== 'function') { if (track.tech_) { // to prevent use before define eslint error, we define loadHandler // as a let here - track.tech_.any(['vttjsloaded', 'vttjserror'], function (event) { + track.tech_.any(['vttjsloaded', 'vttjserror'], event => { if (event.type === 'vttjserror') { - log$1.error("vttjs failed to load, stopping trying to process " + track.src); + log$1.error(`vttjs failed to load, stopping trying to process ${track.src}`); return; } - return parseCues(responseBody, track); }); } @@ -7734,17 +7165,14 @@ var loadTrack = function loadTrack(src, track) { } })); }; + /** * A representation of a single `TextTrack`. * * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack} * @extends Track */ - - -var TextTrack = /*#__PURE__*/function (_Track) { - _inheritsLoose__default['default'](TextTrack, _Track); - +class TextTrack extends Track { /** * Create an instance of this class. * @@ -7779,71 +7207,59 @@ var TextTrack = /*#__PURE__*/function (_Track) { * @param {boolean} [options.default] * If this track should default to on or off. */ - function TextTrack(options) { - var _this; - - if (options === void 0) { - options = {}; - } - + constructor(options = {}) { if (!options.tech) { throw new Error('A tech was not provided.'); } - - var settings = mergeOptions$3(options, { + const settings = merge$1(options, { kind: TextTrackKind[options.kind] || 'subtitles', language: options.language || options.srclang || '' }); - var mode = TextTrackMode[settings.mode] || 'disabled'; - var default_ = settings["default"]; - + let mode = TextTrackMode[settings.mode] || 'disabled'; + const default_ = settings.default; if (settings.kind === 'metadata' || settings.kind === 'chapters') { mode = 'hidden'; } - - _this = _Track.call(this, settings) || this; - _this.tech_ = settings.tech; - _this.cues_ = []; - _this.activeCues_ = []; - _this.preload_ = _this.tech_.preloadTextTracks !== false; - var cues = new TextTrackCueList(_this.cues_); - var activeCues = new TextTrackCueList(_this.activeCues_); - var changed = false; - _this.timeupdateHandler = bind(_assertThisInitialized__default['default'](_this), function () { + super(settings); + this.tech_ = settings.tech; + this.cues_ = []; + this.activeCues_ = []; + this.preload_ = this.tech_.preloadTextTracks !== false; + const cues = new TextTrackCueList(this.cues_); + const activeCues = new TextTrackCueList(this.activeCues_); + let changed = false; + this.timeupdateHandler = bind_(this, function (event = {}) { if (this.tech_.isDisposed()) { return; } - if (!this.tech_.isReady_) { - this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler); + if (event.type !== 'timeupdate') { + this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler); + } return; - } // Accessing this.activeCues for the side-effects of updating itself + } + + // Accessing this.activeCues for the side-effects of updating itself // due to its nature as a getter function. Do not remove or cues will // stop updating! // Use the setter to prevent deletion from uglify (pure_getters rule) - - this.activeCues = this.activeCues; - if (changed) { this.trigger('cuechange'); changed = false; } - - this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler); + if (event.type !== 'timeupdate') { + this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler); + } }); - - var disposeHandler = function disposeHandler() { - _this.stopTracking(); + const disposeHandler = () => { + this.stopTracking(); }; - - _this.tech_.one('dispose', disposeHandler); - + this.tech_.one('dispose', disposeHandler); if (mode !== 'disabled') { - _this.startTracking(); + this.startTracking(); } - - Object.defineProperties(_assertThisInitialized__default['default'](_this), { + Object.defineProperties(this, { /** * @memberof TextTrack * @member {boolean} default @@ -7853,13 +7269,12 @@ var TextTrack = /*#__PURE__*/function (_Track) { * * @readonly */ - "default": { - get: function get() { + default: { + get() { return default_; }, - set: function set() {} + set() {} }, - /** * @memberof TextTrack * @member {string} mode @@ -7870,27 +7285,22 @@ var TextTrack = /*#__PURE__*/function (_Track) { * @fires TextTrack#modechange */ mode: { - get: function get() { + get() { return mode; }, - set: function set(newMode) { + set(newMode) { if (!TextTrackMode[newMode]) { return; } - if (mode === newMode) { return; } - mode = newMode; - if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) { // On-demand load. loadTrack(this.src, this); } - this.stopTracking(); - if (mode !== 'disabled') { this.startTracking(); } @@ -7901,14 +7311,11 @@ var TextTrack = /*#__PURE__*/function (_Track) { * > Note: This is not part of the spec! * * @event TextTrack#modechange - * @type {EventTarget~Event} + * @type {Event} */ - - this.trigger('modechange'); } }, - /** * @memberof TextTrack * @member {TextTrackCueList} cues @@ -7916,16 +7323,14 @@ var TextTrack = /*#__PURE__*/function (_Track) { * @instance */ cues: { - get: function get() { + get() { if (!this.loaded_) { return null; } - return cues; }, - set: function set() {} + set() {} }, - /** * @memberof TextTrack * @member {TextTrackCueList} activeCues @@ -7933,146 +7338,121 @@ var TextTrack = /*#__PURE__*/function (_Track) { * @instance */ activeCues: { - get: function get() { + get() { if (!this.loaded_) { return null; - } // nothing to do - + } + // nothing to do if (this.cues.length === 0) { return activeCues; } - - var ct = this.tech_.currentTime(); - var active = []; - - for (var i = 0, l = this.cues.length; i < l; i++) { - var cue = this.cues[i]; - + const ct = this.tech_.currentTime(); + const active = []; + for (let i = 0, l = this.cues.length; i < l; i++) { + const cue = this.cues[i]; if (cue.startTime <= ct && cue.endTime >= ct) { active.push(cue); - } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) { - active.push(cue); } } - changed = false; - if (active.length !== this.activeCues_.length) { changed = true; } else { - for (var _i = 0; _i < active.length; _i++) { - if (this.activeCues_.indexOf(active[_i]) === -1) { + for (let i = 0; i < active.length; i++) { + if (this.activeCues_.indexOf(active[i]) === -1) { changed = true; } } } - this.activeCues_ = active; activeCues.setCues_(this.activeCues_); return activeCues; }, // /!\ Keep this setter empty (see the timeupdate handler above) - set: function set() {} + set() {} } }); - if (settings.src) { - _this.src = settings.src; - - if (!_this.preload_) { + this.src = settings.src; + if (!this.preload_) { // Tracks will load on-demand. // Act like we're loaded for other purposes. - _this.loaded_ = true; + this.loaded_ = true; } - - if (_this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') { - loadTrack(_this.src, _assertThisInitialized__default['default'](_this)); + if (this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') { + loadTrack(this.src, this); } } else { - _this.loaded_ = true; + this.loaded_ = true; } - - return _this; } - - var _proto = TextTrack.prototype; - - _proto.startTracking = function startTracking() { + startTracking() { + // More precise cues based on requestVideoFrameCallback with a requestAnimationFram fallback this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler); - }; - - _proto.stopTracking = function stopTracking() { + // Also listen to timeupdate in case rVFC/rAF stops (window in background, audio in video el) + this.tech_.on('timeupdate', this.timeupdateHandler); + } + stopTracking() { if (this.rvf_) { this.tech_.cancelVideoFrameCallback(this.rvf_); this.rvf_ = undefined; } + this.tech_.off('timeupdate', this.timeupdateHandler); } + /** * Add a cue to the internal list of cues. * * @param {TextTrack~Cue} cue * The cue to add to our internal list */ - ; - - _proto.addCue = function addCue(originalCue) { - var cue = originalCue; - - if (window__default['default'].vttjs && !(originalCue instanceof window__default['default'].vttjs.VTTCue)) { - cue = new window__default['default'].vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text); - - for (var prop in originalCue) { + addCue(originalCue) { + let cue = originalCue; + if (window__default["default"].vttjs && !(originalCue instanceof window__default["default"].vttjs.VTTCue)) { + cue = new window__default["default"].vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text); + for (const prop in originalCue) { if (!(prop in cue)) { cue[prop] = originalCue[prop]; } - } // make sure that `id` is copied over - + } + // make sure that `id` is copied over cue.id = originalCue.id; cue.originalCue_ = originalCue; } - - var tracks = this.tech_.textTracks(); - - for (var i = 0; i < tracks.length; i++) { + const tracks = this.tech_.textTracks(); + for (let i = 0; i < tracks.length; i++) { if (tracks[i] !== this) { tracks[i].removeCue(cue); } } - this.cues_.push(cue); this.cues.setCues_(this.cues_); } + /** * Remove a cue from our internal list * * @param {TextTrack~Cue} removeCue * The cue to remove from our internal list */ - ; - - _proto.removeCue = function removeCue(_removeCue) { - var i = this.cues_.length; - + removeCue(removeCue) { + let i = this.cues_.length; while (i--) { - var cue = this.cues_[i]; - - if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) { + const cue = this.cues_[i]; + if (cue === removeCue || cue.originalCue_ && cue.originalCue_ === removeCue) { this.cues_.splice(i, 1); this.cues.setCues_(this.cues_); break; } } - }; + } +} - return TextTrack; -}(Track); /** * cuechange - One or more cues in the track have become active or stopped being active. */ - - TextTrack.prototype.allowedEvents_ = { cuechange: 'cuechange' }; @@ -8084,10 +7464,7 @@ TextTrack.prototype.allowedEvents_ = { * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack} * @extends Track */ - -var AudioTrack = /*#__PURE__*/function (_Track) { - _inheritsLoose__default['default'](AudioTrack, _Track); - +class AudioTrack extends Track { /** * Create an instance of this class. * @@ -8110,18 +7487,13 @@ var AudioTrack = /*#__PURE__*/function (_Track) { * If this track is the one that is currently playing. If this track is part of * an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled. */ - function AudioTrack(options) { - var _this; - - if (options === void 0) { - options = {}; - } - - var settings = mergeOptions$3(options, { + constructor(options = {}) { + const settings = merge$1(options, { kind: AudioTrackKind[options.kind] || '' }); - _this = _Track.call(this, settings) || this; - var enabled = false; + super(settings); + let enabled = false; + /** * @memberof AudioTrack * @member {boolean} enabled @@ -8131,18 +7503,17 @@ var AudioTrack = /*#__PURE__*/function (_Track) { * * @fires VideoTrack#selectedchange */ - - Object.defineProperty(_assertThisInitialized__default['default'](_this), 'enabled', { - get: function get() { + Object.defineProperty(this, 'enabled', { + get() { return enabled; }, - set: function set(newEnabled) { + set(newEnabled) { // an invalid or unchanged value if (typeof newEnabled !== 'boolean' || newEnabled === enabled) { return; } - enabled = newEnabled; + /** * An event that fires when enabled changes on this track. This allows * the AudioTrackList that holds this track to act accordingly. @@ -8151,25 +7522,21 @@ var AudioTrack = /*#__PURE__*/function (_Track) { * this internally without an event. * * @event AudioTrack#enabledchange - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('enabledchange'); } - }); // if the user sets this track to selected then + }); + + // if the user sets this track to selected then // set selected to that true value otherwise // we keep it false - if (settings.enabled) { - _this.enabled = settings.enabled; + this.enabled = settings.enabled; } - - _this.loaded_ = true; - return _this; + this.loaded_ = true; } - - return AudioTrack; -}(Track); +} /** * A representation of a single `VideoTrack`. @@ -8177,10 +7544,7 @@ var AudioTrack = /*#__PURE__*/function (_Track) { * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack} * @extends Track */ - -var VideoTrack = /*#__PURE__*/function (_Track) { - _inheritsLoose__default['default'](VideoTrack, _Track); - +class VideoTrack extends Track { /** * Create an instance of this class. * @@ -8202,18 +7566,13 @@ var VideoTrack = /*#__PURE__*/function (_Track) { * @param {boolean} [options.selected] * If this track is the one that is currently playing. */ - function VideoTrack(options) { - var _this; - - if (options === void 0) { - options = {}; - } - - var settings = mergeOptions$3(options, { + constructor(options = {}) { + const settings = merge$1(options, { kind: VideoTrackKind[options.kind] || '' }); - _this = _Track.call(this, settings) || this; - var selected = false; + super(settings); + let selected = false; + /** * @memberof VideoTrack * @member {boolean} selected @@ -8223,18 +7582,17 @@ var VideoTrack = /*#__PURE__*/function (_Track) { * * @fires VideoTrack#selectedchange */ - - Object.defineProperty(_assertThisInitialized__default['default'](_this), 'selected', { - get: function get() { + Object.defineProperty(this, 'selected', { + get() { return selected; }, - set: function set(newSelected) { + set(newSelected) { // an invalid or unchanged value if (typeof newSelected !== 'boolean' || newSelected === selected) { return; } - selected = newSelected; + /** * An event that fires when selected changes on this track. This allows * the VideoTrackList that holds this track to act accordingly. @@ -8243,45 +7601,36 @@ var VideoTrack = /*#__PURE__*/function (_Track) { * this internally without an event. * * @event VideoTrack#selectedchange - * @type {EventTarget~Event} + * @type {Event} */ - this.trigger('selectedchange'); } - }); // if the user sets this track to selected then + }); + + // if the user sets this track to selected then // set selected to that true value otherwise // we keep it false - if (settings.selected) { - _this.selected = settings.selected; + this.selected = settings.selected; } - - return _this; } - - return VideoTrack; -}(Track); +} /** - * @memberof HTMLTrackElement - * @typedef {HTMLTrackElement~ReadyState} - * @enum {number} + * @file html-track-element.js + */ + +/** + * @typedef { import('../tech/tech').default } Tech */ -var NONE = 0; -var LOADING = 1; -var LOADED = 2; -var ERROR = 3; /** * A single track represented in the DOM. * * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement} * @extends EventTarget */ - -var HTMLTrackElement = /*#__PURE__*/function (_EventTarget) { - _inheritsLoose__default['default'](HTMLTrackElement, _EventTarget); - +class HTMLTrackElement extends EventTarget$2 { /** * Create an instance of this class. * @@ -8316,22 +7665,16 @@ var HTMLTrackElement = /*#__PURE__*/function (_EventTarget) { * @param {boolean} [options.default] * If this track should default to on or off. */ - function HTMLTrackElement(options) { - var _this; - - if (options === void 0) { - options = {}; - } - - _this = _EventTarget.call(this) || this; - var readyState; - var track = new TextTrack(options); - _this.kind = track.kind; - _this.src = track.src; - _this.srclang = track.language; - _this.label = track.label; - _this["default"] = track["default"]; - Object.defineProperties(_assertThisInitialized__default['default'](_this), { + constructor(options = {}) { + super(); + let readyState; + const track = new TextTrack(options); + this.kind = track.kind; + this.src = track.src; + this.srclang = track.language; + this.label = track.label; + this.default = track.default; + Object.defineProperties(this, { /** * @memberof HTMLTrackElement * @member {HTMLTrackElement~ReadyState} readyState @@ -8339,11 +7682,10 @@ var HTMLTrackElement = /*#__PURE__*/function (_EventTarget) { * @instance */ readyState: { - get: function get() { + get() { return readyState; } }, - /** * @memberof HTMLTrackElement * @member {TextTrack} track @@ -8352,45 +7694,68 @@ var HTMLTrackElement = /*#__PURE__*/function (_EventTarget) { * */ track: { - get: function get() { + get() { return track; } } }); - readyState = NONE; + readyState = HTMLTrackElement.NONE; + /** * @listens TextTrack#loadeddata * @fires HTMLTrackElement#load */ - - track.addEventListener('loadeddata', function () { - readyState = LOADED; - - _this.trigger({ + track.addEventListener('loadeddata', () => { + readyState = HTMLTrackElement.LOADED; + this.trigger({ type: 'load', - target: _assertThisInitialized__default['default'](_this) + target: this }); }); - return _this; } - - return HTMLTrackElement; -}(EventTarget$2); - +} HTMLTrackElement.prototype.allowedEvents_ = { load: 'load' }; -HTMLTrackElement.NONE = NONE; -HTMLTrackElement.LOADING = LOADING; -HTMLTrackElement.LOADED = LOADED; -HTMLTrackElement.ERROR = ERROR; + +/** + * The text track not loaded state. + * + * @type {number} + * @static + */ +HTMLTrackElement.NONE = 0; + +/** + * The text track loading state. + * + * @type {number} + * @static + */ +HTMLTrackElement.LOADING = 1; + +/** + * The text track loaded state. + * + * @type {number} + * @static + */ +HTMLTrackElement.LOADED = 2; + +/** + * The text track failed to load state. + * + * @type {number} + * @static + */ +HTMLTrackElement.ERROR = 3; /* * This file contains all track properties that are used in * player.js, tech.js, html5.js and possibly other techs in the future. */ -var NORMAL = { +const NORMAL = { audio: { ListClass: AudioTrackList, TrackClass: AudioTrack, @@ -8408,10 +7773,10 @@ var NORMAL = { } }; Object.keys(NORMAL).forEach(function (type) { - NORMAL[type].getterName = type + "Tracks"; - NORMAL[type].privateName = type + "Tracks_"; + NORMAL[type].getterName = `${type}Tracks`; + NORMAL[type].privateName = `${type}Tracks_`; }); -var REMOTE = { +const REMOTE = { remoteText: { ListClass: TextTrackList, TrackClass: TextTrack, @@ -8427,13 +7792,19 @@ var REMOTE = { privateName: 'remoteTextTrackEls_' } }; - -var ALL = _extends__default['default']({}, NORMAL, REMOTE); - +const ALL = Object.assign({}, NORMAL, REMOTE); REMOTE.names = Object.keys(REMOTE); NORMAL.names = Object.keys(NORMAL); ALL.names = [].concat(REMOTE.names).concat(NORMAL.names); +/** + * @file tech.js + */ + +/** + * @typedef { import('../utils/time').TimeRange } TimeRange + */ + /** * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string * that just contains the src url alone. @@ -8472,146 +7843,100 @@ ALL.names = [].concat(REMOTE.names).concat(NORMAL.names); * @return {TextTrack} * The text track that was created. */ - -function createTrackHelper(self, kind, label, language, options) { - if (options === void 0) { - options = {}; - } - - var tracks = self.textTracks(); +function createTrackHelper(self, kind, label, language, options = {}) { + const tracks = self.textTracks(); options.kind = kind; - if (label) { options.label = label; } - if (language) { options.language = language; } - options.tech = self; - var track = new ALL.text.TrackClass(options); + const track = new ALL.text.TrackClass(options); tracks.addTrack(track); return track; } + /** * This is the base class for media playback technology controllers, such as * {@link HTML5} * * @extends Component */ - - -var Tech = /*#__PURE__*/function (_Component) { - _inheritsLoose__default['default'](Tech, _Component); - +class Tech extends Component$1 { /** * Create an instance of this Tech. * * @param {Object} [options] * The key/value store of player options. * - * @param {Component~ReadyCallback} ready + * @param {Function} [ready] * Callback function to call when the `HTML5` Tech is ready. */ - function Tech(options, ready) { - var _this; - - if (options === void 0) { - options = {}; - } - - if (ready === void 0) { - ready = function ready() {}; - } - + constructor(options = {}, ready = function () {}) { // we don't want the tech to report user activity automatically. // This is done manually in addControlsListeners options.reportTouchActivity = false; - _this = _Component.call(this, null, options, ready) || this; + super(null, options, ready); + this.onDurationChange_ = e => this.onDurationChange(e); + this.trackProgress_ = e => this.trackProgress(e); + this.trackCurrentTime_ = e => this.trackCurrentTime(e); + this.stopTrackingCurrentTime_ = e => this.stopTrackingCurrentTime(e); + this.disposeSourceHandler_ = e => this.disposeSourceHandler(e); + this.queuedHanders_ = new Set(); - _this.onDurationChange_ = function (e) { - return _this.onDurationChange(e); - }; - - _this.trackProgress_ = function (e) { - return _this.trackProgress(e); - }; - - _this.trackCurrentTime_ = function (e) { - return _this.trackCurrentTime(e); - }; - - _this.stopTrackingCurrentTime_ = function (e) { - return _this.stopTrackingCurrentTime(e); - }; - - _this.disposeSourceHandler_ = function (e) { - return _this.disposeSourceHandler(e); - }; - - _this.queuedHanders_ = new Set(); // keep track of whether the current source has played at all to + // keep track of whether the current source has played at all to // implement a very limited played() - - _this.hasStarted_ = false; - - _this.on('playing', function () { + this.hasStarted_ = false; + this.on('playing', function () { this.hasStarted_ = true; }); - - _this.on('loadstart', function () { + this.on('loadstart', function () { this.hasStarted_ = false; }); - - ALL.names.forEach(function (name) { - var props = ALL[name]; - + ALL.names.forEach(name => { + const props = ALL[name]; if (options && options[props.getterName]) { - _this[props.privateName] = options[props.getterName]; - } - }); // Manually track progress in cases where the browser/tech doesn't report it. - - if (!_this.featuresProgressEvents) { - _this.manualProgressOn(); - } // Manually track timeupdates in cases where the browser/tech doesn't report it. - - - if (!_this.featuresTimeupdateEvents) { - _this.manualTimeUpdatesOn(); - } - - ['Text', 'Audio', 'Video'].forEach(function (track) { - if (options["native" + track + "Tracks"] === false) { - _this["featuresNative" + track + "Tracks"] = false; + this[props.privateName] = options[props.getterName]; } }); + // Manually track progress in cases where the browser/tech doesn't report it. + if (!this.featuresProgressEvents) { + this.manualProgressOn(); + } + + // Manually track timeupdates in cases where the browser/tech doesn't report it. + if (!this.featuresTimeupdateEvents) { + this.manualTimeUpdatesOn(); + } + ['Text', 'Audio', 'Video'].forEach(track => { + if (options[`native${track}Tracks`] === false) { + this[`featuresNative${track}Tracks`] = false; + } + }); if (options.nativeCaptions === false || options.nativeTextTracks === false) { - _this.featuresNativeTextTracks = false; + this.featuresNativeTextTracks = false; } else if (options.nativeCaptions === true || options.nativeTextTracks === true) { - _this.featuresNativeTextTracks = true; + this.featuresNativeTextTracks = true; } - - if (!_this.featuresNativeTextTracks) { - _this.emulateTextTracks(); + if (!this.featuresNativeTextTracks) { + this.emulateTextTracks(); } + this.preloadTextTracks = options.preloadTextTracks !== false; + this.autoRemoteTextTracks_ = new ALL.text.ListClass(); + this.initTrackListeners(); - _this.preloadTextTracks = options.preloadTextTracks !== false; - _this.autoRemoteTextTracks_ = new ALL.text.ListClass(); - - _this.initTrackListeners(); // Turn on component tap events only if not using native controls - - + // Turn on component tap events only if not using native controls if (!options.nativeControlsForTouch) { - _this.emitTapEvents(); + this.emitTapEvents(); } - - if (_this.constructor) { - _this.name_ = _this.constructor.name || 'Unknown Tech'; + if (this.constructor) { + this.name_ = this.constructor.name || 'Unknown Tech'; } - - return _this; } + /** * A special function to trigger source set in a way that will allow player * to re-trigger if the player or tech are not ready yet. @@ -8619,37 +7944,27 @@ var Tech = /*#__PURE__*/function (_Component) { * @fires Tech#sourceset * @param {string} src The source string at the time of the source changing. */ - - - var _proto = Tech.prototype; - - _proto.triggerSourceset = function triggerSourceset(src) { - var _this2 = this; - + triggerSourceset(src) { if (!this.isReady_) { // on initial ready we have to trigger source set // 1ms after ready so that player can watch for it. - this.one('ready', function () { - return _this2.setTimeout(function () { - return _this2.triggerSourceset(src); - }, 1); - }); + this.one('ready', () => this.setTimeout(() => this.triggerSourceset(src), 1)); } + /** * Fired when the source is set on the tech causing the media element * to reload. * * @see {@link Player#event:sourceset} * @event Tech#sourceset - * @type {EventTarget~Event} + * @type {Event} */ - - this.trigger({ - src: src, + src, type: 'sourceset' }); } + /* Fallbacks for unsupported event types ================================================================================ */ @@ -8658,25 +7973,24 @@ var Tech = /*#__PURE__*/function (_Component) { * * @see {@link Tech#trackProgress} */ - ; - - _proto.manualProgressOn = function manualProgressOn() { + manualProgressOn() { this.on('durationchange', this.onDurationChange_); - this.manualProgress = true; // Trigger progress watching when a source begins loading + this.manualProgress = true; + // Trigger progress watching when a source begins loading this.one('ready', this.trackProgress_); } + /** * Turn off the polyfill for `progress` events that was created in * {@link Tech#manualProgressOn} */ - ; - - _proto.manualProgressOff = function manualProgressOff() { + manualProgressOff() { this.manualProgress = false; this.stopTrackingProgress(); this.off('durationchange', this.onDurationChange_); } + /** * This is used to trigger a `progress` event when the buffered percent changes. It * sets an interval function that will be called every 500 milliseconds to check if the @@ -8684,62 +7998,57 @@ var Tech = /*#__PURE__*/function (_Component) { * * > This function is called by {@link Tech#manualProgressOn} * - * @param {EventTarget~Event} event + * @param {Event} event * The `ready` event that caused this to run. * * @listens Tech#ready * @fires Tech#progress */ - ; - - _proto.trackProgress = function trackProgress(event) { + trackProgress(event) { this.stopTrackingProgress(); - this.progressInterval = this.setInterval(bind(this, function () { + this.progressInterval = this.setInterval(bind_(this, function () { // Don't trigger unless buffered amount is greater than last time - var numBufferedPercent = this.bufferedPercent(); + const numBufferedPercent = this.bufferedPercent(); if (this.bufferedPercent_ !== numBufferedPercent) { /** * See {@link Player#progress} * * @event Tech#progress - * @type {EventTarget~Event} + * @type {Event} */ this.trigger('progress'); } - this.bufferedPercent_ = numBufferedPercent; - if (numBufferedPercent === 1) { this.stopTrackingProgress(); } }), 500); } + /** * Update our internal duration on a `durationchange` event by calling * {@link Tech#duration}. * - * @param {EventTarget~Event} event + * @param {Event} event * The `durationchange` event that caused this to run. * * @listens Tech#durationchange */ - ; - - _proto.onDurationChange = function onDurationChange(event) { + onDurationChange(event) { this.duration_ = this.duration(); } + /** * Get and create a `TimeRange` object for buffering. * * @return {TimeRange} * The time range object that was created. */ - ; - - _proto.buffered = function buffered() { - return createTimeRanges(0, 0); + buffered() { + return createTimeRanges$1(0, 0); } + /** * Get the percentage of the current video that is currently buffered. * @@ -8748,46 +8057,42 @@ var Tech = /*#__PURE__*/function (_Component) { * video that is buffered. * */ - ; - - _proto.bufferedPercent = function bufferedPercent$1() { + bufferedPercent() { return bufferedPercent(this.buffered(), this.duration_); } + /** * Turn off the polyfill for `progress` events that was created in * {@link Tech#manualProgressOn} * Stop manually tracking progress events by clearing the interval that was set in * {@link Tech#trackProgress}. */ - ; - - _proto.stopTrackingProgress = function stopTrackingProgress() { + stopTrackingProgress() { this.clearInterval(this.progressInterval); } + /** * Polyfill the `timeupdate` event for browsers that don't support it. * * @see {@link Tech#trackCurrentTime} */ - ; - - _proto.manualTimeUpdatesOn = function manualTimeUpdatesOn() { + manualTimeUpdatesOn() { this.manualTimeUpdates = true; this.on('play', this.trackCurrentTime_); this.on('pause', this.stopTrackingCurrentTime_); } + /** * Turn off the polyfill for `timeupdate` events that was created in * {@link Tech#manualTimeUpdatesOn} */ - ; - - _proto.manualTimeUpdatesOff = function manualTimeUpdatesOff() { + manualTimeUpdatesOff() { this.manualTimeUpdates = false; this.stopTrackingCurrentTime(); this.off('play', this.trackCurrentTime_); this.off('pause', this.stopTrackingCurrentTime_); } + /** * Sets up an interval function to track current time and trigger `timeupdate` every * 250 milliseconds. @@ -8795,67 +8100,65 @@ var Tech = /*#__PURE__*/function (_Component) { * @listens Tech#play * @triggers Tech#timeupdate */ - ; - - _proto.trackCurrentTime = function trackCurrentTime() { + trackCurrentTime() { if (this.currentTimeInterval) { this.stopTrackingCurrentTime(); } - this.currentTimeInterval = this.setInterval(function () { /** * Triggered at an interval of 250ms to indicated that time is passing in the video. * * @event Tech#timeupdate - * @type {EventTarget~Event} + * @type {Event} */ this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true - }); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15 + }); + + // 42 = 24 fps // 250 is what Webkit uses // FF uses 15 }, 250); } + /** * Stop the interval function created in {@link Tech#trackCurrentTime} so that the * `timeupdate` event is no longer triggered. * * @listens {Tech#pause} */ - ; + stopTrackingCurrentTime() { + this.clearInterval(this.currentTimeInterval); - _proto.stopTrackingCurrentTime = function stopTrackingCurrentTime() { - this.clearInterval(this.currentTimeInterval); // #1002 - if the video ends right before the next timeupdate would happen, + // #1002 - if the video ends right before the next timeupdate would happen, // the progress bar won't make it all the way to the end - this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); } + /** * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList}, * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech. * * @fires Component#dispose */ - ; - - _proto.dispose = function dispose() { + dispose() { // clear out all tracks because we can't reuse them between techs - this.clearTracks(NORMAL.names); // Turn off any manual progress or timeupdate tracking + this.clearTracks(NORMAL.names); + // Turn off any manual progress or timeupdate tracking if (this.manualProgress) { this.manualProgressOff(); } - if (this.manualTimeUpdates) { this.manualTimeUpdatesOff(); } - - _Component.prototype.dispose.call(this); + super.dispose(); } + /** * Clear out a single `TrackList` or an array of `TrackLists` given their names. * @@ -8866,51 +8169,42 @@ var Tech = /*#__PURE__*/function (_Component) { * TrackList names to clear, valid names are `video`, `audio`, and * `text`. */ - ; - - _proto.clearTracks = function clearTracks(types) { - var _this3 = this; - - types = [].concat(types); // clear out all tracks because we can't reuse them between techs - - types.forEach(function (type) { - var list = _this3[type + "Tracks"]() || []; - var i = list.length; - + clearTracks(types) { + types = [].concat(types); + // clear out all tracks because we can't reuse them between techs + types.forEach(type => { + const list = this[`${type}Tracks`]() || []; + let i = list.length; while (i--) { - var track = list[i]; - + const track = list[i]; if (type === 'text') { - _this3.removeRemoteTextTrack(track); + this.removeRemoteTextTrack(track); } - list.removeTrack(track); } }); } + /** * Remove any TextTracks added via addRemoteTextTrack that are * flagged for automatic garbage collection */ - ; - - _proto.cleanupAutoTextTracks = function cleanupAutoTextTracks() { - var list = this.autoRemoteTextTracks_ || []; - var i = list.length; - + cleanupAutoTextTracks() { + const list = this.autoRemoteTextTracks_ || []; + let i = list.length; while (i--) { - var track = list[i]; + const track = list[i]; this.removeRemoteTextTrack(track); } } + /** * Reset the tech, which will removes all sources and reset the internal readyState. * * @abstract */ - ; + reset() {} - _proto.reset = function reset() {} /** * Get the value of `crossOrigin` from the tech. * @@ -8918,9 +8212,8 @@ var Tech = /*#__PURE__*/function (_Component) { * * @see {Html5#crossOrigin} */ - ; + crossOrigin() {} - _proto.crossOrigin = function crossOrigin() {} /** * Set the value of `crossOrigin` on the tech. * @@ -8929,9 +8222,8 @@ var Tech = /*#__PURE__*/function (_Component) { * @param {string} crossOrigin the crossOrigin value * @see {Html5#setCrossOrigin} */ - ; + setCrossOrigin() {} - _proto.setCrossOrigin = function setCrossOrigin() {} /** * Get or set an error on the Tech. * @@ -8941,16 +8233,14 @@ var Tech = /*#__PURE__*/function (_Component) { * @return {MediaError|null} * The current error object on the tech, or null if there isn't one. */ - ; - - _proto.error = function error(err) { + error(err) { if (err !== undefined) { this.error_ = new MediaError(err); this.trigger('error'); } - return this.error_; } + /** * Returns the `TimeRange`s that have been played through for the current source. * @@ -8961,15 +8251,13 @@ var Tech = /*#__PURE__*/function (_Component) { * - A single time range if this video has played * - An empty set of ranges if not. */ - ; - - _proto.played = function played() { + played() { if (this.hasStarted_) { - return createTimeRanges(0, 0); + return createTimeRanges$1(0, 0); } - - return createTimeRanges(); + return createTimeRanges$1(); } + /** * Start playback * @@ -8977,19 +8265,20 @@ var Tech = /*#__PURE__*/function (_Component) { * * @see {Html5#play} */ - ; + play() {} - _proto.play = function play() {} /** * Set whether we are scrubbing or not * * @abstract + * @param {boolean} _isScrubbing + * - true for we are currently scrubbing + * - false for we are no longer scrubbing * * @see {Html5#setScrubbing} */ - ; + setScrubbing(_isScrubbing) {} - _proto.setScrubbing = function setScrubbing() {} /** * Get whether we are scrubbing or not * @@ -8997,25 +8286,24 @@ var Tech = /*#__PURE__*/function (_Component) { * * @see {Html5#scrubbing} */ - ; + scrubbing() {} - _proto.scrubbing = function scrubbing() {} /** * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was * previously called. * + * @param {number} _seconds + * Set the current time of the media to this. * @fires Tech#timeupdate */ - ; - - _proto.setCurrentTime = function setCurrentTime() { + setCurrentTime(_seconds) { // improve the accuracy of manual timeupdates if (this.manualTimeUpdates) { /** * A manual `timeupdate` event. * * @event Tech#timeupdate - * @type {EventTarget~Event} + * @type {Event} */ this.trigger({ type: 'timeupdate', @@ -9024,6 +8312,7 @@ var Tech = /*#__PURE__*/function (_Component) { }); } } + /** * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and * {@link TextTrackList} events. @@ -9034,154 +8323,123 @@ var Tech = /*#__PURE__*/function (_Component) { * @fires Tech#videotrackchange * @fires Tech#texttrackchange */ - ; - - _proto.initTrackListeners = function initTrackListeners() { - var _this4 = this; - + initTrackListeners() { /** * Triggered when tracks are added or removed on the Tech {@link AudioTrackList} * * @event Tech#audiotrackchange - * @type {EventTarget~Event} + * @type {Event} */ /** * Triggered when tracks are added or removed on the Tech {@link VideoTrackList} * * @event Tech#videotrackchange - * @type {EventTarget~Event} + * @type {Event} */ /** * Triggered when tracks are added or removed on the Tech {@link TextTrackList} * * @event Tech#texttrackchange - * @type {EventTarget~Event} + * @type {Event} */ - NORMAL.names.forEach(function (name) { - var props = NORMAL[name]; - - var trackListChanges = function trackListChanges() { - _this4.trigger(name + "trackchange"); + NORMAL.names.forEach(name => { + const props = NORMAL[name]; + const trackListChanges = () => { + this.trigger(`${name}trackchange`); }; - - var tracks = _this4[props.getterName](); - + const tracks = this[props.getterName](); tracks.addEventListener('removetrack', trackListChanges); tracks.addEventListener('addtrack', trackListChanges); - - _this4.on('dispose', function () { + this.on('dispose', () => { tracks.removeEventListener('removetrack', trackListChanges); tracks.removeEventListener('addtrack', trackListChanges); }); }); } + /** * Emulate TextTracks using vtt.js if necessary * * @fires Tech#vttjsloaded * @fires Tech#vttjserror */ - ; - - _proto.addWebVttScript_ = function addWebVttScript_() { - var _this5 = this; - - if (window__default['default'].WebVTT) { + addWebVttScript_() { + if (window__default["default"].WebVTT) { return; - } // Initially, Tech.el_ is a child of a dummy-div wait until the Component system + } + + // Initially, Tech.el_ is a child of a dummy-div wait until the Component system // signals that the Tech is ready at which point Tech.el_ is part of the DOM // before inserting the WebVTT script - - - if (document__default['default'].body.contains(this.el())) { + if (document__default["default"].body.contains(this.el())) { // load via require if available and vtt.js script location was not passed in // as an option. novtt builds will turn the above require call into an empty object // which will cause this if check to always fail. - if (!this.options_['vtt.js'] && isPlain(vtt__default['default']) && Object.keys(vtt__default['default']).length > 0) { + if (!this.options_['vtt.js'] && isPlain(vtt__default["default"]) && Object.keys(vtt__default["default"]).length > 0) { this.trigger('vttjsloaded'); return; - } // load vtt.js via the script location option or the cdn of no location was + } + + // load vtt.js via the script location option or the cdn of no location was // passed in - - - var script = document__default['default'].createElement('script'); + const script = document__default["default"].createElement('script'); script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js'; - - script.onload = function () { + script.onload = () => { /** * Fired when vtt.js is loaded. * * @event Tech#vttjsloaded - * @type {EventTarget~Event} + * @type {Event} */ - _this5.trigger('vttjsloaded'); + this.trigger('vttjsloaded'); }; - - script.onerror = function () { + script.onerror = () => { /** * Fired when vtt.js was not loaded due to an error * * @event Tech#vttjsloaded - * @type {EventTarget~Event} + * @type {Event} */ - _this5.trigger('vttjserror'); + this.trigger('vttjserror'); }; - - this.on('dispose', function () { + this.on('dispose', () => { script.onload = null; script.onerror = null; - }); // but have not loaded yet and we set it to true before the inject so that + }); + // but have not loaded yet and we set it to true before the inject so that // we don't overwrite the injected window.WebVTT if it loads right away - - window__default['default'].WebVTT = true; + window__default["default"].WebVTT = true; this.el().parentNode.appendChild(script); } else { this.ready(this.addWebVttScript_); } } + /** * Emulate texttracks * */ - ; - - _proto.emulateTextTracks = function emulateTextTracks() { - var _this6 = this; - - var tracks = this.textTracks(); - var remoteTracks = this.remoteTextTracks(); - - var handleAddTrack = function handleAddTrack(e) { - return tracks.addTrack(e.track); - }; - - var handleRemoveTrack = function handleRemoveTrack(e) { - return tracks.removeTrack(e.track); - }; - + emulateTextTracks() { + const tracks = this.textTracks(); + const remoteTracks = this.remoteTextTracks(); + const handleAddTrack = e => tracks.addTrack(e.track); + const handleRemoveTrack = e => tracks.removeTrack(e.track); remoteTracks.on('addtrack', handleAddTrack); remoteTracks.on('removetrack', handleRemoveTrack); this.addWebVttScript_(); - - var updateDisplay = function updateDisplay() { - return _this6.trigger('texttrackchange'); - }; - - var textTracksChanges = function textTracksChanges() { + const updateDisplay = () => this.trigger('texttrackchange'); + const textTracksChanges = () => { updateDisplay(); - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; + for (let i = 0; i < tracks.length; i++) { + const track = tracks[i]; track.removeEventListener('cuechange', updateDisplay); - if (track.mode === 'showing') { track.addEventListener('cuechange', updateDisplay); } } }; - textTracksChanges(); tracks.addEventListener('change', textTracksChanges); tracks.addEventListener('addtrack', textTracksChanges); @@ -9192,13 +8450,13 @@ var Tech = /*#__PURE__*/function (_Component) { tracks.removeEventListener('change', textTracksChanges); tracks.removeEventListener('addtrack', textTracksChanges); tracks.removeEventListener('removetrack', textTracksChanges); - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; + for (let i = 0; i < tracks.length; i++) { + const track = tracks[i]; track.removeEventListener('cuechange', updateDisplay); } }); } + /** * Create and returns a remote {@link TextTrack} object. * @@ -9214,15 +8472,13 @@ var Tech = /*#__PURE__*/function (_Component) { * @return {TextTrack} * The TextTrack that gets created. */ - ; - - _proto.addTextTrack = function addTextTrack(kind, label, language) { + addTextTrack(kind, label, language) { if (!kind) { throw new Error('TextTrack kind is required but was not provided'); } - return createTrackHelper(this, kind, label, language); } + /** * Create an emulated TextTrack for use by addRemoteTextTrack * @@ -9244,14 +8500,13 @@ var Tech = /*#__PURE__*/function (_Component) { * @return {HTMLTrackElement} * The track element that gets created. */ - ; - - _proto.createRemoteTextTrack = function createRemoteTextTrack(options) { - var track = mergeOptions$3(options, { + createRemoteTextTrack(options) { + const track = merge$1(options, { tech: this }); return new REMOTE.remoteTextEl.TrackClass(track); } + /** * Creates a remote text track object and returns an html track element. * @@ -9260,7 +8515,7 @@ var Tech = /*#__PURE__*/function (_Component) { * @param {Object} options * See {@link Tech#createRemoteTextTrack} for more detailed properties. * - * @param {boolean} [manualCleanup=true] + * @param {boolean} [manualCleanup=false] * - When false: the TextTrack will be automatically removed from the video * element whenever the source changes * - When True: The TextTrack will have to be cleaned up manually @@ -9268,55 +8523,38 @@ var Tech = /*#__PURE__*/function (_Component) { * @return {HTMLTrackElement} * An Html Track Element. * - * @deprecated The default functionality for this function will be equivalent - * to "manualCleanup=false" in the future. The manualCleanup parameter will - * also be removed. */ - ; - - _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) { - var _this7 = this; - - if (options === void 0) { - options = {}; + addRemoteTextTrack(options = {}, manualCleanup) { + const htmlTrackElement = this.createRemoteTextTrack(options); + if (typeof manualCleanup !== 'boolean') { + manualCleanup = false; } - var htmlTrackElement = this.createRemoteTextTrack(options); - - if (manualCleanup !== true && manualCleanup !== false) { - // deprecation warning - log$1.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'); - manualCleanup = true; - } // store HTMLTrackElement and TextTrack to remote list - - + // store HTMLTrackElement and TextTrack to remote list this.remoteTextTrackEls().addTrackElement_(htmlTrackElement); this.remoteTextTracks().addTrack(htmlTrackElement.track); - - if (manualCleanup !== true) { + if (manualCleanup === false) { // create the TextTrackList if it doesn't exist - this.ready(function () { - return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track); - }); + this.ready(() => this.autoRemoteTextTracks_.addTrack(htmlTrackElement.track)); } - return htmlTrackElement; } + /** * Remove a remote text track from the remote `TextTrackList`. * * @param {TextTrack} track * `TextTrack` to remove from the `TextTrackList` */ - ; - - _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) { - var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); // remove HTMLTrackElement and TextTrack from remote list + removeRemoteTextTrack(track) { + const trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); + // remove HTMLTrackElement and TextTrack from remote list this.remoteTextTrackEls().removeTrackElement_(trackElement); this.remoteTextTracks().removeTrack(track); this.autoRemoteTextTracks_.removeTrack(track); } + /** * Gets available media playback quality metrics as specified by the W3C's Media * Playback Quality API. @@ -9328,11 +8566,10 @@ var Tech = /*#__PURE__*/function (_Component) { * * @abstract */ - ; - - _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() { + getVideoPlaybackQuality() { return {}; } + /** * Attempt to create a floating video window always on top of other windows * so that users may continue consuming media while they interact with other @@ -9347,100 +8584,83 @@ var Tech = /*#__PURE__*/function (_Component) { * * @abstract */ - ; - - _proto.requestPictureInPicture = function requestPictureInPicture() { - var PromiseClass = this.options_.Promise || window__default['default'].Promise; - - if (PromiseClass) { - return PromiseClass.reject(); - } + requestPictureInPicture() { + return Promise.reject(); } + /** * A method to check for the value of the 'disablePictureInPicture'