wai-website-theme 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/_data/lang.json +730 -0
- data/_data/techniques.yml +180 -0
- data/_data/wcag.yml +125 -0
- data/_includes/.DS_Store +0 -0
- data/_includes/body-class.html +1 -0
- data/_includes/box.html +10 -0
- data/_includes/excol.html +13 -0
- data/_includes/footer.html +40 -0
- data/_includes/head.html +23 -0
- data/_includes/header.html +59 -0
- data/_includes/icon.html +6 -0
- data/_includes/img.html +17 -0
- data/_includes/multilang-list-policy-links.html +29 -0
- data/_includes/multilang-list.html +35 -0
- data/_includes/multilang-policy-title.html +5 -0
- data/_includes/multilang-title-full.html +1 -0
- data/_includes/multilang-title.html +1 -0
- data/_includes/navlist.html +22 -0
- data/_includes/notes.html +2 -0
- data/_includes/prevnext.html +34 -0
- data/_includes/resources.html +19 -0
- data/_includes/sidenav.html +65 -0
- data/_includes/sidenote.html +14 -0
- data/_includes/toc.html +10 -0
- data/_includes/video-player.html +99 -0
- data/_layouts/default.html +26 -0
- data/_layouts/home.html +14 -0
- data/_layouts/news.html +21 -0
- data/_layouts/none.html +1 -0
- data/_layouts/policy.html +72 -0
- data/_layouts/sidenav.html +27 -0
- data/_layouts/sidenavsidebar.html +22 -0
- data/assets/ableplayer/.gitattributes +14 -0
- data/assets/ableplayer/.gitignore +7 -0
- data/assets/ableplayer/Gruntfile.js +105 -0
- data/assets/ableplayer/LICENSE +26 -0
- data/assets/ableplayer/README.md +656 -0
- data/assets/ableplayer/build/ableplayer.dist.js +12157 -0
- data/assets/ableplayer/build/ableplayer.js +12157 -0
- data/assets/ableplayer/build/ableplayer.min.css +2 -0
- data/assets/ableplayer/build/ableplayer.min.js +8 -0
- data/assets/ableplayer/button-icons/able-icons.svg +116 -0
- data/assets/ableplayer/button-icons/black/captions.png +0 -0
- data/assets/ableplayer/button-icons/black/chapters.png +0 -0
- data/assets/ableplayer/button-icons/black/close.png +0 -0
- data/assets/ableplayer/button-icons/black/descriptions.png +0 -0
- data/assets/ableplayer/button-icons/black/ellipsis.png +0 -0
- data/assets/ableplayer/button-icons/black/faster.png +0 -0
- data/assets/ableplayer/button-icons/black/forward.png +0 -0
- data/assets/ableplayer/button-icons/black/fullscreen-collapse.png +0 -0
- data/assets/ableplayer/button-icons/black/fullscreen-expand.png +0 -0
- data/assets/ableplayer/button-icons/black/help.png +0 -0
- data/assets/ableplayer/button-icons/black/next.png +0 -0
- data/assets/ableplayer/button-icons/black/pause.png +0 -0
- data/assets/ableplayer/button-icons/black/pipe.png +0 -0
- data/assets/ableplayer/button-icons/black/play.png +0 -0
- data/assets/ableplayer/button-icons/black/preferences.png +0 -0
- data/assets/ableplayer/button-icons/black/previous.png +0 -0
- data/assets/ableplayer/button-icons/black/rabbit.png +0 -0
- data/assets/ableplayer/button-icons/black/restart.png +0 -0
- data/assets/ableplayer/button-icons/black/rewind.png +0 -0
- data/assets/ableplayer/button-icons/black/sign.png +0 -0
- data/assets/ableplayer/button-icons/black/slower.png +0 -0
- data/assets/ableplayer/button-icons/black/stop.png +0 -0
- data/assets/ableplayer/button-icons/black/transcript.png +0 -0
- data/assets/ableplayer/button-icons/black/turtle.png +0 -0
- data/assets/ableplayer/button-icons/black/volume-loud.png +0 -0
- data/assets/ableplayer/button-icons/black/volume-medium.png +0 -0
- data/assets/ableplayer/button-icons/black/volume-mute.png +0 -0
- data/assets/ableplayer/button-icons/black/volume-soft.png +0 -0
- data/assets/ableplayer/button-icons/fonts/able.eot +0 -0
- data/assets/ableplayer/button-icons/fonts/able.svg +40 -0
- data/assets/ableplayer/button-icons/fonts/able.ttf +0 -0
- data/assets/ableplayer/button-icons/fonts/able.woff +0 -0
- data/assets/ableplayer/button-icons/white/captions.png +0 -0
- data/assets/ableplayer/button-icons/white/chapters.png +0 -0
- data/assets/ableplayer/button-icons/white/close.png +0 -0
- data/assets/ableplayer/button-icons/white/descriptions.png +0 -0
- data/assets/ableplayer/button-icons/white/ellipsis.png +0 -0
- data/assets/ableplayer/button-icons/white/faster.png +0 -0
- data/assets/ableplayer/button-icons/white/forward.png +0 -0
- data/assets/ableplayer/button-icons/white/fullscreen-collapse.png +0 -0
- data/assets/ableplayer/button-icons/white/fullscreen-expand.png +0 -0
- data/assets/ableplayer/button-icons/white/help.png +0 -0
- data/assets/ableplayer/button-icons/white/next.png +0 -0
- data/assets/ableplayer/button-icons/white/pause.png +0 -0
- data/assets/ableplayer/button-icons/white/pipe.png +0 -0
- data/assets/ableplayer/button-icons/white/play.png +0 -0
- data/assets/ableplayer/button-icons/white/preferences.png +0 -0
- data/assets/ableplayer/button-icons/white/previous.png +0 -0
- data/assets/ableplayer/button-icons/white/rabbit.png +0 -0
- data/assets/ableplayer/button-icons/white/restart.png +0 -0
- data/assets/ableplayer/button-icons/white/rewind.png +0 -0
- data/assets/ableplayer/button-icons/white/sign.png +0 -0
- data/assets/ableplayer/button-icons/white/slower.png +0 -0
- data/assets/ableplayer/button-icons/white/stop.png +0 -0
- data/assets/ableplayer/button-icons/white/transcript.png +0 -0
- data/assets/ableplayer/button-icons/white/turtle.png +0 -0
- data/assets/ableplayer/button-icons/white/volume-loud.png +0 -0
- data/assets/ableplayer/button-icons/white/volume-medium.png +0 -0
- data/assets/ableplayer/button-icons/white/volume-mute.png +0 -0
- data/assets/ableplayer/button-icons/white/volume-soft.png +0 -0
- data/assets/ableplayer/images/wingrip.png +0 -0
- data/assets/ableplayer/package.json +22 -0
- data/assets/ableplayer/scripts/JQuery.doWhen.js +113 -0
- data/assets/ableplayer/scripts/ableplayer-base.js +440 -0
- data/assets/ableplayer/scripts/browser.js +162 -0
- data/assets/ableplayer/scripts/buildplayer.js +1609 -0
- data/assets/ableplayer/scripts/caption.js +385 -0
- data/assets/ableplayer/scripts/chapters.js +242 -0
- data/assets/ableplayer/scripts/control.js +1514 -0
- data/assets/ableplayer/scripts/description.js +283 -0
- data/assets/ableplayer/scripts/dialog.js +147 -0
- data/assets/ableplayer/scripts/dragdrop.js +766 -0
- data/assets/ableplayer/scripts/event.js +595 -0
- data/assets/ableplayer/scripts/initialize.js +725 -0
- data/assets/ableplayer/scripts/langs.js +750 -0
- data/assets/ableplayer/scripts/metadata.js +134 -0
- data/assets/ableplayer/scripts/misc.js +72 -0
- data/assets/ableplayer/scripts/preference.js +909 -0
- data/assets/ableplayer/scripts/search.js +171 -0
- data/assets/ableplayer/scripts/sign.js +92 -0
- data/assets/ableplayer/scripts/slider.js +454 -0
- data/assets/ableplayer/scripts/track.js +296 -0
- data/assets/ableplayer/scripts/transcript.js +590 -0
- data/assets/ableplayer/scripts/translation.js +66 -0
- data/assets/ableplayer/scripts/volume.js +383 -0
- data/assets/ableplayer/scripts/webvtt.js +765 -0
- data/assets/ableplayer/scripts/youtube.js +471 -0
- data/assets/ableplayer/styles/ableplayer.css +1241 -0
- data/assets/ableplayer/thirdparty/js.cookie.js +145 -0
- data/assets/ableplayer/thirdparty/modernizr.custom.js +4 -0
- data/assets/ableplayer/translations/ca.js +1 -0
- data/assets/ableplayer/translations/de.js +1 -0
- data/assets/ableplayer/translations/en.js +305 -0
- data/assets/ableplayer/translations/es.js +305 -0
- data/assets/ableplayer/translations/fr.js +305 -0
- data/assets/ableplayer/translations/it.js +303 -0
- data/assets/ableplayer/translations/ja.js +305 -0
- data/assets/ableplayer/translations/nl.js +305 -0
- data/assets/css/style.css +4360 -0
- data/assets/css/style.css.map +1 -0
- data/assets/fonts/anonymouspro-bold.woff +0 -0
- data/assets/fonts/anonymouspro-bold.woff2 +0 -0
- data/assets/fonts/anonymouspro-bolditalic.woff +0 -0
- data/assets/fonts/anonymouspro-bolditalic.woff2 +0 -0
- data/assets/fonts/anonymouspro-italic.woff +0 -0
- data/assets/fonts/anonymouspro-italic.woff2 +0 -0
- data/assets/fonts/anonymouspro-regular.woff +0 -0
- data/assets/fonts/anonymouspro-regular.woff2 +0 -0
- data/assets/fonts/notosans-bold.woff +0 -0
- data/assets/fonts/notosans-bold.woff2 +0 -0
- data/assets/fonts/notosans-bolditalic.woff +0 -0
- data/assets/fonts/notosans-bolditalic.woff2 +0 -0
- data/assets/fonts/notosans-italic.woff +0 -0
- data/assets/fonts/notosans-italic.woff2 +0 -0
- data/assets/fonts/notosans-regular.woff +0 -0
- data/assets/fonts/notosans-regular.woff2 +0 -0
- data/assets/images/.DS_Store +0 -0
- data/assets/images/Shape.svg +10 -0
- data/assets/images/icon-related-content.svg +14 -0
- data/assets/images/icons.svg +126 -0
- data/assets/images/teaser-image@1x.jpg +0 -0
- data/assets/images/teaser-image@2x.jpg +0 -0
- data/assets/images/w3c.sketch +0 -0
- data/assets/images/w3c.svg +10 -0
- data/assets/scripts/jquery.min.js +4 -0
- data/assets/scripts/main.js +208 -0
- data/assets/scripts/svg4everybody.js +1 -0
- metadata +257 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! ableplayer V3.0.26 */
|
|
2
|
+
.able-wrapper{position:relative;margin:0;padding:0;width:100%;height:auto;box-sizing:content-box!important}.able{position:relative;margin:1em 0;width:100%;box-shadow:0 0 16px #262626;z-index:5000}.able-column-left{float:left}.able-column-right{float:left}.able .able-vidcap-container{background-color:#000;left:0;margin:0;position:relative;top:0}.able-player{font-family:Arial,Helvetica,sans-serif;background-color:#262626}.able-offscreen{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.able-media-container audio{display:none!important}.able-video{}.able-video .able-now-playing{display:none}.able-controller{position:relative;border-top:2px solid #4c4c4c;border-bottom:2px solid #4c4c4c;background-color:#464646;min-height:38px;padding:0}.able-poster{position:absolute;top:0;left:0}.able-big-play-button{position:absolute;font-size:8em;opacity:.5;filter:alpha(opacity=50);color:#fdfdfd;background-color:transparent;border:0;outline:0;left:0;top:0;padding:0;z-index:6500}.able-big-play-button:hover{opacity:100;filter:alpha(opacity=100)}.able-left-controls,.able-right-controls{overflow:visible}.able-left-controls button,.able-right-controls button{vertical-align:middle}.able-left-controls{float:left}.able-right-controls{float:right}.able-black-controls,.able-black-controls button,.able-black-controls label{color:#000!important}.able-black-controls .able-seekbar{border:2px solid #000}.able-white-controls,.able-white-controls button,.able-black-controls label{color:#FFF!important}.able-white-controls .able-seekbar{border:2px solid #FFF}.able-controller button{background:0 0;position:relative;display:inline-block;border-style:none;margin:3px;padding:0;font-size:20px;min-width:24px;outline:2px solid #464646;border:0;overflow:visible!important;z-index:6600}.able-controller button>span,.able-controller button>img{width:20px;margin:0 auto;padding:0;z-index:6700}.able-controller .buttonOff{opacity:.5;filter:alpha(opacity=50);z-index:6800}.able-controller .able-seekbar{margin:0 5px;z-index:6900}.able-controller button:hover,.able-controller button:focus{outline-style:solid;outline-width:medium}.able-controller button:hover{outline-color:#8AB839!important}.able-controller button:focus{outline-color:#ffbb37!important}.able-seekbar-wrapper{display:inline-block;vertical-align:middle}.able-seekbar{position:relative;height:.5em;border:1px solid;background-color:#000;margin:0 3px;border-style:solid;border-width:2px;border-color:#fff}.able-seekbar-loaded{display:inline-block;position:absolute;left:0;top:0;height:.5em;background-color:#464646;z-index:5100}.able-seekbar-played{display:inline-block;position:absolute;left:0;top:0;height:.5em;background-color:#DADADA;z-index:5200}.able-seekbar-head{display:inline-block;position:relative;left:0;top:-.45em;background-color:#FDFDFD;width:.8em;height:.8em;border:1px solid;border-radius:.8em;z-index:5500}.able-volume-slider{width:34px;height:50px;background-color:#464646;padding:10px 0;position:absolute;right:0;top:-74px;display:none;z-index:9100}.able-volume-track{display:block;position:relative;height:100%;width:5px;margin:0 auto;background-color:#999}.able-volume-track.able-volume-track-on{background-color:#dadada;position:absolute;height:20px;top:30px}.able-volume-head{display:inline-block;background-color:#fdfdfd;outline:1px solid #333;position:absolute;height:7px;width:15px;left:-5px;top:23px;z-index:9175}.able-volume-head:hover,.able-volume-head:focus{background-color:#ffbb37!important}.able-volume-help{display:none}.able-status-bar{height:1.5em;min-height:1.5em;color:#CCC;font-size:.9em;background-color:transparent;padding:.5em .5em .25em}.able-status-bar span.able-timer{text-align:left;float:left;width:32%}.able-status-bar span.able-speed{float:left;width:33%;text-align:center}.able-status{font-style:italic;float:right;width:32%;text-align:right}div.able-captions-wrapper{width:100%;margin:0;padding:0;text-align:center;line-height:1.35em;display:none;z-index:6000}div.able-captions{display:none;padding:.15em .25em;background-color:#000;font-size:1.1em;color:#fff;opacity:.75}div.able-captions-overlay{position:absolute;margin:0;bottom:0}div.able-captions-below{position:relative;min-height:2.8em}div.able-descriptions{position:relative;color:#FF6;background-color:#262626;min-height:2.8em;border-top:1px solid #666;margin:0;padding:3%;width:94%;text-align:center}div.able-now-playing{text-align:center;font-weight:700;font-size:1.1em;color:#FFF;background-color:transparent;padding:.5em .5em 1em}div.able-now-playing span{font-size:.9em}div.able-now-playing span span{display:block}div.able-modal-dialog{position:absolute;height:auto;max-width:90%;margin-left:auto;margin-right:auto;left:0;right:0;outline:0 none;display:none;color:#000;background-color:#FAFAFA;box-sizing:content-box!important;z-index:10000}div.able-modal-overlay{position:fixed;width:100%;height:100%;background-color:#000;opacity:.5;margin:0;padding:0;top:0;left:0;display:none;z-index:9500}button.modalCloseButton{position:absolute;top:5px;right:5px}button.modal-button{margin-right:5px}div.able-modal-dialog input:hover,div.able-modal-dialog input:focus,div.able-modal-dialog button:hover,div.able-modal-dialog button:focus{outline-style:solid;outline-width:2px}div.able-modal-dialog input:hover,div.able-modal-dialog button:hover{outline-color:#8AB839}div.able-modal-dialog input:focus,div.able-modal-dialog button:focus{outline-color:#ffbb37}div.able-modal-dialog h1{font-weight:700;font-size:1.8em;line-height:1.2em;margin:.75em 0;color:#000;text-align:center}.able-prefs-form,.able-help-div,.able-resize-form{background-color:#F5F5F5;border:medium solid #ccc;padding:.5em 1em;margin:0 0 0 1em;width:25em;display:none}.able-prefs-form fieldset{margin-left:0;padding-left:0;border:0}.able-prefs-form legend{color:#000;font-weight:700;font-size:1.1em}.able-prefs-form fieldset div{display:table;margin-left:1em}.able-prefs-form fieldset div input{display:table-cell;width:1em;vertical-align:middle}.able-prefs-form fieldset div label{display:table-cell;padding-left:.5em}fieldset.able-prefs-keys div{float:left;margin-right:1em}div.able-desc-pref-prompt{font-weight:700;font-style:italic;margin-left:1em!important}div.able-prefDescFormat>div{margin-left:1.5em}.able-prefs-captions label,.able-prefs-captions select{display:block;float:left;margin-bottom:.25em}fieldset.able-prefs-captions label{width:6em;text-align:right;padding-right:1em}fieldset.able-prefs-captions select{width:10em;font-size:.9em;border-radius:none}.able-prefs-form div.able-captions-sample{padding:.5em;text-align:center}.able-prefs-form h2{margin-top:0;margin-bottom:.5em;font-size:1.1em}.able-prefs-form ul{margin-top:0}able-prefs-form-keyboard ul{list-style-type:none}span.able-modkey-alt,span.able-modkey-ctrl,span.able-modkey-shift{color:#666;font-style:italic}span.able-modkey{font-weight:700;color:#000;font-size:1.1em}.able-resize-form h1{font-size:1.15em}.able-resize-form div div{margin:1em}.able-resize-form label{padding-right:.5em;font-weight:700}.able-resize-form input[type=text]{font-size:1em}.able-resize-form input[readonly]{color:#AAA}.able-window-toolbar{background-color:#464646;min-height:15px;padding:10px;border-style:solid;border-width:0 0 1px}.able-draggable:hover{cursor:move}.able-window-toolbar .able-button-handler-preferences{position:absolute;top:0;right:0;font-size:1.5em;background-color:transparent;border:0;outline:0;padding:0;z-index:9300}.able-window-toolbar .able-button-handler-preferences:hover,.able-window-toolbar .able-button-handler-preferences:focus{outline-style:solid;outline-width:medium}.able-window-toolbar .able-button-handler-preferences:hover{outline-color:#8AB839!important}.able-window-toolbar .able-button-handler-preferences:focus{outline-color:#ffbb37!important}.able-window-toolbar .able-popup{position:absolute;right:0;top:0;display:none}.able-drag{border:2px dashed #F90;cursor:move}.able-resizable{position:absolute;width:16px;height:16px;padding:5px 2px;bottom:0;right:0;cursor:nwse-resize;background:transparent url(../images/wingrip.png) no-repeat}.able-sign-window{position:relative;margin:1em;z-index:8000}.able-sign-window video{width:100%}.able-sign-window:focus{outline:0}div.able-chapters-div{padding:0}div.able-chapters-div .able-chapters-heading{margin:1em .75em;font-size:1.1em;font-weight:700}div.able-chapters-div ul{list-style-type:none;padding-left:0}div.able-chapters-div ul li{max-width:100%;padding:0;height:2em}div.able-chapters-div button{width:100%;height:100%;border:0;background-color:transparent;color:#000;font-size:1em;text-align:left;padding:.15em 1em}div.able-chapters-div li.able-current-chapter{background-color:#000!important}div.able-chapters-div li.able-current-chapter button{color:#FFF!important}div.able-chapters-div li.able-focus{background-color:#4C4C4C}div.able-chapters-div button:focus,div.able-chapters-div button:hover,div.able-chapters-div button::-moz-focus-inner{border:0;outline:0;color:#FFF!important}.able-tooltip,.able-alert{position:absolute;padding:5px 10px;border-color:#000;border-width:1px;color:#000!important;background-color:#CCC;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:none}.able-alert{background-color:#FFC;box-shadow:0 0 16px #262626;z-index:9400}.able-popup{z-index:9200}.able-tooltip{z-index:9000}.able-popup{position:absolute;margin:0;padding:0;border-color:#000;border-width:1px;background-color:#000;opacity:.85;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:none}.able-popup ul{list-style-type:none;margin:0;padding:0}.able-popup li{padding:.25em 1em .25em .25em;margin:1px}.able-popup label{padding-left:.25em;color:#FFF}.able-popup li.able-focus{background-color:#CCC}.able-popup li.able-focus label{color:#000}.able-popup-no-radio>ul>li>input{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.able-transcript-area{border-width:1px;border-style:solid;height:400px;z-index:7000;outline:0}.able-transcript{position:relative;overflow-y:scroll;padding-left:5%;padding-right:5%;background-color:#FFF;height:350px}.able-transcript div{margin:1em 0}.able-transcript-heading{font-size:1.4em;font-weight:700}.able-transcript-chapter-heading{font-size:1.2em;font-weight:700}.able-transcript div.able-transcript-desc{background-color:#FEE;border:thin solid #336;font-style:italic;padding:1em}.able-transcript .able-unspoken{font-weight:700}.able-transcript .able-hidden{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.able-highlight{background:#FF6}.able-previous{background:#000!important;font-style:italic}.able-transcript span:hover,.able-transcript span:focus,.able-transcript span:active{background:#CF6;cursor:pointer}.able-window-toolbar label{margin-right:10px;color:#FFF}.able-window-toolbar input:focus,.able-window-toolbar input:hover,.able-controller input:focus,.able-controller input:hover,.able-controller button:focus,.able-controller button:hover,.able-seekbar-head:focus,.able-seekbar-head:hover{outline-style:solid;outline-width:2px}.able-window-toolbar input:focus,.able-controller input:focus,.able-controller button:focus,.able-seekbar-head:focus{outline-color:#ffbb37}.able-window-toolbar input:hover,.able-controller input:hover,.able-controller button:hover,.able-seekbar-head:hover{outline-color:#8AB839}.able-window-toolbar .transcript-language-select-wrapper{float:right;padding-right:30px}.able-player .able-playlist{font-size:.9em;list-style-type:none;margin:0;background-color:#FFF;padding:5px 0}.able-player .able-playlist li{background-color:#DDD;margin:5px;padding:5px 10px;border-radius:15px;-moz-border-radius:15px}.able-player .able-playlist li:hover,.able-player .able-playlist li:focus,.able-player .able-playlist li:active{color:#FFF;background-color:#340449;text-decoration:none}.able-player .able-playlist li.able-current{color:#000;background-color:#FFEEB3;font-weight:700;outline:0;text-decoration:none}.able-player .able-playlist li.able-current:after{content:' *'}.able-playlist{}.able-playlist li{}.able-playlist li:hover,.able-playlist li:focus,.able-playlist li:active{text-decoration:none;color:#fff;background-color:#000}.able-playlist li.able-current{font-weight:700;text-decoration:underline}.able-playlist li.able-current:after{content:' *'}.able-search-results ul li{font-size:1.1em;margin-bottom:1em}.able-search-results-time{font-weight:700;text-decoration:underline;cursor:pointer}.able-search-results-time:hover,.able-search-results-time:focus,.able-search-results-time:active{color:#FFF;background-color:#000;text-decoration:none}.able-search-results-text{padding-left:1em}.able-search-term{background-color:#FFC;font-weight:700}.able-clipped,.able-screenreader-alert{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);width:1px!important;height:1px!important;overflow:hidden!important}.able-error{display:block;background:#ffc;border:2px solid #000;color:red;margin:.75em;padding:.5em}.able-fallback{display:block;text-align:center;border:2px solid #335;background-color:#EEE;color:#000;font-weight:700;font-size:1.1em;padding:1em;margin-bottom:1em;max-width:500px;width:95%}.able-fallback div,.able-fallback ul,.able-fallback p{text-align:left}.able-fallback li{font-weight:400}.able-fallback img{width:90%;margin:1em auto;opacity:.3}.able-fallback img.able-poster{position:relative}button svg{display:inline-block;width:1em;height:1em;fill:currentColor}@font-face{font-family:able;src:url(../button-icons/fonts/able.eot?dqripi);src:url(../button-icons/fonts/able.eot?dqripi#iefix) format('embedded-opentype'),url(../button-icons/fonts/able.ttf?dqripi) format('truetype'),url(../button-icons/fonts/able.woff?dqripi) format('woff'),url(../button-icons/fonts/able.svg?dqripi#able) format('svg');font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:able!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-restart:before{content:"\e900"}.icon-rewind:before{content:"\e603"}.icon-forward:before{content:"\e604"}.icon-previous:before{content:"\e901"}.icon-next:before{content:"\e902"}.icon-slower:before{content:"\f0dd"}.icon-faster:before{content:"\f0de"}.icon-turtle:before{content:"\e904"}.icon-rabbit:before{content:"\e905"}.icon-ellipsis:before{content:"\e903"}.icon-pipe:before{content:"\e600"}.icon-captions:before{content:"\e601"}.icon-descriptions:before{content:"\e602"}.icon-sign:before{content:"\e60a"}.icon-volume-mute:before{content:"\e606"}.icon-volume-soft:before{content:"\e60c"}.icon-volume-medium:before{content:"\e605"}.icon-volume-loud:before{content:"\e60b"}.icon-volume-up:before{content:"\e607"}.icon-volume-down:before{content:"\e608"}.icon-chapters:before{content:"\e609"}.icon-transcript:before{content:"\f15c"}.icon-preferences:before{content:"\e60d"}.icon-close:before{content:"\f00d"}.icon-fullscreen-expand:before{content:"\f065"}.icon-fullscreen-collapse:before{content:"\f066"}.icon-help:before{content:"\f128"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*! ableplayer V3.0.26 */
|
|
2
|
+
"use strict";!function(a){a(document).ready(function(){a("video, audio").each(function(b,c){void 0!==a(c).data("able-player")&&new AblePlayer(a(this),a(c))})}),window.onYouTubeIframeAPIReady=function(){AblePlayer.youtubeIframeAPIReady=!0,a("body").trigger("youtubeIframeAPIReady",[])},a(window).keydown(function(a){1===AblePlayer.nextIndex&&AblePlayer.lastCreated.onPlayerKeyPress(a)}),window.AblePlayer=function(b){if(AblePlayer.lastCreated=this,this.media=b,0===a(b).length)return void this.provideFallback("ERROR: No media specified.");if(void 0!==a(b).attr("autoplay")&&"false"!==a(b).attr("autoplay")?this.autoplay=!0:this.autoplay=!1,void 0!==a(b).attr("loop")&&"false"!==a(b).attr("loop")?this.loop=!0:this.loop=!1,void 0!==a(b).data("start-time")&&""!==a(b).data("start-time")?this.startTime=a(b).data("start-time"):this.startTime=0,void 0!==a(b).data("debug")&&"false"!==a(b).data("debug")?this.debug=!0:this.debug=!1,void 0!==a(b).data("root-path")?this.rootPath=a(b).data("root-path").replace(/\/?$/,"/"):this.rootPath=this.getRootPath(),this.defaultVolume=7,void 0!==a(b).data("volume")&&""!==a(b).data("volume")){var c=a(b).data("volume");c>=0&&10>=c&&(this.defaultVolume=c)}if(this.volume=this.defaultVolume,void 0!==a(b).data("use-chapters-button")&&a(b).data("use-chapters-button")===!1?this.useChaptersButton=!1:this.useChaptersButton=!0,void 0!==a(b).data("use-descriptions-button")&&a(b).data("use-descriptions-button")===!1?this.useDescriptionsButton=!1:this.useDescriptionsButton=!0,this.transcriptType=null,void 0!==a(b).data("transcript-src")?(this.transcriptSrc=a(b).data("transcript-src"),this.transcriptSrcHasRequiredParts()?this.transcriptType="manual":this.transcriptType=null):b.find('track[kind="captions"], track[kind="subtitles"]').length>0&&(void 0!==a(b).data("transcript-div")&&""!==a(b).data("transcript-div")?(this.transcriptDivLocation=a(b).data("transcript-div"),this.transcriptType="external"):void 0!==a(b).data("include-transcript")?a(b).data("include-transcript")!==!1&&(this.transcriptType="popup"):this.transcriptType="popup"),void 0!==a(b).data("lyrics-mode")&&"false"!==a(b).data("lyrics-mode")?this.lyricsMode=!0:this.lyricsMode=!1,void 0!==a(b).data("transcript-title")&&""!==a(b).data("transcript-title")&&(this.transcriptTitle=a(b).data("transcript-title")),"overlay"===a(b).data("captions-position")?this.defaultCaptionsPosition="overlay":this.defaultCaptionsPosition="below",void 0!==a(b).data("chapters-div")&&""!==a(b).data("chapters-div")&&(this.chaptersDivLocation=a(b).data("chapters-div")),void 0!==a(b).data("chapters-title")&&(this.chaptersTitle=a(b).data("chapters-title")),void 0!==a(b).data("chapters-default")&&""!==a(b).data("chapters-default")?this.defaultChapter=a(b).data("chapters-default"):this.defaultChapter=null,"chapter"===a(b).data("prevnext-unit")||"chapters"===a(b).data("prevnext-unit")?this.prevNextUnit="chapter":"playlist"===a(b).data("prevnext-unit")?this.prevNextUnit="playlist":this.prevNextUnit=!1,"animals"===a(b).data("speed-icons")?this.speedIcons="animals":this.speedIcons="arrows","chapter"===a(b).data("seekbar-scope")||"chapters"===a(b).data("seekbar-scope")?this.seekbarScope="chapter":this.seekbarScope="video",void 0!==a(b).data("youtube-id")&&""!==a(b).data("youtube-id")&&(this.youTubeId=a(b).data("youtube-id")),void 0!==a(b).data("youtube-desc-id")&&""!==a(b).data("youtube-desc-id")&&(this.youTubeDescId=a(b).data("youtube-desc-id")),this.iconType="font",this.forceIconType=!1,void 0!==a(b).data("icon-type")&&""!==a(b).data("icon-type")){var d=a(b).data("icon-type");("font"===d||"image"==d||"svg"==d)&&(this.iconType=d,this.forceIconType=!0)}if(void 0!==a(b).data("allow-fullscreen")&&a(b).data("allow-fullscreen")===!1?this.allowFullScreen=!1:this.allowFullScreen=!0,this.defaultSeekInterval=10,this.useFixedSeekInterval=!1,void 0!==a(b).data("seek-interval")&&""!==a(b).data("seek-interval")){var e=a(b).data("seek-interval");/^[1-9][0-9]*$/.test(e)&&(this.seekInterval=e,this.useFixedSeekInterval=!0)}if(void 0!==a(b).data("show-now-playing")&&"false"===a(b).data("show-now-playing")?this.showNowPlaying=!1:this.showNowPlaying=!0,this.fallback=null,this.fallbackPath=null,this.testFallback=!1,void 0!==a(b).data("fallback")&&""!==a(b).data("fallback")){var f=a(b).data("fallback");"jw"===f&&(this.fallback=f)}if("jw"===this.fallback&&(void 0!==a(b).data("fallback-path")&&"false"!==a(b).data("fallback-path")?this.fallbackPath=a(b).data("fallback-path"):this.fallbackPath=this.rootPath+"thirdparty/",void 0!==a(b).data("test-fallback")&&"false"!==a(b).data("test-fallback")&&(this.testFallback=!0)),this.lang="en",void 0!==a(b).data("lang")&&""!==a(b).data("lang")){var g=a(b).data("lang");2==g.length&&(this.lang=g)}void 0!==a(b).data("force-lang")&&"false"!==a(b).data("force-lang")?this.forceLang=!0:this.forceLang=!1,void 0!==a(b).data("meta-type")&&""!==a(b).data("meta-type")&&(this.metaType=a(b).data("meta-type")),void 0!==a(b).data("meta-div")&&""!==a(b).data("meta-div")&&(this.metaDiv=a(b).data("meta-div")),void 0!==a(b).data("search")&&""!==a(b).data("search")&&void 0!==a(b).data("search-div")&&""!==a(b).data("search-div")&&(this.searchString=a(b).data("search"),this.searchDiv=a(b).data("search-div")),this.setDefaults(),this.ableIndex=AblePlayer.nextIndex,AblePlayer.nextIndex+=1,this.title=a(b).attr("title"),this.tt={};var h=this;a.when(this.getTranslationText()).then(function(){h.countProperties(h.tt)>50?h.setup():h.provideFallback("ERROR: Failed to load translation table")})},AblePlayer.nextIndex=0,AblePlayer.prototype.setup=function(){var a=this;this.reinitialize().then(function(){a.player?a.setupInstance().then(function(){a.recreatePlayer()}):a.provideFallback("Unable to play media")})},AblePlayer.youtubeIframeAPIReady=!1,AblePlayer.loadingYoutubeIframeAPI=!1}(jQuery),function(a){AblePlayer.prototype.setDefaults=function(){this.playing=!1,this.getUserAgent(),this.setIconColor(),this.setButtonImages()},AblePlayer.prototype.getRootPath=function(){var a,b,c,d,e,f,g,h;for(a=document.getElementsByTagName("script"),b=0;b<a.length;b++)if(c=a[b].src,d=c.substr(c.lastIndexOf("/")),-1!==d.indexOf("ableplayer")){e=c.split("?")[0];break}return f=e.split("/").slice(0,-1).join("/"),g=f.lastIndexOf("/"),h=f.substring(0,g)+"/"},AblePlayer.prototype.setIconColor=function(){var b,c,d,e,f,g,h,i,j,k;for(b=["controller","toolbar"],c=0;c<b.length;c++)"controller"==b[c]?d=a("<div>",{"class":"able-controller"}).hide():"toolbar"===b[c]&&(d=a("<div>",{"class":"able-window-toolbar"}).hide()),a("body").append(d),e=d.css("background-color"),f=e.replace(/[^\d,]/g,"").split(","),g=f[0],h=f[1],i=f[2],j=.2126*g+.7152*h+.0722*i,k=125>j?"white":"black","controller"===b[c]?this.iconColor=k:"toolbar"===b[c]&&(this.toolbarIconColor=k),d.remove()},AblePlayer.prototype.setButtonImages=function(){this.imgPath=this.rootPath+"button-icons/"+this.iconColor+"/",this.playButtonImg=this.imgPath+"play.png",this.pauseButtonImg=this.imgPath+"pause.png",this.restartButtonImg=this.imgPath+"restart.png",this.rewindButtonImg=this.imgPath+"rewind.png",this.forwardButtonImg=this.imgPath+"forward.png",this.previousButtonImg=this.imgPath+"previous.png",this.nextButtonImg=this.imgPath+"next.png","arrows"===this.speedIcons?(this.fasterButtonImg=this.imgPath+"slower.png",this.slowerButtonImg=this.imgPath+"faster.png"):"animals"===this.speedIcons&&(this.fasterButtonImg=this.imgPath+"rabbit.png",this.slowerButtonImg=this.imgPath+"turtle.png"),this.captionsButtonImg=this.imgPath+"captions.png",this.chaptersButtonImg=this.imgPath+"chapters.png",this.signButtonImg=this.imgPath+"sign.png",this.transcriptButtonImg=this.imgPath+"transcript.png",this.descriptionsButtonImg=this.imgPath+"descriptions.png",this.fullscreenExpandButtonImg=this.imgPath+"fullscreen-expand.png",this.fullscreenCollapseButtonImg=this.imgPath+"fullscreen-collapse.png",this.prefsButtonImg=this.imgPath+"preferences.png",this.helpButtonImg=this.imgPath+"help.png"},AblePlayer.prototype.reinitialize=function(){var b,c,d,e;if(b=new a.Deferred,c=b.promise(),d=this,window.console||(this.debug=!1),this.startedPlaying=!1,this.autoScrollTranscript=!0,this.$media=a(this.media).first(),this.media=this.$media[0],this.$media.is("audio"))this.mediaType="audio";else{if(!this.$media.is("video"))return this.mediaType=this.$media.get(0).tagName,e="Media player initialized with "+this.mediaType+"#"+this.mediaId+". ",e+="Expecting an HTML5 audio or video element.",this.provideFallback(e),b.fail(),c;this.mediaType="video"}return this.$sources=this.$media.find("source"),this.player=this.getPlayer(),this.player||this.provideFallback(this.error),this.setIconType(),this.setDimensions(),b.resolve(),c},AblePlayer.prototype.setDimensions=function(){this.$media.attr("width")&&this.$media.attr("height")?(this.playerMaxWidth=parseInt(this.$media.attr("width"),10),this.playerMaxHeight=parseInt(this.$media.attr("height"),10)):(this.playerMaxWidth=this.$media.parent().width(),this.playerMaxHeight=this.getMatchingHeight(this.playerMaxWidth)),this.$media.css({width:"100%",height:"auto"})},AblePlayer.prototype.getMatchingHeight=function(b){var c,d,e,f,g,h;return c=[3840,2560,1920,1280,854,640,426],d=[2160,1440,1080,720,480,360,240],e=null,f=null,a.each(c,function(a){(null==e||Math.abs(this-b)<Math.abs(e-b))&&(e=this,f=a)}),g=d[f],this.aspectRatio=e/g,h=Math.round(b/this.aspectRatio)},AblePlayer.prototype.setIconType=function(){var b,c,d;return this.forceIconType?!1:(window.getComputedStyle?(a("span.icon-play").length?c=a("span.icon-play"):(b=a("<span>",{"class":"icon-play able-clipped"}),a("body").append(b),c=b),d=window.getComputedStyle(c.get(0),null).getPropertyValue("font-family"),"undefined"!=typeof d&&-1!==d.indexOf("able")?this.iconType="font":this.iconType="image"):this.iconType="image",this.debug,void("undefined"!=typeof b&&b.remove()))},AblePlayer.prototype.setupInstance=function(){var b=new a.Deferred,c=b.promise();return this.$media.attr("id")?this.mediaId=this.$media.attr("id"):(this.mediaId="ableMediaId_"+this.ableIndex,this.$media.attr("id",this.mediaId)),this.setupInstancePlaylist(),b.resolve(),c},AblePlayer.prototype.setupInstancePlaylist=function(){var b=this;if(this.hasPlaylist=!1,a(".able-playlist").each(function(){if(a(this).data("player")===b.mediaId){b.hasPlaylist=!0,b.$playlist=a(this).find("li"),a(this).find("li").attr("tabindex","0"),b.playlistIndex=0;var c=a(this).data("embedded");"undefined"!=typeof c&&c!==!1?b.playlistEmbed=!0:b.playlistEmbed=!1}}),this.hasPlaylist&&this.playlistEmbed){var c=this.$playlist.parent();this.$playlistDom=c.clone(),c.remove()}},AblePlayer.prototype.recreatePlayer=function(){var a,b,c;return a=this,this.player?(this.loadCurrentPreferences(),this.injectPlayerCode(),this.initSignLanguage(),void this.setupTracks().then(function(){a.setMediaAttributes(),a.setupAltCaptions().then(function(){("external"===a.transcriptType||"popup"===a.transcriptType)&&a.captions.length<=1&&a.$transcriptLanguageSelect.parent().remove(),a.initDescription(),a.initDefaultCaption(),a.initPlayer().then(function(){for(a.initializing=!1,b=a.getPreferencesGroups(),c=0;c<b.length;c++)a.injectPrefsForm(b[c]);a.setupPopups(),a.updateCaption(),a.updateTranscript(),a.chaptersDivLocation&&a.populateChaptersDiv(),a.showSearchResults()},function(){a.provideFallback(this.error)})})})):void console.log("Can't create player; no appropriate player type detected.")},AblePlayer.prototype.initPlayer=function(){var b,c=this;"html5"===this.player?b=this.initHtml5Player():"jw"===this.player?b=this.initJwPlayer():"youtube"===this.player&&(b=this.initYouTubePlayer());var d=new a.Deferred,e=d.promise();return b.done(function(){c.useFixedSeekInterval===!1&&c.setSeekInterval(),c.addControls(),c.addEventListeners(),c.Volume&&c.setMute(!1),c.setFullscreen(!1),c.setVolume(c.defaultVolume),c.refreshControls(),"html5"===c.player&&c.isIOS()&&c.$media[0].load(),d.resolve()}).fail(function(){d.reject()}),e},AblePlayer.prototype.setSeekInterval=function(){var a;return this.seekInterval=this.defaultSeekInterval,a=this.useChapterTimes?this.chapterDuration:this.getDuration(),"undefined"==typeof a||1>a?void(this.seekIntervalCalculated=!1):(20>=a?this.seekInterval=5:30>=a?this.seekInterval=6:40>=a?this.seekInterval=8:100>=a?this.seekInterval=10:this.seekInterval=a/10,void(this.seekIntervalCalculated=!0))},AblePlayer.prototype.initDefaultCaption=function(){var a,b;if(a=this.usingYouTubeCaptions?this.ytCaptions:this.captions,a.length>0){for(b=0;b<a.length;b++)a[b].def===!0&&(this.captionLang=a[b].language,this.selectedCaptions=a[b]);if("undefined"==typeof this.captionLang)for(b=0;b<a.length;b++)a[b].language===this.lang&&(this.captionLang=a[b].language,this.selectedCaptions=a[b]);"undefined"==typeof this.captionLang&&(this.captionLang=a[0].language,this.selectedCaptions=a[0]),"undefined"!=typeof this.captionLang&&(this.$transcriptLanguageSelect&&this.$transcriptLanguageSelect.find("option[lang="+this.captionLang+"]").prop("selected",!0),this.syncTrackLanguages("init",this.captionLang))}},AblePlayer.prototype.initHtml5Player=function(){var b=new a.Deferred,c=b.promise();return b.resolve(),c},AblePlayer.prototype.initJwPlayer=function(){var b,c=this,d=new a.Deferred,e=d.promise();return a.ajax({async:!1,url:this.fallbackPath+"jwplayer.js",dataType:"script",success:function(e,f,g){c.jwId=c.mediaId+"_fallback",c.$mediaContainer.attr("id",c.jwId),b="audio"===c.mediaType?0:c.playerHeight;var h=[];a.each(c.$sources,function(b,c){h.push({file:a(c).attr("src")})});var i=c.fallbackPath+"jwplayer.flash.swf",j=c.fallbackPath+"jwplayer.html5.js";"video"===c.mediaType?c.jwPlayer=jwplayer(c.jwId).setup({playlist:[{image:c.$media.attr("poster"),sources:h}],flashplayer:i,html5player:j,controls:!1,volume:100*c.defaultVolume,width:"100%",fallback:!1,primary:"flash",wmode:"transparent"}):c.jwPlayer=jwplayer(c.jwId).setup({playlist:[{sources:h}],flashplayer:i,html5player:j,controls:!1,volume:100*this.defaultVolume,height:0,width:"100%",fallback:!1,primary:"flash"}),c.$media.remove(),d.resolve()},error:function(a,b,c){this.error="Failed to load JW Player.",d.reject()}}),e},AblePlayer.prototype.setMediaAttributes=function(){this.$media.attr("tabindex",-1);var a=this.$media.get(0).textTracks;if(a)for(var b=0;b<a.length;)a[b].mode="disabled",b+=1},AblePlayer.prototype.getPlayer=function(){return this.youTubeId?"video"!==this.mediaType?(this.error="To play a YouTube video, use the <video> tag.",null):"youtube":this.testFallback||(this.isUserAgent("msie 7")||this.isUserAgent("msie 8")||this.isUserAgent("msie 9"))&&"video"===this.mediaType||this.isIOS()&&(this.isIOS(4)||this.isIOS(5)||this.isIOS(6))?"jw"===this.fallback&&this.jwCanPlay()?"jw":(this.error="The fallback player (JW Player) is unable to play the available media file.",null):this.media.canPlayType?"html5":(this.error="This browser does not support the available media file.",null)},AblePlayer.prototype.jwCanPlay=function(){var b,c,d;if(this.$sources.length>0)for(b=0;b<this.$sources.length;b++)if(c=this.$sources[b].getAttribute("type"),"video"===this.mediaType&&"video/mp4"===c||"audio"===this.mediaType&&"audio/mpeg"===c)return!0;if(a(".able-playlist")&&(d=a(".able-playlist").eq(0).find("li").eq(0),"audio"===this.mediaType)){if(d.attr("data-mp3"))return!0;if("video"===this.mediaType&&d.attr("data-mp4"))return!0}return!1}}(jQuery),function(a){AblePlayer.prototype.setCookie=function(a){Cookies.set("Able-Player",a,{expires:90})},AblePlayer.prototype.getCookie=function(){var a,b={preferences:{},sign:{},transcript:{}};try{a=Cookies.getJSON("Able-Player")}catch(c){Cookies.getJSON(b),a=b}return a?a:b},AblePlayer.prototype.updateCookie=function(a){var b,c,d,e,f,g;if(b=this.getCookie(),"transcript"===a||"sign"===a)"transcript"===a?(c=this.$transcriptArea,d=c.position(),"undefined"==typeof b.transcript&&(b.transcript={}),b.transcript.position=c.css("position"),b.transcript.zindex=c.css("z-index"),b.transcript.top=d.top,b.transcript.left=d.left,b.transcript.width=c.width(),b.transcript.height=c.height()):"sign"===a&&(c=this.$signWindow,d=c.position(),"undefined"==typeof b.sign&&(b.sign={}),b.sign.position=c.css("position"),b.sign.zindex=c.css("z-index"),b.sign.top=d.top,b.sign.left=d.left,b.sign.width=c.width(),b.sign.height=c.height());else for(e=this.getAvailablePreferences(),f=0;f<e.length;f++)g=e[f].name,g==a&&(b.preferences[g]=this[g]);this.setCookie(b)},AblePlayer.prototype.getPreferencesGroups=function(){if("video"===this.mediaType)return["captions","descriptions","keyboard","transcript"];if("audio"===this.mediaType){var a=[];return a.push("keyboard"),this.lyricsMode&&a.push("transcript"),a}},AblePlayer.prototype.getAvailablePreferences=function(){var a=[];return a.push({name:"prefAltKey",label:this.tt.prefAltKey,group:"keyboard","default":1}),a.push({name:"prefCtrlKey",label:this.tt.prefCtrlKey,group:"keyboard","default":1}),a.push({name:"prefShiftKey",label:this.tt.prefShiftKey,group:"keyboard","default":0}),a.push({name:"prefTranscript",label:null,group:"transcript","default":0}),a.push({name:"prefHighlight",label:this.tt.prefHighlight,group:"transcript","default":1}),a.push({name:"prefAutoScrollTranscript",label:null,group:"transcript","default":1}),a.push({name:"prefTabbable",label:this.tt.prefTabbable,group:"transcript","default":0}),"video"===this.mediaType&&(a.push({name:"prefCaptions",label:null,group:"captions","default":1}),a.push({name:"prefCaptionsPosition",label:this.tt.prefCaptionsPosition,group:"captions","default":this.defaultCaptionsPosition}),a.push({name:"prefCaptionsFont",label:this.tt.prefCaptionsFont,group:"captions","default":this.tt.sans}),a.push({name:"prefCaptionsSize",label:this.tt.prefCaptionsSize,group:"captions","default":"100%"}),a.push({name:"prefCaptionsColor",label:this.tt.prefCaptionsColor,group:"captions","default":"white"}),a.push({name:"prefCaptionsBGColor",label:this.tt.prefCaptionsBGColor,group:"captions","default":"black"}),a.push({name:"prefCaptionsOpacity",label:this.tt.prefCaptionsOpacity,group:"captions","default":"100%"}),a.push({name:"prefDesc",label:null,group:"descriptions","default":0}),a.push({name:"prefDescFormat",label:this.tt.prefDescFormat,group:"descriptions","default":"video"}),a.push({name:"prefDescPause",label:this.tt.prefDescPause,group:"descriptions","default":0}),a.push({name:"prefVisibleDesc",label:this.tt.prefVisibleDesc,group:"descriptions","default":1}),a.push({name:"prefSign",label:null,group:null,"default":0})),a},AblePlayer.prototype.loadCurrentPreferences=function(){for(var a=this.getAvailablePreferences(),b=this.getCookie(),c=0;c<a.length;c++){var d=a[c].name,e=a[c]["default"];void 0!==b.preferences[d]?this[d]=b.preferences[d]:(b.preferences[d]=e,this[d]=e)}this.setCookie(b)},AblePlayer.prototype.injectPrefsForm=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z;d=this,c=this.getAvailablePreferences(),e=a("<div>",{"class":"able-prefs-form "});var $="able-prefs-form-"+b;if(e.addClass($),"captions"==b)f=this.tt.prefTitleCaptions,g=this.tt.prefIntroCaptions,h=a("<p>",{text:g}),e.append(h);else if("descriptions"==b){f=this.tt.prefTitleDescriptions;var h=a("<p>",{text:this.tt.prefIntroDescription1}),_=a("<ul>"),aa=a("<li>",{text:this.tt.prefDescFormatOption1}),ba=a("<li>",{text:this.tt.prefDescFormatOption2});_.append(aa,ba),this.hasOpenDesc&&this.hasClosedDesc?(Q=this.tt.prefIntroDescription2+" ",Q+="<strong>"+this.tt.prefDescFormatOption1b+"</strong>",Q+=" <em>"+this.tt.and+"</em> <strong>"+this.tt.prefDescFormatOption2b+"</strong>."):this.hasOpenDesc?(Q=this.tt.prefIntroDescription2,Q+=" <strong>"+this.tt.prefDescFormatOption1b+"</strong>."):this.hasClosedDesc?(Q=this.tt.prefIntroDescription2,Q+=" <strong>"+this.tt.prefDescFormatOption2b+"</strong>."):Q=this.tt.prefIntroDescriptionNone,i=a("<p>",{html:Q}),j=this.tt.prefIntroDescription3,(this.hasOpenDesc||this.hasClosedDesc)&&(j+=" "+this.tt.prefIntroDescription4),k=a("<p>",{text:j}),e.append(h,_,i,k)}else"keyboard"==b?(f=this.tt.prefTitleKeyboard,g=this.tt.prefIntroKeyboard1,g+=" "+this.tt.prefIntroKeyboard2,g+=" "+this.tt.prefIntroKeyboard3,h=a("<p>",{text:g}),e.append(h)):"transcript"==b&&(f=this.tt.prefTitleTranscript,g=this.tt.prefIntroTranscript,h=a("<p>",{text:g}),e.append(h));for("descriptions"===b?(q=a("<fieldset>"),o="able-prefs-"+b+"1",p=this.mediaId+"-prefs-"+b+"1",q.addClass(o).attr("id",p),r=a("<legend>"+this.tt.prefDescFormat+"</legend>"),q.append(r),s=a("<fieldset>"),o="able-prefs-"+b+"2",p=this.mediaId+"-prefs-"+b+"2",s.addClass(o).attr("id",p),t=a("<legend>"+this.tt.prefHeadingTextDescription+"</legend>"),s.append(t)):(n=a("<fieldset>"),o="able-prefs-"+b,p=this.mediaId+"-prefs-"+b,n.addClass(o).attr("id",p),"keyboard"===b&&(u=a("<legend>"+this.tt.prefHeadingKeyboard1+"</legend>"),n.append(u))),l=0;l<c.length;l++)if(c[l].group==b&&c[l].label){if(v=c[l].name,x="able-"+v,y=this.mediaId+"_"+v,"prefDescFormat"!==v&&(w=a("<div>").addClass(x)),"prefDescFormat"==v)B=a("<div>"),C=y+"_1",E=a("<label>").attr("for",C).text(this.capitalizeFirstLetter(this.tt.prefDescFormatOption1)),D=a("<input>",{type:"radio",name:v,id:C,value:"video"}),"video"===this.prefDescFormat&&D.prop("checked",!0),B.append(D,E),F=a("<div>"),G=y+"_2",I=a("<label>").attr("for",G).text(this.capitalizeFirstLetter(this.tt.prefDescFormatOption2)),H=a("<input>",{type:"radio",name:v,id:G,value:"text"}),"text"===this.prefDescFormat&&H.prop("checked",!0),F.append(H,I);else if("captions"===b){for(z=a('<label for="'+y+'"> '+c[l].label+"</label>"),A=a("<select>",{name:v,id:y}),"prefCaptions"!==v&&"prefCaptionsStyle"!==v&&A.change(function(){N=a(this).attr("name"),d.stylizeCaptions(d.$sampleCapsDiv,N)}),J=this.getCaptionsOptions(v),m=0;m<J.length;m++)"prefCaptionsPosition"===v?(L=J[m],"overlay"===L?M=this.tt.captionsPositionOverlay:"below"===L&&(L=J[m],M=this.tt.captionsPositionBelow)):"prefCaptionsColor"===v||"prefCaptionsBGColor"===v?(L=J[m][0],M=J[m][1]):"prefCaptionsOpacity"===v?(L=J[m],M=J[m],"0%"===L?M+=" ("+this.tt.transparent+")":"100%"===L&&(M+=" ("+this.tt.solid+")")):(L=J[m],M=J[m]),K=a("<option>",{value:L,text:M}),this[v]===L&&K.prop("selected",!0),A.append(K);w.append(z,A)}else z=a('<label for="'+y+'"> '+c[l].label+"</label>"),A=a("<input>",{type:"checkbox",name:v,id:y,value:"true"}),1===this[v]&&A.prop("checked",!0),"keyboard"===b&&A.change(function(){N=a(this).attr("name"),"prefAltKey"===N?(O=".able-modkey-alt",P=d.tt.prefAltKey+" + "):"prefCtrlKey"===N?(O=".able-modkey-ctrl",P=d.tt.prefCtrlKey+" + "):"prefShiftKey"===N&&(O=".able-modkey-shift",P=d.tt.prefShiftKey+" + "),a(this).is(":checked")?a(O).text(P):a(O).text("")}),w.append(A,z);"descriptions"===b?"prefDescFormat"===v?q.append(B,F):s.append(w):n.append(w)}if("descriptions"===b?e.append(q,s):e.append(n),"captions"===b)"video"===this.mediaType&&(this.$sampleCapsDiv=a("<div>",{"class":"able-captions-sample"}).text(this.tt.sampleCaptionText),e.append(this.$sampleCapsDiv),this.stylizeCaptions(this.$sampleCapsDiv));else if("keyboard"===b){for(R=a("<h2>",{text:this.tt.prefHeadingKeyboard2}),S=a("<ul>"),T=[],U=[],l=0;l<this.controls.length;l++)"play"===this.controls[l]?(T.push(this.tt.play+"/"+this.tt.pause),U.push("p</span> <em>"+this.tt.or+'</em> <span class="able-help-modifiers"> '+this.tt.spacebar)):"restart"===this.controls[l]?(T.push(this.tt.restart),U.push("s")):"rewind"===this.controls[l]?(T.push(this.tt.rewind),U.push("r")):"forward"===this.controls[l]?(T.push(this.tt.forward),U.push("f")):"volume"===this.controls[l]?(T.push(this.tt.volume),U.push("v</span> <em>"+this.tt.or+'</em> <span class="able-modkey">1-9'),T.push(this.tt.mute+"/"+this.tt.unmute),U.push("m")):"captions"===this.controls[l]?(this.captions.length>1?T.push(this.tt.captions):this.captionsOn?T.push(this.tt.hideCaptions):T.push(this.tt.showCaptions),U.push("c")):"descriptions"===this.controls[l]?(this.descOn?T.push(this.tt.turnOffDescriptions):T.push(this.tt.turnOnDescriptions),U.push("d")):"prefs"===this.controls[l]?(T.push(this.tt.preferences),U.push("e")):"help"===this.controls[l]&&(T.push(this.tt.help),U.push("h"));for(l=0;l<U.length;l++)V='<span class="able-modkey-alt">',1===this.prefAltKey&&(V+=this.tt.prefAltKey+" + "),V+="</span>",V+='<span class="able-modkey-ctrl">',1===this.prefCtrlKey&&(V+=this.tt.prefCtrlKey+" + "),V+="</span>",V+='<span class="able-modkey-shift">',1===this.prefShiftKey&&(V+=this.tt.prefShiftKey+" + "),V+="</span>",V+='<span class="able-modkey">'+U[l]+"</span>",V+=" = "+T[l],W=a("<li>",{html:V}),S.append(W);V='<span class="able-modkey">'+this.tt.escapeKey+"</span>",V+=" = "+this.tt.escapeKeyFunction,W=a("<li>",{html:V}),S.append(W),e.append(R,S)}a("body").append(e),X=new AccessibleDialog(e,this.$prefsButton,"dialog",f,h,d.tt.closeButtonLabel,"32em"),e.append("<hr>"),Y=a('<button class="modal-button">'+this.tt.save+"</button>"),Z=a('<button class="modal-button">'+this.tt.cancel+"</button>"),Y.click(function(){X.hide(),d.savePrefsFromForm()}),Z.click(function(){X.hide(),d.resetPrefsForm()}),e.append(Y),e.append(Z),"captions"===b?this.captionPrefsDialog=X:"descriptions"===b?this.descPrefsDialog=X:"keyboard"===b?this.keyboardPrefsDialog=X:"transcript"===b&&(this.transcriptPrefsDialog=X),a("div.able-prefs-form button.modalCloseButton").click(function(){d.resetPrefsForm()}),a("div.able-prefs-form").keydown(function(a){27===a.which&&d.resetPrefsForm()})},AblePlayer.prototype.resetPrefsForm=function(){var b,c,d,e,f;for(b=this,c=this.getCookie(),d=this.getAvailablePreferences(),e=0;e<d.length;e++)f=d[e].name,"prefDescFormat"===f?"text"===this[f]?a('input[value="text"]').prop("checked",!0):a('input[value="video"]').prop("checked",!0):-1!==f.indexOf("Captions")&&"prefCaptions"!==f?a('select[name="'+f+'"]').val(c.preferences[f]):1===this[f]?a('input[name="'+f+'"]').prop("checked",!0):a('input[name="'+f+'"]').prop("checked",!1);this.stylizeCaptions(this.$sampleCapsDiv)},AblePlayer.prototype.savePrefsFromForm=function(){var b,c,d,e,f;b=0,c=0,d=!1;for(var g=this.getCookie(),h=this.getAvailablePreferences(),i=0;i<h.length;i++)if(h[i].label){var j=h[i].name;"prefDescFormat"==j?(this.prefDescFormat=a('input[name="'+j+'"]:checked').val(),this.prefDescFormat!==g.preferences.prefDescFormat&&(g.preferences.prefDescFormat=this.prefDescFormat,b++)):-1!==j.indexOf("Captions")&&"prefCaptions"!==j?(f=a('select[name="'+j+'"]').val(),g.preferences[j]!==f&&(g.preferences[j]=f,this[j]=f,b++,c++),"prefCaptionsSize"===j&&(d=!0,e=f)):a('input[name="'+j+'"]').is(":checked")?(g.preferences[j]=1,1===this[j]||(this[j]=1,b++)):(g.preferences[j]=0,1===this[j]&&(this[j]=0,b++))}b>0?(this.setCookie(g),this.showAlert(this.tt.prefSuccess)):this.showAlert(this.tt.prefNoChange),"youtube"===this.player&&"undefined"!=typeof this.usingYouTubeCaptions&&this.usingYouTubeCaptions&&d&&this.youTubePlayer.setOption(this.ytCaptionModule,"fontSize",this.translatePrefs("size",e,"youtube")),this.updatePrefs(),c>0&&(this.stylizeCaptions(this.$captionsDiv),"undefined"!=typeof this.$descDiv&&this.stylizeCaptions(this.$descDiv))},AblePlayer.prototype.updatePrefs=function(){var b;b=1===this.prefAltKey?"Alt + ":"",1===this.prefCtrlKey&&(b+="Control + "),1===this.prefShiftKey&&(b+="Shift + "),a(".able-help-modifiers").text(b),1===this.prefTabbable?a(".able-transcript span.able-transcript-seekpoint").attr("tabindex","0"):a(".able-transcript span.able-transcript-seekpoint").removeAttr("tabindex"),0===this.prefHighlight&&a(".able-transcript span").removeClass("able-highlight"),this.updateCaption(),this.refreshingDesc=!0,this.initDescription()},AblePlayer.prototype.usingModifierKeys=function(a){return(1!==this.prefAltKey||a.altKey)&&(1!==this.prefCtrlKey||a.ctrlKey)&&(1!==this.prefShiftKey||a.shiftKey)?!0:!1}}(jQuery),function(a){function b(a,b){for(var d=[],e=0;e<b.length;e++)d.push(c(a,b[e]));return d}function c(a,b){var c=b(a);if(null!==a.error)throw a.error;return c}function d(a,b){for(var c=0;c<b.length;c++)"\n"===b[c]?(a.column=1,a.line+=1):a.column+=1}function e(a,b){var c=a.text.substring(0,b);return d(a,c),a.text=a.text.substring(b),c}function f(a,b){var c,e=a.text.indexOf("\n");return-1===e?(c=a.text,d(a,c),a.text=""):(c=a.text.substring(0,e),d(a,c+"\n"),a.text=a.text.substring(e+1)),c}function g(a){var b=a.text.indexOf("\n");return-1===b?a.text:a.text.substring(0,b)}function h(a){b(a,[s,t]);var c=a.text[0];" "===c||" "===c||"\n"===c?b(a,[x,i,z,m]):a.error="WEBVTT signature not followed by whitespace."}function i(a){for(;;){var b=g(a);if(-1!==b.indexOf("-->"))return;if(0===b.length)return;var d=c(a,k);a.metadata[d[0]]=d[1],c(a,x)}}function j(a){var b=[],c=a.indexOf(" ");c>=0&&b.push(c);var d=a.indexOf(" ");d>=0&&b.push(d);var e=a.indexOf("\n");return e>=0&&b.push(e),Math.min.apply(null,b)}function k(a){var b=a.text.indexOf("\n"),c=e(a,b),d=c.indexOf(":");if(-1===d)return void(a.error="Missing colon.");var f=c.substring(0,d),g=c.substring(d+1);return[f,g]}function l(a){var b=j(a.text),c=e(a,b),d=c.indexOf(":");if(-1===d)return void(a.error="Missing colon.");var f=c.substring(0,d),g=c.substring(d+1);return[f,g]}function m(d){for(;;){var e=g(d);if(0!==e.indexOf("NOTE")||4!==e.length&&" "!==e[4]&&" "!==e[4])if(0===a.trim(e).length&&d.text.length>0)c(d,y);else{if(!(a.trim(e).length>0))return;c(d,n)}else b(d,[r,y])}}function n(a){var d,h,i=g(a);if(-1===i.indexOf("-->")&&(d=f(a),i=g(a),-1===i.indexOf("-->")))return h="Invalid WebVTT file: "+a.src+"\n",h+="Line: "+a.line+", ",h+="Column: "+a.column+"\n",h+="Expected cue timing for cueId '"+d+"' but found: "+i+"\n",void(console.warn||console.log);var j=b(a,[A,w,u,w,A]),k=j[0],l=j[4];if(k>=l)return void(a.error="Start time is not sooner than end time.");c(a,v);var m=c(a,o);e(a,1);var n=c(a,p);"undefined"==typeof d&&(d=a.cues.length+1),a.cues.push({id:d,start:k,end:l,settings:m,components:n})}function o(a){for(var b={};a.text.length>0&&"\n"!==a.text[0];){var d=c(a,l);b[d[0]]=d[1],c(a,v)}return b}function p(b){for(var d={type:"internal",tagName:"",value:"",classes:[],annotation:"",parent:null,children:[],language:""},f=d,h=[];b.text.length>0;){var i=g(b);if(-1!==i.indexOf("-->")||/^\s*$/.test(i))break;if(b.text.length>=2&&"\n"===b.text[0]&&"\n"===b.text[1]){e(b,2);break}var j=q(b);if("string"===j.type)f.children.push(j);else if("startTag"===j.type)j.type=j.tagName,j.parent=f,-1!==a.inArray(j.tagName,["i","b","u","ruby"])?(h.length>0&&(f.language=h[h.length-1]),f.children.push(j),f=j):"rt"===j.tagName&&"ruby"===f.tagName?(h.length>0&&(f.language=h[h.length-1]),f.children.push(j),f=j):"c"===j.tagName?(j.value=j.annotation,h.length>0&&(f.language=h[h.length-1]),f.children.push(j),f=j):"v"===j.tagName?(j.value=j.annotation,h.length>0&&(f.language=h[h.length-1]),f.children.push(j),f=j):"lang"===j.tagName&&(h.push(j.annotation),h.length>0&&(f.language=h[h.length-1]),f.children.push(j),f=j);else if("endTag"===j.type)j.tagName===f.type&&-1!==a.inArray(j.tagName,["c","i","b","u","ruby","rt","v"])?f=f.parent:"lang"===j.tagName&&"lang"===f.type?(f=f.parent,h.pop()):"ruby"===j.tagName&&"rt"===f.type&&(f=f.parent.parent);else if("timestampTag"===j.type){var k={text:j.value,error:null,metadata:{},cues:[],line:1,column:1};try{var l=c(k,A);0===k.text.length&&(j.value=l,f.push(j))}catch(m){}}}return d}function q(b){for(var c="data",d=[],f="",g={type:"",tagName:"",value:"",classes:[],annotation:"",children:[]};;){var h;if(h=b.text.length>=2&&"\n"===b.text[0]&&"\n"===b.text[1]?"":b.text.length>0?b.text[0]:"","data"===c)if("&"===h)f="&",c="escape";else if("<"===h){if(0!==d.length)return g.type="string",g.value=d.join(""),g;c="tag"}else{if(""===h)return{type:"string",value:d.join("")};d.push(h)}else if("escape"===c)if("&"===h)d.push(f),f="&";else if(h.match(/[0-9a-z]/))f+=h;else if(";"===h)"&"===f?d.push("&"):"<"===f?d.push("<"):">"===f?d.push(">"):"&lrm"===f?d.push(""):"&rlm"===f?d.push(""):" "===f?d.push(" "):(d.push(f),d.push(";")),c="data";else{if("<"===h||""===h)return d.push(f),g.type="string",g.value=d.join(""),g;if(" "===h||"\n"===h||"\f"===h||" "===h)return d.push(f),g.type="string",
|
|
3
|
+
g.value=d.join(""),g;d.push(f),c="data"}else if("tag"===c)if(" "===h||"\n"===h||"\f"===h||" "===h)c="startTagAnnotation";else if("."===h)c="startTagClass";else if("/"===h)c="endTag";else if(h.match("[0-9]"))c="timestampTag",d.push(h);else{if(">"===h){e(b,1);break}if(""===h)return g.tagName="",g.type="startTag",g;d.push(h),c="startTag"}else if("startTag"===c)if(" "===h||"\f"===h||" "===h)c="startTagAnnotation";else if("\n"===h)f=h,c="startTagAnnotation";else if("."===h)c="startTagClass";else{if(">"===h)return e(b,1),g.tagName=d.join(""),g.type="startTag",g;if(""===h)return g.tagName=d.join(""),g.type="startTag",g;d.push(h)}else if("startTagClass"===c)if(" "===h||"\f"===h||" "===h)g.classes.push(f),f="",c="startTagAnnotation";else if("\n"===h)g.classes.push(f),f=h,c="startTagAnnotation";else if("."===h)g.classes.push(f),f="";else{if(">"===h)return e(b,1),g.classes.push(f),g.type="startTag",g.tagName=d.join(""),g;if(""===h)return g.classes.push(f),g.type="startTag",g.tagName=d.join(""),g;f+="c"}else if("startTagAnnotation"===c){if(">"===h)return e(b,1),f=a.trim(f).replace(/ +/," "),g.type="startTag",g.tagName=d.join(""),g.annotation=f,g;if(""===h)return f=a.trim(f).replace(/ +/," "),g.type="startTag",g.tagName=d.join(""),g.annotation=f,g;f+=h}else if("endTag"===c){if(">"===h)return e(b,1),g.type="endTag",g.tagName=d.join(""),g;if(""===h)return g.type="endTag",g.tagName=d.join(""),g;d.push(h)}else{if("timestampTag"!==c)throw"Unknown tokenState "+c;if(">"===h)return e(b,1),g.type="timestampTag",g.name=d.join(""),g;if(""===h)return g.type="timestampTag",g.name=d.join(""),g;d.push(h)}e(b,1)}}function r(b){var c=f(b);if(-1!==c.indexOf("-->"))return void(b.error="Invalid syntax: --> in NOTE line.");for(;;){var d=g(b);if(0===a.trim(d).length)return;if(-1!==d.indexOf("-->"))return void(b.error="Invalid syntax: --> in comment.");f(b)}}function s(a){"\ufeff"===a.text[0]&&e(a,1)}function t(a){"WEBVTT"===a.text.substring(0,6)?e(a,6):a.error="Invalid signature."}function u(a){a.text.length<3||"-->"!==a.text.substring(0,3)?a.error="Missing -->":e(a,3)}function v(a){for(;" "===a.text[0]||" "===a.text[0];)e(a,1)}function w(a){for(var b=0;" "===a.text[0]||" "===a.text[0];)e(a,1),b+=1;0===b&&(a.error="Missing space.")}function x(a){var b=a.text.indexOf("\n");-1===b?a.error="Missing EOL.":e(a,b+1)}function y(b){for(;b.text.length>0;){var c=g(b);if(0!==a.trim(c).length)break;f(b)}}function z(b){for(var c=0;b.text.length>0;){var d=g(b);if(0!==a.trim(d).length)break;f(b),c+=1}0===c&&(b.error="Missing empty line.")}function A(a){var b=j(a.text);if(-1===b)return void a.error("Missing timing.");var c=e(a,b),d=/((\d\d):)?((\d\d):)(\d\d).(\d\d\d)|(\d+).(\d\d\d)/.exec(c);if(!d)return void(a.error="Unable to parse timestamp");var f=0,g=d[2],h=d[4];if(h){if(parseInt(h,10)>59)return void(a.error="Invalid minute range");g&&(f+=3600*parseInt(g,10)),f+=60*parseInt(h,10);var i=d[5];if(parseInt(i,10)>59)return void(a.error="Invalid second range");f+=parseInt(i,10),f+=parseInt(d[6],10)/1e3}else f+=parseInt(d[7],10),f+=parseInt(d[8],10)/1e3;return f}AblePlayer.prototype.parseWebVTT=function(a,b){b=b.replace(/(\r\n|\n|\r)/g,"\n");var d={src:a,text:b,error:null,metadata:{},cues:[],line:1,column:1};try{c(d,h)}catch(e){var f="Invalid WebVTT file: "+d.src+"\n";f+="Line: "+d.line+", ",f+="Column: "+d.column+"\n",f+=e,console.warn||console.log}return d}}(jQuery),function(a){AblePlayer.prototype.injectPlayerCode=function(){var b,c;b=this,this.$mediaContainer=this.$media.wrap('<div class="able-media-container"></div>').parent(),this.$ableDiv=this.$mediaContainer.wrap('<div class="able"></div>').parent(),this.$ableWrapper=this.$ableDiv.wrap('<div class="able-wrapper"></div>').parent(),"youtube"!==this.player&&this.$ableWrapper.css({"max-width":this.playerMaxWidth+"px"}),this.injectOffscreenHeading(),"video"===this.mediaType&&("font"==this.iconType&&"youtube"!==this.player&&this.injectBigPlayButton(),c=a("<div>",{"class":"able-vidcap-container"}),this.$vidcapContainer=this.$mediaContainer.wrap(c).parent()),this.injectPlayerControlArea(),this.injectTextDescriptionArea(),this.transcriptType&&("popup"===this.transcriptType||"external"===this.transcriptType?this.injectTranscriptArea():"manual"===this.transcriptType&&this.setupManualTranscript(),this.addTranscriptAreaEvents()),this.injectAlert(),this.injectPlaylist()},AblePlayer.prototype.injectOffscreenHeading=function(){var b;this.playerHeadingLevel=this.getNextHeadingLevel(this.$ableDiv),b="h"+this.playerHeadingLevel.toString(),this.$headingDiv=a("<"+b+">"),this.$ableDiv.prepend(this.$headingDiv),this.$headingDiv.addClass("able-offscreen"),this.$headingDiv.text(this.tt.playerHeading)},AblePlayer.prototype.injectBigPlayButton=function(){this.$bigPlayButton=a("<button>",{"class":"able-big-play-button icon-play","aria-hidden":!0,tabindex:-1});var b=this;this.$bigPlayButton.click(function(){b.handlePlay()}),this.$mediaContainer.append(this.$bigPlayButton)},AblePlayer.prototype.injectPlayerControlArea=function(){this.$playerDiv=a("<div>",{"class":"able-player",role:"region","aria-label":this.mediaType+" player"}),this.$playerDiv.addClass("able-"+this.mediaType),this.$nowPlayingDiv=a("<div>",{"class":"able-now-playing","aria-live":"assertive","aria-atomic":"true"}),this.$controllerDiv=a("<div>",{"class":"able-controller"}),this.$controllerDiv.addClass("able-"+this.iconColor+"-controls"),this.$statusBarDiv=a("<div>",{"class":"able-status-bar"}),this.$timer=a("<span>",{"class":"able-timer"}),this.$elapsedTimeContainer=a("<span>",{"class":"able-elapsedTime",text:"0:00"}),this.$durationContainer=a("<span>",{"class":"able-duration"}),this.$timer.append(this.$elapsedTimeContainer).append(this.$durationContainer),this.$speed=a("<span>",{"class":"able-speed","aria-live":"assertive"}).text(this.tt.speed+": 1x"),this.$status=a("<span>",{"class":"able-status","aria-live":"polite"}),this.$statusBarDiv.append(this.$timer,this.$speed,this.$status),this.$playerDiv.append(this.$nowPlayingDiv,this.$controllerDiv,this.$statusBarDiv),this.$ableDiv.append(this.$playerDiv)},AblePlayer.prototype.injectTextDescriptionArea=function(){this.$descDiv=a("<div>",{"class":"able-descriptions","aria-live":"assertive","aria-atomic":"true"}),this.$descDiv.hide(),this.$ableDiv.append(this.$descDiv)},AblePlayer.prototype.getDefaultWidth=function(a){return"transcript"===a?450:"sign"===a?400:void 0},AblePlayer.prototype.positionDraggableWindow=function(b,c){var d,e,f,g;d=this.getCookie(),"transcript"===b?(f=this.$transcriptArea,"undefined"!=typeof d.transcript&&(e=d.transcript)):"sign"===b&&(f=this.$signWindow,"undefined"!=typeof d.transcript&&(e=d.sign)),"undefined"==typeof e||a.isEmptyObject(e)?(g=this.getOptimumPosition(b,c),"undefined"==typeof c&&(c=this.getDefaultWidth(b)),f.css({position:g[0],width:c,"z-index":g[3]}),"absolute"===g[0]&&f.css({top:g[1]+"px",left:g[2]+"px"})):(f.css({position:e.position,width:e.width,"z-index":e.zindex}),"absolute"===e.position&&f.css({top:e.top,left:e.left}),this.updateZIndex(b))},AblePlayer.prototype.getOptimumPosition=function(b,c){var d,e,f,g,h,i,j,k,l;return"undefined"==typeof c&&(c=this.getDefaultWidth(b)),d=5,e=[],f=this.$ableDiv.width(),g=this.$ableDiv.height(),h=this.$ableDiv.offset(),i=h.top,j=h.left,k=a(window).width(),l=0,"transcript"===b?"undefined"!=typeof this.$signWindow&&this.$signWindow.is(":visible")&&(l=this.$signWindow.width()+d):"sign"===b&&"undefined"!=typeof this.$transcriptArea&&this.$transcriptArea.is(":visible")&&(l=this.$transcriptArea.width()+d),k-(j+f+d+l)>c?(e[0]="absolute",e[1]=0,e[2]=f+l+d):j>c+d?(e[0]="absolute",e[1]=0,e[2]=j-c-d):e[0]="relative",e},AblePlayer.prototype.injectPoster=function(b,c){var d,e,f;"youtube"===c?"undefined"!=typeof this.ytWidth?(e=this.ytWidth,f=this.ytHeight):"undefined"!=typeof this.playerMaxWidth?(e=this.playerMaxWidth,f=this.playerMaxHeight):"undefined"!=typeof this.playerWidth&&(e=this.playerWidth,f=this.playerHeight):"fallback"===c&&(e="100%",f="auto"),this.$media.attr("poster")&&(d=this.$media.attr("poster"),this.$posterImg=a("<img>",{"class":"able-poster",src:d,alt:"",role:"presentation",width:e,height:f}),b.append(this.$posterImg))},AblePlayer.prototype.injectAlert=function(){var b;this.$alertBox=a('<div role="alert"></div>'),this.$alertBox.addClass("able-alert"),this.$alertBox.appendTo(this.$ableDiv),b="audio"==this.mediaType?-10:Math.round(10*this.$mediaContainer.offset().top)/10,this.$alertBox.css({top:b+"px"}),this.$srAlertBox=a('<div role="alert"></div>'),this.$srAlertBox.addClass("able-screenreader-alert"),this.$srAlertBox.appendTo(this.$ableDiv)},AblePlayer.prototype.injectPlaylist=function(){if(this.playlistEmbed===!0){var a=this.$playlistDom.clone();a.insertBefore(this.$statusBarDiv),this.$playlist=a.find("li")}this.hasPlaylist&&0===this.$sources.length&&(this.initializing=!0,this.swapSource(0),this.$sources=this.$media.find("source"))},AblePlayer.prototype.createPopup=function(b){var c,d,e,f,g,h;return c=this,d=a("<div>",{id:this.mediaId+"-"+b+"-menu","class":"able-popup"}),("chapters"===b||"prefs"===b||"sign-window"===b||"transcript-window"===b)&&d.addClass("able-popup-no-radio"),d.on("keydown",function(b){e=a(this).find("input:focus"),f=e.parent(),f.is(":first-child")?(g=a(this).find("input").last(),h=f.next().find("input")):f.is(":last-child")?(g=f.prev().find("input"),h=a(this).find("input").first()):(g=f.prev().find("input"),h=f.next().find("input")),9===b.which?b.shiftKey?(f.removeClass("able-focus"),g.focus(),g.parent().addClass("able-focus")):(f.removeClass("able-focus"),h.focus(),h.parent().addClass("able-focus")):40===b.which||39===b.which?(f.removeClass("able-focus"),h.focus(),h.parent().addClass("able-focus")):38==b.which||37===b.which?(f.removeClass("able-focus"),g.focus(),g.parent().addClass("able-focus")):32===b.which||13===b.which?a("input:focus").click():27===b.which&&(f.removeClass("able-focus"),c.closePopups()),b.preventDefault()}),this.$controllerDiv.append(d),d},AblePlayer.prototype.closePopups=function(){this.chaptersPopup&&this.chaptersPopup.is(":visible")&&(this.chaptersPopup.hide(),this.$chaptersButton.focus()),this.captionsPopup&&this.captionsPopup.is(":visible")&&(this.captionsPopup.hide(),this.$ccButton.focus()),this.prefsPopup&&this.prefsPopup.is(":visible")&&(this.prefsPopup.hide(),this.$prefsButton.focus()),this.$windowPopup&&this.$windowPopup.is(":visible")&&(this.$windowPopup.hide(),this.$windowButton.show().focus()),this.$volumeSlider&&this.$volumeSlider.is(":visible")&&(this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeAlert.text(this.tt.volumeSliderClosed),this.$volumeButton.focus())},AblePlayer.prototype.setupPopups=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(c=[],"undefined"==typeof b&&c.push("prefs"),("captions"===b||"undefined"==typeof b)&&("undefined"!=typeof this.ytCaptions?this.ytCaptions.length&&c.push("ytCaptions"):this.captions.length>0&&c.push("captions")),("chapters"===b||"undefined"==typeof b)&&this.chapters.length>0&&this.useChaptersButton&&c.push("chapters"),c.length>0){d=this;for(var f=0;f<c.length;f++){var s=c[f];e=!1,"prefs"==s?this.prefsPopup=this.createPopup("prefs"):"captions"==s?("undefined"==typeof this.captionsPopup&&(this.captionsPopup=this.createPopup("captions")),h=this.captions):"chapters"==s?("undefined"==typeof this.chaptersPopup&&(this.chaptersPopup=this.createPopup("chapters")),h=this.selectedChapters?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[]):"ytCaptions"==s&&("undefined"==typeof this.captionsPopup&&(this.captionsPopup=this.createPopup("captions")),h=this.ytCaptions);var i=a("<ul></ul>");if(l=this.mediaId+"-"+s+"-choice","prefs"===s){for(p=this.getPreferencesGroups(),g=0;g<p.length;g++)j=a("<li></li>"),q=p[g],"captions"===q?r=this.tt.prefMenuCaptions:"descriptions"===q?r=this.tt.prefMenuDescriptions:"keyboard"===q?r=this.tt.prefMenuKeyboard:"transcript"===q&&(r=this.tt.prefMenuTranscript),m=this.mediaId+"-"+s+"-"+g,n=a("<input>",{type:"radio",val:q,name:l,id:m}),o=a("<label>",{"for":m}),o.text(r),n.click(function(b){var c=a(this).attr("value");d.setFullscreen(!1),"captions"===c?d.captionPrefsDialog.show():"descriptions"===c?d.descPrefsDialog.show():"keyboard"===c?d.keyboardPrefsDialog.show():"transcript"===c&&d.transcriptPrefsDialog.show(),d.closePopups()}),j.append(n,o),i.append(j);this.prefsPopup.append(i)}else{for(g=0;g<h.length;g++){if(j=a("<li></li>"),k=h[g],m=this.mediaId+"-"+s+"-"+g,n=a("<input>",{type:"radio",val:g,name:l,id:m}),k.def&&(n.prop("checked",!0),e=!0),o=a("<label>",{"for":m}),"undefined"!==k.language&&n.attr("lang",k.language),"captions"==s||"ytCaptions"==s)o.text(k.label||k.language),n.click(this.getCaptionClickFunction(k));else if("chapters"==s){o.text(this.flattenCueForCaption(k)+" - "+this.formatSecondsAsColonTime(k.start));var t=function(a){return function(){d.seekTo(a),d.hidingPopup=!0,d.chaptersPopup.hide(),setTimeout(function(){d.hidingPopup=!1},100),d.$chaptersButton.focus()}};n.on("click keypress",t(k.start))}j.append(n,o),i.append(j)}("captions"==s||"ytCaptions"==s)&&(m=this.mediaId+"-captions-off",j=a("<li></li>"),n=a("<input>",{type:"radio",name:l,id:m}),o=a("<label>",{"for":m}),o.text(this.tt.captionsOff),0===this.prefCaptions&&n.prop("checked",!0),n.click(this.getCaptionOffFunction()),j.append(n,o),i.append(j)),e||("captions"!=s&&"ytCaptions"!=s||!i.find("input:radio[lang="+this.captionLang+"]")?i.find("input").first().prop("checked",!0):i.find("input:radio[lang="+this.captionLang+"]").prop("checked",!0)),"captions"===s||"ytCaptions"===s?this.captionsPopup.html(i):"chapters"===s&&this.chaptersPopup.html(i)}}}},AblePlayer.prototype.provideFallback=function(b){var c,d,e,f,g,h,i,j,k,l;if(h=!1,c=a("<div>",{"class":"able-fallback",role:"alert"}),d="undefined"!=typeof this.playerMaxWidth?this.playerMaxWidth+"px":this.$media.attr("width")?parseInt(this.$media.attr("width"),10)+"px":"100%",c.css("max-width",d),e=this.$media.clone(),a("source, track",e).remove(),f=e.html().trim(),f.length?c.html(f):"NO SUPPORT"==b?(g=this.tt.fallbackError1+" "+this.tt[this.mediaType]+". ",g+=this.tt.fallbackError2+":",f=a("<p>").text(g),c.html(f),h=!0):c.text(b),h){for(l=a("<ul>"),i=this.getSupportingBrowsers(),j=0;j<i.length;j++)k=a("<li>"),k.text(i[j].name+" "+i[j].minVersion+" "+this.tt.orHigher),l.append(k);c.append(l)}this.injectPoster(c,"fallback"),"undefined"!=typeof this.$ableWrapper?(this.$ableWrapper.before(c),this.$ableWrapper.remove()):"undefined"!=typeof this.$media?(this.$media.before(c),this.$media.remove()):a("body").prepend(c)},AblePlayer.prototype.getSupportingBrowsers=function(){var a=[];return a[0]={name:"Chrome",minVersion:"31"},a[1]={name:"Firefox",minVersion:"34"},a[2]={name:"Internet Explorer",minVersion:"10"},a[3]={name:"Opera",minVersion:"26"},a[4]={name:"Safari for Mac OS X",minVersion:"7.1"},a[5]={name:"Safari for iOS",minVersion:"7.1"},a[6]={name:"Android Browser",minVersion:"4.1"},a[7]={name:"Chrome for Android",minVersion:"40"},a},AblePlayer.prototype.calculateControlLayout=function(){var a={ul:["play","restart","rewind","forward"],ur:["seek"],bl:[],br:[]};this.browserSupportsVolume()?(this.volumeButton="volume-"+this.getVolumeName(this.volume),a.ur.push("volume")):this.volume=!1;var b=[],c=[];return this.isPlaybackRateSupported()&&(b.push("slower"),b.push("faster")),"video"===this.mediaType&&(this.hasCaptions&&b.push("captions"),this.hasSignLanguage&&b.push("sign"),(this.hasOpenDesc||this.hasClosedDesc)&&this.useDescriptionsButton&&b.push("descriptions")),"popup"===this.transcriptType&&b.push("transcript"),"video"===this.mediaType&&this.hasChapters&&this.useChaptersButton&&b.push("chapters"),a.br.push("preferences"),"video"===this.mediaType&&this.allowFullScreen&&"jw"!==this.player&&a.br.push("fullscreen"),b.length>0&&c.length>0?(a.bl=b,a.bl.push("pipe"),a.bl=a.bl.concat(c)):a.bl=b.concat(c),a},AblePlayer.prototype.addControls=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q=this,r=100,s=this.calculateControlLayout(),t={0:"ul",1:"ur",2:"bl",3:"br"};for(f=this.mediaId+"-tooltip",this.$tooltipDiv=a("<div>",{id:f,"class":"able-tooltip"}),this.$controllerDiv.append(this.$tooltipDiv),b=0;3>=b;b++){for(d=s[t[b]],e=b%2===0?a("<div>",{"class":"able-left-controls"}):a("<div>",{"class":"able-right-controls"}),this.$controllerDiv.append(e),c=0;c<d.length;c++){if(g=d[c],"seek"===g){var u=a('<div class="able-seekbar"></div>'),v=this.mediaType+" "+this.tt.seekbarLabel;e.append(u);var w=this.getDuration();0==w&&(w=100),this.seekBar=new AccessibleSlider(this.mediaType,u,"horizontal",r,0,w,this.seekInterval,v,"seekbar",!0,"visible")}else if("pipe"===g){var x=a("<span>",{tabindex:"-1","aria-hidden":"true"});if("font"===this.iconType)x.addClass("icon-pipe");else{var y=a("<img>",{src:this.rootPath+"button-icons/"+this.iconColor+"/pipe.png",alt:"",role:"presentation"});x.append(y)}e.append(x)}else{i="volume"===g?this.rootPath+"button-icons/"+this.iconColor+"/"+this.volumeButton+".png":"fullscreen"===g?this.rootPath+"button-icons/"+this.iconColor+"/fullscreen-expand.png":"slower"===g?"animals"===this.speedIcons?this.rootPath+"button-icons/"+this.iconColor+"/turtle.png":this.rootPath+"button-icons/"+this.iconColor+"/slower.png":"faster"===g?"animals"===this.speedIcons?this.rootPath+"button-icons/"+this.iconColor+"/rabbit.png":this.rootPath+"button-icons/"+this.iconColor+"/faster.png":this.rootPath+"button-icons/"+this.iconColor+"/"+g+".png",j=this.getButtonTitle(g),k=a("<button>",{type:"button",tabindex:"0","aria-label":j,"class":"able-button-handler-"+g}),("volume"===g||"preferences"===g)&&("preferences"==g?p=this.mediaId+"-prefs-menu":"volume"===g&&(p=this.mediaId+"-volume-slider"),k.attr({"aria-controls":p})),"font"===this.iconType?(l="volume"===g?"icon-"+this.volumeButton:"slower"===g?"animals"===this.speedIcons?"icon-turtle":"icon-slower":"faster"===g?"animals"===this.speedIcons?"icon-rabbit":"icon-faster":"icon-"+g,m=a("<span>",{"class":l,"aria-hidden":"true"}),k.append(m)):"svg"===this.iconType?(l="volume"===g?"svg-"+this.volumeButton:"fullscreen"===g?"svg-fullscreen-expand":"slower"===g?"animals"===this.speedIcons?"svg-turtle":"svg-slower":"faster"===g?"animals"===this.speedIcons?"svg-rabbit":"svg-faster":"svg-"+g,m=a("<svg>",{"class":l}),n=a("<use>",{"xlink:href":this.rootPath+"icons/able-icons.svg#"+l}),m.append(n),k.html(m),k.html(k.html())):(h=a("<img>",{src:i,alt:"",role:"presentation"}),k.append(h));var z=a("<span>",{"class":"able-clipped"}).text(j);k.append(z),k.on("mouseenter focus",function(b){var c=a(this).attr("aria-label"),d=a(this).position(),e=a(this).height(),g=(a(this).width(),d.top-e-15),h=!0;if(a(this).closest("div").hasClass("able-right-controls")){if(a(this).closest("div").find("button:last").get(0)==a(this).get(0)){h=!1;var i=0,j={left:"",right:i+"px",top:g+"px"}}}else if(a(this).is(":first-child")){h=!1;var i=d.left,j={left:i+"px",right:"",top:g+"px"}}if(h)var k=a("#"+f).text(c).width(),i=d.left-k/2,j={left:i+"px",right:"",top:g+"px"};var l=a("#"+f).text(c).css(j);q.showTooltip(l),a(this).on("mouseleave blur",function(){a("#"+f).text("").hide()})}),"captions"===g?this.prefCaptions&&1===this.prefCaptions||(o=this.captions.length>1?this.tt.captions:this.tt.showCaptions,k.addClass("buttonOff").attr("title",o)):"descriptions"===g&&(this.prefDesc&&1===this.prefDesc||k.addClass("buttonOff").attr("title",this.tt.turnOnDescriptions)),e.append(k),"play"===g?this.$playpauseButton=k:"captions"===g?this.$ccButton=k:"sign"===g?(this.$signButton=k,this.$signWindow.is(":visible")||this.$signButton.addClass("buttonOff")):"descriptions"===g?this.$descButton=k:"mute"===g?this.$muteButton=k:"transcript"===g?(this.$transcriptButton=k,this.$transcriptDiv.is(":visible")||this.$transcriptButton.addClass("buttonOff").attr("title",this.tt.showTranscript)):"fullscreen"===g?this.$fullscreenButton=k:"chapters"===g?this.$chaptersButton=k:"preferences"===g?this.$prefsButton=k:"volume"===g&&(this.$volumeButton=k)}"volume"===g&&this.addVolumeSlider(e)}b%2==1&&this.$controllerDiv.append('<div style="clear:both;"></div>')}"video"===this.mediaType&&("undefined"!=typeof this.$captionsDiv&&this.stylizeCaptions(this.$captionsDiv),"undefined"!=typeof this.$descDiv&&this.stylizeCaptions(this.$descDiv)),this.controls=[];for(var A in s)s.hasOwnProperty(A)&&(this.controls=this.controls.concat(s[A]));this.refreshControls()},AblePlayer.prototype.useSvg=function(){
|
|
4
|
+
// @license Licensed under MIT license
|
|
5
|
+
var a,b,c=Object.create(null),d=function(){clearTimeout(b),b=setTimeout(a,100)},e=function(){},f=function(){var a;window.addEventListener("resize",d,!1),window.addEventListener("orientationchange",d,!1),window.MutationObserver?(a=new MutationObserver(d),a.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),e=function(){try{a.disconnect(),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange",d,!1)}catch(b){}}):(document.documentElement.addEventListener("DOMSubtreeModified",d,!1),e=function(){document.documentElement.removeEventListener("DOMSubtreeModified",d,!1),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange",d,!1)})},g="http://www.w3.org/1999/xlink";a=function(){function a(){s-=1,0===s&&f()}function b(a){return function(){c[a.base]!==!0&&a.useEl.setAttributeNS(g,"xlink:href","#"+a.hash)}}function d(b){return function(){var c,d=document.body,e=document.createElement("x");b.onload=null,e.innerHTML=b.responseText,c=e.getElementsByTagName("svg")[0],c&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",d.insertBefore(c,d.firstChild)),a()}}function h(b){return function(){b.onerror=null,b.ontimeout=null,a()}}var i,j,k,l,m,n,o,p,q,r="",s=0;if(window.XMLHttpRequest&&(m=new XMLHttpRequest,m=void 0!==m.withCredentials?XMLHttpRequest:XDomainRequest||void 0),void 0!==m){for(e(),p=document.getElementsByTagName("use"),l=0;l<p.length;l+=1){try{j=p[l].getBoundingClientRect()}catch(t){j=!1}o=p[l].getAttributeNS(g,"href").split("#"),i=o[0],k=o[1],n=j&&0===j.left&&0===j.right&&0===j.top&&0===j.bottom,j&&0===j.width&&0===j.height&&!n?(r&&!i.length&&k&&!document.getElementById(k)&&(i=r),i.length&&(q=c[i],q!==!0&&setTimeout(b({useEl:p[l],base:i,hash:k}),0),void 0===q&&(q=new m,c[i]=q,q.onload=d(q),q.onerror=h(q),q.ontimeout=h(q),q.open("GET",i),q.send(),s+=1))):n||(void 0===c[i]?c[i]=!0:c[i].onload&&(c[i].abort(),c[i].onload=void 0,c[i]=!0))}p="",s+=1,a()}}},AblePlayer.prototype.swapSource=function(b){var c,d,e,f,g,h,i,j,k;for(this.$media.find("source").remove(),c=this.$playlist.eq(b),d=c.html(),c.attr("lang")&&(e=c.attr("lang")),f=[],g=0,"audio"===this.mediaType?(c.attr("data-mp3")&&(h=c.attr("data-mp3"),f[g]=new Array("audio/mpeg",h),g++),c.attr("data-webm")&&(f[g]=new Array("audio/webm",c.attr("data-webm")),g++),c.attr("data-webma")&&(f[g]=new Array("audio/webm",c.attr("data-webma")),g++),c.attr("data-ogg")&&(f[g]=new Array("audio/ogg",c.attr("data-ogg")),g++),c.attr("data-oga")&&(f[g]=new Array("audio/ogg",c.attr("data-oga")),g++),c.attr("data-wav")&&(f[g]=new Array("audio/wav",c.attr("data-wav")),g++)):"video"===this.mediaType&&(c.attr("data-mp4")&&(h=c.attr("data-mp4"),f[g]=new Array("video/mp4",h),g++),c.attr("data-webm")&&(f[g]=new Array("video/webm",c.attr("data-webm")),g++),c.attr("data-webmv")&&(f[g]=new Array("video/webm",c.attr("data-webmv")),g++),c.attr("data-ogg")&&(f[g]=new Array("video/ogg",c.attr("data-ogg")),g++),c.attr("data-ogv")&&(f[g]=new Array("video/ogg",c.attr("data-ogv")),g++)),i=0;i<f.length;i++)j=a("<source>",{type:f[i][0],src:f[i][1]}),this.$media.append(j);this.$playlist.removeClass("able-current"),c.addClass("able-current"),this.showNowPlaying===!0&&(k=a("<span>"),"undefined"!=typeof e&&k.attr("lang",e),k.html("<span>Selected track:</span>"+d),this.$nowPlayingDiv.html(k)),this.initializing?this.swappingSrc=!1:(this.swappingSrc=!0,"html5"===this.player?this.media.load():"jw"===this.player?this.jwPlayer.load({file:h}):"youtube"===this.player)},AblePlayer.prototype.getButtonTitle=function(a){var b;return"playpause"===a?this.tt.play:"play"===a?this.tt.play:"pause"===a?this.tt.pause:"restart"===a?this.tt.restart:"rewind"===a?this.tt.rewind:"forward"===a?this.tt.forward:"captions"===a?(b=this.usingYouTubeCaptions?this.ytCaptions.length:this.captions.length,b>1?this.tt.captions:this.captionsOn?this.tt.hideCaptions:this.tt.showCaptions):"descriptions"===a?this.descOn?this.tt.turnOffDescriptions:this.tt.turnOnDescriptions:"transcript"===a?this.$transcriptDiv.is(":visible")?this.tt.hideTranscript:this.tt.showTranscript:"chapters"===a?this.tt.chapters:"sign"===a?this.tt.sign:"volume"===a?this.tt.volume:"faster"===a?this.tt.faster:"slower"===a?this.tt.slower:"preferences"===a?this.tt.preferences:"help"!==a?(this.debug,a.charAt(0).toUpperCase()+a.slice(1)):void 0}}(jQuery),function(a){AblePlayer.prototype.setupTracks=function(){var b=this,c=new a.Deferred,d=c.promise();this.$tracks=this.$media.find("track"),this.captions=[],this.captionLabels=[],this.descriptions=[],this.chapters=[],this.meta=[];for(var e=[],f=0;f<this.$tracks.length;f++){var g=this.$tracks[f],h=g.getAttribute("kind"),i=g.getAttribute("src");g.getAttribute("default");if(i){var j=this.loadTextObject(i);e.push(j),j.then(function(a,c){return function(d,e){var f=b.parseWebVTT(d,e).cues;"captions"===c||"subtitles"===c?b.setupCaptions(a,f):"descriptions"===c?b.setupDescriptions(a,f):"chapters"===c?b.setupChapters(a,f):"metadata"===c&&b.setupMetadata(a,f)}}(g,h))}}return a.when.apply(a,e).then(function(){c.resolve()}),d},AblePlayer.prototype.setupCaptions=function(b,c){this.hasCaptions=!0;var d=b.getAttribute("srclang")||this.lang,e=b.getAttribute("label")||this.getLanguageName(d);if("string"==typeof b.getAttribute("default")){var f=!0;b.removeAttribute("default")}else var f=!1;if("video"===this.mediaType&&(this.$captionsDiv||(this.$captionsDiv=a("<div>",{"class":"able-captions"}),this.$captionsWrapper=a("<div>",{"class":"able-captions-wrapper","aria-hidden":"true"}),"below"===this.prefCaptionsPosition?this.$captionsWrapper.addClass("able-captions-below"):this.$captionsWrapper.addClass("able-captions-overlay"),this.$captionsWrapper.append(this.$captionsDiv),this.$vidcapContainer.append(this.$captionsWrapper))),this.currentCaption=-1,1===this.prefCaptions?this.captionsOn=!0:this.captionsOn=!1,"external"===this.transcriptType||"popup"===this.transcriptType){this.$unknownTranscriptOption&&(this.$unknownTranscriptOption.remove(),this.$unknownTranscriptOption=null);var g=a("<option></option>",{value:d,lang:d}).text(e)}if("external"===this.transcriptType||"popup"===this.transcriptType)var h=this.$transcriptLanguageSelect.find("option");if(0===this.captions.length)this.captions.push({cues:c,language:d,label:e,def:f}),("external"===this.transcriptType||"popup"===this.transcriptType)&&(f&&g.prop("selected",!0),this.$transcriptLanguageSelect.append(g)),this.captionLabels.push(e);else{for(var i=!1,j=0;j<this.captions.length;j++){this.captionLabels[j];if(e.toLowerCase()<this.captionLabels[j].toLowerCase()){this.captions.splice(j,0,{cues:c,language:d,label:e,def:f}),("external"===this.transcriptType||"popup"===this.transcriptType)&&(f&&g.prop("selected",!0),g.insertBefore(h.eq(j))),this.captionLabels.splice(j,0,e),i=!0;break}}i||(this.captions.push({cues:c,language:d,label:e,def:f}),("external"===this.transcriptType||"popup"===this.transcriptType)&&(f&&g.prop("selected",!0),this.$transcriptLanguageSelect.append(g)),this.captionLabels.push(e))}("external"===this.transcriptType||"popup"===this.transcriptType)&&this.$transcriptLanguageSelect.find("option").length>1&&this.$transcriptLanguageSelect.prop("disabled",!1)},AblePlayer.prototype.setupDescriptions=function(a,b){var c=a.getAttribute("srclang")||this.lang;this.hasClosedDesc=!0,this.currentDescription=-1,this.descriptions.push({cues:b,language:c})},AblePlayer.prototype.setupChapters=function(a,b){var c=a.getAttribute("srclang")||this.lang;this.hasChapters=!0,this.chapters.push({cues:b,language:c})},AblePlayer.prototype.setupMetadata=function(b,c){"text"===this.metaType?this.metaDiv&&a("#"+this.metaDiv)&&(this.$metaDiv=a("#"+this.metaDiv),this.hasMeta=!0,this.meta=c):"selector"===this.metaType&&(this.hasMeta=!0,this.visibleSelectors=[],this.meta=c)},AblePlayer.prototype.loadTextObject=function(b){var c=new a.Deferred,d=c.promise(),e=this,f=a("<div>",{style:"display:none"});return f.load(b,function(a,d,g){"error"===d?(e.debug,c.fail()):c.resolve(b,a),f.remove()}),d},AblePlayer.prototype.setupAltCaptions=function(){var b=new a.Deferred,c=b.promise();return 0===this.captions.length&&"youtube"===this.player&&"undefined"!=typeof youTubeDataAPIKey?this.setupYouTubeCaptions().done(function(){b.resolve()}):b.resolve(),c}}(jQuery),function(a){AblePlayer.prototype.initYouTubePlayer=function(){var b,c,d,e;return b=this,c=new a.Deferred,d=c.promise(),e=this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,this.activeYouTubeId=e,AblePlayer.youtubeIframeAPIReady?this.finalizeYoutubeInit().then(function(){c.resolve()}):(AblePlayer.loadingYoutubeIframeAPI||a.getScript("https://www.youtube.com/iframe_api").fail(function(){c.fail()}),a("body").on("youtubeIframeAPIReady",function(){b.finalizeYoutubeInit().then(function(){c.resolve()})})),d},AblePlayer.prototype.finalizeYoutubeInit=function(){var b,c,d,e,f,g;return b=new a.Deferred,c=b.promise(),d=this,e=this.mediaId+"_youtube",this.$mediaContainer.prepend(a("<div>").attr("id",e)),this.youTubeCaptionsReady=!1,d.captions.length?(f=0,this.usingYouTubeCaptions=!1):f=this.captionsOn?1:0,g=this.getYouTubeDimensions(this.activeYouTubeId,e),g?(this.ytWidth=g[0],this.ytHeight=g[1],this.aspectRatio=d.ytWidth/d.ytHeight):(this.ytWidth=null,this.ytHeight=null),this.youTubePlayer=new YT.Player(e,{videoId:this.activeYouTubeId,width:this.ytWidth,height:this.ytHeight,playerVars:{enablejsapi:1,start:this.startTime,controls:0,cc_load_policy:f,hl:this.lang,modestbranding:1,rel:0,html5:1},events:{onReady:function(){d.swappingSrc&&(d.swappingSrc=!1,d.playing&&d.playMedia()),"undefined"==typeof d.aspectRatio&&d.resizeYouTubePlayer(d.activeYouTubeId,e),b.resolve()},onError:function(a){b.fail()},onStateChange:function(a){var b=d.getPlayerState(a.data);"playing"===b?(d.playing=!0,d.startedPlaying=!0):d.playing=!1,d.stoppingYouTube&&"paused"===b&&("undefined"!=typeof d.$posterImg&&d.$posterImg.show(),d.stoppingYouTube=!1,d.seeking=!1,d.playing=!1)},onPlaybackQualityChange:function(){},onApiChange:function(a){d.initYouTubeCaptionModule()}}}),d.injectPoster(d.$mediaContainer,"youtube"),d.$media.remove(),c},AblePlayer.prototype.getYouTubeDimensions=function(b,c){var d,e,f,g;return d=[],"undefined"!=typeof this.playerMaxWidth?(d[0]=this.playerMaxWidth,"undefined"!=typeof this.playerMaxHeight&&(d[1]=this.playerMaxHeight),d):"undefined"!=typeof a("#"+c)&&(e=a("#"+c),f=e.width(),g=e.height(),f>0&&g>0)?(d[0]=f,d[1]=g,d):!1},AblePlayer.prototype.resizeYouTubePlayer=function(a,b){var c,d,e;"undefined"!=typeof this.aspectRatio?this.restoringAfterFullScreen?(this.youTubePlayer&&this.youTubePlayer.setSize(this.ytWidth,this.ytHeight),this.restoringAfterFullScreen=!1):(d=this.$ableWrapper.parent().width(),e=Math.round(d/this.aspectRatio),this.$ableWrapper.css({"max-width":d+"px",width:""}),this.youTubePlayer.setSize(d,e),this.isFullscreen()?this.youTubePlayer.setSize(d,e):this.youTubePlayer.setSize(this.ytWidth,this.ytHeight)):(c=this.getYouTubeDimensions(a,b),c&&(d=c[0],e=c[1],d>0&&e>0&&(this.aspectRatio=d/e,this.ytWidth=d,this.ytHeight=e,d!==this.$ableWrapper.width()&&(d=this.$ableWrapper.width(),e=Math.round(d/this.aspectRatio),this.youTubePlayer&&this.youTubePlayer.setSize(d,e)))))},AblePlayer.prototype.setupYouTubeCaptions=function(){var b,c,d=new a.Deferred,e=d.promise();return b=this,this.ytCaptions=[],c=this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,a.doWhen({when:function(){return googleApiReady},interval:100,attempts:1e3}).done(function(){b.getYouTubeCaptionData(c).done(function(){d.resolve()})}).fail(function(){}),e},AblePlayer.prototype.getYouTubeCaptionData=function(b){var c,d,e,f,g,h,i,j,k=new a.Deferred,l=k.promise();return c=this,gapi.client.setApiKey(youTubeDataAPIKey),gapi.client.load("youtube","v3").then(function(){var a=gapi.client.youtube.captions.list({part:"id, snippet",videoId:b});a.then(function(a){if(a.result.items.length){for(c.hasCaptions=!0,c.usingYouTubeCaptions=!0,1===c.prefCaptions?c.captionsOn=!0:c.captionsOn=!1,d=0;d<a.result.items.length;d++)e=a.result.items[d].id,g=a.result.items[d].snippet.name,f=a.result.items[d].snippet.language,h=a.result.items[d].snippet.trackKind,i=a.result.items[d].snippet.isDraft,"ASR"===h||i||(""===g&&(g=c.getLanguageName(f)),j=f===c.lang?!0:!1,c.ytCaptions.push({language:f,label:g,def:j}));c.setupPopups("captions"),k.resolve()}else c.hasCaptions=!1,c.usingYouTubeCaptions=!1,k.resolve()},function(a){})}),l},AblePlayer.prototype.initYouTubeCaptionModule=function(){var a;if(a=this.youTubePlayer.getOptions(),a.length){for(var b=0;b<a.length;b++){if("cc"==a[b]){this.ytCaptionModule="cc",this.hasCaptions||(this.hasCaptions=!0,this.usingYouTubeCaptions=!0);break}if("captions"==a[b]){this.ytCaptionModule="captions",this.hasCaptions||(this.hasCaptions=!0,this.usingYouTubeCaptions=!0);break}}"undefined"!=typeof this.ytCaptionModule&&(this.usingYouTubeCaptions?(this.youTubePlayer.setOption(this.ytCaptionModule,"track",{languageCode:this.captionLang}),this.youTubePlayer.setOption(this.ytCaptionModule,"fontSize",this.translatePrefs("size",this.prefCaptionsSize,"youtube"))):this.youTubePlayer.unloadModule(this.ytCaptionModule))}else this.hasCaptions=!1,this.usingYouTubeCaptions=!1;this.refreshControls()}}(jQuery),function(a){window.AccessibleSlider=function(b,c,d,e,f,g,h,i,j,k,l){var m;m=this,this.position=0,this.tracking=!1,this.trackDevice=null,this.keyTrackPosition=0,this.lastTrackPosition=0,this.nextStep=1,this.inertiaCount=0,this.bodyDiv=a(c),k&&(this.loadedDiv=a("<div></div>"),this.playedDiv=a("<div></div>")),this.seekHead=a("<div>",{orientation:d,"class":"able-"+j+"-head"}),"visible"===l?this.seekHead.attr("tabindex","0"):this.seekHead.attr("tabindex","-1"),this.seekHead.attr({role:"slider","aria-label":i,"aria-valuemin":f,"aria-valuemax":g}),this.timeTooltip=a("<div>"),this.bodyDiv.append(this.timeTooltip),this.timeTooltip.attr("role","tooltip"),this.timeTooltip.addClass("able-tooltip"),this.bodyDiv.append(this.loadedDiv),this.bodyDiv.append(this.playedDiv),this.bodyDiv.append(this.seekHead),this.bodyDiv.wrap("<div></div>"),this.wrapperDiv=this.bodyDiv.parent(),"horizontal"===d?(this.wrapperDiv.width(e),this.loadedDiv.width(0)):(this.wrapperDiv.height(e),this.loadedDiv.height(0)),this.wrapperDiv.addClass("able-"+j+"-wrapper"),k&&(this.loadedDiv.addClass("able-"+j+"-loaded"),this.playedDiv.width(0),this.playedDiv.addClass("able-"+j+"-played"),this.setDuration(g)),this.seekHead.hover(function(a){m.overHead=!0,m.refreshTooltip()},function(a){m.overHead=!1,!m.overBody&&m.tracking&&"mouse"===m.trackDevice&&m.stopTracking(m.pageXToPosition(a.pageX)),m.refreshTooltip()}),this.seekHead.mousemove(function(a){m.tracking&&"mouse"===m.trackDevice&&m.trackHeadAtPageX(a.pageX)}),this.seekHead.focus(function(a){m.overHead=!0,m.refreshTooltip()}),this.seekHead.blur(function(a){m.overHead=!1,m.refreshTooltip()}),this.bodyDiv.hover(function(){m.overBody=!0,m.refreshTooltip()},function(a){m.overBody=!1,m.overBodyMousePos=null,m.refreshTooltip(),!m.overHead&&m.tracking&&"mouse"===m.trackDevice&&m.stopTracking(m.pageXToPosition(a.pageX))}),this.bodyDiv.mousemove(function(a){m.overBodyMousePos={x:a.pageX,y:a.pageY},m.tracking&&"mouse"===m.trackDevice&&m.trackHeadAtPageX(a.pageX),m.refreshTooltip()}),this.bodyDiv.mousedown(function(a){m.startTracking("mouse",m.pageXToPosition(a.pageX)),m.trackHeadAtPageX(a.pageX),m.seekHead.is(":focus")||m.seekHead.focus(),a.preventDefault()}),this.seekHead.mousedown(function(a){m.startTracking("mouse",m.pageXToPosition(m.seekHead.offset()+m.seekHead.width()/2)),m.bodyDiv.is(":focus")||m.bodyDiv.focus(),a.preventDefault()}),this.bodyDiv.mouseup(function(a){m.tracking&&"mouse"===m.trackDevice&&m.stopTracking(m.pageXToPosition(a.pageX))}),this.seekHead.mouseup(function(a){m.tracking&&"mouse"===m.trackDevice&&m.stopTracking(m.pageXToPosition(a.pageX))}),this.bodyDiv.keydown(function(a){if(36===a.which)m.trackImmediatelyTo(0);else if(35===a.which)m.trackImmediatelyTo(m.duration);else if(37===a.which||40===a.which)m.arrowKeyDown(-1);else if(39===a.which||38===a.which)m.arrowKeyDown(1);else if(33===a.which&&h>0)m.arrowKeyDown(h);else{if(!(34===a.which&&h>0))return;m.arrowKeyDown(-h)}a.preventDefault()}),this.bodyDiv.keyup(function(a){a.which>=33&&a.which<=40&&(m.tracking&&"keyboard"===m.trackDevice&&m.stopTracking(m.keyTrackPosition),a.preventDefault())})},AccessibleSlider.prototype.arrowKeyDown=function(a){this.tracking&&"keyboard"===this.trackDevice?(this.keyTrackPosition=this.boundPos(this.keyTrackPosition+this.nextStep*a),this.inertiaCount+=1,20===this.inertiaCount&&(this.inertiaCount=0,this.nextStep*=2),this.trackHeadAtPosition(this.keyTrackPosition)):(this.nextStep=1,this.inertiaCount=0,this.keyTrackPosition=this.boundPos(this.position+this.nextStep*a),this.startTracking("keyboard",this.keyTrackPosition),this.trackHeadAtPosition(this.keyTrackPosition))},AccessibleSlider.prototype.pageXToPosition=function(a){var b=a-this.bodyDiv.offset().left,c=this.duration*(b/this.bodyDiv.width());return this.boundPos(c)},AccessibleSlider.prototype.boundPos=function(a){return Math.max(0,Math.min(a,this.duration))},AccessibleSlider.prototype.setDuration=function(a){a!==this.duration&&(this.duration=a,this.resetHeadLocation(),this.seekHead.attr("aria-valuemax",a))},AccessibleSlider.prototype.setWidth=function(a){this.wrapperDiv.width(a),this.resizeDivs(),this.resetHeadLocation()},AccessibleSlider.prototype.getWidth=function(){return this.wrapperDiv.width()},AccessibleSlider.prototype.resizeDivs=function(){this.playedDiv.width(this.bodyDiv.width()*(this.position/this.duration)),this.loadedDiv.width(this.bodyDiv.width()*this.buffered)},AccessibleSlider.prototype.resetHeadLocation=function(){var a=this.position/this.duration,b=this.bodyDiv.width()*a;this.seekHead.css("left",b-this.seekHead.width()/2),this.tracking&&this.stopTracking(this.position)},AccessibleSlider.prototype.setPosition=function(a,b){this.position=a,this.resetHeadLocation(),this.refreshTooltip(),this.resizeDivs(),this.updateAriaValues(a,b)},AccessibleSlider.prototype.setBuffered=function(a){this.buffered=a,this.redrawDivs},AccessibleSlider.prototype.startTracking=function(a,b){this.tracking||(this.trackDevice=a,this.tracking=!0,this.bodyDiv.trigger("startTracking",[b]))},AccessibleSlider.prototype.stopTracking=function(a){this.trackDevice=null,this.tracking=!1,this.bodyDiv.trigger("stopTracking",[a]),this.setPosition(a,!0)},AccessibleSlider.prototype.trackHeadAtPageX=function(a){var b=this.pageXToPosition(a),c=a-this.bodyDiv.offset().left-this.seekHead.width()/2;c=Math.max(0,Math.min(c,this.bodyDiv.width()-this.seekHead.width())),this.lastTrackPosition=b,this.seekHead.css("left",c),this.reportTrackAtPosition(b)},AccessibleSlider.prototype.trackHeadAtPosition=function(a){var b=a/this.duration,c=this.bodyDiv.width()*b;this.lastTrackPosition=a,this.seekHead.css("left",c-this.seekHead.width()/2),this.reportTrackAtPosition(a)},AccessibleSlider.prototype.reportTrackAtPosition=function(a){this.bodyDiv.trigger("tracking",[a]),this.updateAriaValues(a,!0)},AccessibleSlider.prototype.updateAriaValues=function(b,c){var d,e=Math.floor(b/3600),f=Math.floor(b%3600/60),g=Math.floor(b%60),h=1===e?"hour":"hours",i=1===f?"minute":"minutes",j=1===g?"second":"seconds";d=e>0?e+" "+h+", "+f+" "+i+", "+g+" "+j:f>0?f+" "+i+", "+g+" "+j:g+" "+j,this.liveAriaRegion||(this.liveAriaRegion=a("<span>",{"class":"able-offscreen","aria-live":"polite"}),this.wrapperDiv.append(this.liveAriaRegion)),c&&this.liveAriaRegion.text()!==d&&this.liveAriaRegion.text(d),this.seekHead.attr("aria-valuetext",d),this.seekHead.attr("aria-valuenow",Math.floor(b).toString())},AccessibleSlider.prototype.trackImmediatelyTo=function(a){this.startTracking("keyboard",a),this.trackHeadAtPosition(a),this.keyTrackPosition=a},AccessibleSlider.prototype.refreshTooltip=function(){this.overHead?(this.timeTooltip.show(),this.tracking?this.timeTooltip.text(this.positionToStr(this.lastTrackPosition)):this.timeTooltip.text(this.positionToStr(this.position)),this.setTooltipPosition(this.seekHead.position().left+this.seekHead.width()/2)):this.overBody&&this.overBodyMousePos?(this.timeTooltip.show(),this.timeTooltip.text(this.positionToStr(this.pageXToPosition(this.overBodyMousePos.x))),this.setTooltipPosition(this.overBodyMousePos.x-this.bodyDiv.offset().left)):this.timeTooltip.hide()},AccessibleSlider.prototype.setTooltipPosition=function(a){this.timeTooltip.css({left:a-this.timeTooltip.width()/2-10,bottom:this.seekHead.height()+10})},AccessibleSlider.prototype.positionToStr=function(a){var b=Math.floor(a/3600),c=Math.floor(a/60)%60,d=Math.floor(a%60);return 10>d&&(d="0"+d),b>0?(10>c&&(c="0"+c),b+":"+c+":"+d):c+":"+d}}(jQuery),function(a){AblePlayer.prototype.addVolumeSlider=function(b){var c,d,e,f,g,h;c=this,d=this.mediaId+"-volume-slider",e=this.mediaId+"-volume-help",this.volumeTrackHeight=50,this.volumeHeadHeight=7,this.volumeTickHeight=this.volumeTrackHeight/10,this.$volumeSlider=a("<div>",{id:d,"class":"able-volume-slider","aria-hidden":"true"}),this.$volumeSliderTooltip=a("<div>",{"class":"able-tooltip",role:"tooltip"}),this.$volumeSliderTrack=a("<div>",{"class":"able-volume-track"}),this.$volumeSliderTrackOn=a("<div>",{"class":"able-volume-track able-volume-track-on"}),this.$volumeSliderHead=a("<div>",{"class":"able-volume-head",role:"slider","aria-orientation":"vertical","aria-label":this.tt.volumeUpDown,"aria-valuemin":0,"aria-valuemax":10,"aria-valuenow":this.volume,tabindex:-1}),this.$volumeSliderTrack.append(this.$volumeSliderTrackOn,this.$volumeSliderHead),this.$volumeAlert=a("<div>",{"class":"able-offscreen","aria-live":"assertive","aria-atomic":"true"}),h=parseInt(c.volume)/10*100,this.$volumeHelp=a("<div>",{id:e,"class":"able-volume-help"}).text(h+"%, "+this.tt.volumeHelp),this.$volumeButton.attr({"aria-describedby":e}),this.$volumeSlider.append(this.$volumeSliderTooltip,this.$volumeSliderTrack,this.$volumeAlert,this.$volumeHelp),b.append(this.$volumeSlider),this.refreshVolumeSlider(this.volume),this.$volumeSliderHead.on("mousedown",function(b){b.preventDefault(),c.draggingVolume=!0,c.volumeHeadPositionTop=a(this).offset().top}),this.$mediaContainer.on("mouseover",function(a){"youtube"==c.player&&(c.draggingVolume=!1)}),a(document).on("mouseup",function(a){c.draggingVolume=!1}),a(document).on("mousemove",function(a){c.draggingVolume&&(f=a.pageX,g=a.pageY,c.moveVolumeHead(g))}),this.$volumeSliderHead.on("keydown",function(a){if(37===a.which||40===a.which)c.handleVolume("down");else if(39===a.which||38===a.which)c.handleVolume("up");else{if(27!==a.which&&13!==a.which)return;c.$volumeSlider.is(":visible")?c.hideVolumePopup():c.showVolumePopup()}a.preventDefault()})},AblePlayer.prototype.refreshVolumeSlider=function(a){var b,c;b=a/10*100,c=b+"%";var d,e,f;d=a*this.volumeTickHeight,e=this.volumeTrackHeight-d,f=e-this.volumeHeadHeight,this.$volumeSliderTrackOn.css({height:d+"px",top:e+"px"}),this.$volumeSliderHead.attr({"aria-valuenow":a,"aria-valuetext":c}),this.$volumeSliderHead.css({top:f+"px"}),this.$volumeAlert.text(b+"%")},AblePlayer.prototype.refreshVolumeButton=function(a){var b,c,d,e,f;b=this.getVolumeName(a),c=a/10*100,d=this.tt.volume+" "+c+"%","font"===this.iconType?(e="icon-volume-"+b,this.$volumeButton.find("span").first().removeClass().addClass(e),this.$volumeButton.find("span.able-clipped").text(d)):(f=this.imgPath+"volume-"+b+".png",this.$volumeButton.find("img").attr("src",f))},AblePlayer.prototype.moveVolumeHead=function(a){var b,c,d,e,b=this.volumeHeadPositionTop-a;if(Math.abs(b)>this.volumeTickHeight){if(c=b>0?"up":"down","up"==c&&10==this.volume)return;if("down"==c&&0==this.volume)return;d=Math.round(Math.abs(b)/this.volumeTickHeight),"up"==c?(e=this.volume+d,e>10&&(e=10)):(e=this.volume-d,0>e&&(e=0)),this.setVolume(e),this.refreshVolumeSlider(e),this.refreshVolumeButton(e),this.volumeHeadPositionTop=a}},AblePlayer.prototype.handleVolume=function(a){var b;return"undefined"==typeof a?void(this.$volumeSlider.is(":visible")?this.hideVolumePopup():this.showVolumePopup()):(a>=49&&57>=a?b=a-48:(b=this.getVolume(),"up"===a&&10>b?b+=1:"down"===a&&b>0&&(b-=1)),void(this.isMuted()&&b>0?this.setMute(!1):0===b?this.setMute(!0):(this.setVolume(b),this.refreshVolumeSlider(b),this.refreshVolumeButton(b))))},AblePlayer.prototype.handleMute=function(){this.isMuted()?this.setMute(!1):this.setMute(!0)},AblePlayer.prototype.showVolumePopup=function(){this.closePopups(),this.$tooltipDiv.hide(),this.$volumeSlider.show().attr("aria-hidden","false"),this.$volumeSliderHead.attr("tabindex","0").focus()},AblePlayer.prototype.hideVolumePopup=function(){this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeSliderHead.attr("tabindex","-1"),this.$volumeButton.focus()},AblePlayer.prototype.isMuted=function(){return"html5"===this.player?this.media.muted:"jw"===this.player&&this.jwPlayer?this.jwPlayer.getMute():"youtube"===this.player?this.youTubePlayer.isMuted():void 0},AblePlayer.prototype.setMute=function(a){a?(this.lastVolume=this.volume,this.volume=0):"undefined"!=typeof this.lastVolume&&(this.volume=this.lastVolume),"html5"===this.player?this.media.muted=a:"jw"===this.player&&this.jwPlayer?this.jwPlayer.setMute(a):"youtube"===this.player&&(a?this.youTubePlayer.mute():this.youTubePlayer.unMute()),this.refreshVolumeSlider(this.volume),this.refreshVolumeButton(this.volume)},AblePlayer.prototype.setVolume=function(a){"html5"===this.player?(this.media.volume=a/10,this.hasSignLanguage&&this.signVideo&&(this.signVideo.volume=0)):"jw"===this.player&&this.jwPlayer?this.jwPlayer.setVolume(10*a):"youtube"===this.player&&(this.youTubePlayer.setVolume(10*a),this.volume=a),this.lastVolume=a},AblePlayer.prototype.getVolume=function(a){return"html5"===this.player?10*this.media.volume:"jw"===this.player&&this.jwPlayer?this.jwPlayer.getVolume()/10:"youtube"===this.player?this.youTubePlayer.getVolume()/10:void 0},AblePlayer.prototype.getVolumeName=function(a){return 0==a?"mute":10==a?"loud":5>a?"soft":"medium"}}(jQuery),function(a){var b="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";window.AccessibleDialog=function(c,d,e,f,g,h,i,j,k){this.title=f,this.closeButtonLabel=h,this.focusedElementBeforeModal=d,this.escapeHook=k,this.baseId=a(c).attr("id")||Math.floor(1e9*Math.random()).toString();var l=this,m=c;if(this.modal=m,m.css({width:i||"50%",top:j?"0":"5%"}),m.addClass("able-modal-dialog"),!j){var n=a("<button>",{"class":"modalCloseButton",title:l.closeButtonLabel,"aria-label":l.closeButtonLabel}).text("X");n.keydown(function(a){32===a.which&&l.hide()}).click(function(){l.hide()});var o=a("<h1></h1>");o.attr("id","modalTitle-"+this.baseId),o.css("text-align","center"),o.text(f),g.attr("id","modalDesc-"+this.baseId),m.attr({"aria-labelledby":"modalTitle-"+this.baseId,"aria-describedby":"modalDesc-"+this.baseId}),m.prepend(o),m.prepend(n)}m.attr({"aria-hidden":"true",role:e}),m.keydown(function(c){if(27===c.which)l.escapeHook?l.escapeHook(c,this):(l.hide(),c.preventDefault());else if(9===c.which){var d=m.find("*"),e=d.filter(b).filter(":visible");if(0===e.length)return;var f=a(":focus"),g=e.index(f);c.shiftKey?0===g&&(e.get(e.length-1).focus(),c.preventDefault()):g===e.length-1&&(e.get(0).focus(),c.preventDefault())}c.stopPropagation()}),a("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("aria-hidden","false")},AccessibleDialog.prototype.show=function(){if(!this.overlay){var c=a("<div></div>").attr({"class":"able-modal-overlay",tabindex:"-1"});this.overlay=c,a("body").append(c),c.on("mousedown.accessibleModal",function(a){a.preventDefault()})}a("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("aria-hidden","true"),this.overlay.css("display","block"),this.modal.css("display","block"),this.modal.attr({"aria-hidden":"false",tabindex:"-1"});var d=this.modal.find("*").filter(b).filter(":visible");0===d.length&&this.focusedElementBeforeModal.blur();var e=this;setTimeout(function(){e.modal.focus()},300)},AccessibleDialog.prototype.hide=function(){this.overlay&&this.overlay.css("display","none"),this.modal.css("display","none"),this.modal.attr("aria-hidden","true"),a("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("aria-hidden","false"),this.focusedElementBeforeModal.focus()}}(jQuery),function(a){AblePlayer.prototype.getNextHeadingLevel=function(b){var c,d,e,f,g;return c=b.parents(),c.each(function(){return d=a(this).children(":header"),e=d.length,e?(f=d.eq(e-1).prop("tagName"),!1):void 0}),"undefined"==typeof f?g=1:(g=parseInt(f[1]),g+=1,g>6&&(g=6)),g},AblePlayer.prototype.countProperties=function(a){var b,c;b=0;for(c in a)a.hasOwnProperty(c)&&++b;return b},AblePlayer.prototype.formatSecondsAsColonTime=function(a){var b=Math.floor(a/3600),c=Math.floor(a/60)%60,d=Math.floor(a%60);return 10>d&&(d="0"+d),b>0?(10>c&&(c="0"+c),b+":"+c+":"+d):c+":"+d},AblePlayer.prototype.capitalizeFirstLetter=function(a){return a.charAt(0).toUpperCase()+a.slice(1)}}(jQuery),function(a){AblePlayer.prototype.initDescription=function(){this.refreshingDesc||(this.descFile=this.$sources.first().attr("data-desc-src"),"undefined"!=typeof this.descFile?this.hasOpenDesc=!0:this.youTubeDescId?this.hasOpenDesc=!0:this.hasOpenDesc=!1),this.prefDesc?this.hasOpenDesc&&this.hasClosedDesc?(this.useDescFormat=this.prefDescFormat,this.descOn=!0):this.hasOpenDesc?(this.useDescFormat="video",this.descOn=!0):this.hasClosedDesc&&(this.useDescFormat="text",this.descOn=!0):this.refreshingDesc?(this.prevDescFormat=this.useDescFormat,this.useDescFormat=!1,this.descOn=!1):this.useDescFormat=!1,this.descOn?"video"===this.useDescFormat?(this.usingAudioDescription()||this.swapDescription(),this.$descDiv.hide(),this.$descDiv.removeClass("able-clipped")):"text"===this.useDescFormat&&(this.$descDiv.show(),this.prefVisibleDesc?this.$descDiv.removeClass("able-clipped"):this.$descDiv.addClass("able-clipped"),this.swappingSrc||this.showDescription(this.getElapsed())):"video"===this.prevDescFormat?this.usingAudioDescription()&&this.swapDescription():"text"===this.prevDescFormat&&(this.$descDiv.hide(),this.$descDiv.removeClass("able-clipped")),this.refreshingDesc=!1},AblePlayer.prototype.usingAudioDescription=function(){return"youtube"===this.player?this.activeYouTubeId===this.youTubeDescId:this.$sources.first().attr("data-desc-src")===this.$sources.first().attr("src")},AblePlayer.prototype.swapDescription=function(){var a,b,c,d,e,f,g;if(a=this,this.swapTime=this.getElapsed(),this.descOn?this.showAlert(this.tt.alertDescribedVersion):this.showAlert(this.tt.alertNonDescribedVersion),"html5"===this.player){if(this.usingAudioDescription()){for(b=0;b<this.$sources.length;b++)c=this.$sources[b].getAttribute("data-orig-src"),e=this.$sources[b].getAttribute("type"),c&&this.$sources[b].setAttribute("src",c),"video/mp4"===e&&(f=b);this.swappingSrc=!0}else{for(b=0;b<this.$sources.length;b++)c=this.$sources[b].getAttribute("src"),d=this.$sources[b].getAttribute("data-desc-src"),e=this.$sources[b].getAttribute("type"),d&&(this.$sources[b].setAttribute("src",d),this.$sources[b].setAttribute("data-orig-src",c)),"video/mp4"===e&&(f=b);this.swappingSrc=!0}"html5"===this.player?this.media.load():"youtube"===this.player||"jw"===this.player&&this.jwPlayer&&(g=this.$sources[f].getAttribute("src"),this.jwPlayer.load({file:g}))}else"youtube"===this.player&&(this.usingAudioDescription()?(this.activeYouTubeId=this.youTubeId,this.showAlert(this.tt.alertNonDescribedVersion)):(this.activeYouTubeId=this.youTubeDescId,this.showAlert(this.tt.alertDescribedVersion)),"undefined"!=typeof this.youTubePlayer&&this.setupAltCaptions().then(function(){a.playing?a.youTubePlayer.loadVideoById(a.activeYouTubeId,a.swapTime):a.youTubePlayer.cueVideoById(a.activeYouTubeId,a.swapTime)}))},AblePlayer.prototype.showDescription=function(a){if(!this.swappingSrc){var b,c,d,e=function(a){
|
|
6
|
+
var b=[];if("string"===a.type)b.push(a.value);else for(var c=0;c<a.children.length;c++)b.push(e(a.children[c]));return b.join("")};for(d=this.selectedDescriptions?this.selectedDescriptions.cues:this.descriptions.length>=1?this.descriptions[0].cues:[],b=0;b<d.length;b++)if(d[b].start<=a&&d[b].end>a){c=b;break}"undefined"!=typeof c?this.currentDescription!==c&&(this.$status.removeAttr("aria-live"),this.$descDiv.html(e(d[c].components)),this.prefDescPause&&this.pauseMedia(),this.currentDescription=c):(this.$descDiv.html(""),this.currentDescription=-1,this.$status.attr("aria-live","polite"))}}}(jQuery),function(a){AblePlayer.prototype.getUserAgent=function(){this.userAgent={},this.userAgent.browser={},/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)?(this.userAgent.browser.name="Firefox",this.userAgent.browser.version=RegExp.$1):/MSIE (\d+\.\d+);/.test(navigator.userAgent)?(this.userAgent.browser.name="Internet Explorer",this.userAgent.browser.version=RegExp.$1):/Trident.*rv[ :]*(\d+\.\d+)/.test(navigator.userAgent)?(this.userAgent.browser.name="Internet Explorer",this.userAgent.browser.version=RegExp.$1):/Edge[\/\s](\d+\.\d+)/.test(navigator.userAgent)?(this.userAgent.browser.name="Edge",this.userAgent.browser.version=RegExp.$1):/OPR\/(\d+\.\d+)/i.test(navigator.userAgent)?(this.userAgent.browser.name="Opera",this.userAgent.browser.version=RegExp.$1):/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)?(this.userAgent.browser.name="Chrome",/Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&(this.userAgent.browser.version=RegExp.$1)):/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)?(this.userAgent.browser.name="Safari",/Version[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&(this.userAgent.browser.version=RegExp.$1)):(this.userAgent.browser.name="Unknown",this.userAgent.browser.version="Unknown"),-1!=window.navigator.userAgent.indexOf("Windows NT 6.2")?this.userAgent.os="Windows 8":-1!=window.navigator.userAgent.indexOf("Windows NT 6.1")?this.userAgent.os="Windows 7":-1!=window.navigator.userAgent.indexOf("Windows NT 6.0")?this.userAgent.os="Windows Vista":-1!=window.navigator.userAgent.indexOf("Windows NT 5.1")?this.userAgent.os="Windows XP":-1!=window.navigator.userAgent.indexOf("Windows NT 5.0")?this.userAgent.os="Windows 2000":-1!=window.navigator.userAgent.indexOf("Mac")?this.userAgent.os="Mac/iOS":-1!=window.navigator.userAgent.indexOf("X11")?this.userAgent.os="UNIX":-1!=window.navigator.userAgent.indexOf("Linux")&&(this.userAgent.os="Linux"),this.debug},AblePlayer.prototype.isUserAgent=function(a){var b=navigator.userAgent.toLowerCase();return this.debug,-1!==b.indexOf(a.toLowerCase())?!0:!1},AblePlayer.prototype.isIOS=function(a){var b,c;return b=navigator.userAgent.toLowerCase(),c=/ipad|iphone|ipod/.exec(b),c?"undefined"!=typeof a?-1!==b.indexOf("os "+a)?!0:!1:!0:!1},AblePlayer.prototype.browserSupportsVolume=function(){var a,b;return a=navigator.userAgent.toLowerCase(),b=/ipad|iphone|ipod|android|blackberry|windows ce|windows phone|webos|playbook/.exec(a),b?"android"===b[0]&&/firefox/.test(a)?!0:!1:!0},AblePlayer.prototype.nativeFullscreenSupported=function(){return"jw"===this.player?!1:document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled}}(jQuery),function(a){AblePlayer.prototype.seekTo=function(a){if(this.seeking=!0,this.liveUpdatePending=!0,"html5"===this.player){var b;this.startTime=a,b=this.media.seekable,b.length>0&&this.startTime>=b.start(0)&&this.startTime<=b.end(0)&&(this.media.currentTime=this.startTime,this.hasSignLanguage&&this.signVideo&&(this.signVideo.currentTime=this.startTime))}else"jw"===this.player&&this.jwPlayer?(this.jwSeekPause=!0,this.jwPlayer.seek(a)):"youtube"===this.player&&(this.youTubePlayer.seekTo(a,!0),a>0&&"undefined"!=typeof this.$posterImg&&this.$posterImg.hide());this.refreshControls()},AblePlayer.prototype.getDuration=function(){var a;return"html5"===this.player?a=this.media.duration:"jw"===this.player&&this.jwPlayer?a=this.jwPlayer.getDuration():"youtube"===this.player&&this.youTubePlayer&&(a=this.youTubePlayer.getDuration()),void 0===a||isNaN(a)||-1===a?0:a},AblePlayer.prototype.getElapsed=function(){var a;if("html5"===this.player)a=this.media.currentTime;else if("jw"===this.player&&this.jwPlayer){if("IDLE"===this.jwPlayer.getState())return 0;a=this.jwPlayer.getPosition()}else"youtube"===this.player&&this.youTubePlayer&&(a=this.youTubePlayer.getCurrentTime());return void 0===a||isNaN(a)||-1===a?0:a},AblePlayer.prototype.getPlayerState=function(){if(!this.swappingSrc){if("html5"===this.player)return this.media.paused?0===this.getElapsed()?"stopped":this.media.ended?"ended":"paused":4!==this.media.readyState?"buffering":"playing";if("jw"===this.player&&this.jwPlayer){if("PAUSED"===this.jwPlayer.getState()||"IDLE"===this.jwPlayer.getState()||void 0===this.jwPlayer.getState())return 0===this.getElapsed()?"stopped":this.getElapsed()===this.getDuration()?"ended":"paused";if("BUFFERING"===this.jwPlayer.getState())return"buffering";if("PLAYING"===this.jwPlayer.getState())return"playing"}else if("youtube"===this.player&&this.youTubePlayer){var a=this.youTubePlayer.getPlayerState();if(-1===a||5===a)return"stopped";if(0===a)return"ended";if(1===a)return"playing";if(2===a)return"paused";if(3===a)return"buffering"}}},AblePlayer.prototype.isPlaybackRateSupported=function(){return"html5"===this.player?this.media.playbackRate?!0:!1:"jw"===this.player&&this.jwPlayer?!1:"youtube"===this.player?this.youTubePlayer.getAvailablePlaybackRates().length>1:void 0},AblePlayer.prototype.setPlaybackRate=function(a){a=Math.max(.5,a),"html5"===this.player?this.media.playbackRate=a:"youtube"===this.player&&this.youTubePlayer.setPlaybackRate(a),this.hasSignLanguage&&this.signVideo&&(this.signVideo.playbackRate=a),this.$speed.text(this.tt.speed+": "+a.toFixed(2).toString()+"x")},AblePlayer.prototype.getPlaybackRate=function(){return"html5"===this.player?this.media.playbackRate:"jw"===this.player&&this.jwPlayer?1:"youtube"===this.player?this.youTubePlayer.getPlaybackRate():void 0},AblePlayer.prototype.isPaused=function(){var a=this.getPlayerState();return"paused"===a||"stopped"===a||"ended"===a},AblePlayer.prototype.pauseMedia=function(){"html5"===this.player?(this.media.pause(!0),this.hasSignLanguage&&this.signVideo&&this.signVideo.pause(!0)):"jw"===this.player&&this.jwPlayer?this.jwPlayer.pause(!0):"youtube"===this.player&&this.youTubePlayer.pauseVideo()},AblePlayer.prototype.playMedia=function(){"html5"===this.player?(this.media.play(!0),this.hasSignLanguage&&this.signVideo&&this.signVideo.play(!0)):"jw"===this.player&&this.jwPlayer?this.jwPlayer.play(!0):"youtube"===this.player&&(this.youTubePlayer.playVideo(),"undefined"!=typeof this.$posterImg&&this.$posterImg.hide(),this.stoppingYouTube=!1),this.startedPlaying=!0},AblePlayer.prototype.refreshControls=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;b=this,this.swappingSrc||(c=this.getDuration(),d=this.getElapsed(),this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.chapterElapsed=this.getChapterElapsed()),this.useFixedSeekInterval===!1&&this.seekIntervalCalculated===!1&&c>0&&this.setSeekInterval(),this.seekBar&&(this.useChapterTimes?(e=this.selectedChapters.cues.length-1,this.selectedChapters.cues[e]==this.currentChapter&&this.currentChapter.end!==c?this.seekBar.setDuration(c-this.currentChapter.start):this.seekBar.setDuration(this.chapterDuration)):this.seekBar.setDuration(c),this.seekBar.tracking||(g=this.liveUpdatePending||this.seekBar.seekHead.is(a(document.activeElement)),this.liveUpdatePending=!1,this.useChapterTimes?this.seekBar.setPosition(this.chapterElapsed,g):this.seekBar.setPosition(d,g)),f=this.seekBar.tracking?this.seekBar.lastTrackPosition:this.useChapterTimes?this.chapterElapsed:d),this.useChapterTimes?this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.chapterDuration)):this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(c)),this.$elapsedTimeContainer.text(this.formatSecondsAsColonTime(f)),h={stopped:this.tt.statusStopped,paused:this.tt.statusPaused,playing:this.tt.statusPlaying,buffering:this.tt.statusBuffering,ended:this.tt.statusEnd},this.stoppingYouTube?(this.$status.text()!==this.tt.statusStopped&&this.$status.text(this.tt.statusStopped),this.$playpauseButton.find("span").first().hasClass("icon-pause")&&("font"===this.iconType?(this.$playpauseButton.find("span").first().removeClass("icon-pause").addClass("icon-play"),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):"svg"===this.iconType||this.$playpauseButton.find("img").attr("src",this.playButtonImg))):"undefined"!=typeof this.$status&&"undefined"!=typeof this.seekBar&&(this.$status.text()===h[this.getPlayerState()]||this.seekBar.tracking?(this.statusDebounceStart=null,clearTimeout(this.statusTimeout),this.statusTimeout=null):(i=(new Date).getTime(),this.statusDebounceStart?i-this.statusDebounceStart>250&&(this.$status.text(h[this.getPlayerState()]),this.statusDebounceStart=null,clearTimeout(this.statusTimeout),this.statusTimeout=null):(this.statusDebounceStart=i,this.statusTimeout=setTimeout(function(){b.refreshControls()},300))),this.seekBar.tracking||this.stoppingYouTube||(this.isPaused()?(this.$playpauseButton.attr("aria-label",this.tt.play),"font"===this.iconType?(this.$playpauseButton.find("span").first().removeClass("icon-pause").addClass("icon-play"),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):"svg"===this.iconType?(this.$playpauseButton.find("svg").removeClass("svg-pause").addClass("svg-play"),r=this.$playpauseButton.find("use").attr("xlink:href"),s=r.replace("svg-pause","svg-play"),this.$playpauseButton.find("use").attr(s),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):this.$playpauseButton.find("img").attr("src",this.playButtonImg)):(this.$playpauseButton.attr("aria-label",this.tt.pause),"font"===this.iconType?(this.$playpauseButton.find("span").first().removeClass("icon-play").addClass("icon-pause"),this.$playpauseButton.find("span.able-clipped").text(this.tt.pause)):"svg"===this.iconType?(this.$playpauseButton.find("svg").removeClass("svg-play").addClass("svg-pause"),r=this.$playpauseButton.find("use").attr("xlink:href"),s=r.replace("svg-play","svg-pause"),this.$playpauseButton.find("use").attr(s),this.$playpauseButton.find("span.able-clipped").text(this.tt.pause)):this.$playpauseButton.find("img").attr("src",this.pauseButtonImg)))),this.seekBar&&(j=0,n=40,k=this.seekBar.wrapperDiv.parent().prev("div.able-left-controls"),l=k.next("div.able-right-controls"),k.children().each(function(){"BUTTON"==a(this).prop("tagName")&&(j+=a(this).width())}),l.children().each(function(){"BUTTON"==a(this).prop("tagName")&&(j+=a(this).width())}),m=this.isFullscreen()?a(window).width()-j-n:this.$ableWrapper.width()-j-n,Math.abs(m-this.seekBar.getWidth())>5&&this.seekBar.setWidth(m)),this.isFullscreen()||(v=300,t=this.$statusBarDiv.height(),u=this.$statusBarDiv.find("span.able-speed").height(),u>t+5?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):(this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1),this.$statusBarDiv.width()<v?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1))),this.$descButton&&(this.descOn?(this.$descButton.removeClass("buttonOff").attr("aria-label",this.tt.turnOffDescriptions),this.$descButton.find("span.able-clipped").text(this.tt.turnOffDescriptions)):(this.$descButton.addClass("buttonOff").attr("aria-label",this.tt.turnOnDescriptions),this.$descButton.find("span.able-clipped").text(this.tt.turnOnDescriptions))),this.$ccButton&&(o=this.usingYouTubeCaptions?this.ytCaptions.length:this.captions.length,this.captionsOn?(this.$ccButton.removeClass("buttonOff"),1===o&&(this.$ccButton.attr("aria-label",this.tt.hideCaptions),this.$ccButton.find("span.able-clipped").text(this.tt.hideCaptions))):(this.$ccButton.addClass("buttonOff"),1===o&&(this.$ccButton.attr("aria-label",this.tt.showCaptions),this.$ccButton.find("span.able-clipped").text(this.tt.showCaptions))),o>1&&(this.$ccButton.attr({"aria-label":this.tt.captions,"aria-haspopup":"true","aria-controls":this.mediaId+"-captions-menu"}),this.$ccButton.find("span.able-clipped").text(this.tt.captions))),this.$chaptersButton&&this.$chaptersButton.attr({"aria-label":this.tt.chapters,"aria-haspopup":"true","aria-controls":this.mediaId+"-chapters-menu"}),this.$fullscreenButton&&(this.isFullscreen()?(this.$fullscreenButton.attr("aria-label",this.tt.exitFullScreen),"font"===this.iconType?(this.$fullscreenButton.find("span").first().removeClass("icon-fullscreen-expand").addClass("icon-fullscreen-collapse"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.exitFullScreen)):"svg"===this.iconType?(this.$fullscreenButton.find("svg").removeClass("icon-fullscreen-expand").addClass("icon-fullscreen-collapse"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.exitFullScreen)):this.$fullscreenButton.find("img").attr("src",this.fullscreenCollapseButtonImg)):(this.$fullscreenButton.attr("aria-label",this.tt.enterFullScreen),"font"===this.iconType?(this.$fullscreenButton.find("span").first().removeClass("icon-fullscreen-collapse").addClass("icon-fullscreen-expand"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.enterFullScreen)):"svg"===this.iconType?(this.$fullscreenButton.find("svg").removeClass("icon-fullscreen-collapse").addClass("icon-fullscreen-expand"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.enterFullScreen)):this.$fullscreenButton.find("img").attr("src",this.fullscreenExpandButtonImg))),"undefined"!=typeof this.$bigPlayButton&&(this.isPaused()&&!this.seekBar.tracking?(this.hideBigPlayButton||this.$bigPlayButton.show(),this.isFullscreen()?(this.$bigPlayButton.width(a(window).width()),this.$bigPlayButton.height(a(window).height())):(this.$bigPlayButton.width(this.$mediaContainer.width()),this.$bigPlayButton.height(this.$mediaContainer.height()))):this.$bigPlayButton.hide()),this.transcriptType&&(1===this.prefAutoScrollTranscript?(this.autoScrollTranscript=!0,this.$autoScrollTranscriptCheckbox.prop("checked",!0)):(this.autoScrollTranscript=!1,this.$autoScrollTranscriptCheckbox.prop("checked",!1)),this.autoScrollTranscript&&this.currentHighlight&&(q=Math.floor(a(".able-transcript").scrollTop()+a(this.currentHighlight).position().top-a(".able-transcript").height()/2+a(this.currentHighlight).height()/2),q!==Math.floor(a(".able-transcript").scrollTop())&&(this.scrollingTranscript=!0,a(".able-transcript").scrollTop(q)))),"html5"===this.player?this.media.buffered.length>0&&(p=this.media.buffered.end(0),this.useChapterTimes?(p>this.chapterDuration&&(p=this.chapterDuration),this.seekBar&&this.seekBar.setBuffered(p/this.chapterDuration)):this.seekBar&&this.seekBar.setBuffered(p/c)):"jw"===this.player&&this.jwPlayer?this.seekBar&&this.seekBar.setBuffered(this.jwPlayer.getBuffer()/100):"youtube"===this.player&&this.seekBar&&this.seekBar.setBuffered(this.youTubePlayer.getVideoLoadedFraction()))},AblePlayer.prototype.getHiddenWidth=function(a){var b=a.clone().appendTo("body"),c=b.outerWidth();return b.remove(),c},AblePlayer.prototype.handlePlay=function(a){this.isPaused()?this.playMedia():this.pauseMedia(),this.refreshControls()},AblePlayer.prototype.handleRestart=function(){this.seekTo(0),this.refreshControls()},AblePlayer.prototype.handleRewind=function(){var a,b;a=this.getElapsed(),b=a-this.seekInterval,this.useChapterTimes?b<this.currentChapter.start&&(b=this.currentChapter.start):0>b&&(b=0),this.seekTo(b)},AblePlayer.prototype.handleFastForward=function(){var a,b,c,d;a=this.getElapsed(),b=this.getDuration(),d=this.chapters.length-1,c=a+this.seekInterval,this.useChapterTimes?this.chapters[d]==this.currentChapter?c>b||c>this.currentChapter.end?c=Math.min(b,this.currentChapter.end):b%c<this.seekInterval&&(c=Math.min(b,this.currentChapter.end)):c>this.currentChapter.end&&(c=this.currentChapter.end):c>b&&(c=b),this.seekTo(c)},AblePlayer.prototype.handleRateIncrease=function(){this.changeRate(1)},AblePlayer.prototype.handleRateDecrease=function(){this.changeRate(-1)},AblePlayer.prototype.changeRate=function(a){if("html5"===this.player)this.setPlaybackRate(this.getPlaybackRate()+.25*a);else if("youtube"===this.player){var b=this.youTubePlayer.getAvailablePlaybackRates(),c=this.getPlaybackRate(),d=b.indexOf(c);-1===d||(d+=a,d<b.length&&d>=0&&this.setPlaybackRate(b[d]))}},AblePlayer.prototype.handleCaptionToggle=function(){var a;if(this.hidingPopup)return this.hidingPopup=!1,!1;if(a=this.captions.length?this.captions:this.ytCaptions.length?this.ytCaptions:[],1===a.length){if(this.captionsOn===!0)this.captionsOn=!1,this.prefCaptions=0,this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.unloadModule(this.ytCaptionModule):this.$captionsWrapper.hide();else{this.captionsOn=!0,this.prefCaptions=1,this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?"undefined"!=typeof this.ytCaptionModule&&this.youTubePlayer.loadModule(this.ytCaptionModule):this.$captionsWrapper.show();for(var b=0;b<a.length;b++)a[b].def===!0&&(this.selectedCaptions=a[b]);this.selectedCaptions=this.captions[0],this.descriptions.length>=0&&(this.selectedDescriptions=this.descriptions[0])}this.refreshControls()}else this.captionsPopup.is(":visible")?(this.captionsPopup.hide(),this.hidingPopup=!1,this.$ccButton.focus()):(this.closePopups(),this.captionsPopup.show(),this.captionsPopup.css("top",this.$ccButton.position().top-this.captionsPopup.outerHeight()),this.captionsPopup.css("left",this.$ccButton.position().left),this.captionsPopup.find("li").removeClass("able-focus"),this.captionsPopup.find("input:checked")?this.captionsPopup.find("input:checked").focus().parent().addClass("able-focus"):this.captionsPopup.find("input").first().focus().parent().addClass("able-focus"))},AblePlayer.prototype.handleChapters=function(){return this.hidingPopup?(this.hidingPopup=!1,!1):void(this.chaptersPopup.is(":visible")?(this.chaptersPopup.hide(),this.hidingPopup=!1,this.$chaptersButton.focus()):(this.closePopups(),this.chaptersPopup.show(),this.chaptersPopup.css("top",this.$chaptersButton.position().top-this.chaptersPopup.outerHeight()),this.chaptersPopup.css("left",this.$chaptersButton.position().left),this.chaptersPopup.find("li").removeClass("able-focus"),this.chaptersPopup.find("input:checked")?this.chaptersPopup.find("input:checked").focus().parent().addClass("able-focus"):this.chaptersPopup.find("input").first().focus().parent().addClass("able-focus")))},AblePlayer.prototype.handleDescriptionToggle=function(){this.descOn=!this.descOn,this.prefDesc=+this.descOn,this.updateCookie("prefDesc"),this.refreshingDesc=!0,this.initDescription(),this.refreshControls()},AblePlayer.prototype.handlePrefsClick=function(a){var b,c,d;return this.hidingPopup?(this.hidingPopup=!1,!1):void(this.prefsPopup.is(":visible")?(this.prefsPopup.hide(),this.hidingPopup=!1,this.$prefsButton.focus()):(this.closePopups(),this.prefsPopup.show(),b=this.$prefsButton.position(),c=this.$ableDiv.width()-5,d=c-this.prefsPopup.width(),this.prefsPopup.css("top",b.top-this.prefsPopup.outerHeight()),this.prefsPopup.css("left",d),this.prefsPopup.find("li").removeClass("able-focus"),this.prefsPopup.find("input").first().focus().parent().addClass("able-focus")))},AblePlayer.prototype.handleHelpClick=function(){this.setFullscreen(!1),this.helpDialog.show()},AblePlayer.prototype.handleTranscriptToggle=function(){this.$transcriptDiv.is(":visible")?(this.$transcriptArea.hide(),this.$transcriptButton.addClass("buttonOff").attr("aria-label",this.tt.showTranscript),this.$transcriptButton.find("span.able-clipped").text(this.tt.showTranscript),this.prefTranscript=0):(this.positionDraggableWindow("transcript"),this.$transcriptArea.show(),this.$transcriptButton.removeClass("buttonOff").attr("aria-label",this.tt.hideTranscript),this.$transcriptButton.find("span.able-clipped").text(this.tt.hideTranscript),this.prefTranscript=1),this.updateCookie("prefTranscript")},AblePlayer.prototype.handleSignToggle=function(){this.$signWindow.is(":visible")?(this.$signWindow.hide(),this.$signButton.addClass("buttonOff").attr("aria-label",this.tt.showSign),this.$signButton.find("span.able-clipped").text(this.tt.showSign),this.prefSign=0):(this.positionDraggableWindow("sign"),this.$signWindow.show(),this.$signButton.removeClass("buttonOff").attr("aria-label",this.tt.hideSign),this.$signButton.find("span.able-clipped").text(this.tt.hideSign),this.prefSign=1),this.updateCookie("prefSign")},AblePlayer.prototype.isFullscreen=function(){return this.nativeFullscreenSupported()?document.fullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.msFullscreenElement?!0:!1:this.modalFullscreenActive?!0:!1},AblePlayer.prototype.setFullscreen=function(b){if(this.isFullscreen()!=b){var c=this,d=this.$ableWrapper,e=d[0];if(this.nativeFullscreenSupported())b?(this.preFullScreenWidth=this.$ableWrapper.width(),this.preFullScreenHeight=this.$ableWrapper.height(),e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()):document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),a(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",function(){c.isFullscreen()||(c.restoringAfterFullScreen=!0,c.resizePlayer(c.preFullScreenWidth,c.preFullScreenHeight))});else{if(!this.fullscreenDialog){var f=a("<div>"),g=a("<p>",{"class":"able-screenreader-alert"}).text(this.tt.fullscreen);f.append(g),this.fullscreenDialog=new AccessibleDialog(f,this.$fullscreenButton,"dialog","Fullscreen video player",g,this.tt.exitFullScreen,"100%",!0,function(){c.handleFullscreenToggle()}),a("body").append(f)}var h=this.isPaused();if(b){this.modalFullscreenActive=!0,this.fullscreenDialog.show(),this.$modalFullscreenPlaceholder=a('<div class="placeholder">'),this.$modalFullscreenPlaceholder.insertAfter(d),d.appendTo(this.fullscreenDialog.modal),d===this.$ableColumnLeft&&d.width("100%");var i=a(window).height()-this.$playerDiv.height();this.$descDiv.is(":hidden")||(i-=this.$descDiv.height()),this.resizePlayer(a(window).width(),i)}else this.modalFullscreenActive=!1,d===this.$ableColumnLeft&&d.width("50%"),d.insertAfter(this.$modalFullscreenPlaceholder),this.$modalFullscreenPlaceholder.remove(),this.fullscreenDialog.hide(),this.resizePlayer(this.$ableWrapper.width(),this.$ableWrapper.height());!h&&this.isPaused()&&this.playMedia()}this.refreshControls()}},AblePlayer.prototype.handleFullscreenToggle=function(){var a=this.isPaused();this.setFullscreen(!this.isFullscreen()),a?this.pauseMedia():a||this.playMedia()},AblePlayer.prototype.handleTranscriptLockToggle=function(a){this.autoScrollTranscript=a,this.prefAutoScrollTranscript=+a,this.updateCookie("prefAutoScrollTranscript"),this.refreshControls()},AblePlayer.prototype.showTooltip=function(a){a.is(":animated")?a.stop(!0,!0).show().delay(4e3).fadeOut(1e3):a.stop().show().delay(4e3).fadeOut(1e3)},AblePlayer.prototype.showAlert=function(a,b){var c,d,e,f,g;c=this,"transcript"===b?(d=this.$transcriptAlert,e=this.$transcriptArea):"sign"===b?(d=this.$signAlert,e=this.$signWindow):d="screenreader"===b?this.$srAlertBox:this.$alertBox,d.show(),d.text(a),"transcript"==b||"sign"===b?(f=e.width()>d.width()?e.width()/2-d.width()/2:10,"sign"===b?g=e.height()/3*2:"transcript"===b&&(g=this.$transcriptToolbar.height()+30),d.css({top:g+"px",left:f+"px"})):"screenreader"!==b&&d.css({left:this.$playerDiv.width()/2-d.width()/2}),"screenreader"!==b&&setTimeout(function(){d.fadeOut(300)},3e3)},AblePlayer.prototype.showedAlert=function(a){return"transcript"===a?this.showedTranscriptAlert?!0:!1:"sign"===a&&this.showedSignAlert?!0:!1},AblePlayer.prototype.resizePlayer=function(a,b){var c,d,e,f,g,h;this.isFullscreen()?("undefined"!=typeof this.$vidcapContainer&&(this.$ableWrapper.css({width:a+"px","max-width":""}),this.$vidcapContainer.css({height:b+"px",width:a}),this.$media.css({height:b+"px",width:a})),"undefined"!=typeof this.$transcriptArea&&this.retrieveOffscreenWindow("transcript",a,b),"undefined"!=typeof this.$signWindow&&this.retrieveOffscreenWindow("sign",a,b)):this.restoringAfterFullScreen&&(a=this.preFullScreenWidth,b=this.preFullScreenHeight,this.restoringAfterFullScreen=!1,this.$ableWrapper.css({"max-width":a+"px",width:""}),"undefined"!=typeof this.$vidcapContainer&&this.$vidcapContainer.css({height:"",width:""}),this.$media.css({width:"100%",height:"auto"})),"youtube"===this.player&&this.youTubePlayer?this.youTubePlayer.setSize(a,b):"jw"===this.player&&this.jwPlayer&&("audio"===this.mediaType?this.jwPlayer.resize(a,0):this.jwPlayer.resize(a,c)),"undefined"!=typeof this.$captionsDiv&&(d=400,e=1e3,f=parseInt(this.prefCaptionsSize,10),g=a>e?1.5*f:d>a?f/1.5:f,h=g+25,this.$captionsDiv.css("font-size",g+"%"),this.$captionsWrapper.css("line-height",h+"%")),this.refreshControls()},AblePlayer.prototype.retrieveOffscreenWindow=function(a,b,c){var d,e,f,g,h,i,j,k;"transcript"==a?d=this.$transcriptArea:"sign"==a&&(d=this.$signWindow),i=d.width(),k=d.height(),e=d.position(),f=e.top,g=e.left,h=g+i,j=f+k,0>f&&(f=10,d.css("top",f)),0>g&&(g=10,d.css("left",g)),h>b&&(g=b-20-i,d.css("left",g)),j>c&&(f=c-10-k,d.css("top",f))},AblePlayer.prototype.getHighestZIndex=function(){var b,c,d;return b=0,c=a("body *").not(".able-modal-dialog,.able-modal-dialog *,.able-modal-overlay,.able-modal-overlay *"),c.each(function(){d=a(this).css("z-index"),Number.isInteger(+d)&&parseInt(d)>b&&(b=parseInt(d))}),b},AblePlayer.prototype.updateZIndex=function(a){var b,c,d,e;if("undefined"==typeof this.$transcriptArea||"undefined"==typeof this.$signWindow)return!1;if(b=parseInt(this.$transcriptArea.css("z-index")),c=parseInt(this.$signWindow.css("z-index")),b===c)d=b+1e3,e=b;else if(b>c){if("transcript"===a)return!1;d=b,e=c}else{if("sign"===a)return!1;d=c,e=b}"transcript"===a?(this.$transcriptArea.css("z-index",d),this.$signWindow.css("z-index",e)):"sign"===a&&(this.$signWindow.css("z-index",d),this.$transcriptArea.css("z-index",e))},AblePlayer.prototype.syncTrackLanguages=function(a,b){var c,d,e,f,g;for(c=0;c<this.captions.length;c++)this.captions[c].language===b&&(d=this.captions[c]);for(c=0;c<this.chapters.length;c++)this.chapters[c].language===b&&(f=this.chapters[c]);for(c=0;c<this.descriptions.length;c++)this.descriptions[c].language===b&&(e=this.descriptions[c]);for(c=0;c<this.meta.length;c++)this.meta[c].language===b&&(g=this.meta[c]);this.transcriptLang=b,"init"===a||"captions"===a?(this.captionLang=b,this.selectedCaptions=d,this.selectedChapters=f,this.selectedDescriptions=e,this.selectedMeta=g,this.transcriptCaptions=d,this.transcriptChapters=f,this.transcriptDescriptions=e,this.updateChaptersList(),this.setupPopups("chapters")):"transcript"===a&&(this.transcriptCaptions=d,this.transcriptChapters=f,this.transcriptDescriptions=e),this.updateTranscript()}}(jQuery),function(a){AblePlayer.prototype.updateCaption=function(a){this.usingYouTubeCaptions||"undefined"==typeof this.$captionsWrapper||(this.captionsOn?(this.$captionsWrapper.show(),this.showCaptions(a||this.getElapsed())):this.$captionsWrapper&&(this.$captionsWrapper.hide(),this.prefCaptions=0))},AblePlayer.prototype.getCaptionClickFunction=function(a){var b=this;return function(){b.selectedCaptions=a,b.captionLang=a.language,b.currentCaption=-1,b.usingYouTubeCaptions?b.captionsOn?"undefined"!=typeof b.ytCaptionModule&&b.youTubePlayer.setOption(b.ytCaptionModule,"track",{languageCode:b.captionLang}):(b.resettingYouTubeCaptions=!0,b.youTubePlayer.loadModule(b.ytCaptionModule)):(b.syncTrackLanguages("captions",b.captionLang),this.swappingSrc||(b.updateCaption(),b.showDescription(b.getElapsed()))),b.captionsOn=!0,b.hidingPopup=!0,b.captionsPopup.hide(),setTimeout(function(){b.hidingPopup=!1},100),b.$ccButton.focus(),b.prefCaptions=1,b.updateCookie("prefCaptions"),b.refreshControls()}},AblePlayer.prototype.getCaptionOffFunction=function(){var a=this;return function(){"youtube"==a.player&&a.youTubePlayer.unloadModule(a.ytCaptionModule),a.captionsOn=!1,a.currentCaption=-1,a.hidingPopup=!0,a.captionsPopup.hide(),setTimeout(function(){a.hidingPopup=!1},100),a.$ccButton.focus(),a.prefCaptions=0,a.updateCookie("prefCaptions"),this.swappingSrc||(a.refreshControls(),a.updateCaption())}},AblePlayer.prototype.showCaptions=function(a){var b,c,d,e;for(e=this.selectedCaptions?this.selectedCaptions.cues:this.captions.length>=1?this.captions[0].cues:[],b=0;b<e.length;b++)if(e[b].start<=a&&e[b].end>a){c=b;break}"undefined"!=typeof c?this.currentCaption!==c&&(d=this.flattenCueForCaption(e[c]).replace("\n","<br>"),this.$captionsDiv.html(d),this.currentCaption=c,0===d.length?this.$captionsDiv.css("display","none"):this.$captionsDiv.css("display","inline-block")):(this.$captionsDiv.html(""),this.currentCaption=-1)},AblePlayer.prototype.flattenCueForCaption=function(a){var b=[],c=function(a){var b,d=[];if("string"===a.type)d.push(a.value);else if("v"===a.type)for(d.push("("+a.value+")"),b=0;b<a.children.length;b++)d.push(c(a.children[b]));else if("i"===a.type){for(d.push("<em>"),b=0;b<a.children.length;b++)d.push(c(a.children[b]));d.push("</em>")}else if("b"===a.type){for(d.push("<strong>"),b=0;b<a.children.length;b++)d.push(c(a.children[b]));d.push("</strong>")}else for(b=0;b<a.children.length;b++)d.push(c(a.children[b]));return d.join("")};if("undefined"!=typeof a.components)for(var d=0;d<a.components.children.length;d++)b.push(c(a.components.children[d]));return b.join("")},AblePlayer.prototype.getCaptionsOptions=function(a){var b=[];switch(a){case"prefCaptionsFont":b[0]=this.tt.serif,b[1]=this.tt.sans,b[3]=this.tt.cursive,b[4]=this.tt.fantasy,b[2]=this.tt.monospace;break;case"prefCaptionsColor":case"prefCaptionsBGColor":b[0]=["white",this.tt.white],b[1]=["yellow",this.tt.yellow],b[2]=["green",this.tt.green],b[3]=["cyan",this.tt.cyan],b[4]=["blue",this.tt.blue],b[5]=["magenta",this.tt.magenta],b[6]=["red",this.tt.red],b[7]=["black",this.tt.black];break;case"prefCaptionsSize":b[0]="75%",b[1]="100%",b[2]="125%",b[3]="150%",b[4]="200%";break;case"prefCaptionsOpacity":b[0]="0%",b[1]="25%",b[2]="50%",b[3]="75%",b[4]="100%";break;case"prefCaptionsStyle":b[0]=this.tt.captionsStylePopOn,b[1]=this.tt.captionsStyleRollUp;break;case"prefCaptionsPosition":b[0]="overlay",b[1]="below"}return b},AblePlayer.prototype.translatePrefs=function(a,b,c){if("youtube"==c&&"size"===a)switch(b){case"75%":return-1;case"100%":return 0;case"125%":return 1;case"150%":return 2;case"200%":return 3}return!1},AblePlayer.prototype.stylizeCaptions=function(b,c){var d,e,f,g;"undefined"!=typeof b&&("prefCaptionsPosition"==c?this.positionCaptions():"undefined"!=typeof c?("prefCaptionsFont"===c?d="font-family":"prefCaptionsSize"===c?d="font-size":"prefCaptionsColor"===c?d="color":"prefCaptionsBGColor"===c?d="background-color":"prefCaptionsOpacity"===c&&(d="opacity"),e="prefCaptionsOpacity"===c?parseFloat(a("#"+this.mediaId+"_"+c).val())/100:a("#"+this.mediaId+"_"+c).val(),b.css(d,e)):(f=parseFloat(this.prefCaptionsOpacity)/100,b.css({"font-family":this.prefCaptionsFont,"font-size":this.prefCaptionsSize,color:this.prefCaptionsColor,"background-color":this.prefCaptionsBGColor,opacity:f}),b===this.$captionsDiv&&"undefined"!=typeof this.$captionsWrapper&&(g=parseInt(this.prefCaptionsSize,10)+25,this.$captionsWrapper.css("line-height",g+"%")),"below"===this.prefCaptionsPosition?"undefined"!=typeof this.$captionsWrapper&&this.$captionsWrapper.css({
|
|
7
|
+
"background-color":this.prefCaptionsBGColor,opacity:"1"}):"overlay"===this.prefCaptionsPosition&&"undefined"!=typeof this.$captionsWrapper&&this.$captionsWrapper.css({"background-color":"transparent",opacity:""}),this.positionCaptions()))},AblePlayer.prototype.positionCaptions=function(a){"undefined"==typeof a&&(a=this.prefCaptionsPosition),"undefined"!=typeof this.$captionsWrapper&&("below"==a?(this.$captionsWrapper.removeClass("able-captions-overlay").addClass("able-captions-below"),this.$captionsWrapper.css({"background-color":this.prefCaptionsBGColor,opacity:"1"})):(this.$captionsWrapper.removeClass("able-captions-below").addClass("able-captions-overlay"),this.$captionsWrapper.css({"background-color":"transparent",opacity:""})))}}(jQuery),function(a){AblePlayer.prototype.populateChaptersDiv=function(){var b,c,d,e;a("#"+this.chaptersDivLocation)&&(this.$chaptersDiv=a("#"+this.chaptersDivLocation),this.$chaptersDiv.addClass("able-chapters-div"),this.chaptersTitle&&(b=this.getNextHeadingLevel(this.$chaptersDiv),c="h"+b.toString(),d=this.mediaId+"-chapters-heading",e=a("<"+c+">",{"class":"able-chapters-heading",id:d}).text(this.chaptersTitle),this.$chaptersDiv.append(e)),this.$chaptersNav=a("<nav>"),this.chaptersTitle?this.$chaptersNav.attr("aria-labelledby",d):this.$chaptersNav.attr("aria-label",this.tt.chapters),this.$chaptersDiv.append(this.$chaptersNav),this.updateChaptersList())},AblePlayer.prototype.updateChaptersList=function(){var b,c,d,e,f,g,h,i,j,k,d,l;if(b=this,!this.$chaptersNav)return!1;if("undefined"==typeof this.useChapterTimes&&("chapter"===this.seekbarScope&&this.selectedChapters.cues.length?this.useChapterTimes=!0:this.useChapterTimes=!1),c=this.useChapterTimes?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[],c.length>0){for(d=a("<ul>"),e=0;e<c.length;e++)f=e,g=a("<li></li>"),h=a("<button>",{type:"button",val:f}).text(this.flattenCueForCaption(c[f])),j=function(c){return function(){k=a(this).closest("li"),d=a(this).closest("ul").find("li"),l=d.index(k),d.removeClass("able-current-chapter").attr("aria-selected",""),k.addClass("able-current-chapter").attr("aria-selected","true"),b.updateChapter(c),b.seekTo(c)}},h.on("click",j(c[f].start)),h.on("focus",function(){a(this).closest("ul").find("li").removeClass("able-focus"),a(this).closest("li").addClass("able-focus")}),g.on("hover",function(){a(this).closest("ul").find("li").removeClass("able-focus"),a(this).addClass("able-focus")}),g.on("mouseleave",function(){a(this).removeClass("able-focus")}),h.on("blur",function(){a(this).closest("li").removeClass("able-focus")}),g.append(h),d.append(g),this.defaultChapter===c[f].id&&(h.attr("aria-selected","true").parent("li").addClass("able-current-chapter"),this.currentChapter=c[f],i=!0);i||(this.currentChapter=c[0],d.find("button").first().attr("aria-selected","true").parent("li").addClass("able-current-chapter")),this.$chaptersNav.html(d)}return!1},AblePlayer.prototype.seekToChapter=function(a){for(var b=0;b<this.selectedChapters.cues.length;){if(this.selectedChapters.cues[b].id==a){this.seekTo(this.selectedChapters.cues[b].start),this.updateChapter(this.selectedChapters.cues[b].start);break}b++}},AblePlayer.prototype.updateChapter=function(a){if("undefined"!=typeof this.selectedChapters){var b,c,d;for(b=this.selectedChapters.cues,c=0;c<b.length;c++)if(b[c].start<=a&&b[c].end>a){d=c;break}"undefined"!=typeof d&&this.currentChapter!==b[d]&&(this.currentChapter=b[d],this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.seekIntervalCalculated=!1),"undefined"!=typeof this.$chaptersDiv&&(this.$chaptersDiv.find("ul").find("li").removeClass("able-current-chapter").attr("aria-selected",""),this.$chaptersDiv.find("ul").find("li").eq(d).addClass("able-current-chapter").attr("aria-selected","true")))}},AblePlayer.prototype.getChapterDuration=function(){var a,b,c;return"undefined"==typeof this.currentChapter?0:(a=this.getDuration(),b=this.selectedChapters.cues.length-1,this.selectedChapters.cues[b]==this.currentChapter&&this.currentChapter.end!==a?(c=a,this.currentChapter.end=a):c=this.currentChapter.end,c-this.currentChapter.start)},AblePlayer.prototype.getChapterElapsed=function(){if("undefined"==typeof this.currentChapter)return 0;var a=(this.getDuration(),this.getElapsed());return a>this.currentChapter.start?a-this.currentChapter.start:0},AblePlayer.prototype.convertChapterTimeToVideoTime=function(a){if("undefined"!=typeof this.currentChapter){var b=this.currentChapter.start+a;return b>this.currentChapter.end?this.currentChapter.end:b}return a}}(jQuery),function(a){AblePlayer.prototype.updateMeta=function(a){this.hasMeta&&("text"===this.metaType?(this.$metaDiv.show(),this.showMeta(a||this.getElapsed())):this.showMeta(a||this.getElapsed()))},AblePlayer.prototype.showMeta=function(b){var c,d,e,f,g,h,i,j,k,l;for(c=[],f=this.meta.length>=1?this.meta:[],d=0;d<f.length;d++)if(f[d].start<=b&&f[d].end>b){e=d;break}if("undefined"!=typeof e){if(this.currentMeta!==e){if("text"===this.metaType)this.$metaDiv.html(this.flattenCueForMeta(f[e]).replace("\n","<br>"));else if("selector"===this.metaType){for(g=this.flattenCueForMeta(f[e]),h=g.split("\n"),i=0;i<h.length;i++)j=a.trim(h[i]),"pause"===j.toLowerCase().trim()?(this.hideBigPlayButton=!0,this.pauseMedia()):"focus:"==j.toLowerCase().substring(0,6)?(l=j.substring(6).trim(),a(l).length&&a(l).focus()):a(j).length&&(k=parseInt(a(j).attr("data-duration")),"undefined"==typeof k||isNaN(k)?a(j).show():a(j).show().delay(k).fadeOut(),this.visibleSelectors.push(j),c.push(j));if(this.visibleSelectors&&this.visibleSelectors.length&&this.visibleSelectors.length!==c.length)for(i=this.visibleSelectors.length-1;i>=0;i--)-1==a.inArray(this.visibleSelectors[i],c)&&(a(this.visibleSelectors[i]).hide(),this.visibleSelectors.splice(i,1))}this.currentMeta=e}}else{if("undefined"!=typeof this.$metaDiv&&this.$metaDiv.html(""),this.visibleSelectors&&this.visibleSelectors.length){for(i=0;i<this.visibleSelectors.length;i++)a(this.visibleSelectors[i]).hide();this.visibleSelectors=[]}this.currentMeta=-1}},AblePlayer.prototype.flattenCueForMeta=function(a){for(var b=[],c=function(a){var b,d=[];if("string"===a.type)d.push(a.value);else if("v"===a.type)for(d.push("["+a.value+"]"),b=0;b<a.children.length;b++)d.push(c(a.children[b]));else for(b=0;b<a.children.length;b++)d.push(c(a.children[b]));return d.join("")},d=0;d<a.components.children.length;d++)b.push(c(a.components.children[d]));return b.join("")}}(jQuery),function(a){AblePlayer.prototype.injectTranscriptArea=function(){this.$transcriptArea=a("<div>",{"class":"able-transcript-area",tabindex:"-1"}),this.$transcriptToolbar=a("<div>",{"class":"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$transcriptDiv=a("<div>",{"class":"able-transcript"}),this.$autoScrollTranscriptCheckbox=a('<input id="autoscroll-transcript-checkbox" type="checkbox">'),this.$transcriptToolbar.append(a('<label for="autoscroll-transcript-checkbox">'+this.tt.autoScroll+": </label>"),this.$autoScrollTranscriptCheckbox),this.$transcriptLanguageSelect=a('<select id="transcript-language-select">'),this.$unknownTranscriptOption=a('<option val="unknown">'+this.tt.unknown+"</option>"),this.$transcriptLanguageSelect.append(this.$unknownTranscriptOption),this.$transcriptLanguageSelect.prop("disabled",!0);var b=a('<div class="transcript-language-select-wrapper">');this.$transcriptLanguageSelectContainer=b,b.append(a('<label for="transcript-language-select">'+this.tt.language+": </label>"),this.$transcriptLanguageSelect),this.$transcriptToolbar.append(b),this.$transcriptArea.append(this.$transcriptToolbar,this.$transcriptDiv),this.transcriptDivLocation?a("#"+this.transcriptDivLocation).append(this.$transcriptArea):this.$ableWrapper.append(this.$transcriptArea),this.transcriptDivLocation||(this.initDragDrop("transcript"),1===this.prefTranscript&&this.positionDraggableWindow("transcript",this.getDefaultWidth("transcript"))),this.prefTranscript||this.transcriptDivLocation||this.$transcriptArea.hide()},AblePlayer.prototype.addTranscriptAreaEvents=function(){var a=this;this.$autoScrollTranscriptCheckbox.click(function(){a.handleTranscriptLockToggle(a.$autoScrollTranscriptCheckbox.prop("checked"))}),this.$transcriptDiv.bind("mousewheel DOMMouseScroll click scroll",function(b){a.scrollingTranscript||(a.autoScrollTranscript=!1,a.refreshControls()),a.scrollingTranscript=!1}),"undefined"!=typeof this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.on("click mousedown",function(a){a.stopPropagation()}),this.$transcriptLanguageSelect.on("change",function(){var b=a.$transcriptLanguageSelect.val();a.syncTrackLanguages("transcript",b)}))},AblePlayer.prototype.transcriptSrcHasRequiredParts=function(){return a("#"+this.transcriptSrc).length&&(this.$transcriptArea=a("#"+this.transcriptSrc),this.$transcriptArea.find(".able-window-toolbar").length&&(this.$transcriptToolbar=this.$transcriptArea.find(".able-window-toolbar").eq(0),this.$transcriptArea.find(".able-transcript").length&&(this.$transcriptDiv=this.$transcriptArea.find(".able-transcript").eq(0),this.$transcriptArea.find(".able-transcript-seekpoint").length)))?(this.$transcriptSeekpoints=this.$transcriptArea.find(".able-transcript-seekpoint"),!0):!1},AblePlayer.prototype.setupManualTranscript=function(){this.$autoScrollTranscriptCheckbox=a('<input id="autoscroll-transcript-checkbox" type="checkbox">'),this.$transcriptToolbar.append(a('<label for="autoscroll-transcript-checkbox">'+this.tt.autoScroll+": </label>"),this.$autoScrollTranscriptCheckbox)},AblePlayer.prototype.updateTranscript=function(){if(this.transcriptType){if("external"===this.transcriptType||"popup"===this.transcriptType){var b,c,d;if(this.transcriptLang?c=this.transcriptCaptions.cues:this.transcriptCaptions?(this.transcriptLang=this.transcriptCaptions.language,c=this.transcriptCaptions.cues):this.selectedCaptions&&(this.transcriptLang=this.captionLang,c=this.selectedCaptions.cues),this.transcriptChapters)b=this.transcriptChapters.cues;else if(this.chapters.length>0){if(this.transcriptLang)for(var e=0;e<this.chapters.length;e++)this.chapters[e].language===this.transcriptLang&&(b=this.chapters[e].cues);"undefined"==typeof b&&(b=this.chapters[0].cues||[])}if(this.transcriptDescriptions)d=this.transcriptDescriptions.cues;else if(this.descriptions.length>0){if(this.transcriptLang)for(var e=0;e<this.descriptions.length;e++)this.descriptions[e].language===this.transcriptLang&&(d=this.descriptions[e].cues);d||(d=this.descriptions[0].cues||[])}var f=this.generateTranscript(b||[],c||[],d||[]);this.$transcriptDiv.html(f),this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.find("option:selected").prop("selected",!1),this.$transcriptLanguageSelect.find("option[lang="+this.transcriptLang+"]").prop("selected",!0))}var g=this;1===this.prefTabbable&&a(".able-transcript span.able-transcript-seekpoint").attr("tabindex","0"),this.$transcriptArea.length>0&&this.$transcriptArea.find("span.able-transcript-seekpoint").click(function(b){var c=parseFloat(a(this).attr("data-start"));c+=.01,g.seekTo(c)})}},AblePlayer.prototype.highlightTranscript=function(b){if(this.transcriptType){var c,d,e=this;b=parseFloat(b),this.$transcriptArea.find("span.able-transcript-caption").each(function(){return c=parseFloat(a(this).attr("data-start")),d=parseFloat(a(this).attr("data-end")),b>=c&&d>=b?(e.$transcriptArea.find(".able-highlight").removeClass("able-highlight"),a(this).addClass("able-highlight"),!1):void 0}),e.currentHighlight=a(".able-highlight"),0===e.currentHighlight.length&&(e.currentHighlight=null)}},AblePlayer.prototype.generateTranscript=function(b,c,d){var e,f=this,g=a('<div class="able-transcript-container"></div>');if(g.attr("lang",this.transcriptLang),e="undefined"!=typeof this.transcriptTitle?this.transcriptTitle:this.lyricsMode?this.tt.lyricsTitle:this.tt.transcriptTitle,"undefined"==typeof this.transcriptDivLocation){var h=this.playerHeadingLevel;h+=1;var i=h+1;if(6>=h)var j="h"+h.toString();else var j="div";var k=a("<"+j+">");k.addClass("able-transcript-heading"),h>6&&k.attr({role:"heading","aria-level":h}),k.text(e),k.attr("lang",this.lang),g.append(k)}for(var l=0,m=0,n=0,o=function(b,c){if(6>=i)var d="h"+i.toString();else var d="div";var e=a("<"+d+">",{"class":"able-transcript-chapter-heading"});i>6&&e.attr({role:"heading","aria-level":i});for(var f=function(a){var b=[];if("string"===a.type)b.push(a.value);else for(var c=0;c<a.children.length;c++)b=b.concat(f(a.children[c]));return b},g=a("<span>",{"class":"able-transcript-seekpoint"}),h=0;h<c.components.children.length;h++)for(var j=f(c.components.children[h]),k=0;k<j.length;k++)g.append(j[k]);g.attr("data-start",c.start.toString()),g.attr("data-end",c.end.toString()),e.append(g),b.append(e)},p=function(b,c){var d=a("<div>",{"class":"able-transcript-desc"}),e=a("<span>",{"class":"able-hidden"});e.attr("lang",f.lang),e.text(f.tt.prefHeadingDescription+": "),d.append(e);for(var g=function(a){var b=[];if("string"===a.type)b.push(a.value);else for(var c=0;c<a.children.length;c++)b=b.concat(g(a.children[c]));return b},h=a("<span>",{"class":"able-transcript-seekpoint"}),i=0;i<c.components.children.length;i++)for(var j=g(c.components.children[i]),k=0;k<j.length;k++)h.append(j[k]);h.attr("data-start",c.start.toString()),h.attr("data-end",c.end.toString()),d.append(h),b.append(d)},q=function(b,c){for(var d=a("<span>",{"class":"able-transcript-seekpoint able-transcript-caption"}),e=function(b){var c=[],d=function(b){var c=[];if(""===b)return c;var e=b.indexOf("["),f=b.indexOf("]"),g=b.indexOf("("),h=b.indexOf(")"),i=-1!==e&&-1!==f,j=-1!==g&&-1!==h;if(j&&i&&g>e||i){c=c.concat(d(b.substring(0,e)));var k=a("<span>",{"class":"able-unspoken"});k.text(b.substring(e,f+1)),c.push(k),c=c.concat(d(b.substring(g,h+1)))}else if(j){c=c.concat(d(b.substring(0,g)));var k=a("<span>",{"class":"able-unspoken"});k.text(b.substring(e,f+1)),c.push(k),c=c.concat(d(b.substring(h+1)))}else c.push(b);return c};if("string"===b.type)c=c.concat(d(b.value));else if("v"===b.type){var f=a("<span>",{"class":"able-unspoken"});f.text("("+b.value+")"),c.push(f);for(var g=0;g<b.children.length;g++)for(var h=e(b.children[g]),i=0;i<h.length;i++)c.push(h[i])}else if("b"===b.type||"i"===b.type){if("b"===b.type)var j=a("<strong>");else if("i"===b.type)var j=a("<em>");for(var g=0;g<b.children.length;g++)for(var h=e(b.children[g]),i=0;i<h.length;i++)j.append(h[i]);("b"===b.type||"i"==b.type)&&c.push(j," ")}else for(var g=0;g<b.children.length;g++)c=c.concat(e(b.children[g]));return c},g=0;g<c.components.children.length;g++)for(var h=e(c.components.children[g]),i=0;i<h.length;i++){var j=h[i];"string"==typeof j&&(f.lyricsMode?j=j.replace("\n","<br>")+"<br>":j+=" "),d.append(j)}d.attr("data-start",c.start.toString()),d.attr("data-end",c.end.toString()),b.append(d),b.append(" \n")};l<b.length||n<d.length||m<c.length;){if(l<b.length&&n<d.length&&m<c.length)var r=Math.min(b[l].start,d[n].start,c[m].start);else if(l<b.length&&n<d.length)var r=Math.min(b[l].start,d[n].start);else if(l<b.length&&m<c.length)var r=Math.min(b[l].start,c[m].start);else if(n<d.length&&m<c.length)var r=Math.min(d[n].start,c[m].start);else var r=null;null!==r?"undefined"!=typeof b[l]&&b[l].start===r?(o(g,b[l]),l+=1):"undefined"!=typeof d[n]&&d[n].start===r?(p(g,d[n]),n+=1):(q(g,c[m]),m+=1):l<b.length?(o(g,b[l]),l+=1):n<d.length?(p(g,d[n]),n+=1):m<c.length&&(q(g,c[m]),m+=1)}var s=g.children(),t=0;return s.each(function(){a(this).hasClass("able-transcript-caption")?((-1!==a(this).text().indexOf("[")||-1!==a(this).text().indexOf("("))&&t>0&&(g.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),t=0),a(this).addClass("able-block-temp"),t++):t>0&&(g.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),t=0)}),g}}(jQuery),function(a){AblePlayer.prototype.showSearchResults=function(){var b=this;if(this.searchDiv&&this.searchString&&a("#"+this.SearchDiv)){var c=this.searchFor(this.searchString);if(c.length>0){var d=a("<p>",{"class":"able-search-results-summary"}),e="Found <strong>"+c.length+"</strong> matching items. ";e+="Click the time associated with any item ",e+="to play the video from that point.",d.html(e);for(var f=a("<ul>"),g=0;g<c.length;g++){var h=a("<li>",{}),i=this.secondsToTime(c[g].start),j=a("<span>",{"class":"able-search-results-time","data-start":c[g].start,title:i.title,tabindex:"0"});j.text(i.value),j.click(function(c){var d=parseFloat(a(this).attr("data-start"));d+=.01,b.seeking=!0,b.seekTo(d)});var k=a("<span>",{"class":"able-search-result-text"});k.html("..."+c[g].caption+"..."),h.append(j,k),f.append(h)}a("#"+this.searchDiv).append(d,f)}else{var l=a("<p>").text("No results found.");a("#"+this.searchDiv).append(l)}}},AblePlayer.prototype.searchFor=function(b){var c,d,e,f,g,h,i,j=b.split(" ");if(this.captions.length>0&&(c=this.captions[0].language,d=this.captions[0].cues,d.length>0)){var e=[];for(g=0,h=0;h<d.length;h++)if(-1!==a.inArray(d[h].components.children[0].type,["string","i","b","u","v","c"]))for(f=this.flattenCueForCaption(d[h]),i=0;i<j.length;i++)if(-1!==f.indexOf(j[i])){e[g]=[],e[g].start=d[h].start,e[g].caption=this.highlightSearchTerm(j,i,f),g++;break}}return e},AblePlayer.prototype.highlightSearchTerm=function(a,b,c){var d,e,f,g,h,i,j;for(d=b;d<a.length;d++)e=a[d],f=c.indexOf(e),-1!==f&&(g=e.length,g>0?(h=c.substring(0,f),i='<span class="able-search-term">'+e+"</span>",j=c.substring(f+g),c=h+i+j):(h='<span class="able-search-term">'+e+"</span>",i=c.substring(f+g),c=h+i));return c},AblePlayer.prototype.secondsToTime=function(a){var a=Math.floor(a),b=parseInt(a/3600,10)%24,c=parseInt(a/60,10)%60,d=a%60,e="",f="";b>0&&(e+=b+":"),10>c?(e+="0"+c+":",c>0&&(f+=c+" minutes ")):(e+=c+":",f+=c+" minutes "),10>d?(e+="0"+d,d>0&&(f+=d+" seconds ")):(e+=d,f+=d+" seconds ");var g=[];return g.value=e,g.title=f,g}}(jQuery),function(a){AblePlayer.prototype.onMediaUpdateTime=function(){var a=this.getElapsed();this.swappingSrc&&"undefined"!=typeof this.swapTime?this.swapTime===a&&this.playing&&(this.playMedia(),this.swappingSrc=!1,this.swapTime=null):this.startedPlaying&&(1===this.prefHighlight&&this.highlightTranscript(a),this.updateCaption(),this.showDescription(a),this.updateChapter(a),this.updateMeta(),this.refreshControls())},AblePlayer.prototype.onMediaPause=function(){},AblePlayer.prototype.onMediaComplete=function(){this.hasPlaylist&&(this.playlistIndex===this.$playlist.length-1?this.loop&&(this.playlistIndex=0,this.swapSource(0)):(this.playlistIndex++,this.swapSource(this.playlistIndex))),this.refreshControls()},AblePlayer.prototype.onMediaNewSourceLoad=function(){if(this.swappingSrc===!0)if(this.swapTime>0)this.seekTo(this.swapTime);else{if(this.playing)if("jw"===this.player){var a=this.jwPlayer;setTimeout(function(){a.play(!0)},500)}else this.playMedia();this.swappingSrc=!1,this.refreshControls()}},AblePlayer.prototype.onWindowResize=function(){if(this.isFullscreen()){var b,c;b=a(window).width(),c=this.isUserAgent("Firefox")||this.isUserAgent("Trident")||this.isUserAgent("Edge")?window.innerHeight-this.$playerDiv.outerHeight()-20:window.outerHeight>=window.innerHeight?window.innerHeight-this.$playerDiv.outerHeight():window.outerHeight,this.$descDiv.is(":hidden")||(c-=this.$descDiv.height()),this.positionCaptions("overlay")}else this.restoringAfterFullScreen?(b=this.preFullScreenWidth,c=this.preFullScreenHeight):(b=this.$ableWrapper.width(),c="undefined"!=typeof this.aspectRatio?Math.round(b/this.aspectRatio):this.$ableWrapper.height(),this.positionCaptions());this.resizePlayer(b,c)},AblePlayer.prototype.addSeekbarListeners=function(){var a=this;this.seekBar.bodyDiv.on("startTracking",function(b){a.pausedBeforeTracking=a.isPaused(),a.pauseMedia()}).on("tracking",function(b,c){a.highlightTranscript(c),a.updateCaption(c),a.showDescription(c),a.updateChapter(a.convertChapterTimeToVideoTime(c)),a.updateMeta(c),a.refreshControls()}).on("stopTracking",function(b,c){a.useChapterTimes?a.seekTo(a.convertChapterTimeToVideoTime(c)):a.seekTo(c),a.pausedBeforeTracking||setTimeout(function(){a.playMedia()},200)})},AblePlayer.prototype.onClickPlayerButton=function(b){var c=a(b).attr("class").split(" ")[0].substr(20);"play"===c?this.handlePlay():"restart"===c?this.handleRestart():"rewind"===c?this.handleRewind():"forward"===c?this.handleFastForward():"mute"===c?this.handleMute():"volume"===c?this.handleVolume():"faster"===c?this.handleRateIncrease():"slower"===c?this.handleRateDecrease():"captions"===c?this.handleCaptionToggle():"chapters"===c?this.handleChapters():"descriptions"===c?this.handleDescriptionToggle():"sign"===c?this.handleSignToggle():"preferences"===c?this.handlePrefsClick():"help"===c?this.handleHelpClick():"transcript"===c?this.handleTranscriptToggle():"fullscreen"===c&&this.handleFullscreenToggle()},AblePlayer.prototype.okToHandleKeyPress=function(){var b=a(document.activeElement).prop("tagName");return"INPUT"===b?!1:!0},AblePlayer.prototype.onPlayerKeyPress=function(b){if(!this.okToHandleKeyPress())return!1;var c=b.which;if(c>=65&&90>=c&&(c+=32),27===c)this.closePopups();else if(32===c)a(".able-controller button").is(":focus")||this.handlePlay();else if(112===c)this.usingModifierKeys(b)&&this.handlePlay();else if(115===c)this.usingModifierKeys(b)&&this.handleRestart();else if(109===c)this.usingModifierKeys(b)&&this.handleMute();else if(118===c)this.usingModifierKeys(b)&&this.handleVolume();else if(c>=49&&57>=c)this.usingModifierKeys(b)&&this.handleVolume(c);else if(99===c)this.usingModifierKeys(b)&&this.handleCaptionToggle();else if(100===c)this.usingModifierKeys(b)&&this.handleDescriptionToggle();else if(102===c)this.usingModifierKeys(b)&&this.handleFastForward();else if(114===c)this.usingModifierKeys(b)&&this.handleRewind();else if(101===c)this.usingModifierKeys(b)&&this.handlePrefsClick();else if(13===c){var d=a(document.activeElement);"SPAN"===d.prop("tagName")?d.click():"LI"===d.prop("tagName")&&d.click()}},AblePlayer.prototype.addHtml5MediaListeners=function(){var a=this;this.$media.on("emptied",function(){}).on("loadedmetadata",function(){a.onMediaNewSourceLoad()}).on("canplay",function(){}).on("canplaythrough",function(){a.startedPlaying||(a.startTime?a.seeking?(a.seeking=!1,a.autoplay&&a.playMedia()):a.seekTo(a.startTime):a.defaultChapter&&"undefined"!=typeof a.selectedChapters?a.seekToChapter(a.defaultChapter):a.autoplay&&a.playMedia())}).on("playing",function(){a.playing=!0,a.refreshControls()}).on("ended",function(){a.onMediaComplete()}).on("progress",function(){a.refreshControls()}).on("waiting",function(){a.refreshControls()}).on("durationchange",function(){a.refreshControls()}).on("timeupdate",function(){a.onMediaUpdateTime()}).on("play",function(){a.debug}).on("pause",function(){a.onMediaPause()}).on("ratechange",function(){}).on("volumechange",function(){a.volume=a.getVolume(),a.debug}).on("error",function(){if(a.debug)switch(a.media.error.code){case 1:break;case 2:break;case 3:break;case 4:}})},AblePlayer.prototype.addJwMediaListeners=function(){var b=this;this.jwPlayer.onTime(function(){b.onMediaUpdateTime()}).onComplete(function(){b.onMediaComplete()}).onReady(function(){b.debug,a("#"+b.jwId).removeAttr("tabindex"),b.$fallbackWrapper=a("#"+b.mediaId+"_fallback_wrapper"),b.fallbackDefaultWidth=b.$fallbackWrapper.width(),b.fallbackDefaultHeight=b.$fallbackWrapper.height(),b.fallbackRatio=b.fallbackDefaultWidth/b.fallbackDefaultHeight,b.startTime>0&&!b.startedPlaying&&(b.seekTo(b.startTime),b.startedPlaying=!0),b.refreshControls()}).onSeek(function(a){b.debug&&console.log("Seeking to "+a.position+"; target: "+a.offset),b.jwSeekPause&&(b.jwSeekPause=!1,b.playMedia()),setTimeout(function(){b.refreshControls()},300)}).onPlay(function(){b.debug,b.refreshControls()}).onPause(function(){b.onMediaPause()}).onBuffer(function(){b.debug,b.refreshControls()}).onBufferChange(function(){b.refreshControls()}).onIdle(function(a){b.debug,b.refreshControls()}).onMeta(function(){b.debug}).onPlaylist(function(){b.debug,b.onMediaNewSourceLoad()})},AblePlayer.prototype.addEventListeners=function(){var b;b=this,a(window).resize(function(){b.onWindowResize()});var c=this.$ableDiv[0],d=new MutationObserver(function(a){a.forEach(function(a){"attributes"===a.type&&"style"===a.attributeName&&b.$ableDiv.is(":visible")&&b.refreshControls()})}),e={attributes:!0,childList:!0,characterData:!0};d.observe(c,e),this.addSeekbarListeners(),this.$controllerDiv.find("button").on("click",function(){b.onClickPlayerButton(this)}),this.$ableDiv.keydown(function(a){AblePlayer.nextIndex>1&&b.onPlayerKeyPress(a)}),this.$transcriptArea&&this.$transcriptArea.keydown(function(a){AblePlayer.nextIndex>1&&b.onPlayerKeyPress(a)}),this.$playlist&&this.$playlist.click(function(){b.playlistIndex=a(this).index(),b.swapSource(b.playlistIndex)}),this.$media.click(function(){b.handlePlay()}),"html5"===this.player?this.addHtml5MediaListeners():"jw"===this.player?this.addJwMediaListeners():"youtube"===this.player&&setInterval(function(){b.onMediaUpdateTime()},300)}}(jQuery),function(a){AblePlayer.prototype.initDragDrop=function(b){var c,d,e,f,g,h;c=this,"transcript"===b?(d=this.$transcriptArea,f="transcript-window",e=this.$transcriptToolbar):"sign"===b&&(d=this.$signWindow,f="sign-window",e=this.$signToolbar),e.addClass("able-draggable"),g=a("<div>",{"class":"able-resizable"}),h=parseInt(d.css("z-index"))+100,g.css("z-index",h),d.append(g),e.on("mousedown",function(a){return a.stopPropagation(),c.windowMenuClickRegistered||(c.windowMenuClickRegistered=!0,c.startMouseX=a.pageX,c.startMouseY=a.pageY,c.dragDevice="mouse",c.startDrag(b,d)),!1}),e.on("mouseup",function(a){return a.stopPropagation(),c.dragging&&"mouse"===c.dragDevice&&c.endDrag(b),!1}),g.on("mousedown",function(a){return a.stopPropagation(),c.windowMenuClickRegistered?void 0:(c.windowMenuClickRegistered=!0,c.startMouseX=a.pageX,c.startMouseY=a.pageY,c.startResize(b,d),!1)}),g.on("mouseup",function(a){return a.stopPropagation(),c.resizing&&c.endResize(b),!1}),d.on("click",function(){c.windowMenuClickRegistered||c.finishingDrag||c.updateZIndex(b),c.finishingDrag=!1}),this.addWindowMenu(b,d,f)},AblePlayer.prototype.addWindowMenu=function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;for(e=this,this.windowMenuClickRegistered=!1,this.finishingDrag=!1,f=a('<div role="alert"></div>'),f.addClass("able-alert"),f.appendTo(this.$activeWindow),f.css({top:c.offset().top}),g=a("<button>",{type:"button",tabindex:"0","aria-label":this.tt.windowButtonLabel,"class":"able-button-handler-preferences"}),"font"===this.iconType?(h=a("<span>",{"class":"icon-preferences","aria-hidden":"true"}),g.append(h)):(i=this.rootPath+"button-icons/"+this.toolbarIconColor+"/preferences.png",j=a("<img>",{src:i,alt:"",role:"presentation"}),g.append(j)),k=a("<span>",{"class":"able-clipped"}).text(this.tt.windowButtonLabel),g.append(k),l=this.mediaId+"-"+d+"-tooltip",m=a("<div>",{"class":"able-tooltip",id:l}),g.on("mouseenter focus",function(b){var c=a(this).attr("aria-label"),d=a(this).position(),f=a(this).height(),g=(a(this).width(),d.top-f-5),h=0,i={left:"",right:h+"px",top:g+"px"},j=a("#"+l).text(c).css(i);e.showTooltip(j),a(this).on("mouseleave blur",function(){a("#"+l).text("").hide()})}),n=this.createPopup(d),o=a("<ul></ul>"),p=this.mediaId+"-"+d+"-choice",q=[],q.push({name:"move",label:this.tt.windowMove}),q.push({name:"resize",label:this.tt.windowResize}),r=0;r<q.length;r++)s=a("<li></li>"),t=q[r],u=p+"-"+r,v=a("<input>",{type:"radio",val:t.name,name:p,id:u}),w=a("<label>",{"for":u}),w.text(t.label),v.on("focus",function(b){a(this).parents("ul").children("li").removeClass("able-focus"),a(this).parent("li").addClass("able-focus")}),v.on("click",function(c){c.stopPropagation(),e.windowMenuClickRegistered||e.finishingDrag||(e.windowMenuClickRegistered=!0,e.handleMenuChoice(b,a(this).val(),c.type))}),w.on("click mousedown",function(){var b=a(this).attr("for");a("#"+b).click()}),s.append(v,w),o.append(s);n.append(o),g.on("click mousedown keydown",function(a){a.stopPropagation(),e.windowMenuClickRegistered||e.finishingDrag||e.handleWindowButtonClick(b,a),e.finishingDrag=!1}),n.on("keydown",function(a){27===a.which&&(g.focus(),n.hide())}),"transcript"===b?(this.$transcriptAlert=f,this.$transcriptPopupButton=g,this.$transcriptPopup=n,this.$transcriptToolbar.append(f,g,m,n)):"sign"===b&&(this.$signAlert=f,this.$signPopupButton=g,this.$signPopup=n,this.$signToolbar.append(f,g,m,n)),this.addResizeDialog(b,c)},AblePlayer.prototype.addResizeDialog=function(b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this,"transcript"===b?(e=this.$transcriptPopup,f=this.$transcriptPopupButton):"sign"===b&&(e=this.$signPopup,f=this.$signPopupButton),g=this.mediaId+"-resize-"+b+"-width",h=this.mediaId+"-resize-"+b+"-height",i=c.width(),j=c.height(),k=i/j,l=a("<div></div>",{"class":"able-resize-form"}),m=a("<div></div>"),n=a("<div></div>"),o=a("<input>",{type:"text",id:g,value:i}),p=a("<label>",{"for":g}).text(this.tt.width),q=a("<div></div>"),r=a("<input>",{type:"text",id:h,value:j}),s=a("<label>",{"for":h}).text(this.tt.height),"sign"===b&&(r.prop("readonly",!0),o.on("input",function(){t=a(this).val(),u=Math.round(t/k,0),r.val(u)})),v=a('<button class="modal-button">'+this.tt.save+"</button>"),w=a('<button class="modal-button">'+this.tt.cancel+"</button>"),v.on("click",function(){x=a("#"+g).val(),y=a("#"+h).val(),(x!==i||y!==j)&&(c.css({width:x+"px",height:y+"px"}),d.updateCookie(b)),z.hide(),e.hide(),f.focus()}),w.on("click",function(){z.hide(),e.hide(),f.focus()}),n.append(p,o),q.append(s,r),m.append(n,q),l.append(m,"<hr>",v,w),a("body").append(l),z=new AccessibleDialog(l,f,"alert",this.tt.windowResizeHeading,m,this.tt.closeButtonLabel,"20em"),"transcript"===b?this.transcriptResizeDialog=z:"sign"===b&&(this.signResizeDialog=z)},AblePlayer.prototype.handleWindowButtonClick=function(b,c){var d,e,f,g,h;if(d=this,"keydown"===c.type){if(32!==c.which&&13!==c.which&&27!==c.which)return!1;this.windowMenuClickRegistered=!0}else this.windowMenuClickRegistered=!0;"transcript"===b?(e=this.$transcriptPopup,f=this.$transcriptPopupButton,g=this.$transcriptToolbar):"sign"===b&&(e=this.$signPopup,f=this.$signPopupButton,g=this.$signToolbar),e.is(":visible")?(e.hide(200,"",function(){d.windowMenuClickRegistered=!1}),e.find("li").removeClass("able-focus"),f.focus()):(this.updateZIndex(b),h=f.position().top+f.outerHeight(),e.css("top",h),e.show(200,"",function(){a(this).find("input").first().focus().parent().addClass("able-focus"),d.windowMenuClickRegistered=!1}))},AblePlayer.prototype.handleMenuChoice=function(a,b,c){var d,e,f,g,h;d=this,"transcript"===a?(e=this.$transcriptArea,f=this.$transcriptPopup,g=this.$transcriptPopupButton,h=this.transcriptResizeDialog):"sign"===a&&(e=this.$signWindow,f=this.$signPopup,g=this.$signPopupButton,h=this.signResizeDialog),f.hide("fast",function(){d.windowMenuClickRegistered=!1}),g.focus(),"move"===b?(this.showedAlert(a)||(this.showAlert(this.tt.windowMoveAlert,a),"transcript"===a?this.showedTranscriptAlert=!0:"sign"===a&&(this.showedSignAlert=!0)),"keydown"===c?this.dragDevice="keyboard":this.dragDevice="mouse",this.startDrag(a,e),f.hide().parent().focus()):"resize"==b&&h.show()},AblePlayer.prototype.startDrag=function(b,c){var d,e,f,g,h;return d=this,this.$activeWindow=c,this.dragging=!0,"transcript"===b?e=this.$transcriptPopup:"sign"===b&&(e=this.$signPopup),this.showedAlert(b)||(this.showAlert(this.tt.windowMoveAlert,b),"transcript"===b?this.showedTranscriptAlert=!0:"sign"===b&&(this.showedSignAlert=!0)),e.is(":visible")&&e.hide(),this.updateZIndex(b),f=this.$activeWindow.position(),this.dragStartX=f.left,this.dragStartY=f.top,"undefined"==typeof this.startMouseX?(this.dragDevice="keyboard",this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.startingDrag=!0):(this.dragDevice="mouse",this.dragOffsetX=this.startMouseX-this.dragStartX,this.dragOffsetY=this.startMouseY-this.dragStartY),this.$activeWindow.addClass("able-drag").css({
|
|
8
|
+
position:"absolute",top:this.dragStartY+"px",left:this.dragStartX+"px"}).focus(),"mouse"===this.dragDevice?a(document).on("mousemove",function(a){d.dragging&&(g=a.pageX-d.dragOffsetX,h=a.pageY-d.dragOffsetY,d.resetDraggedObject(g,h))}):"keyboard"===this.dragDevice&&this.$activeWindow.on("keydown",function(a){d.dragging&&d.dragKeys(b,a)}),!1},AblePlayer.prototype.dragKeys=function(a,b){var c,d;if(this.startingDrag)return this.startingDrag=!1,!1;switch(c=b.which,d=10,c){case 37:case 63234:this.dragKeyX-=d;break;case 38:case 63232:this.dragKeyY-=d;break;case 39:case 63235:this.dragKeyX+=d;break;case 40:case 63233:this.dragKeyY+=d;break;case 13:case 27:return this.endDrag(a),!1;default:return!1}return this.resetDraggedObject(this.dragKeyX,this.dragKeyY),b.preventDefault&&b.preventDefault(),!1},AblePlayer.prototype.resetDraggedObject=function(a,b){this.$activeWindow.css({left:a+"px",top:b+"px"})},AblePlayer.prototype.resizeObject=function(a,b,c){var d;this.$activeWindow.css({width:b+"px",height:c+"px"}),"transcript"===a&&(d=c-50,this.$transcriptDiv.css("height",d+"px"))},AblePlayer.prototype.endDrag=function(b){var c,d;"transcript"===b?(c=this.$transcriptPopup,d=this.$transcriptPopupButton):"sign"===b&&(c=this.$signPopup,d=this.$signPopupButton),a(document).off("mousemove mouseup"),this.$activeWindow.off("keydown").removeClass("able-drag"),"keyboard"===this.dragDevice&&d.focus(),this.dragging=!1,this.updateCookie(b),this.startMouseX=void 0,this.startMouseY=void 0,this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout(function(){this.finishingDrag=!1},100)},AblePlayer.prototype.isCloseToCorner=function(a,b,c){var d,e,f,g,h,i,j,k;return d=10,e=a.offset(),f=e.top,g=e.left,h=a.width(),i=a.height(),j=f+i,k=g+h,Math.abs(j-c)<=d&&Math.abs(k-b)<=d?!0:!1},AblePlayer.prototype.startResize=function(b,c){var d,e,f,g,h;return d=this,this.$activeWindow=c,this.resizing=!0,"transcript"===b?e=this.$transcriptPopup:"sign"===b&&(e=this.$signPopup),e.is(":visible")&&e.hide().parent().focus(),f=this.$activeWindow.position(),this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.dragStartWidth=this.$activeWindow.width(),this.dragStartHeight=this.$activeWindow.height(),a(document).on("mousemove",function(a){d.resizing&&(g=d.dragStartWidth+(a.pageX-d.startMouseX),h=d.dragStartHeight+(a.pageY-d.startMouseY),d.resizeObject(b,g,h))}),!1},AblePlayer.prototype.endResize=function(b){var c,d;"transcript"===b?(c=this.$transcriptPopup,d=this.$transcriptPopupButton):"sign"===b&&(c=this.$signPopup,d=this.$signPopupButton),a(document).off("mousemove mouseup"),this.$activeWindow.off("keydown"),d.show().focus(),this.resizing=!1,this.$activeWindow.removeClass("able-resize"),this.updateCookie(b),this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout(function(){this.finishingDrag=!1},100)}}(jQuery),function(a){AblePlayer.prototype.initSignLanguage=function(){"html5"===this.player&&(this.signFile=this.$sources.first().attr("data-sign-src"),this.signFile?(this.debug,this.hasSignLanguage=!0,this.injectSignPlayerCode()):this.hasSignLanguage=!1)},AblePlayer.prototype.injectSignPlayerCode=function(){var b,c,d,e,f,g,h;for(b=this,d=this.getDefaultWidth("sign"),c=this.mediaId+"-sign",this.$signVideo=a("<video>",{id:c,tabindex:"-1"}),this.signVideo=this.$signVideo[0],e=0;e<this.$sources.length;e++){if(f=this.$sources[e].getAttribute("data-sign-src"),g=this.$sources[e].getAttribute("type"),!f){this.hasSignLanguage=!1;break}h=a("<source>",{src:f,type:g}),this.$signVideo.append(h)}this.$signWindow=a("<div>",{"class":"able-sign-window",tabindex:"-1"}),this.$signToolbar=a("<div>",{"class":"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$signWindow.append(this.$signToolbar,this.$signVideo),this.$ableWrapper.append(this.$signWindow),this.initDragDrop("sign"),1===this.prefSign?this.positionDraggableWindow("sign",this.getDefaultWidth("sign")):this.$signWindow.hide()}}(jQuery),function(a){var b={ab:{name:"Abkhaz",nativeName:"аҧсуа"},aa:{name:"Afar",nativeName:"Afaraf"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},sq:{name:"Albanian",nativeName:"Shqip"},am:{name:"Amharic",nativeName:"አማርኛ"},ar:{name:"Arabic",nativeName:"العربية"},an:{name:"Aragonese",nativeName:"Aragonés"},hy:{name:"Armenian",nativeName:"Հայերեն"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ, магӀарул мацӀ"},ae:{name:"Avestan",nativeName:"avesta"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},bm:{name:"Bambara",nativeName:"bamanankan"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},eu:{name:"Basque",nativeName:"euskara, euskera"},be:{name:"Belarusian",nativeName:"Беларуская"},bn:{name:"Bengali",nativeName:"বাংলা"},bh:{name:"Bihari",nativeName:"भोजपुरी"},bi:{name:"Bislama",nativeName:"Bislama"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},br:{name:"Breton",nativeName:"brezhoneg"},bg:{name:"Bulgarian",nativeName:"български език"},my:{name:"Burmese",nativeName:"ဗမာစာ"},ca:{name:"Catalan",nativeName:"Català"},ch:{name:"Chamorro",nativeName:"Chamoru"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ny:{name:"Chichewa",nativeName:"chiCheŵa, chinyanja"},zh:{name:"Chinese",nativeName:"中文 (Zhōngwén), 汉语, 漢語"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},kw:{name:"Cornish",nativeName:"Kernewek"},co:{name:"Corsican",nativeName:"corsu, lingua corsa"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},hr:{name:"Croatian",nativeName:"hrvatski"},cs:{name:"Czech",nativeName:"česky, čeština"},da:{name:"Danish",nativeName:"dansk"},dv:{name:"Divehi",nativeName:"ދިވެހި"},nl:{name:"Dutch",nativeName:"Nederlands, Vlaams"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},et:{name:"Estonian",nativeName:"eesti, eesti keel"},ee:{name:"Ewe",nativeName:"Eʋegbe"},fo:{name:"Faroese",nativeName:"føroyskt"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fi:{name:"Finnish",nativeName:"suomi, suomen kieli"},fr:{name:"French",nativeName:"français, langue française"},ff:{name:"Fula",nativeName:"Fulfulde, Pulaar, Pular"},gl:{name:"Galician",nativeName:"Galego"},ka:{name:"Georgian",nativeName:"ქართული"},de:{name:"German",nativeName:"Deutsch"},el:{name:"Greek",nativeName:"Ελληνικά"},gn:{name:"Guaraní",nativeName:"Avañeẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},ha:{name:"Hausa",nativeName:"Hausa, هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hz:{name:"Herero",nativeName:"Otjiherero"},hi:{name:"Hindi",nativeName:"हिन्दी, हिंदी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hu:{name:"Hungarian",nativeName:"Magyar"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Originally called Occidental; then Interlingue after WWII"},ga:{name:"Irish",nativeName:"Gaeilge"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ik:{name:"Inupiaq",nativeName:"Iñupiaq, Iñupiatun"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語 (にほんご/にっぽんご)"},jv:{name:"Javanese",nativeName:"basa Jawa"},kl:{name:"Kalaallisut",nativeName:"kalaallisut, kalaallit oqaasii"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी, كشميري"},kk:{name:"Kazakh",nativeName:"Қазақ тілі"},km:{name:"Khmer",nativeName:"ភាសាខ្មែរ"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},ky:{name:"Kyrgyz",nativeName:"кыргыз тили"},kv:{name:"Komi",nativeName:"коми кыв"},kg:{name:"Kongo",nativeName:"KiKongo"},ko:{name:"Korean",nativeName:"한국어 (韓國語), 조선말 (朝鮮語)"},ku:{name:"Kurdish",nativeName:"Kurdî, كوردی"},kj:{name:"Kuanyama",nativeName:"Kuanyama"},la:{name:"Latin",nativeName:"latine, lingua latina"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Luganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:""},lv:{name:"Latvian",nativeName:"latviešu valoda"},gv:{name:"Manx",nativeName:"Gaelg, Gailck"},mk:{name:"Macedonian",nativeName:"македонски јазик"},mg:{name:"Malagasy",nativeName:"Malagasy fiteny"},ms:{name:"Malay",nativeName:"bahasa Melayu, بهاس ملايو"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mt:{name:"Maltese",nativeName:"Malti"},mi:{name:"Māori",nativeName:"te reo Māori"},mr:{name:"Marathi",nativeName:"मराठी"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mn:{name:"Mongolian",nativeName:"монгол"},na:{name:"Nauru",nativeName:"Ekakairũ Naoero"},nv:{name:"Navajo",nativeName:"Diné bizaad, Dinékʼehǰí"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"North Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},nr:{name:"South Ndebele",nativeName:"isiNdebele"},oc:{name:"Occitan",nativeName:"Occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},cu:{name:"Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Punjabi",nativeName:"ਪੰਜਾਬੀ, پنجابی"},pi:{name:"Pāli",nativeName:"पाऴि"},fa:{name:"Persian",nativeName:"فارسی"},pl:{name:"Polish",nativeName:"polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi, Kichwa"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"kiRundi"},ro:{name:"Romanian",nativeName:"română"},ru:{name:"Russian",nativeName:"русский язык"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी, سنڌي، سندھی"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sm:{name:"Samoan",nativeName:"gagana faa Samoa"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},sr:{name:"Serbian",nativeName:"српски језик"},gd:{name:"Gaelic",nativeName:"Gàidhlig"},sn:{name:"Shona",nativeName:"chiShona"},si:{name:"Sinhalese",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovene",nativeName:"slovenščina"},so:{name:"Somali",nativeName:"Soomaaliga, af Soomaali"},st:{name:"Southern Sotho",nativeName:"Sesotho"},es:{name:"Spanish",nativeName:"español, castellano"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sw:{name:"Swahili",nativeName:"Kiswahili"},ss:{name:"Swati",nativeName:"SiSwati"},sv:{name:"Swedish",nativeName:"svenska"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ, toğikī, تاجیکی"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},tk:{name:"Turkmen",nativeName:"Türkmen, Түркмен"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татарча, tatarça, تاتارچا"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"Uyƣurqə, ئۇيغۇرچە"},uk:{name:"Ukrainian",nativeName:"українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"zbek, Ўзбек, أۇزبېك"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"Walon"},cy:{name:"Welsh",nativeName:"Cymraeg"},wo:{name:"Wolof",nativeName:"Wollof"},fy:{name:"Western Frisian",nativeName:"Frysk"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ, Saw cuengh"}};AblePlayer.prototype.getLanguageName=function(a){a=a.slice(0,2);var c=b[a];return c?c.name:void 0},AblePlayer.prototype.getLanguageNativeName=function(a){a=a.slice(0,2);var c=b[a];return c?c.nativeName:void 0}}(jQuery),function($){AblePlayer.prototype.getSupportedLangs=function(){var a=["ca","de","en","es","fr","it","ja"];return a},AblePlayer.prototype.getTranslationText=function(){var deferred,thisObj,lang,thisObj,msg,translationFile;return deferred=$.Deferred(),thisObj=this,this.forceLang||($("body").attr("lang")?lang=$("body").attr("lang"):$("html").attr("lang")&&(lang=$("html").attr("lang")),lang!==this.lang&&(msg="Language of web page ("+lang+") ",-1!==$.inArray(lang,this.getSupportedLangs())?(msg+=" has a translation table available.",this.lang=lang):msg+=" is not currently supported. Using default language ("+this.lang+")",this.debug)),translationFile=this.rootPath+"translations/"+this.lang+".js",this.importTranslationFile(translationFile).then(function(result){thisObj.tt=eval(thisObj.lang),deferred.resolve()}),deferred.promise()},AblePlayer.prototype.importTranslationFile=function(a){var b=$.Deferred();return $.getScript(a).done(function(a,c){b.resolve(a)}).fail(function(a,c,d){b.fail()}),b.promise()}}(jQuery),function(a){a.doWhen=function(b){return a.Deferred(function(c){var d=a.extend({},{when:null,exec:function(){},interval:100,attempts:100,delayed:0},b,{checkId:null}),e=function(){return d.when()===!0?(d.exec.call(c.promise()),void c.resolve()):void(d.checkId=setInterval(function(){0===d.attempts?(clearInterval(d.checkId),c.reject()):(--d.attempts,d.when()===!0&&(d.attempts=0,clearInterval(d.checkId),d.exec.call(c.promise()),c.resolve()))},d.interval))};d.delayed>0?setTimeout(e,Number(d.delayed)):e()}).promise()}}(jQuery);
|