', {
- 'class': 'able-modal-header'
- });
- modalHeader.prepend(titleH1);
- modalHeader.prepend(closeButton);
- modal.prepend(modalHeader);
- }
+ modal.attr({
+ 'aria-labelledby': 'modalTitle-' + this.baseId,
+ });
+ var modalHeader = $( '
', {
+ 'class': 'able-modal-header'
+ });
+ modalHeader.prepend(titleH1);
+ modalHeader.prepend(closeButton);
+ modal.prepend(modalHeader);
modal.attr({
'aria-hidden': 'true',
- 'role': dialogRole,
+ 'role': 'dialog',
+ 'aria-modal': 'true'
});
- if (isModal) {
- modal.attr('aria-modal','true');
- }
modal.on( 'keydown', function (e) {
if (e.key === 'Escape') {
- if (thisObj.escapeHook) {
- thisObj.escapeHook(e, this);
- } else {
- thisObj.hide();
- e.preventDefault();
- }
+ thisObj.hide();
+ e.preventDefault();
} else if (e.key === 'Tab') {
// Manually loop tab navigation inside the modal.
var parts = modal.find('*');
@@ -8087,6 +8176,35 @@ if (typeof module !== "undefined" && module.exports) {
return Number(Math.floor(value + "e" + decimals) + "e-" + decimals);
};
+ AblePlayer.prototype.defer = function() {
+ const self = this;
+ const promise = new Promise((resolve, reject) => {
+ self.resolve = resolve;
+ self.reject = reject;
+ self.promise = () => promise;
+ });
+ }
+
+ AblePlayer.prototype.getScript = function( source, callback ) {
+ var script = document.createElement('script');
+ var prior = document.getElementsByTagName('script')[0];
+ script.async = 1;
+
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
+ if ( isAbort || !script.readyState || /loaded|complete/.test(script.readyState) ) {
+ script.onload = script.onreadystatechange = null;
+ script = undefined;
+
+ if ( !isAbort && callback ) {
+ setTimeout(callback, 0);
+ }
+ }
+ };
+
+ script.src = source;
+ prior.parentNode.insertBefore(script, prior);
+ }
+
AblePlayer.prototype.hasAttr = function (object, attribute) {
// surprisingly, there is no hasAttr() function in Jquery as of 3.2.1
// return true if object has attribute; otherwise false
@@ -8130,7 +8248,7 @@ if (typeof module !== "undefined" && module.exports) {
var deferred, promise, thisObj;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
thisObj = this;
@@ -8191,12 +8309,12 @@ if (typeof module !== "undefined" && module.exports) {
// make description text visible
if (typeof this.$descDiv !== 'undefined') {
this.$descDiv.show();
- this.$descDiv.removeClass('able-clipped');
+ this.$descDiv.removeClass('able-offscreen');
}
} else {
// keep it visible to screen readers, but hide it visibly
if (typeof this.$descDiv !== 'undefined') {
- this.$descDiv.addClass('able-clipped');
+ this.$descDiv.addClass('able-offscreen');
}
}
}
@@ -8210,7 +8328,7 @@ if (typeof module !== "undefined" && module.exports) {
// hide description div from everyone, including screen reader users
if (typeof this.$descDiv !== 'undefined') {
this.$descDiv.hide();
- this.$descDiv.removeClass('able-clipped');
+ this.$descDiv.removeClass('able-offscreen');
}
}
}
@@ -8341,12 +8459,12 @@ if (typeof module !== "undefined" && module.exports) {
// set description voice on player init, or when user changes caption language
// Voice is determined in the following order of precedence:
- // 1. User's preferred voice for this language, saved in a cookie
+ // 1. User's preferred voice for this language, saved in preferences
// 2. The first available voice in the array of available voices for this browser in this language
- var cookie, voices, prefDescVoice, descVoice, descLang, prefVoiceFound;
- cookie = this.getCookie();
- prefDescVoice = (typeof cookie.voices !== 'undefined') ? this.getPrefDescVoice() : null;
+ var preferences, voices, prefDescVoice, descVoice, descLang, prefVoiceFound;
+ preferences = this.getPref();
+ prefDescVoice = (typeof preferences.voices !== 'undefined') ? this.getPrefDescVoice() : null;
this.getBrowserVoices();
this.rebuildDescPrefsForm();
@@ -8392,7 +8510,7 @@ if (typeof module !== "undefined" && module.exports) {
if (this.$voiceSelectField) {
this.$voiceSelectField.val(this.prefDescVoice);
}
- this.updateCookie('voice');
+ this.updatePreferences('voice');
}
}
};
@@ -8406,7 +8524,7 @@ if (typeof module !== "undefined" && module.exports) {
// 2. User is toggling description
// (playerCreated == true)
- var thisObj, i, origSrc, descSrc, srcType;
+ var thisObj, i, origSrc, descSrc;
thisObj = this;
@@ -8439,11 +8557,9 @@ if (typeof module !== "undefined" && module.exports) {
}
if (this.descOn) {
- // user has requested the described version
- this.showAlert(this.tt.alertDescribedVersion);
+ this.showAlert( this.translate( 'alertDescribedVersion', 'Using the audio described version of this video' ) );
} else {
- // user has requested the non-described version
- this.showAlert(this.tt.alertNonDescribedVersion);
+ this.showAlert( this.translate( 'alertNonDescribedVersion', 'Using the non-described version of this video' ) );
}
if (this.player === 'html5') {
@@ -8525,11 +8641,11 @@ if (typeof module !== "undefined" && module.exports) {
if (this.usingDescribedVersion()) {
// the described version is currently playing. Swap to non-described
this.activeVimeoId = this.vimeoId;
- this.showAlert(this.tt.alertNonDescribedVersion);
+ this.showAlert( this.translate( 'alertNonDescribedVersion', 'Using the non-described version of this video' ) );
} else {
// the non-described version is currently playing. Swap to described.
this.activeVimeoId = this.vimeoDescId;
- this.showAlert(this.tt.alertDescribedVersion);
+ this.showAlert( this.translate( 'alertDescribedVersion', 'Using the audio described version of this video' ) );
}
if (this.playerCreated) {
this.deletePlayer('swap-desc-vimeo');
@@ -8557,11 +8673,11 @@ if (typeof module !== "undefined" && module.exports) {
};
AblePlayer.prototype.showDescription = function(now) {
- if (!this.hasClosedDesc || this.swappingSrc || !this.descOn || ( this.descMethod === 'video' && !this.prefDescVisible ) ) {
+ if (!this.playing || !this.hasClosedDesc || this.swappingSrc || !this.descOn || ( this.descMethod === 'video' && !this.prefDescVisible ) ) {
return;
}
- var thisObj, i, cues, d, thisDescription, descText;
+ var thisObj, cues, d, thisDescription, descText;
thisObj = this;
var flattenComponentForDescription = function (component) {
@@ -8911,7 +9027,7 @@ if (typeof module !== "undefined" && module.exports) {
var deferred, promise, thisObj, mediaTimes;
mediaTimes = {};
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
thisObj = this;
if (typeof duration !== 'undefined' && typeof elapsed !== 'undefined') {
@@ -8936,7 +9052,7 @@ if (typeof module !== "undefined" && module.exports) {
// function is called by getMediaTimes, and return value is sanitized there
var deferred, promise, thisObj;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
thisObj = this;
@@ -8984,7 +9100,7 @@ if (typeof module !== "undefined" && module.exports) {
var deferred, promise, thisObj;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
thisObj = this;
@@ -9030,7 +9146,7 @@ if (typeof module !== "undefined" && module.exports) {
// - 'playing' - Currently playing.
var deferred, promise, thisObj;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
thisObj = this;
@@ -9115,7 +9231,7 @@ if (typeof module !== "undefined" && module.exports) {
}
this.syncSignVideo( { 'rate' : rate } );
this.playbackRate = rate;
- this.$speed.text(this.tt.speed + ': ' + rate.toFixed(2).toString() + 'x');
+ this.$speed.text( this.translate( 'speed', 'Speed' ) + ': ' + rate.toFixed(2).toString() + 'x');
};
AblePlayer.prototype.getPlaybackRate = function () {
@@ -9197,8 +9313,6 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.playMedia = function () {
- var thisObj = this;
-
this.syncSignVideo( { 'play' : true } );
if (this.player === 'html5') {
@@ -9224,43 +9338,19 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.fadeControls = function(direction) {
// Visibly fade controls without hiding them from screen reader users
-
// direction is either 'out' or 'in'
- // TODO: This still needs work.
// After the player fades, it's replaced by an empty space
// Would be better if the video and captions expanded to fill the void
- // Attempted to fade out to 0 opacity, then move the playerDiv offscreen
- // and expand the mediaContainer to fill the vacated space
- // However, my attempts to do this have been choppy and buggy
- // Code is preserved below and commented out
+ // replace JS animation with CSS animation in 12/2025.
- var thisObj, mediaHeight, playerHeight, newMediaHeight;
- thisObj = this;
+ var thisObj = this;
if (direction == 'out') {
// get the original height of two key components:
- mediaHeight = this.$mediaContainer.height();
- playerHeight = this.$playerDiv.height();
- newMediaHeight = mediaHeight + playerHeight;
-
- // fade slowly to transparency
- this.$playerDiv.fadeTo(2000,0,function() {
- /*
- // when finished, position playerDiv offscreen
- // thisObj.$playerDiv.addClass('able-offscreen');
- // Expand the height of mediaContainer to fill the void (needs work)
- thisObj.$mediaContainer.animate({
- height: newMediaHeight
- },500);
- */
- });
+ this.$playerDiv.addClass( 'fade-out' ).removeClass( 'fade-in' );
} else if (direction == 'in') {
- // restore captionsContainer to its original height (needs work)
- // this.$mediaContainer.removeAttr('style');
- // fade relatively quickly back to its original position with full opacity
- // this.$playerDiv.removeClass('able-offscreen').fadeTo(100,1);
- this.$playerDiv.fadeTo(100,1);
+ this.$playerDiv.addClass( 'fade-in' ).removeClass( 'fade-out' );
}
};
@@ -9433,8 +9523,8 @@ if (typeof module !== "undefined" && module.exports) {
this.toggleButtonState(
this.$descButton,
this.descOn,
- this.tt.turnOffDescriptions,
- this.tt.turnOnDescriptions,
+ this.translate( 'turnOffDescriptions', 'Turn off descriptions' ),
+ this.translate( 'turnOnDescriptions', 'Turn on descriptions' ),
);
}
}
@@ -9450,8 +9540,8 @@ if (typeof module !== "undefined" && module.exports) {
'aria-controls': this.mediaId + '-captions-menu'
});
}
- var ariaLabelOn = ( captionsCount > 1 ) ? this.tt.captions : this.tt.showCaptions;
- var ariaLabelOff = ( captionsCount > 1 ) ? this.tt.captions : this.tt.hideCaptions;
+ var ariaLabelOn = ( captionsCount > 1 ) ? this.translate( 'captions', 'Captions' ) : this.translate( 'showCaptions', 'Show captions' );
+ var ariaLabelOff = ( captionsCount > 1 ) ? this.translate( 'captions', 'Captions' ) : this.translate( 'hideCaptions', 'Hide captions' );
var ariaPressed = ( captionsCount > 1 ) ? true : false;
this.toggleButtonState(
@@ -9467,13 +9557,11 @@ if (typeof module !== "undefined" && module.exports) {
if (context === 'fullscreen' || context == 'init'){
if (this.$fullscreenButton) {
if (!this.fullscreen) {
- this.$fullscreenButton.attr('aria-label', this.tt.enterFullScreen);
+ this.$fullscreenButton.attr( 'aria-label', this.translate( 'enterFullScreen', 'Enter full screen' ) );
this.getIcon( this.$fullscreenButton, 'fullscreen-expand' );
- this.$fullscreenButton.find('span.able-clipped').text(this.tt.enterFullScreen);
} else {
- this.$fullscreenButton.attr('aria-label',this.tt.exitFullscreen);
+ this.$fullscreenButton.attr('aria-label', this.translate( 'exitFullScreen', 'Exit full screen' ) );
this.getIcon( this.$fullscreenButton, 'fullscreen-collapse' );
- this.$fullscreenButton.find('span.able-clipped').text(this.tt.exitFullscreen);
}
}
}
@@ -9528,7 +9616,7 @@ if (typeof module !== "undefined" && module.exports) {
if (this.$chaptersButton) {
this.$chaptersButton.attr({
- 'aria-label': this.tt.chapters,
+ 'aria-label': this.translate( 'chapters', 'Chapters' ),
'aria-haspopup': 'true',
'aria-controls': this.mediaId + '-chapters-menu'
});
@@ -9539,22 +9627,21 @@ if (typeof module !== "undefined" && module.exports) {
// update status
textByState = {
- 'stopped': this.tt.statusStopped,
- 'paused': this.tt.statusPaused,
- 'playing': this.tt.statusPlaying,
- 'buffering': this.tt.statusBuffering,
- 'ended': this.tt.statusEnd
+ 'stopped': this.translate( 'statusStopped', 'Stopped' ),
+ 'paused': this.translate( 'statusPaused', 'Paused' ),
+ 'playing': this.translate( 'statusPlaying', 'Playing' ),
+ 'buffering': this.translate( 'statusBuffering', 'Buffering' ),
+ 'ended': this.translate( 'statusEnd', 'End of track' )
};
if (this.stoppingYouTube) {
// stoppingYouTube is true temporarily while video is paused and seeking to 0
// See notes in handleRestart()
// this.stoppingYouTube will be reset when seek to 0 is finished (in event.js > onMediaUpdateTime())
- if (this.$status.text() !== this.tt.statusStopped) {
- this.$status.text(this.tt.statusStopped);
+ if (this.$status.text() !== this.translate( 'statusStopped', 'Stopped' ) ) {
+ this.$status.text( this.translate( 'statusStopped', 'Stopped' ) );
}
this.getIcon( this.$playpauseButton, 'play' );
- this.$playpauseButton.find('span.able-clipped').text(this.tt.play);
} else if (typeof this.$status !== 'undefined' && typeof this.seekBar !== 'undefined') {
// Update the text only if it's changed since it has role="alert";
// also don't update while tracking, since this may Pause/Play the player but we don't want to send a Pause/Play update.
@@ -9599,11 +9686,9 @@ if (typeof module !== "undefined" && module.exports) {
if (currentState === 'paused' || currentState === 'stopped' || currentState === 'ended') {
thisObj.$playpauseButton.attr('aria-label',thisObj.tt.play);
thisObj.getIcon( thisObj.$playpauseButton, 'play' );
- thisObj.$playpauseButton.find('span.able-clipped').text(thisObj.tt.play);
} else {
thisObj.$playpauseButton.attr('aria-label',thisObj.tt.pause);
thisObj.getIcon( thisObj.$playpauseButton, 'pause' );
- thisObj.$playpauseButton.find('span.able-clipped').text(thisObj.tt.pause);
}
}
});
@@ -9790,7 +9875,7 @@ if (typeof module !== "undefined" && module.exports) {
this.captionsOn = false;
this.prefCaptions = 0;
ariaPressed = false;
- this.updateCookie('prefCaptions');
+ this.updatePreferences('prefCaptions');
if (this.usingYouTubeCaptions) {
this.youTubePlayer.unloadModule('captions');
} else if (this.usingVimeoCaptions) {
@@ -9803,7 +9888,7 @@ if (typeof module !== "undefined" && module.exports) {
this.captionsOn = true;
this.prefCaptions = 1;
ariaPressed = true;
- this.updateCookie('prefCaptions');
+ this.updatePreferences('prefCaptions');
if (this.usingYouTubeCaptions) {
this.youTubePlayer.loadModule('captions');
} else if (this.usingVimeoCaptions) {
@@ -9865,8 +9950,8 @@ if (typeof module !== "undefined" && module.exports) {
}
}
}
- var ariaLabelOn = ( captions.length > 1 ) ? this.tt.captions : this.tt.showCaptions;
- var ariaLabelOff = ( captions.length > 1 ) ? this.tt.captions : this.tt.hideCaptions;
+ var ariaLabelOn = ( captions.length > 1 ) ? this.translate( 'captions', 'Captions' ) : this.translate( 'showCaptions', 'Show captions' );
+ var ariaLabelOff = ( captions.length > 1 ) ? this.translate( 'captions', 'Captions' ) : this.translate( 'hideCaptions', 'Hide captions' );
this.toggleButtonState(
this.$ccButton,
@@ -9927,7 +10012,7 @@ if (typeof module !== "undefined" && module.exports) {
this.descOn = !this.descOn;
this.prefDesc = + this.descOn; // convert boolean to integer
- this.updateCookie('prefDesc');
+ this.updatePreferences('prefDesc');
if (typeof this.$descDiv !== 'undefined') {
if (!this.$descDiv.is(':hidden')) {
this.$descDiv.hide();
@@ -9994,17 +10079,12 @@ if (typeof module !== "undefined" && module.exports) {
}
};
- AblePlayer.prototype.handleHelpClick = function() {
- this.setFullscreen(false);
- this.helpDialog.show();
- };
-
AblePlayer.prototype.handleTranscriptToggle = function () {
var thisObj = this;
var visible = this.$transcriptDiv.is(':visible');
if ( visible ) {
this.$transcriptArea.hide();
- this.toggleButtonState( this.$transcriptButton, ! visible, this.tt.hideTranscript, this.tt.showTranscript );
+ this.toggleButtonState( this.$transcriptButton, ! visible, this.translate( 'hideTranscript', 'Hide transcript' ), this.translate( 'showTranscript', 'Show transcript' ) );
this.prefTranscript = 0;
if ( this.transcriptType === 'popup' ) {
this.$transcriptButton.trigger('focus').addClass('able-focus');
@@ -10023,7 +10103,7 @@ if (typeof module !== "undefined" && module.exports) {
// showing transcriptArea has a cascading effect of showing all content *within* transcriptArea
// need to re-hide the popup menu
this.$transcriptPopup.hide();
- this.toggleButtonState( this.$transcriptButton, ! visible, this.tt.hideTranscript, this.tt.showTranscript );
+ this.toggleButtonState( this.$transcriptButton, ! visible, this.translate( 'hideTranscript', 'Hide transcript' ), this.translate( 'showTranscript', 'Show transcript' ) );
this.prefTranscript = 1;
// move focus to first focusable element (window options button)
this.focusNotClick = true;
@@ -10033,11 +10113,11 @@ if (typeof module !== "undefined" && module.exports) {
thisObj.focusNotClick = false;
}, 100);
} else {
- this.toggleButtonState( this.$transcriptButton, ! visible, this.tt.hideTranscript, this.tt.showTranscript );
+ this.toggleButtonState( this.$transcriptButton, ! visible, this.translate( 'hideTranscript', 'Hide transcript' ), this.translate( 'showTranscript', 'Show transcript' ) );
this.$transcriptArea.show();
}
}
- this.updateCookie('prefTranscript');
+ this.updatePreferences('prefTranscript');
};
AblePlayer.prototype.handleSignToggle = function () {
@@ -10046,7 +10126,7 @@ if (typeof module !== "undefined" && module.exports) {
var visible = this.$signWindow.is(':visible');
if ( visible ) {
this.$signWindow.hide();
- this.toggleButtonState( this.$signButton, ! visible, this.tt.hideSign, this.tt.showSign );
+ this.toggleButtonState( this.$signButton, ! visible, this.translate( 'hideSign', 'Hide sign language' ), this.translate( 'showSign', 'Show sign language' ) );
this.prefSign = 0;
this.$signButton.trigger('focus').addClass('able-focus');
// wait briefly before resetting stopgap var
@@ -10060,7 +10140,7 @@ if (typeof module !== "undefined" && module.exports) {
// showing signWindow has a cascading effect of showing all content *within* signWindow
// need to re-hide the popup menu
this.$signPopup.hide();
- this.toggleButtonState( this.$signButton, ! visible, this.tt.hideSign, this.tt.showSign );
+ this.toggleButtonState( this.$signButton, ! visible, this.translate( 'hideSign', 'Hide sign language' ), this.translate( 'showSign', 'Show sign language' ) );
this.prefSign = 1;
this.focusNotClick = true;
this.$signWindow.find('button').first().trigger('focus');
@@ -10070,31 +10150,12 @@ if (typeof module !== "undefined" && module.exports) {
thisObj.focusNotClick = false;
}, 100);
}
- this.updateCookie('prefSign');
+ this.updatePreferences('prefSign');
};
- AblePlayer.prototype.isFullscreen = function () {
-
- // NOTE: This has been largely replaced as of 3.2.5 with a Boolean this.fullscreen,
- // which is defined in setFullscreen()
- // This function returns true if *any* element is fullscreen
- // but doesn't tell us whether a particular element is in fullscreen
- // (e.g., if there are multiple players on the page)
- // The Boolean this.fullscreen is defined separately for each player instance
-
- if (this.nativeFullscreenSupported()) {
- return (document.fullscreenElement ||
- document.webkitFullscreenElement ||
- document.webkitCurrentFullscreenElement ) ? true : false;
- } else {
- return this.modalFullscreenActive ? true : false;
- }
- }
-
AblePlayer.prototype.setFullscreen = function (fullscreen) {
if (this.fullscreen == fullscreen) {
- // replace isFullscreen() with a Boolean. see function for explanation
return;
}
var thisObj = this;
@@ -10108,6 +10169,14 @@ if (typeof module !== "undefined" && module.exports) {
x: window.pageXOffset || 0,
y: window.pageYOffset || 0
}
+ if (this.prefTranscript === 1) {
+ // transcript is on. Go ahead and reposition it
+ this.rePositionDraggableWindow("transcript");
+ }
+ if (this.prefSign === 1) {
+ // sign is on. Go ahead and reposition it
+ this.rePositionDraggableWindow("sign");
+ }
this.scrollPosition = scroll;
// Initialize fullscreen
if (el.requestFullscreen) {
@@ -10126,51 +10195,20 @@ if (typeof module !== "undefined" && module.exports) {
} else if (document.webkitCancelFullscreen) {
document.webkitCancelFullscreen();
}
+ if (this.prefTranscript === 1) {
+ // transcript is on. Go ahead and reposition it
+ this.positionDraggableWindow("transcript");
+ }
+ if (this.prefSign === 1) {
+ // sign is on. Go ahead and reposition it
+ this.positionDraggableWindow("sign");
+ }
this.fullscreen = false;
}
} else {
- // Non-native fullscreen support through modal dialog.
- // Create dialog on first run through.
- if (!this.fullscreenDialog) {
- var $dialogDiv = $('
');
- // create a hidden alert, communicated to screen readers via aria-describedby
- var $fsDialogAlert = $('
',{
- 'class': 'able-screenreader-alert'
- }).text(this.tt.fullScreen); // In English: "Full screen"; TODO: Add alert text that is more descriptive
- $dialogDiv.append($fsDialogAlert);
- // now render this as a dialog
- this.fullscreenDialog = new AccessibleDialog($dialogDiv, this.$fullscreenButton, 'dialog', true, 'Fullscreen video player', $fsDialogAlert, this.tt.exitFullscreen, '100%', true, function () { thisObj.handleFullscreenToggle() });
- $('body').append($dialogDiv);
- }
-
- // Track whether paused/playing before moving element; moving the element can stop playback.
- var wasPaused = this.paused;
-
- if (fullscreen) {
- this.modalFullscreenActive = true;
- this.fullscreenDialog.show();
-
- // Move player element into fullscreen dialog, then show.
- // Put a placeholder element where player was.
- this.$modalFullscreenPlaceholder = $('
');
- this.$modalFullscreenPlaceholder.insertAfter($el);
- $el.appendTo(this.fullscreenDialog.modal);
-
- var newHeight = $(window).height() - this.$playerDiv.height();
- if (typeof this.$descDiv !== 'undefined' && (!this.$descDiv.is(':hidden')) ) {
- newHeight -= this.$descDiv.height();
- }
- } else {
- this.modalFullscreenActive = false;
- $el.insertAfter(this.$modalFullscreenPlaceholder);
- this.$modalFullscreenPlaceholder.remove();
- this.fullscreenDialog.hide();
- }
-
- // Resume playback if moving stopped it.
- if (!wasPaused && this.paused) {
- this.playMedia();
- }
+ // Removed non-native fullscreen mode in 4.8, which only supported iOS.
+ // Native fullscreen is on iOS 18+ devices behind a feature flag
+ // The polyfill hasn't worked for years.
}
// add event handlers for changes in fullscreen mode.
// Browsers natively trigger this event with the Escape key,
@@ -10246,18 +10284,24 @@ if (typeof module !== "undefined" && module.exports) {
this.autoScrollTranscript = val; // val is boolean
this.prefAutoScrollTranscript = +val; // convert boolean to numeric 1 or 0 for cookie
- this.updateCookie('prefAutoScrollTranscript');
+ this.updatePreferences('prefAutoScrollTranscript');
this.refreshControls('transcript');
};
AblePlayer.prototype.getIcon = function( $button, id, forceImg = false ) {
// Remove existing HTML before generating.
- $button.find('svg, img, span:not(.able-clipped)').remove();
// iconData: [0 = svg viewbox, 1 = svg path, 2 = icon font class, 3 = image file]
- var iconData = this.getIconData( id );
var iconType = this.iconType;
+ var iconData = this.getIconData( id );
iconType = ( null === iconData[3] ) ? 'svg' : iconType;
- iconType = ( forceImg === true ) ? 'image' : iconType;
+ iconType = ( forceImg === true ) ? 'img' : iconType;
+
+ var existingIcon = $button.find( iconType + '#ableplayer-' + id );
+ // Avoid repainting icon if there's no change.
+ if ( existingIcon.length > 0 ) {
+ return;
+ }
+ $button.find('svg, img, span').remove();
if (iconType === 'font') {
var $buttonIcon = $('
', {
@@ -10279,6 +10323,7 @@ if (typeof module !== "undefined" && module.exports) {
icon.setAttribute( 'focusable', 'false' );
icon.setAttribute( 'aria-hidden', 'true');
icon.setAttribute( 'viewBox', iconData[0] );
+ icon.setAttribute( 'id', 'ableplayer-' + id );
let path = getNode( 'path', { d: iconData[1] } );
icon.appendChild( path );
@@ -10298,9 +10343,6 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.setText = function( $button, text ) {
$button.attr( 'aria-label', text );
- // add the visibly-hidden label for screen readers that don't support aria-label on the button
- $buttonLabel = $('',{ 'class': 'able-clipped' }).text( text );
- $button.append($buttonLabel);
};
AblePlayer.prototype.toggleButtonState = function($button, isOn, onLabel, offLabel, ariaPressed = false, ariaExpanded = false) {
@@ -10312,7 +10354,6 @@ if (typeof module !== "undefined" && module.exports) {
}
if (! isOn) {
$button.addClass('buttonOff').attr('aria-label', offLabel);
- $button.find('span.able-clipped').text(offLabel);
if ( ariaPressed ) {
$button.attr('aria-pressed', 'false');
}
@@ -10321,7 +10362,6 @@ if (typeof module !== "undefined" && module.exports) {
}
} else {
$button.removeClass('buttonOff').attr('aria-label', onLabel);
- $button.find('span.able-clipped').text(onLabel);
if ( ariaPressed ) {
$button.attr('aria-pressed', 'true');
}
@@ -10333,11 +10373,7 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.showTooltip = function($tooltip) {
- if (($tooltip).is(':animated')) {
- $tooltip.stop(true,true).show();
- } else {
- $tooltip.stop().show();
- }
+ $tooltip.show();
};
AblePlayer.prototype.showAlert = function( msg, location = 'main' ) {
@@ -10365,7 +10401,7 @@ if (typeof module !== "undefined" && module.exports) {
if (location !== 'screenreader') {
setTimeout( function () {
- $alertBox.fadeOut(300);
+ $alertBox.hide();
}, 30000 );
}
};
@@ -10472,12 +10508,9 @@ if (typeof module !== "undefined" && module.exports) {
'height': newHeight
});
} else {
- // No constraints. Let CSS handle the positioning.
+ // No constraints. Let CSS handle the positioning.
this.$media.removeAttr('width height');
- this.$ableWrapper.css({
- 'width': newWidth + 'px',
- 'height': 'auto'
- });
+ this.$ableWrapper.removeAttr( 'style' );
}
}
// Resize captions
@@ -10504,7 +10537,6 @@ if (typeof module !== "undefined" && module.exports) {
'font-size': captionSize
});
}
-
this.refreshControls();
};
@@ -10832,7 +10864,7 @@ if (typeof module !== "undefined" && module.exports) {
// save preference to cookie
thisObj.prefCaptions = 1;
- thisObj.updateCookie("prefCaptions");
+ thisObj.updatePreferences("prefCaptions");
thisObj.refreshControls("captions");
};
};
@@ -10868,7 +10900,7 @@ if (typeof module !== "undefined" && module.exports) {
// save preference to cookie
thisObj.prefCaptions = 0;
- thisObj.updateCookie("prefCaptions");
+ thisObj.updatePreferences("prefCaptions");
if (!this.swappingSrc) {
thisObj.refreshControls("captions");
thisObj.updateCaption();
@@ -10977,24 +11009,24 @@ if (typeof module !== "undefined" && module.exports) {
switch (pref) {
case "prefCaptionsFont":
- options[0] = ["serif", this.tt.serif];
- options[1] = ["sans-serif", this.tt.sans];
- options[2] = ["cursive", this.tt.cursive];
- options[3] = ["fantasy", this.tt.fantasy];
- options[4] = ["monospace", this.tt.monospace];
+ options[0] = ["serif", this.translate( 'serif', 'serif' )];
+ options[1] = ["sans-serif", this.translate( 'sans', 'sans-serif' )];
+ options[2] = ["cursive", this.translate( 'cursive', 'cursive' )];
+ options[3] = ["fantasy", this.translate( 'fantasy', 'fantasy' )];
+ options[4] = ["monospace", this.translate( 'monospace', 'monospace' )];
break;
case "prefCaptionsColor":
case "prefCaptionsBGColor":
// HTML color values must be in English
- options[0] = ["white", this.tt.white];
- options[1] = ["yellow", this.tt.yellow];
- options[2] = ["green", this.tt.green];
- options[3] = ["cyan", this.tt.cyan];
- options[4] = ["blue", this.tt.blue];
- options[5] = ["magenta", this.tt.magenta];
- options[6] = ["red", this.tt.red];
- options[7] = ["black", this.tt.black];
+ options[0] = ["white", this.translate( 'white', 'white' )];
+ options[1] = ["yellow", this.translate( 'yellow', 'yellow' )];
+ options[2] = ["green", this.translate( 'green', 'green' )];
+ options[3] = ["cyan", this.translate( 'cyan', 'cyan' )];
+ options[4] = ["blue", this.translate( 'blue', 'blue' )];
+ options[5] = ["magenta", this.translate( 'magenta', 'magenta' )];
+ options[6] = ["red", this.translate( 'red', 'red' )];
+ options[7] = ["black", this.translate( 'black', 'black' )];
break;
case "prefCaptionsSize":
@@ -11014,8 +11046,8 @@ if (typeof module !== "undefined" && module.exports) {
break;
case "prefCaptionsStyle":
- options[0] = this.tt.captionsStylePopOn;
- options[1] = this.tt.captionsStyleRollUp;
+ options[0] = this.translate( 'captionsStylePopOn', 'Pop-on' );
+ options[1] = this.translate( 'captionsStyleRollUp', 'Roll-up' );
break;
case "prefCaptionsPosition":
@@ -11175,9 +11207,9 @@ if (typeof module !== "undefined" && module.exports) {
this.$chaptersNav = $('');
if (this.chaptersTitle) {
- this.$chaptersNav.attr('aria-labelledby',headingId);
+ this.$chaptersNav.attr( 'aria-labelledby', headingId );
} else {
- this.$chaptersNav.attr('aria-label',this.tt.chapters);
+ this.$chaptersNav.attr( 'aria-label', this.translate( 'chapters', 'Chapters' ) );
}
this.$chaptersDiv.append(this.$chaptersNav);
@@ -11473,7 +11505,11 @@ if (typeof module !== "undefined" && module.exports) {
typeof showDuration !== "undefined" &&
!isNaN(showDuration)
) {
- $(line).show().delay(showDuration).fadeOut();
+ $(line).show();
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ delay(showDuration).then(() => {
+ $(line).hide();
+ });
} else {
// no duration specified. Just show the element until end time specified in VTT file
$(line).show();
@@ -11545,7 +11581,7 @@ if (typeof module !== "undefined" && module.exports) {
(function ($) {
AblePlayer.prototype.setupTranscript = function () {
- var deferred = new $.Deferred();
+ var deferred = new this.defer();
var promise = deferred.promise();
if (this.usingYouTubeCaptions || this.usingVimeoCaptions || this.hideTranscriptButton ) {
@@ -11591,7 +11627,7 @@ if (typeof module !== "undefined" && module.exports) {
this.$transcriptArea = $("", {
class: "able-transcript-area",
role: "dialog",
- "aria-label": this.tt.transcriptTitle,
+ "aria-label": this.translate( 'transcriptTitle', 'Transcript' ),
});
this.$transcriptToolbar = $("
", {
@@ -11611,7 +11647,7 @@ if (typeof module !== "undefined" && module.exports) {
});
$autoScrollLabel = $("
", {
for: "autoscroll-transcript-checkbox-" + this.mediaId,
- }).text(this.tt.autoScroll);
+ }).text( this.translate( 'autoScroll', 'Auto scroll' ) );
$autoScrollContainer = $( '', {
'class': 'autoscroll-transcript'
});
@@ -11629,7 +11665,7 @@ if (typeof module !== "undefined" && module.exports) {
});
$languageSelectLabel = $("
", {
for: "transcript-language-select-" + this.mediaId,
- }).text(this.tt.language);
+ }).text( this.translate( 'language', 'Language' ) );
this.$transcriptLanguageSelect = $("", {
id: "transcript-language-select-" + this.mediaId,
});
@@ -11704,7 +11740,7 @@ if (typeof module !== "undefined" && module.exports) {
);
if (typeof this.$transcriptLanguageSelect !== "undefined") {
- this.$transcriptLanguageSelect.on("click mousedown", function (e) {
+ this.$transcriptLanguageSelect.on('click', function (e) {
// execute default behavior
// prevent propagation of mouse event to toolbar or window
e.stopPropagation();
@@ -11754,7 +11790,7 @@ if (typeof module !== "undefined" && module.exports) {
});
$autoScrollLabel = $("", {
for: "autoscroll-transcript-checkbox-" + this.mediaId,
- }).text(this.tt.autoScroll);
+ }).text( this.translate( 'autoScroll', 'Auto scroll' ) );
// Add an auto-scroll checkbox to the toolbar.
this.$autoScrollTranscriptCheckbox = $autoScrollInput;
@@ -11934,9 +11970,9 @@ if (typeof module !== "undefined" && module.exports) {
if (typeof this.transcriptTitle !== "undefined") {
transcriptTitle = this.transcriptTitle;
} else if (this.lyricsMode) {
- transcriptTitle = this.tt.lyricsTitle;
+ transcriptTitle = this.translate( 'lyricsTitle', 'Lyrics' );
} else {
- transcriptTitle = this.tt.transcriptTitle;
+ transcriptTitle = this.translate( 'transcriptTitle', 'Transcript' );
}
if (!this.transcriptDivLocation) {
@@ -12330,7 +12366,7 @@ if (typeof module !== "undefined" && module.exports) {
// sanitize search string
var cleanSearchString = DOMPurify.sanitize(this.searchString);
if ($("#" + this.SearchDiv)) {
- var searchStringHtml = "" + this.tt.resultsSummary1 + " ";
+ var searchStringHtml = "
" + this.translate( 'resultsSummary1', 'You searched for:') + ' ';
searchStringHtml +=
'' + cleanSearchString + " ";
searchStringHtml += "
";
@@ -12342,19 +12378,16 @@ if (typeof module !== "undefined" && module.exports) {
var $resultsSummary = $("", {
class: "able-search-results-summary",
});
- var resultsSummaryText = this.tt.resultsSummary2;
- resultsSummaryText +=
- " " + resultsArray.length + " ";
- resultsSummaryText += this.tt.resultsSummary3 + " ";
- resultsSummaryText += this.tt.resultsSummary4;
- $resultsSummary.html(resultsSummaryText);
+ var resultsSummaryText = this.translate( 'resultsSummary2', 'Found %1 matching items.', [ '' + resultsArray.length + ' ' ] );
+ resultsSummaryText += ' ' + this.translate( 'resultsSummary3', 'Click the time associated with any item to play the video from that point.' );
+ $resultsSummary.html( resultsSummaryText );
var $resultsList = $("
");
for (var i = 0; i < resultsArray.length; i++) {
var resultId = "aria-search-result-" + i;
var $resultsItem = $("", {});
var itemStartTime = this.secondsToTime(resultsArray[i]["start"]);
var itemLabel =
- this.tt.searchButtonLabel + " " + itemStartTime["title"];
+ this.translate( 'searchButtonLabel', 'Play at %1', [ itemStartTime["title"] ] );
var itemStartSpan = $("", {
class: "able-search-results-time",
"data-start": resultsArray[i]["start"],
@@ -12377,16 +12410,16 @@ if (typeof module !== "undefined" && module.exports) {
class: "able-search-result-text",
id: resultId,
});
- itemText.html("..." + resultsArray[i]["caption"] + "...");
+ itemText.html('...' + resultsArray[i]["caption"] + '...');
$resultsItem.append(itemStartSpan, itemText);
$resultsList.append($resultsItem);
}
- $("#" + this.searchDiv)
+ $('#' + this.searchDiv)
.html(searchStringHtml)
.append($resultsSummary, $resultsList);
} else {
- var noResults = $("").text(this.tt.noResultsFound);
- $("#" + this.searchDiv)
+ var noResults = $('
').text( this.translate( 'noResultsFound', 'No results found.' ) );
+ $('#' + this.searchDiv)
.html(searchStringHtml)
.append(noResults);
}
@@ -12480,36 +12513,36 @@ if (typeof module !== "undefined" && module.exports) {
if (hours > 0) {
value += hours + ":";
if (hours == 1) {
- title += "1 " + this.tt.hour + " ";
+ title += "1 " + this.translate( 'hour', 'hour' ) + " ";
} else {
- title += hours + " " + this.tt.hours + " ";
+ title += hours + " " + this.translate( 'hours', 'hours' ) + " ";
}
}
if (minutes < 10) {
value += "0" + minutes + ":";
if (minutes > 0) {
if (minutes == 1) {
- title += "1 " + this.tt.minute + " ";
+ title += "1 " + this.translate( 'minute', 'minute' ) + " ";
} else {
- title += minutes + " " + this.tt.minutes + " ";
+ title += minutes + " " + this.translate( 'minutes', 'minutes' ) + " ";
}
}
} else {
value += minutes + ":";
- title += minutes + " " + this.tt.minutes + " ";
+ title += minutes + " " + this.translate( 'minutes', 'minutes' ) + " ";
}
if (seconds < 10) {
value += "0" + seconds;
if (seconds > 0) {
if (seconds == 1) {
- title += "1 " + this.tt.second + " ";
+ title += "1 " + this.translate( 'second', 'second' ) + " ";
} else {
- title += seconds + " " + this.tt.seconds + " ";
+ title += seconds + " " + this.translate( 'seconds', 'seconds' ) + " ";
}
}
} else {
value += seconds;
- title += seconds + " " + this.tt.seconds + " ";
+ title += seconds + " " + this.translate( 'seconds', 'seconds' ) + " ";
}
var time = [];
time["value"] = value;
@@ -12868,9 +12901,6 @@ if (typeof module !== "undefined" && module.exports) {
this.showingPrefsDialog = false;
}
break;
- case 'help':
- this.handleHelpClick();
- break;
case 'transcript':
if ( !this.closingTranscript ) {
this.handleTranscriptToggle();
@@ -12884,10 +12914,8 @@ if (typeof module !== "undefined" && module.exports) {
};
AblePlayer.prototype.getButtonNameFromClass = function (classString) {
-
// player control buttons all have class="able-button-handler-x" where x is the identifier
// buttons might also have other classes assigned though
-
var classes, i;
classes = classString.split(' ');
@@ -12900,12 +12928,15 @@ if (typeof module !== "undefined" && module.exports) {
}
AblePlayer.prototype.okToHandleKeyPress = function () {
-
- // returns true unless user's focus is on a UI element
+ let defaultReturn = true;
+ if ( this.prefNoKeyShortcuts === 1 ) {
+ defaultReturn = false;
+ }
+ // returns true unless user's focus is on a UI element or user has disabled keyboard shortcuts.
// that is likely to need supported keystrokes, including space
var activeElement = AblePlayer.getActiveDOMElement();
- return ($(activeElement).prop('tagName') === 'INPUT') ? false : true;
+ return ($(activeElement).prop('tagName') === 'INPUT') ? false : defaultReturn;
};
AblePlayer.prototype.onPlayerKeyPress = function (e) {
@@ -12913,11 +12944,11 @@ if (typeof module !== "undefined" && module.exports) {
// handle keystrokes (using DHTML Style Guide recommended key combinations)
// https://web.archive.org/web/20130127004544/http://dev.aol.com/dhtml_style_guide/#mediaplayer
// Modifier keys Alt + Ctrl are on by default, but can be changed within Preferences
- // NOTE #1: Style guide only supports Play/Pause, Stop, Mute, Captions, & Volume Up & Down
+ // - Style guide only supports Play/Pause, Stop, Mute, Captions, & Volume Up & Down
// The rest are reasonable best choices
- // NOTE #2: If there are multiple players on a single page, keystroke handlers
+ // - If there are multiple players on a single page, keystroke handlers
// are only bound to the FIRST player
- // NOTE #3: The DHTML Style Guide is now the W3C WAI-ARIA Authoring Guide and has undergone many revisions
+ // - The DHTML Style Guide is now the W3C WAI-ARIA Authoring Guide and has undergone many revisions
// including removal of the "media player" design pattern. There's an issue about that:
// https://github.com/w3c/aria-practices/issues/27
@@ -13240,7 +13271,7 @@ if (typeof module !== "undefined" && module.exports) {
};
AblePlayer.prototype.addEventListeners = function () {
- // Save the current object context in thisObj for use with inner functions.
+
var thisObj = this;
// Appropriately resize media player for full screen.
@@ -13357,7 +13388,7 @@ if (typeof module !== "undefined" && module.exports) {
});
// handle local keydown events if this isn't the only player on the page;
- // otherwise these are dispatched by global handler (see ableplayer-base,js)
+ // otherwise these are dispatched by global handler (see ableplayer-base.js)
this.$ableDiv.on( 'keydown', function (e) {
if (AblePlayer.nextIndex > 1) {
thisObj.onPlayerKeyPress(e);
@@ -13435,18 +13466,23 @@ if (typeof module !== "undefined" && module.exports) {
$window = this.$transcriptArea;
windowName = 'transcript-window';
$toolbar = this.$transcriptToolbar;
- $toolbar.attr( 'aria-label', this.tt.transcriptControls );
+ $toolbar.attr( 'aria-label', this.translate( 'transcriptControls', 'Transcript Window Controls' ) );
} else if (which === 'sign') {
$window = this.$signWindow;
windowName = 'sign-window';
$toolbar = this.$signToolbar;
- $toolbar.attr( 'aria-label', this.tt.signControls );
+ $toolbar.attr( 'aria-label', this.translate( 'signControls', 'Sign Language Window Controls' ) );
}
// add class to trigger change in cursor on hover
$toolbar.addClass('able-draggable');
$toolbar.attr( 'role', 'application' );
+ $dragHandle = $('
',{
+ 'class': 'able-drag-handle'
+ });
+
+ $dragHandle.html('
');
// add resize handle selector to bottom right corner
$resizeHandle = $('
',{
'class': 'able-resizable'
@@ -13491,13 +13527,14 @@ if (typeof module !== "undefined" && module.exports) {
resizeZIndex = parseInt($window.css('z-index')) + 100;
$resizeHandle.css('z-index',resizeZIndex);
$window.append($resizeHandle);
+ $toolbar.append($dragHandle);
// Final step: Need to refresh the DOM in order for browser to process & display the SVG
$resizeHandle.html($resizeHandle.html());
// add event listener to toolbar to start and end drag
// other event listeners will be added when drag starts
- $toolbar.on('mousedown mouseup touchstart touchend', function(e) {
+ $dragHandle.on('mousedown mouseup touchstart touchend', function(e) {
e.stopPropagation();
if (e.type === 'mousedown' || e.type === 'touchstart' ) {
if (!thisObj.windowMenuClickRegistered) {
@@ -13541,7 +13578,6 @@ if (typeof module !== "undefined" && module.exports) {
}
thisObj.finishingDrag = false;
});
-
this.addWindowMenu(which,$window,windowName);
};
@@ -13571,7 +13607,7 @@ if (typeof module !== "undefined" && module.exports) {
'class': 'able-button-handler-preferences'
});
this.getIcon( $newButton, 'preferences' );
- this.setText( $newButton, this.tt.windowButtonLabel );
+ this.setText( $newButton, this.translate( 'windowButtonLabel', 'Window options' ) );
// add a tooltip that displays aria-label on mouseenter or focus
tooltipId = this.mediaId + '-' + windowName + '-tooltip';
@@ -13613,7 +13649,7 @@ if (typeof module !== "undefined" && module.exports) {
}
// handle button click
- $newButton.on('click mousedown keydown',function(e) {
+ $newButton.on('click keydown',function(e) {
if (thisObj.focusNotClick) {
return false;
@@ -13624,6 +13660,7 @@ if (typeof module !== "undefined" && module.exports) {
}
e.stopPropagation();
if (!thisObj.windowMenuClickRegistered && !thisObj.finishingDrag) {
+ console.log( 'firing' );
// don't set windowMenuClickRegistered yet; that happens in handler function
thisObj.handleWindowButtonClick(which, e);
}
@@ -13637,7 +13674,8 @@ if (typeof module !== "undefined" && module.exports) {
var thisObj, $windowPopup, $windowButton, widthId, heightId,
$resizeForm, $resizeWrapper, $resizeWidthDiv, $resizeWidthInput, $resizeWidthLabel,
- $resizeHeightDiv, $resizeHeightInput, $resizeHeightLabel, $saveButton, $cancelButton, newWidth, newHeight, resizeDialog;
+ $resizeHeightDiv, $resizeHeightInput, $resizeHeightLabel, $saveButton, $cancelButton,
+ newWidth, newHeight, resizeDialog;
thisObj = this;
@@ -13670,7 +13708,7 @@ if (typeof module !== "undefined" && module.exports) {
});
$resizeWidthLabel = $('
',{
'for': widthId
- }).text(this.tt.width);
+ }).text( this.translate( 'width', 'Width' ) );
// height field
$resizeHeightDiv = $('
');
@@ -13682,16 +13720,16 @@ if (typeof module !== "undefined" && module.exports) {
});
$resizeHeightLabel = $('',{
'for': heightId
- }).text(this.tt.height);
+ }).text( this.translate( 'height', 'Height' ) );
// Add save and cancel buttons.
- $saveButton = $('' + this.tt.save + ' ');
- $cancelButton = $('' + this.tt.cancel + ' ');
+ $saveButton = $('' + this.translate( 'save', 'Save' ) + ' ');
+ $cancelButton = $('' + this.translate( 'cancel', 'Cancel' ) + ' ');
$saveButton.on('click',function () {
newWidth = $('#' + widthId).val();
newHeight = $('#' + heightId).val();
thisObj.resizeObject(which,newWidth,newHeight);
- thisObj.updateCookie(which);
+ thisObj.updatePreferences(which);
resizeDialog.hide();
$windowPopup.hide();
@@ -13715,7 +13753,12 @@ if (typeof module !== "undefined" && module.exports) {
// that will include an ancestor of the dialog,
// which will render the dialog unreadable by screen readers
$('body').append($resizeForm);
- resizeDialog = new AccessibleDialog($resizeForm, $windowButton, 'dialog', true, this.tt.windowResizeHeading, $resizeWrapper, this.tt.closeButtonLabel, '20em');
+ resizeDialog = new AccessibleDialog(
+ $resizeForm,
+ $windowButton,
+ this.translate( 'windowResizeHeading', 'Resize Window' ),
+ this.translate( 'closeButtonLabel', 'Close' ),
+ );
if (which === 'transcript') {
this.transcriptResizeDialog = resizeDialog;
} else if (which === 'sign') {
@@ -13728,7 +13771,6 @@ if (typeof module !== "undefined" && module.exports) {
var thisObj, $windowPopup, $windowButton, $toolbar, popupTop;
thisObj = this;
-
if (this.focusNotClick) {
// transcript or sign window has just opened,
// and focus moved to the window button
@@ -13745,7 +13787,6 @@ if (typeof module !== "undefined" && module.exports) {
$windowButton = this.$signPopupButton;
$toolbar = this.$signToolbar;
}
-
if (e.type === 'keydown') {
// user pressed a key
if (e.key === ' ' || e.key === 'Enter') {
@@ -13753,14 +13794,13 @@ if (typeof module !== "undefined" && module.exports) {
} else if (e.key === 'Escape') {
if ($windowPopup.is(':visible')) {
// close the popup menu
- $windowPopup.hide('fast', function() {
- // also reset the Boolean
- thisObj.windowMenuClickRegistered = false;
- // also restore menu items to their original state
- $windowPopup.find('li').removeClass('able-focus').attr('tabindex','-1');
- // also return focus to window options button
- $windowButton.trigger('focus');
- });
+ $windowPopup.hide();
+ // also reset the Boolean
+ thisObj.windowMenuClickRegistered = false;
+ // also restore menu items to their original state
+ $windowPopup.find('li').removeClass('able-focus').attr('tabindex','-1');
+ // also return focus to window options button
+ $windowButton.trigger('focus');
} else {
// popup isn't open. Close the window
if (which === 'sign') {
@@ -13777,10 +13817,9 @@ if (typeof module !== "undefined" && module.exports) {
this.windowMenuClickRegistered = true;
}
- if ($windowPopup.is(':visible')) {
- $windowPopup.hide(200,'',function() {
- thisObj.windowMenuClickRegistered = false; // reset
- });
+ if ( $windowPopup.is(':visible') ) {
+ $windowPopup.hide();
+ thisObj.windowMenuClickRegistered = false; // reset
$windowPopup.find('li').removeClass('able-focus');
$windowButton.attr('aria-expanded','false').trigger('focus');
} else {
@@ -13788,11 +13827,10 @@ if (typeof module !== "undefined" && module.exports) {
this.updateZIndex(which);
popupTop = $toolbar.outerHeight() - 1;
$windowPopup.css('top', popupTop);
- $windowPopup.show(200,'',function() {
- $windowButton.attr('aria-expanded','true');
- $(this).find('li').first().trigger('focus').addClass('able-focus');
- thisObj.windowMenuClickRegistered = false; // reset
- });
+ $windowPopup.show();
+ $windowButton.attr('aria-expanded','true');
+ $(this).find('li').first().trigger('focus').addClass('able-focus');
+ thisObj.windowMenuClickRegistered = false; // reset
}
};
@@ -13832,15 +13870,15 @@ if (typeof module !== "undefined" && module.exports) {
if (e.type === 'keydown') {
if (e.key === 'Escape') { // escape
// hide the popup menu
- $windowPopup.hide('fast', function() {
- // also reset the Boolean
- thisObj.windowMenuClickRegistered = false;
- // also restore menu items to their original state
- $windowPopup.find('li').removeClass('able-focus').attr('tabindex','-1');
- $windowButton.attr('aria-expanded','false');
- // also return focus to window options button
- $windowButton.trigger('focus');
- });
+ $windowPopup.hide();
+ // also reset the Boolean
+ thisObj.windowMenuClickRegistered = false;
+ // also restore menu items to their original state
+ $windowPopup.find('li').removeClass('able-focus').attr('tabindex','-1');
+ $windowButton.attr('aria-expanded','false');
+ // also return focus to window options button
+ $windowButton.trigger('focus');
+
return false;
} else {
// all other keys will be handled by upstream functions
@@ -13852,13 +13890,13 @@ if (typeof module !== "undefined" && module.exports) {
}
// hide the popup menu
- $windowPopup.hide('fast', function() {
- // also reset the boolean
- thisObj.windowMenuClickRegistered = false;
- // also restore menu items to their original state
- $windowPopup.find('li').removeClass('able-focus').attr('tabindex','-1');
- $windowButton.attr('aria-expanded','false');
- });
+ $windowPopup.hide();
+ // also reset the boolean
+ thisObj.windowMenuClickRegistered = false;
+ // also restore menu items to their original state
+ $windowPopup.find('li').removeClass('able-focus').attr('tabindex','-1');
+ $windowButton.attr('aria-expanded','false');
+
if (choice !== 'close') {
$windowButton.trigger('focus');
}
@@ -13868,7 +13906,7 @@ if (typeof module !== "undefined" && module.exports) {
this.$activeWindow.attr('role','application');
if (!this.showedAlert(which)) {
- this.showAlert(this.tt.windowMoveAlert,which);
+ this.showAlert( this.translate( 'windowMoveAlert', 'Drag or use arrow keys to move the window; Enter to stop' ),which);
if (which === 'transcript') {
this.showedTranscriptAlert = true;
} else if (which === 'sign') {
@@ -13980,8 +14018,6 @@ if (typeof module !== "undefined" && module.exports) {
var key, keySpeed;
- var thisObj = this;
-
// stopgap to prevent firing on initial Enter or space
// that selected "Move" from menu
if (this.startingDrag) {
@@ -13994,23 +14030,23 @@ if (typeof module !== "undefined" && module.exports) {
switch (key) {
case 'ArrowLeft': // left
this.dragKeyX -= keySpeed;
- this.$srAlertBox.text( this.tt.windowMoveLeft );
+ this.$srAlertBox.text( this.translate( 'windowMoveLeft', 'Window moved left' ) );
break;
case 'ArrowUp': // up
this.dragKeyY -= keySpeed;
- this.$srAlertBox.text( this.tt.windowMoveUp );
+ this.$srAlertBox.text( this.translate( 'windowMoveUp', 'Window moved up' ) );
break;
case 'ArrowRight': // right
this.dragKeyX += keySpeed;
- this.$srAlertBox.text( this.tt.windowMoveRight );
+ this.$srAlertBox.text( this.translate( 'windowMoveRight', 'Window moved right' ) );
break;
case 'ArrowDown': // down
this.dragKeyY += keySpeed;
- this.$srAlertBox.text( this.tt.windowMoveDown );
+ this.$srAlertBox.text( this.translate( 'windowMoveDown', 'Window moved down' ) );
break;
case 'Enter': // enter
case 'Escape': // escape
- this.$srAlertBox.text( this.tt.windowMoveStopped );
+ this.$srAlertBox.text( this.translate( 'windowMoveStopped', 'Window move stopped' ) );
this.endDrag(which);
return false;
default:
@@ -14078,7 +14114,7 @@ if (typeof module !== "undefined" && module.exports) {
this.dragging = false;
// save final position of dragged element
- this.updateCookie(which);
+ this.updatePreferences(which);
// reset starting mouse positions
this.startMouseX = undefined;
@@ -14098,7 +14134,7 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.startResize = function(which, $element) {
- var thisObj, $windowPopup, startPos, newWidth, newHeight;
+ var thisObj, $windowPopup, newWidth, newHeight;
thisObj = this;
this.$activeWindow = $element;
@@ -14150,7 +14186,7 @@ if (typeof module !== "undefined" && module.exports) {
this.$activeWindow.removeClass('able-resize');
// save final width and height of dragged element
- this.updateCookie(which);
+ this.updatePreferences(which);
// Booleans for preventing stray events
this.windowMenuClickRegistered = false;
@@ -14214,16 +14250,21 @@ if (typeof module !== "undefined" && module.exports) {
signVideoId = this.mediaId + '-sign';
if ( this.signFile || this.signYoutubeId ) {
- this.$signWindow = $('',{
- 'class' : 'able-sign-window',
- 'role': 'dialog',
- 'aria-label': this.tt.sign
- });
- this.$signToolbar = $('
',{
- 'class': 'able-window-toolbar able-' + this.toolbarIconColor + '-controls'
- });
+ if ( null !== this.$signDivLocation ) {
+ this.$signDivLocation.addClass( 'able-sign-window able-fixed' );
+ this.$signWindow = this.$signDivLocation;
+ } else {
+ this.$signWindow = $('
',{
+ 'class' : 'able-sign-window',
+ 'role': 'dialog',
+ 'aria-label': this.translate( 'sign', 'Sign language' )
+ });
+ this.$signToolbar = $('
',{
+ 'class': 'able-window-toolbar able-' + this.toolbarIconColor + '-controls'
+ });
+ this.$signWindow.append(this.$signToolbar);
+ }
- this.$signWindow.append(this.$signToolbar);
this.$ableWrapper.append(this.$signWindow);
}
@@ -14266,11 +14307,15 @@ if (typeof module !== "undefined" && module.exports) {
}
// make it draggable
- this.initDragDrop('sign');
+ if ( null === this.$signDivLocation ) {
+ this.initDragDrop('sign');
+ }
if (this.prefSign === 1) {
// sign window is on. Go ahead and position it and show it
- this.positionDraggableWindow('sign',this.getDefaultWidth('sign'));
+ if ( null === this.$signDivLocation ) {
+ this.positionDraggableWindow('sign',this.getDefaultWidth('sign'));
+ }
} else {
this.$signWindow.hide();
}
@@ -14281,7 +14326,7 @@ if (typeof module !== "undefined" && module.exports) {
var thisObj, deferred, promise;
thisObj = this;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
this.youTubeSignPlayerReady = false;
@@ -14293,9 +14338,9 @@ if (typeof module !== "undefined" && module.exports) {
});
} else {
// Has another player already started loading the script? If so, abort...
- if (!AblePlayer.loadingYouTubeIframeAPI) {
- $.getScript('https://www.youtube.com/iframe_api').fail(function () {
- deferred.fail();
+ if ( ! AblePlayer.loadingYouTubeIframeAPI ) {
+ thisObj.getScript('https://www.youtube.com/iframe_api', function () {
+ console.log( 'YouTube API loaded' );
});
}
@@ -14314,7 +14359,7 @@ if (typeof module !== "undefined" && module.exports) {
// This is called once we're sure the Youtube iFrame API is loaded -- see above
var deferred, promise, thisObj, containerId, ccLoadPolicy, autoplay;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
thisObj = this;
containerId = this.mediaId + '_youtube_sign';
@@ -14349,10 +14394,10 @@ if (typeof module !== "undefined" && module.exports) {
deferred.resolve();
},
onError: function (x) {
- deferred.fail();
+ deferred.reject();
},
onStateChange: function (x) {
- thisObj.getPlayerState().then(function(playerState) {
+ thisObj.getPlayerState().then(function() {
// no actions
});
},
@@ -15373,41 +15418,86 @@ if (typeof module !== "undefined" && module.exports) {
(function ($) {
AblePlayer.prototype.getSupportedLangs = function() {
// returns an array of languages for which AblePlayer has translation tables
- var langs = ['ca','cs','da','de','en','es','fr','he','id','it','ja','ms','nb','nl','pl','pt','pt-br','sv','tr','zh-tw'];
+ var langs = {
+ 'ca' : 'Catalan',
+ 'cs' : 'Czech',
+ 'da' : 'Danish',
+ 'de' : 'German',
+ 'en' : 'English',
+ 'es' : 'Spanish',
+ 'fr' : 'French',
+ 'he' : 'Hebrew',
+ 'id' : 'Indonesian',
+ 'it' : 'Italian',
+ 'ja' : 'Japanese',
+ 'ms' : 'Malay',
+ 'nb' : 'Norwegian Bokmål',
+ 'nl' : 'Dutch',
+ 'pl' : 'Polish',
+ 'pt' : 'Portuguese',
+ 'pt-br' : 'Brazilian Portuguese',
+ 'sv' : 'Swedish',
+ 'tr' : 'Turkish',
+ 'zh-tw' : 'Chinese (Taiwan)'
+ };
+
return langs;
};
+ /**
+ * Fetch a translated string if it exists.
+ *
+ * @param {string} key JSON key to locate translated string.
+ * @param {string} fallback Default language if no translation found.
+ * @param {Array} args Ordered array of arguments to replace in string.
+ * @returns
+ */
+ AblePlayer.prototype.translate = function( key, fallback, args = Array() ) {
+ let translation = '';
+ if ( this.tt[ key ] ) {
+ translation = this.tt[ key ];
+ } else {
+ translation = fallback;
+ }
+ if ( args.length > 0 ) {
+ args.forEach( ( val, index ) => {
+ let ref = index + 1;
+ translation = translation.replace( '%' + ref, val );
+ });
+ }
+
+ return translation;
+ }
+
AblePlayer.prototype.getTranslationText = function() {
// determine language, then get labels and prompts from corresponding translation var
var deferred, thisObj, supportedLangs, docLang, translationFile, i, similarLangFound;
- deferred = $.Deferred();
+ deferred = new this.defer();
thisObj = this;
supportedLangs = this.getSupportedLangs(); // returns an array
if (this.lang) { // a data-lang attribute is included on the media element
- if ($.inArray(this.lang,supportedLangs) === -1) {
+ if ( Object.hasOwn( supportedLangs,this.lang ) ) {
// the specified language is not supported
- if (this.lang.indexOf('-') == 2) {
+ if ( this.lang.indexOf('-') == 2 ) {
// this is a localized lang attribute (e.g., fr-CA)
// try the parent language, given the first two characters
// if parent lang is supported. Use that, else null.
- this.lang = ($.inArray(this.lang.substring(0,2),supportedLangs) !== -1) ? this.lang.substring(0,2) : null;
+ this.lang = ( Object.hasOwn(supportedLangs,this.lang.substring(0,2)) !== -1 ) ? this.lang.substring(0,2) : null;
} else {
// this is not a localized language.
// but maybe there's a similar localized language supported
// that has the same parent?
similarLangFound = false;
- i = 0;
- while (i < supportedLangs.length) {
- if (supportedLangs[i].substring(0,2) == this.lang) {
+ for ( const [key,value] of Object.entries(supportedLangs) ) {
+ if ( key.substring(0,2) == this.lang ) {
this.lang = supportedLangs[i];
similarLangFound = true;
}
- i++;
}
- if (!similarLangFound) {
+ if ( !similarLangFound ) {
// language requested via data-lang is not supported
this.lang = null;
}
@@ -15425,7 +15515,7 @@ if (typeof module !== "undefined" && module.exports) {
docLang = null;
}
if (docLang) {
- if ($.inArray(docLang,supportedLangs) !== -1) {
+ if ( Object.hasOwn( supportedLangs,docLang ) ) {
// the document language is supported
this.lang = docLang;
} else {
@@ -15433,7 +15523,7 @@ if (typeof module !== "undefined" && module.exports) {
if (docLang.indexOf('-') == 2) {
// this is a localized lang attribute (e.g., fr-CA)
// try the parent language, given the first two characters
- if ($.inArray(docLang.substring(0,2),supportedLangs) !== -1) {
+ if ( Object.hasOwn(supportedLangs,docLang.substring(0,2)) ) {
// the parent language is supported. use that.
this.lang = docLang.substring(0,2);
}
@@ -15452,50 +15542,64 @@ if (typeof module !== "undefined" && module.exports) {
this.searchLang = this.lang;
}
translationFile = this.rootPath + 'translations/' + this.lang + '.json';
- $.getJSON(translationFile, function(data) {
- // success!
- thisObj.tt = data;
- deferred.resolve();
- })
- .fail(function() {
- console.log( "Error: Translation files need to be updated to JSON.",translationFile);
- translationFile = thisObj.rootPath + 'translations/' + thisObj.lang + '.js';
- $.getJSON(translationFile, function(data) {
- // success!
+ fetch(translationFile)
+ .then( response => {
+ return response.json();
+ })
+ .then( data => {
thisObj.tt = data;
+ thisObj.translationFiles = true;
deferred.resolve();
})
- .fail( function() {
- console.log( "Critical Error: Unable to load translation file:",translationFile);
- thisObj.provideFallback();
- deferred.fail();
+ .catch( error => {
+ console.log( "Error: Translation files should be updated to JSON." + error,translationFile);
+ translationFile = thisObj.rootPath + 'translations/' + thisObj.lang + '.js';
+ fetch(translationFile)
+ .then( response => {
+ return response.json();
+ })
+ .then( data => {
+ thisObj.tt = data;
+ thisObj.translationFiles = true;
+ deferred.resolve();
+ })
+ .catch( error => {
+ console.log( "Error: Unable to load translation file:", translationFile);
+ thisObj.tt = {};
+ thisObj.translationFiles = false;
+ deferred.resolve();
+ });
});
- })
return deferred.promise();
};
AblePlayer.prototype.getSampleDescriptionText = function() {
+ if ( ! this.translationFiles ) {
+ this.sampleText = [];
+ let translation = { 'lang':'en', 'text': this.translate( 'sampleDescriptionText', 'Adjust settings to hear this sample text.' ) };
+ this.sampleText.push(translation);
+ } else {
+ // Create an array of sample description text in all languages
+ // This needs to be readily available for testing different voices
+ // in the Description Preferences dialog
+ var thisObj, supportedLangs, thisLang, translationFile, thisText, translation;
- // Create an array of sample description text in all languages
- // This needs to be readily available for testing different voices
- // in the Description Preferences dialog
- var thisObj, supportedLangs, i, thisLang, translationFile, thisText, translation;
-
- supportedLangs = this.getSupportedLangs();
-
- thisObj = this;
+ supportedLangs = this.getSupportedLangs();
+ thisObj = this;
- this.sampleText = [];
- for (i=0; i < supportedLangs.length; i++) {
- translationFile = this.rootPath + 'translations/' + supportedLangs[i] + '.json';
- $.getJSON(translationFile, thisLang, (function(thisLang) {
- return function(data) {
+ this.sampleText = [];
+ for ( const [key,value] of Object.entries(supportedLangs) ) {
+ translationFile = this.rootPath + 'translations/' + key + '.json';
+ fetch(translationFile)
+ .then( response => {
+ return response.json();
+ })
+ .then( data => {
thisText = data.sampleDescriptionText;
translation = {'lang':thisLang, 'text': thisText};
thisObj.sampleText.push(translation);
- };
- }(supportedLangs[i])) // pass lang to callback function
- );
+ });
+ }
}
};
@@ -15509,8 +15613,6 @@ if (typeof module !== "undefined" && module.exports) {
(function ($) {
AblePlayer.prototype.injectVTS = function() {
- // To add a transcript sorter to a web page:
-
var thisObj, $heading, $instructions, $p1, $p2, $ul, $li1, $li2, $li3,
$fieldset, $legend, i, $radioDiv, radioId, $label, $radio, $saveButton, $savedTable;
@@ -15527,7 +15629,8 @@ if (typeof module !== "undefined" && module.exports) {
this.vtsLang = this.lang;
// Inject a heading
- $heading = $('
').text('Video Transcript Sorter'); // TODO: Localize; intelligently assign proper heading level
+ let heading = this.translate( 'vtsHeading', 'Video Transcript Sorter' );
+ $heading = $('').text( heading ); // TODO: intelligently assign proper heading level
$('#able-vts').append($heading);
// Inject an empty div for writing messages
@@ -15542,19 +15645,19 @@ if (typeof module !== "undefined" && module.exports) {
$instructions = $('',{
'id': 'able-vts-instructions'
});
- $p1 = $('
').text('Use the Video Transcript Sorter to modify text tracks:');
+ $p1 = $('
').text( this.translate( 'vtsInstructions1', 'Use the Video Transcript Sorter to modify text tracks:' ) );
$ul = $('
');
- $li1 = $('').text('Reorder chapters, descriptions, captions, and/or subtitles so they appear in the proper sequence in Able Player\'s auto-generated transcript.');
- $li2 = $(' ').text('Modify content or start/end times (all are directly editable within the table).');
- $li3 = $(' ').text('Add new content, such as chapters or descriptions.');
- $p2 = $('').text('After editing, click the "Save Changes" button to generate new content for all relevant timed text files. The new text can be copied and pasted into new WebVTT files.');
+ $li1 = $('
').text( this.translate( 'vtsInstructions2', 'Reorder chapters, descriptions, captions, and/or subtitles so they appear in the proper sequence in Able Player\'s auto-generated transcript.' ) );
+ $li2 = $(' ').text( this.translate( 'vtsInstructions3', 'Modify content or start/end times (all are directly editable within the table).' ) );
+ $li3 = $(' ').text( this.translate( 'vtsInstructions4', 'Add new content, such as chapters or descriptions.' ) );
+ $p2 = $('').text( this.translate( 'vtsInstructions5', 'After editing, click the "Save Changes" button to generate new content for all relevant timed text files. The new text can be copied and pasted into new WebVTT files.' ) );
$ul.append($li1,$li2,$li3);
$instructions.append($p1,$ul,$p2);
$('#able-vts').append($instructions);
// Inject a fieldset with radio buttons for each language
$fieldset = $('
');
- $legend = $('').text('Select a language'); // TODO: Localize this
+ $legend = $('').text( this.translate( 'vtsSelectLanguage', 'Select a language' ) );
$fieldset.append($legend);
$fieldWrapper = $( '
' );
for (i in this.langs) {
@@ -15588,13 +15691,13 @@ if (typeof module !== "undefined" && module.exports) {
}
$fieldset.append( $fieldWrapper );
$('#able-vts').append($fieldset);
-
- // Inject a 'Save Changes' button
+ let vtsSave = this.translate( 'vtsSave', 'Generate new .vtt content' );
+ // Inject a button to generate new files.
$saveButton = $('',{
'type': 'button',
'id': 'able-vts-save',
'value': 'save'
- }).text('Save Changes'); // TODO: Localize this
+ }).text( vtsSave );
$('#able-vts').append($saveButton);
// Inject a table with one row for each cue in the default language
@@ -15643,7 +15746,7 @@ if (typeof module !== "undefined" && module.exports) {
e.stopPropagation();
if ($(this).attr('value') == 'save') {
// replace table with WebVTT output in textarea fields (for copying/pasting)
- $(this).attr('value','cancel').text('Return to Editor'); // TODO: Localize this
+ $(this).attr('value','cancel').text( this.translate( 'vtsReturn', 'Return to Editor' ) );
$savedTable = $('#able-vts table');
$('#able-vts-instructions').hide();
$('#able-vts > fieldset').hide();
@@ -15652,13 +15755,13 @@ if (typeof module !== "undefined" && module.exports) {
thisObj.parseVtsOutput($savedTable);
} else {
// cancel saving, and restore the table using edited content
- $(this).attr('value','save').text('Save Changes'); // TODO: Localize this
+ $(this).attr('value','save').text( vtsSave );
$('#able-vts-output').remove();
$('#able-vts-instructions').show();
$('#able-vts > fieldset').show();
$('#able-vts').append($savedTable);
$('#able-vts').append(thisObj.getIconCredit());
- thisObj.showVtsAlert('Cancelling saving. Any edits you made have been restored in the VTS table.'); // TODO: Localize this
+ thisObj.showVtsAlert( this.translate( 'vtsCancel', 'Cancelling saving. Any edits you made have been restored in the VTS table.' ) );
}
});
}
@@ -15669,8 +15772,6 @@ if (typeof module !== "undefined" && module.exports) {
// TODO: Add support for trackDesc
// (to destinguish between tracks for the decribed vs non-described versions)
-
- // Called from tracks.js
var srcFile, vtsCues;
srcFile = this.getFilenameFromPath(src);
@@ -15801,11 +15902,16 @@ if (typeof module !== "undefined" && module.exports) {
$table = $('',{
'lang': lang
});
- $thead = $('');
- $tr = $('',{
- 'lang': 'en' // TEMP, until header row is localized
- });
- headers = ['Row','Kind','Start','End','Content','Actions']; // TODO: Localize this
+ $thead = $( '' );
+ $tr = $( '' );
+ headers = [
+ this.translate( 'vtsRow', 'Row' ),
+ this.translate( 'vtsKind', 'Kind' ),
+ this.translate( 'vtsStart', 'Start' ),
+ this.translate( 'vtsEnd', 'End' ),
+ this.translate( 'vtsContent', 'Content' ),
+ this.translate( 'vtsActions', 'Actions' )
+ ];
for (i=0; i < headers.length; i++) {
$th = $('', {
'scope': 'col'
@@ -16205,7 +16311,8 @@ if (typeof module !== "undefined" && module.exports) {
this.adjustTimes(newRowNum);
// Announce the insertion
- this.showVtsAlert('A new row ' + newRowNum + ' has been inserted'); // TODO: Localize this
+ let newAlert = this.translate( 'vtsNewRow', 'A new row %1 has been inserted.', [ newRowNum ] );
+ this.showVtsAlert( newAlert );
// Place focus in new select field
$select.trigger('focus');
@@ -16231,7 +16338,8 @@ if (typeof module !== "undefined" && module.exports) {
}
// Announce the deletion
- this.showVtsAlert('Row ' + rowNum + ' has been deleted'); // TODO: Localize this
+ let newAlert = this.translate( 'vtsDeletedRow', 'Row %1 has been deleted.', [ rowNum ] );
+ this.showVtsAlert( newAlert );
};
@@ -16262,9 +16370,8 @@ if (typeof module !== "undefined" && module.exports) {
// auto-adjust times
this.adjustTimes(otherRowNum);
- // Announce the move (TODO: Localize this)
- msg = 'Row ' + rowNum + ' has been moved ' + direction;
- msg += ' and is now Row ' + otherRowNum;
+ // Announce the move
+ msg = this.translate( 'vtsMovedRow', 'Row %1 has been moved %2 and is now Row %3.', [ rowNum, direction, otherRowNum ] );
this.showVtsAlert(msg);
};
@@ -16450,7 +16557,11 @@ if (typeof module !== "undefined" && module.exports) {
// because it's positioning needs are unique
// For now, alertDiv is fixed at top left of screen
// but could ultimately be modified to appear near the point of action in the VTS table
- this.$vtsAlert.text(message).show().delay(3000).fadeOut('slow');
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ this.$vtsAlert.text(message).show();
+ delay(10000).then(() => {
+ this.$vtsAlert.text(message).hide()
+ });
};
AblePlayer.prototype.parseVtsOutput = function($table) {
@@ -16523,10 +16634,10 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.initVimeoPlayer = function () {
- var thisObj, deferred, promise, containerId, vimeoId, autoplay, options;
+ var thisObj, deferred, promise, containerId, vimeoId, options;
thisObj = this;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
containerId = this.mediaId + '_vimeo';
@@ -16636,7 +16747,7 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.getVimeoPaused = function () {
var deferred, promise;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
this.vimeoPlayer.getPaused().then(function (paused) {
@@ -16650,7 +16761,7 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.getVimeoEnded = function () {
var deferred, promise;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
this.vimeoPlayer.getEnded().then(function (ended) {
@@ -16663,11 +16774,9 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.getVimeoState = function () {
- var thisObj, deferred, promise, promises, gettingPausedPromise, gettingEndedPromise;
-
- thisObj = this;
+ var deferred, promise, promises, gettingPausedPromise, gettingEndedPromise;
- deferred = new $.Deferred();
+ deferred = new this.defer();
promise = deferred.promise();
promises = [];
@@ -16694,10 +16803,10 @@ if (typeof module !== "undefined" && module.exports) {
// get data via Vimeo Player API, and push data to this.captions
// Note: Vimeo doesn't expose the caption cues themselves
// so this.captions will only include metadata about caption tracks; not cues
- var deferred = new $.Deferred();
+ var deferred = new this.defer();
var promise = deferred.promise();
- var thisObj, i, trackId, isDefaultTrack;
+ var thisObj, i, isDefaultTrack;
thisObj = this;
@@ -16751,29 +16860,23 @@ if (typeof module !== "undefined" && module.exports) {
AblePlayer.prototype.getVimeoPosterUrl = function (vimeoId, width) {
- // this is a placeholder, copied from getYouTubePosterUrl()
- // Vimeo doesn't seem to have anything similar,
- // Vimeo API for images: https://vimeo.com/api/v2/video/328769500.json
- // will require an unauthenticated API query.
+ // Vimeo Oembed only returns a 640px width image. Hope at some point there's an alternative.
+ var url = 'http://vimeo.com/api/oembed.json?url=https://vimeo.com/' + vimeoId, imageUrl = '';
+ console.log( url );
+ fetch( url ).then( response => {
- // return a URL for retrieving a YouTube poster image
- // supported values of width: 120, 320, 480, 640
+ return response.json();
+ })
+ .then( json => {
+ imageUrl = json.thumbnail_url;
+ })
+ .catch( error => {
+ if (thisObj.debug) {
+ console.log( 'Vimeo API query: ' + error );
+ }
+ });
- var url = 'https://img.youtube.com/vi/' + youTubeId;
- if (width == '120') {
- // default (small) thumbnail, 120 x 90
- return url + '/default.jpg';
- } else if (width == '320') {
- // medium quality thumbnail, 320 x 180
- return url + '/hqdefault.jpg';
- } else if (width == '480') {
- // high quality thumbnail, 480 x 360
- return url + '/hqdefault.jpg';
- } else if (width == '640') {
- // standard definition poster image, 640 x 480
- return url + '/sddefault.jpg';
- }
- return false;
+ return imageUrl;
};
AblePlayer.prototype.getVimeoId = function (url) {
diff --git a/build/ableplayer.min.css b/build/ableplayer.min.css
index 05ded3ad..22ee92cb 100644
--- a/build/ableplayer.min.css
+++ b/build/ableplayer.min.css
@@ -1 +1 @@
-:root{--able-white:#fff;--able-black:#000;--able-transparent-gray:#00000077;--able-medium-light-gray:#a8a8a8;--able-light-gray:#dadada;--able-very-light-gray:#eee;--able-off-white:#fdfdfd;--able-dark-gray:#262626;--able-medium-dark-gray:#333;--able-medium-dark-gray2:#464646;--able-medium-gray:#666;--able-bright-yellow:#ff6;--able-light-yellow:#ffc;--able-bright-orange:#f90;--able-light-orange:#ffbb37;--able-bright-green:#8ab839;--able-light-pink:#fee}.able-chapters-div,.able-modal-dialog,.able-modal-overlay,.able-playlist,.able-search-results,.able-transcript-area,.able-wrapper{--able-base-control-size:24px;--able-color:var(--able-white);--able-control-background:var(--able-black);--able-control-color:var(--able-white);--able-big-play-background:var(--able-transparent-gray);--able-alert-button-color:var(--able-black);--able-seekbar-border:var(--able-medium-light-gray);--able-seekbar-background:var(--able-black);--able-seekbar-loaded:var(--able-medium-gray);--able-seekbar-played:var(--able-light-gray);--able-seekbar-head:var(--able-off-white);--able-control-label-color:var(--able-white);--able-controller-background:var(--able-medium-dark-gray2);--able-separator-color:var(--able-medium-light-gray);--able-volume-background:var(--able-black);--able-volume-outline:var(--able-medium-gray);--able-statusbar-color:var(--able-light-gray);--able-statusbar-background:var(--able-black);--able-default-caption-color:var(--able-white);--able-default-caption-background:var(--able-black);--able-default-description-color:var(--able-bright-yellow);--able-default-description-background:var(--able-dark-gray);--able-description-border:var(--able-medium-gray);--able-now-playing-color:var(--able-white);--able-now-playing-background:var(--able-black);--able-modal-color:var(--able-black);--able-modal-background:var(--able-off-white);--able-modal-overlay:var(--able-transparent-gray);--able-modal-border:3px solid var(--able-light-gray);--able-drag-outline:var(--able-bright-orange);--able-sign-background:var(--able-white);--able-sign-border:var(--able-black);--able-resizable-color:var(--able-medium-gray);--able-chapter-background:transparent;--able-chapter-color:var(--able-black);--able-current-chapter-background:var(--able-black);--able-current-chapter-color:var(--able-white);--able-focus-outline:var(--able-light-orange);--able-hover-outline:var(--able-bright-green);--able-tooltip-border:var(--able-dark-gray);--able-tooltip-color:var(--able-medium-dark-gray);--able-tooltip-background:var(--able-very-light-gray);--able-alert-background:var(--able-light-yellow);--able-menu-border:var(--able-dark-gray);--able-menu-background:var(--able-black);--able-menu-outline:var(--able-medium-gray);--able-menu-color:var(--able-white);--able-menu-focus-background:var(--able-very-light-gray);--able-menu-focus-color:var(--able-black);--able-transcript-background:var(--able-white);--able-cue-audio-description-background:var(--able-light-pink);--able-cue-audio-description-color:var(--able-dark-gray);--able-cue-highlighted-background:var(--able-black);--able-cue-highlighted-color:var(--able-white);--able-cue-interacting-background:var(--able-light-yellow);--able-cue-interacting-color:var(--able-black);--able-playlist-item-background:var(--able-off-white);--able-playlist-item-color:var(--able-black);--able-playlist-item-button-color:var(--able-black);--able-search-results-button-background:var(--able-white);--able-search-results-button-color:var(--able-black);--able-playlist-current-background:var(--able-white);--able-playlist-current-border:var(--able-dark-gray);--able-playlist-current-outline:var(--able-medium-dark-gray);--able-playlist-current-active-color:var(--able-black);--able-playlist-current-active-background:var(--able-white);--able-search-term-background:var(--able-light-yellow);--able-search-term-color:var(--able-black)}.able-black-controls{--able-control-background:#fff!important;--able-control-color:#000!important}.able-chapters-div,.able-modal-dialog,.able-playlist,.able-search-results,.able-transcript-area,.able-wrapper{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.able-chapters-div,.able-chapters-div *,.able-playlist,.able-playlist *,.able-wrapper,.able-wrapper *{box-sizing:border-box}.able-wrapper{position:relative;margin:0 auto;padding:0;max-width:100%;height:auto;text-align:start}.able{position:relative;margin:0;padding:0;width:100%;z-index:5000;display:grid}.able-player-transcript .able-window-toolbar input,.able-wrapper .able input{margin:0;padding:2px 4px}.able-control-row{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;padding:8px 9px 8px;gap:4px}.able-pipe{position:relative;top:-2px;color:var(--able-separator-color);margin:0 6px}.able .able-vidcap-container{left:0;margin:0;position:relative;top:0}.able .able-audcap-container{position:relative;margin:0;padding:.5rem;min-height:3.2rem}.able-clipped,.able-offscreen,.able-screenreader-alert,.able-transcript .able-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.able-media-container audio{display:none!important}.able-controller{position:relative;background-color:var(--able-controller-background);padding:0 4px}.able-audio .able-controller{padding-top:8px}.able-skin-legacy .able-controller{padding:0}.able-poster{position:absolute;top:0;left:0;width:100%!important;height:auto!important}.able .able-vidcap-container{overflow:visible}.able .able-vidcap-container video{max-width:100%;display:block}.able-media-container iframe,.able-sign-window iframe{max-width:100%!important;display:block!important}.able-wrapper .able button.able-big-play-button{position:absolute;color:var(--able-control-color);background-color:var(--able-big-play-background);border:none;outline:0;left:0;top:0;padding:0;z-index:6500;opacity:.75;display:flex;align-items:center;justify-content:center;border-radius:5px;width:100%;height:100%}.able-wrapper .able button.able-big-play-button:focus,.able-wrapper .able button.able-big-play-button:hover{opacity:100}.able-big-play-button svg{background-color:var(--able-control-background);padding:1rem;width:8rem;height:8rem;max-width:140px;max-height:140px;border-radius:8px}.able-big-play-button:focus svg,.able-big-play-button:hover svg{outline:3px solid}.able-left-controls,.able-right-controls{overflow:visible;display:flex;gap:3px;align-items:center;flex-wrap:wrap}.able-skin-legacy .able-left-controls,.able-skin-legacy .able-right-controls{width:fit-content}.able-controller,.able-controller button,.able-controller div[role=button]{color:var(--able-control-color)}.able-controller .able-alert button{color:var(--able-alert-button-color)!important}.able-controller .able-seekbar{border:1px solid var(--able-seekbar-border)}.able-controller div[role=button]{background:0 0;position:relative;padding:2px;min-width:var(--able-base-control-size);min-height:var(--able-base-control-size);width:1rem;height:1rem;border:none;overflow:visible!important;display:flex;justify-content:center;align-items:center;z-index:6600;border-radius:3px}.able-controller div.able-button-handler-play[role=button]{padding:4px}.able-controller .buttonOff{opacity:.5}.able-seekbar-wrapper{display:block;width:100%;padding:6px 12px}.able-skin-legacy .able-seekbar-wrapper{padding:0}.able-seekbar{display:flex;align-items:center;position:relative;height:.5rem;border:1px solid;background-color:var(--able-seekbar-background);z-index:6500}.able-seekbar-loaded{display:inline-block;position:absolute;left:0;top:0;height:100%;background-color:var(--able-seekbar-loaded);z-index:5100}.able-seekbar-played{display:inline-block;position:absolute;left:0;top:0;height:100%;background-color:var(--able-seekbar-played);z-index:5200}.able-seekbar-head{display:inline-block;position:relative;left:0;background-color:var(--able-seekbar-head);min-width:var(--able-base-control-size);min-height:var(--able-base-control-size);width:.875rem;height:.875rem;border-radius:100%;z-index:5500}.able-volume-slider{height:120px;background-color:var(--able-volume-background);outline:1px solid var(--able-volume-outline);margin:0;padding:8px;position:absolute;right:0;display:block;z-index:9100}.able-volume-help{display:none}.able-volume-slider input[type=range]{appearance:slider-vertical;writing-mode:bt-rl;width:28px;height:100%;background:0 0}.able-volume-slider input[type=range]::-moz-range-track{border:1px solid #fff;width:7px;cursor:pointer;background:#000}input[type=range]::-moz-range-thumb{background-color:var(--able-control-color);outline:1px solid var(--able-volume-outline);outline-offset:-2px;height:var(--able-base-control-size);width:var(--able-base-control-size);border-radius:100%}.able-status-bar{color:var(--able-statusbar-color);font-size:.875rem;padding:8px 12px;gap:12px;display:flex;align-items:center;justify-content:space-between;background:var(--able-statusbar-background)}.able-status-bar span.able-timer{text-align:start}.able-status-bar span.able-speed{text-align:center}.able-status{font-style:italic;text-align:end}div.able-captions-wrapper{width:100%;margin:0;padding:0;text-align:center;display:block;z-index:6000}div.able-captions-wrapper:not(.able-captions-overlay){padding:0 0 8px}div.able-captions{display:none;padding:4px 6px;line-height:1.4;background-color:var(--able-default-caption-background);font-size:1rem;color:var(--able-default-caption-color);opacity:.75}div.able-vidcap-container div.able-captions-overlay{position:absolute;margin:0;bottom:12px}div.able-vidcap-container div.able-captions-below{position:relative;min-height:4rem}div.able-audcap-container.captions-off{display:none}div.able-descriptions{position:relative;color:var(--able-default-description-color);background-color:var(--able-default-description-background);min-height:4rem;border-top:1px solid var(--able-description-border);margin:0;padding:12px;text-align:center}div.able-now-playing{text-align:center;font-weight:700;font-size:1rem;padding:.5rem .5rem 1rem;color:var(--able-now-playing-color);background:var(--able-now-playing-background)}div.able-now-playing span{font-size:.875rem}div.able-video div.able-now-playing{display:none}div.able-modal-dialog{position:fixed;display:none;z-index:10000;max-height:90%;overflow:auto;transform:translate(-50%,-50%)!important;top:50%;left:50%;outline:0 none;color:var(--able-modal-color);background-color:var(--able-modal-background);border:var(--able-modal-border);width:50rem;max-width:95%;padding:1rem;box-sizing:border-box}body.able-modal-active{overflow:hidden}div.able-modal-overlay{position:fixed;width:100%;height:100%;background-color:var(--able-modal-overlay);margin:0;padding:0;top:0;left:0;display:none;z-index:9500}.able-alert button,.able-modal-dialog button{all:unset;padding:4px 12px;font-size:1.125rem;border:2px solid}.able-prefs-buttons{display:flex;gap:8px;margin-top:1rem}.able-modal-header{display:flex;justify-content:space-between}.able-modal-dialog .modalCloseButton{margin:0;align-self:flex-start}div.able-modal-dialog h1{font-size:1.5rem;line-height:1.6;margin:0 0 .5rem;order:-1}.able-prefs-form div[role=group]{padding:1rem 0;border:none}.able-prefs-form h2{font-weight:700;font-size:1.1rem}.able-desc-pref-prompt{font-weight:700;font-style:italic;margin-left:1rem!important}.able-prefDescFormat>div{margin-left:1.5rem}.able-prefs-captions>div,.able-prefs-descriptions>div{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.25rem}.able-prefs-captions label,.able-prefs-descriptions label{text-align:end;width:10rem}.able-prefs-checkbox label{width:auto}.able-prefs-captions select,.able-prefs-descriptions select{width:10rem}div.able-prefDescPause{margin-top:1rem}.able-prefs-form div.able-captions-sample{padding:.5rem;text-align:center}.able-prefs-form div.able-desc-sample{padding:.5rem;text-align:center;color:#fff;background-color:#000}.able-prefs-form h2{margin-top:0;margin-bottom:.5rem;font-size:1.1rem}.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.1rem}.able-resize-form h1{font-size:1.15rem}.able-resize-form div div{margin:1rem 0}.able-resize-form label{display:block}.able-resize-form input{font-size:1.25rem;padding:4px}.able-resize-form input[readonly]{color:var(--able-separator-color)}.able-window-toolbar{background-color:var(--able-controller-background);color:var(--able-control-color);padding:8px;border:none;display:flex;align-items:center;justify-content:space-between;gap:12px}.able-window-toolbar>div{display:flex}.able-window-toolbar button{color:var(--able-control-color)}.able-window-toolbar .able-button-handler-preferences svg{min-width:var(--able-base-control-size);min-height:var(--able-base-control-size);height:1rem;width:1rem}.able-draggable:hover{cursor:move}.able-window-toolbar .able-button-handler-preferences{background-color:transparent;border:none;outline:0;padding:0;z-index:9300}.able-window-toolbar .able-button-handler-preferences img{display:block}.able-window-toolbar .able-popup{position:absolute;cursor:default;left:0;top:0;display:block;border-radius:0 0 5px 5px;background:var(--able-controller-background)}.able-drag{outline:3px dashed var(--able-drag-outline);outline-offset:2px;cursor:move}.able-resizable{position:absolute;width:20px;height:20px;bottom:0;right:0;padding:1px;cursor:nwse-resize}.able-resizable svg line{stroke:var(--able-resizable-color);stroke-width:2px}.able-sign-window{position:relative;z-index:8000;background:var(--able-sign-background);border:1px solid var(--able-sign-border)}.able-sign-window video{width:100%;margin-bottom:1rem}.able-sign-window:focus{outline:0}div.able-chapters-div{padding:0;max-width:100%}div.able-chapters-div .able-chapters-heading{margin:8px;font-size:1.125rem;font-weight:700}div.able-chapters-div ul,div.able-chapters-div ul li{list-style-type:none;padding:0;margin:0}div.able-chapters-div button{all:unset;width:100%;height:100%;border:none;background-color:var(--able-chapter-background);color:var(--able-chapter-color);font-size:1rem;text-align:start;padding:8px}div.able-chapters-div li.able-current-chapter button{background-color:var(--able-current-chapter-background);color:var(--able-current-chapter-color)}div.able-chapters-div button:focus{border:0;outline:2px solid var(--able-focus-outline);outline-offset:2px}div.able-chapters-div button:hover{outline:2px solid var(--able-hover-outline);outline-offset:2px}div.able-wrapper.fullscreen{margin:0!important;position:fixed!important;top:0!important;background:0 0!important}.able-tooltip{position:absolute;padding:4px 8px;border:1px solid var(--able-tooltip-border);color:var(--able-tooltip-color)!important;background-color:var(--able-tooltip-background);border-radius:3px;display:block;font-size:.875rem}.able .able-alert{border:none}.able-alert{background-color:var(--able-alert-background);z-index:9400;padding:4px 8px;position:absolute;height:fit-content;width:100%;border:1px solid;border-radius:0;border-left-width:0;border-right-width:0;justify-content:space-between;align-items:center;gap:12px;bottom:0;left:0}.able-popup{z-index:9200}.able-tooltip{z-index:9500}.able ul.able-popup,ul.able-popup{position:absolute;margin:0;padding:0;padding-inline-start:0;list-style-type:none;border-width:1px;border-color:var(--able-menu-border);background-color:var(--able-menu-background);outline:1px solid var(--able-menu-outline);color:var(--able-menu-color);opacity:.95;border-radius:4px;display:grid;cursor:default;width:auto}.able ul.able-popup li,ul.able-popup li{padding:4px 16px;margin:0;width:auto}.able ul.able-popup li:first-of-type,ul.able-popup li:first-of-type{border-radius:4px 4px 0 0}.able ul.able-popup li:last-of-type,ul.able-popup li:last-of-type{border-radius:0 0 4px 4px}.able ul.able-popup li.able-focus,ul.able-popup li.able-focus{background-color:var(--able-menu-focus-background);color:var(--able-menu-focus-color)}.able-popup-captions li[aria-checked=true]::before{content:"\2713"/'';margin-right:4px}.able-transcript-area{border-width:1px;border-style:solid;z-index:7000;padding-bottom:25px;background-color:var(--able-transcript-background)}.able-transcript{position:relative;overflow-y:scroll;padding-left:1rem;padding-right:1rem;background-color:#fff;height:350px}.able-transcript div{margin:1rem 0}.able-transcript-heading{font-size:1.375rem;font-weight:700;margin:.5rem 0;padding:0}.able-transcript-chapter-heading{font-size:1.125rem;font-weight:700;margin:0;padding:0}.able-transcript div.able-transcript-desc{background-color:var(--able-cue-audio-description-background);color:var(--able-cue-audio-description-color);border:1px solid;font-style:italic;padding:.5rem}.able-transcript .able-unspoken{font-weight:700}.able-highlight,.able-highlight span:active,.able-highlight span:focus,.able-highlight span:hover{background-color:var(--able-cue-highlighted-background)!important;color:var(--able-cue-highlighted-color)!important;padding:.25rem .1rem;border:none;outline:0}.able-transcript span:active,.able-transcript span:focus,.able-transcript span:hover{background:var(--able-cue-interacting-background);color:var(--able-cue-interacting-color);border:none;outline:0;border-bottom:1px solid;cursor:pointer}.able-window-toolbar label{display:inline;font-size:.875rem;margin-right:.333rem;color:var(--able-control-label-color)}.able-alert button,.able-controller div[role=button],.able-controller input,.able-modal-dialog button,.able-playlist li button,.able-popup li,.able-search-results li button,.able-seekbar-head,.able-window-toolbar .able-button-handler-preferences,.able-window-toolbar input,.able-window-toolbar select,div.able-modal-dialog button,div.able-modal-dialog input{outline-style:solid;outline-width:3px;outline-color:transparent}.able-alert button:focus,.able-controller div[role=button]:focus,.able-controller input:focus,.able-modal-dialog button:focus,.able-playlist button:focus,.able-search-results li button:focus,.able-seekbar-head:focus,.able-window-toolbar .able-button-handler-preferences:focus,.able-window-toolbar input:focus,.able-window-toolbar select:focus,.able-wrapper .able button.able-big-play-button:focus .icon-play,.able-wrapper .able button.able-big-play-button:focus svg,div.able-modal-dialog button:focus,div.able-modal-dialog input:focus{outline-color:var(--able-focus-outline)}.able-alert button:hover,.able-controller div[role=button]:hover,.able-controller input:hover,.able-modal-dialog button:hover,.able-playlist li button:hover,.able-popup li:hover,.able-search-results li button:hover,.able-seekbar-head:hover,.able-window-toolbar .able-button-handler-preferences:hover,.able-window-toolbar input:hover,.able-window-toolbar select:hover,.able-wrapper .able button.able-big-play-button:hover .icon-play,.able-wrapper .able button.able-big-play-button:hover svg,div.able-modal-dialog button:hover,div.able-modal-dialog input:hover{outline-color:var(--able-hover-outline)}.able-playlist,.able-search-results ul{list-style-type:none;margin:0;padding:0;display:grid}.able-playlist li,.able-search-results li{background-color:var(--able-playlist-item-background);color:var(--able-playlist-item-color);padding:0;margin:0;border:1px solid;width:auto;border-bottom:none;max-width:100%}.able-search-results li{display:flex}.able-playlist li:first-of-type:not(.able-player.able-playlistli),.able-search-results li:first-of-type{border-radius:5px 5px 0 0}.able-playlist li:last-of-type:not(.able-player.able-playlistli),.able-search-results li:last-of-type{border-bottom:2px solid;border-radius:0 0 5px 5px}.able-playlist li button,.able-search-results li button{border:none;color:var(--able-playlist-item-button-color);background-color:transparent;font-size:.875rem;width:100%;padding:8px;text-align:start;display:flex;align-items:center;gap:12px;outline-offset:-6px}.able-search-results li button{outline-offset:-3px;border-radius:4px}.able-search-results li>span{font-size:.875rem;padding:8px}.able-search-results li button{width:fit-content;background:var(--able-search-results-button-background);color:var(--able-search-results-buttonc-color);border-radius:3px;margin:2px}.able-playlist li button img{max-width:100px;max-height:100px;display:block}.able-playlist li.able-current{background-color:var(--able-playlist-current-background);border-color:var(--able-playlist-current-border);outline:2px solid var(--able-playlist-current-outline);outline-offset:-2px}.able-playlist li.able-current button:active,.able-playlist li.able-current button:focus,.able-playlist li.able-current button:hover{color:var(--able-playlist-current-active-color);background:var(--able-playlist-current-active-background)}#able-search-term-echo{font-style:italic}button.able-search-results-time{font-weight:700;cursor:pointer}#able-search-term-echo,.able-search-term{background-color:var(--able-search-term-background);color:var(--able-search-term-color);font-weight:700}.able-modal-dialog button svg,.able-modal-dialog div[role=button] svg,.able-wrapper button svg,.able-wrapper div[role=button] svg{display:block;fill:currentColor}#able-vts-instructions{padding:1rem;border:1px solid #999;width:100%;margin:0 auto 1.5rem;box-sizing:border-box}#able-vts fieldset{margin:0 auto 1.5rem;border:none}#able-vts fieldset legend{color:#000;font-weight:700}#able-vts fieldset div{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}#able-vts thead tr{background:#f0f0f0}#able-vts table{border-collapse:collapse}#able-vts table,#able-vts table td,#able-vts table th{border:1px solid #323232;padding:8px;color:#323232}#able-vts table td[contenteditable=true]:hover{background:#fff;color:#333}#able-vts table td[contenteditable=true]:focus-within{background:#fff;color:#000}#able-vts table td button{width:auto;padding:2px;margin:1px;display:flex;align-items:center;float:left;color:#323232;background:#f6f6f6;border-radius:2px}#able-vts table td button svg{width:22px;height:22px}#able-vts table button:hover svg{fill:#c00}tr.kind-subtitles{background-color:#fff}tr.kind-descriptions{background-color:#fee}tr.kind-chapters{background-color:#e6ffe6}.able-vts-dragging{background-color:#ffc}div#able-vts-icon-credit{font-size:.875rem}div#able-vts-alert{display:none;position:fixed;top:5px;left:5px;border:2px solid #666;background-color:#ffc;padding:1rem;font-weight:700;z-index:9400}button#able-vts-save{font-size:1rem;padding:6px 12px;border-radius:4px;margin-bottom:1rem;font-weight:700}button#able-vts-save:focus,button#able-vts-save:hover{color:#fff;background-color:#060}.able-vts-output-instructions{width:720px;max-width:90%}#able-vts textarea{height:200px;width:720px;max-width:90%}@media (width < 480px){.able-control-row{gap:8px}.able-control-row div[role=button]{min-width:32px;height:32px}.able-sign-window,.able-transcript-area{position:static!important;width:100%!important}div.able-captions-wrapper:not(.able-captions-overlay){min-height:5rem}}
\ No newline at end of file
+:root{--able-white:#fff;--able-black:#000;--able-transparent-gray:#00000077;--able-medium-light-gray:#a8a8a8;--able-light-gray:#dadada;--able-very-light-gray:#eee;--able-off-white:#fdfdfd;--able-dark-gray:#262626;--able-medium-dark-gray:#333;--able-medium-dark-gray2:#464646;--able-medium-gray:#666;--able-bright-yellow:#ff6;--able-light-yellow:#ffc;--able-bright-orange:#f90;--able-light-orange:#ffbb37;--able-bright-green:#8ab839;--able-light-pink:#fee}.able-chapters-div,.able-modal-dialog,.able-modal-overlay,.able-playlist,.able-search-results,.able-transcript-area,.able-wrapper{--able-base-control-size:24px;--able-color:var(--able-white);--able-control-background:var(--able-black);--able-control-color:var(--able-white);--able-big-play-background:var(--able-transparent-gray);--able-alert-button-color:var(--able-black);--able-seekbar-border:var(--able-medium-light-gray);--able-seekbar-background:var(--able-black);--able-seekbar-loaded:var(--able-medium-gray);--able-seekbar-played:var(--able-light-gray);--able-seekbar-head:var(--able-off-white);--able-control-label-color:var(--able-white);--able-controller-background:var(--able-medium-dark-gray2);--able-separator-color:var(--able-medium-light-gray);--able-volume-background:var(--able-black);--able-volume-outline:var(--able-medium-gray);--able-statusbar-color:var(--able-light-gray);--able-statusbar-background:var(--able-black);--able-default-caption-color:var(--able-white);--able-default-caption-background:var(--able-black);--able-default-description-color:var(--able-bright-yellow);--able-default-description-background:var(--able-dark-gray);--able-description-border:var(--able-medium-gray);--able-now-playing-color:var(--able-white);--able-now-playing-background:var(--able-black);--able-modal-color:var(--able-black);--able-modal-background:var(--able-off-white);--able-modal-overlay:var(--able-transparent-gray);--able-modal-border:3px solid var(--able-light-gray);--able-drag-outline:var(--able-bright-orange);--able-sign-background:var(--able-white);--able-sign-border:var(--able-black);--able-resizable-color:var(--able-medium-gray);--able-chapter-background:transparent;--able-chapter-color:var(--able-black);--able-current-chapter-background:var(--able-black);--able-current-chapter-color:var(--able-white);--able-focus-outline:var(--able-light-orange);--able-hover-outline:var(--able-bright-green);--able-tooltip-border:var(--able-dark-gray);--able-tooltip-color:var(--able-medium-dark-gray);--able-tooltip-background:var(--able-very-light-gray);--able-alert-background:var(--able-light-yellow);--able-menu-border:var(--able-dark-gray);--able-menu-background:var(--able-black);--able-menu-outline:var(--able-medium-gray);--able-menu-color:var(--able-white);--able-menu-focus-background:var(--able-very-light-gray);--able-menu-focus-color:var(--able-black);--able-transcript-background:var(--able-white);--able-cue-audio-description-background:var(--able-light-pink);--able-cue-audio-description-color:var(--able-dark-gray);--able-cue-highlighted-background:var(--able-black);--able-cue-highlighted-color:var(--able-white);--able-cue-interacting-background:var(--able-light-yellow);--able-cue-interacting-color:var(--able-black);--able-playlist-item-background:var(--able-off-white);--able-playlist-item-color:var(--able-black);--able-playlist-item-button-color:var(--able-black);--able-search-results-button-background:var(--able-white);--able-search-results-button-color:var(--able-black);--able-playlist-current-background:var(--able-white);--able-playlist-current-border:var(--able-dark-gray);--able-playlist-current-outline:var(--able-medium-dark-gray);--able-playlist-current-active-color:var(--able-black);--able-playlist-current-active-background:var(--able-white);--able-search-term-background:var(--able-light-yellow);--able-search-term-color:var(--able-black)}.able-black-controls{--able-control-background:#fff!important;--able-control-color:#000!important}.able-chapters-div,.able-modal-dialog,.able-playlist,.able-search-results,.able-transcript-area,.able-wrapper{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.able-chapters-div,.able-chapters-div *,.able-playlist,.able-playlist *,.able-wrapper,.able-wrapper *{box-sizing:border-box}.able-wrapper{position:relative;margin:0 auto;padding:0;max-width:100%;height:auto;text-align:start}.able{position:relative;margin:0;padding:0;width:100%;z-index:5000;display:grid}.able-player-transcript .able-window-toolbar input,.able-wrapper .able input{margin:0;padding:2px 4px}.able-control-row{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;padding:8px 9px 8px;gap:4px}.able-pipe{position:relative;top:-2px;color:var(--able-separator-color);margin:0 6px}.able .able-vidcap-container{left:0;margin:0;position:relative;top:0}.able .able-audcap-container{position:relative;margin:0;padding:.5rem;min-height:3.2rem}.able-offscreen,.able-screenreader-alert,.able-transcript .able-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.able-media-container audio{display:none!important}.able-controller{position:relative;background-color:var(--able-controller-background);padding:0 4px}.able-audio .able-controller{padding-top:8px}.able-skin-legacy .able-controller{padding:0}.able-poster{position:absolute;top:0;left:0;width:100%!important;height:auto!important}.able .able-vidcap-container{overflow:visible}.able .able-vidcap-container video{max-width:100%;display:block}.able-media-container iframe,.able-sign-window iframe{max-width:100%!important;display:block!important}.able-wrapper .able button.able-big-play-button{position:absolute;color:var(--able-control-color);background-color:var(--able-big-play-background);background:var(--able-big-play-background);border:none;outline:0;left:0;top:0;padding:0;z-index:6500;opacity:.75;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.able-audio-wrapper{display:flex;gap:4px;align-items:center;padding:4px;background:var(--able-control-background)}.able-audio-wrapper img{max-width:120px}.able-audio-wrapper .able-audio{flex:1}.able-wrapper .able button.able-big-play-button:focus,.able-wrapper .able button.able-big-play-button:hover{opacity:100}.able-big-play-button svg{background-color:var(--able-control-background);padding:1rem;width:8rem;height:8rem;max-width:140px;max-height:140px;border-radius:8px}.able-big-play-button:focus svg,.able-big-play-button:hover svg{outline:3px solid}.able-left-controls,.able-right-controls{overflow:visible;display:flex;gap:3px;align-items:center;flex-wrap:wrap}.able-skin-legacy .able-left-controls,.able-skin-legacy .able-right-controls{width:fit-content}.able-controller,.able-controller button,.able-controller div[role=button]{color:var(--able-control-color)}.able-controller .able-alert button{color:var(--able-alert-button-color)!important}.able-controller .able-seekbar{border:1px solid var(--able-seekbar-border)}.able-controller div[role=button]{background:0 0;position:relative;padding:2px;min-width:var(--able-base-control-size);min-height:var(--able-base-control-size);width:1rem;height:1rem;border:none;overflow:visible!important;display:flex;justify-content:center;align-items:center;z-index:6600;border-radius:3px}.able-controller div.able-button-handler-play[role=button]{padding:4px}.able-controller .buttonOff{opacity:.5}.able-seekbar-wrapper{display:block;width:100%;padding:6px 12px}.able-skin-legacy .able-seekbar-wrapper{padding:0}.able-seekbar{display:flex;align-items:center;position:relative;height:.5rem;border:1px solid;background-color:var(--able-seekbar-background);z-index:6500}.able-seekbar-loaded{display:inline-block;position:absolute;left:0;top:0;height:100%;background-color:var(--able-seekbar-loaded);z-index:5100}.able-seekbar-played{display:inline-block;position:absolute;left:0;top:0;height:100%;background-color:var(--able-seekbar-played);z-index:5200}.able-seekbar-head{display:inline-block;position:relative;left:0;background-color:var(--able-seekbar-head);min-width:var(--able-base-control-size);min-height:var(--able-base-control-size);width:.875rem;height:.875rem;border-radius:100%;z-index:5500}.able-volume-slider{height:120px;background-color:var(--able-volume-background);outline:1px solid var(--able-volume-outline);margin:0;padding:8px;position:absolute;right:0;display:block;z-index:9100}.able-volume-help{display:none}.able-volume-slider input[type=range]{appearance:slider-vertical;writing-mode:bt-rl;width:28px;height:100%;background:0 0}.able-volume-slider input[type=range]::-moz-range-track{border:1px solid #fff;width:7px;cursor:pointer;background:#000}input[type=range]::-moz-range-thumb{background-color:var(--able-control-color);outline:1px solid var(--able-volume-outline);outline-offset:-2px;height:var(--able-base-control-size);width:var(--able-base-control-size);border-radius:100%}.able-status-bar{color:var(--able-statusbar-color);font-size:.875rem;padding:8px 12px;gap:12px;display:flex;align-items:center;justify-content:space-between;background:var(--able-statusbar-background)}.able-status-bar span.able-timer{text-align:start}.able-status-bar span.able-speed{text-align:center}.able-status{font-style:italic;text-align:end}div.able-captions-wrapper{width:100%;margin:0;padding:0;text-align:center;display:block;z-index:6000}div.able-captions-wrapper:not(.able-captions-overlay){padding:0}div.able-captions{display:none;padding:4px 6px;line-height:1.4;background-color:var(--able-default-caption-background);font-size:1rem;color:var(--able-default-caption-color);opacity:.75}div.able-vidcap-container div.able-captions-overlay{position:absolute;margin:0;bottom:12px}div.able-vidcap-container div.able-captions-below{position:relative;min-height:4rem;display:flex;justify-content:center;align-items:center}div.able-audcap-container.captions-off{display:none}div.able-descriptions{position:relative;color:var(--able-default-description-color);background-color:var(--able-default-description-background);min-height:4rem;border-top:1px solid var(--able-description-border);margin:0;padding:12px;text-align:center}div.able-now-playing{text-align:center;font-weight:700;font-size:1rem;padding:.5rem .5rem 1rem;color:var(--able-now-playing-color);background:var(--able-now-playing-background)}div.able-now-playing span{font-size:.875rem}div.able-video div.able-now-playing{display:none}div.able-modal-dialog{position:fixed;display:none;z-index:10000;max-height:90%;overflow:auto;transform:translate(-50%,-50%)!important;top:50%;left:50%;outline:0 none;color:var(--able-modal-color);background-color:var(--able-modal-background);border:var(--able-modal-border);width:fit-content;max-width:95%;padding:1rem;box-sizing:border-box}@media screen and (width < 800px){div.able-modal-dialog{min-width:95%}}body.able-modal-active{overflow:hidden}div.able-modal-overlay{position:fixed;width:100%;height:100%;background-color:var(--able-modal-overlay);margin:0;padding:0;top:0;left:0;display:none;z-index:9500}.able-alert button,.able-modal-dialog button{all:unset;padding:4px 12px;font-size:1.125rem;border:2px solid}.able-prefs-buttons{display:flex;gap:8px;margin-top:1rem}.able-modkey-item.hidden{display:none}.able-modal-header{display:flex;justify-content:space-between;gap:8px}.able-modal-dialog .modalCloseButton{margin:0;align-self:flex-start}div.able-modal-dialog h1{font-size:1.5rem;line-height:1.6;margin:0 0 .5rem;order:-1}.able-prefs-form div[role=group]{padding:1rem 0;border:none}.able-prefs-form h2{font-weight:700;font-size:1.1rem}.able-desc-pref-prompt{font-weight:700;font-style:italic;margin-left:1rem!important}.able-prefDescFormat>div{margin-left:1.5rem}.able-prefs-captions>div,.able-prefs-descriptions>div{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.25rem}.able-prefs-captions label,.able-prefs-descriptions label{text-align:end;width:10rem}.able-prefs-checkbox label{width:auto}.able-prefs-captions select,.able-prefs-descriptions select{width:10rem}div.able-prefDescPause{margin-top:1rem}.able-prefs-form div.able-captions-sample{padding:.5rem;text-align:center}.able-prefs-form div.able-desc-sample{padding:.5rem;text-align:center;color:#fff;background-color:#000}.able-prefs-form h2{margin-top:0;margin-bottom:.5rem;font-size:1.1rem}.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.1rem}.able-resize-form h1{font-size:1.15rem}.able-resize-form div div{margin:1rem 0}.able-resize-form label{display:block}.able-resize-form input{font-size:1.25rem;padding:4px}.able-resize-form input[readonly]{color:var(--able-separator-color)}.able-window-toolbar{background-color:var(--able-controller-background);color:var(--able-control-color);padding:8px;border:none;display:flex;align-items:center;justify-content:space-between;gap:12px}.able-window-toolbar button{order:1}.able-window-toolbar .autoscroll-transcript{order:3;width:fit-content;text-wrap:nowrap}.able-window-toolbar .transcript-language-select-wrapper{order:4}.able-window-toolbar .able-drag-handle{order:2;width:100%;height:100%}.able-window-toolbar .able-drag-handle svg{height:12px;width:auto;margin:0 auto}.able-window-toolbar .able-drag-handle path{fill:var(--able-medium-light-gray)}.able-draggable:hover .able-drag-handle path{fill:var(--able-very-light-gray)}.able-window-toolbar>div{display:flex}.able-window-toolbar button{color:var(--able-control-color)}.able-window-toolbar .able-button-handler-preferences svg{min-width:var(--able-base-control-size);min-height:var(--able-base-control-size);height:1rem;width:1rem}.able-draggable .able-drag-handle:hover{cursor:move}.able-window-toolbar .able-button-handler-preferences{background-color:transparent;border:none;outline:0;padding:0;z-index:9300}.able-window-toolbar .able-button-handler-preferences img{display:block}.able-window-toolbar .able-popup{position:absolute;cursor:default;left:0;top:0;display:block;border-radius:0 0 5px 5px;background:var(--able-controller-background)}.able-drag{outline:3px dashed var(--able-drag-outline);outline-offset:2px;cursor:move}.able-resizable{position:absolute;width:24px;height:24px;bottom:0;right:0;padding:1px;cursor:nwse-resize}.able-resizable svg line{stroke:var(--able-resizable-color);stroke-width:2px}.able-sign-window{position:relative;z-index:8000;background:var(--able-sign-background);border:1px solid var(--able-sign-border)}.fade-out{visibility:hidden;opacity:0;transition:visibility 0s 2s,opacity 2s linear}.fade-in{visibility:visible;opacity:1;transition:opacity 1s linear}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.able-sign-window video{width:100%;display:block}.able-sign-window .able-resizable{background:#00000033;background:linear-gradient(to bottom right,transparent 0,transparent 51%,#fff3 51%,#fff3 100%);border-top-left-radius:20px}.able-sign-window:hover .able-resizable{background:var(--able-very-light-gray);background:linear-gradient(to bottom right,transparent 0,transparent 51%,#fffe 51%,#fffe 100%)}.able-sign-window.able-fixed video{margin:0;display:block}.able-sign-window:focus{outline:0}div.able-chapters-div{padding:0;max-width:100%}div.able-chapters-div .able-chapters-heading{margin:8px;font-size:1.125rem;font-weight:700}div.able-chapters-div ul,div.able-chapters-div ul li{list-style-type:none;padding:0;margin:0}div.able-chapters-div button{all:unset;width:100%;height:100%;border:none;background-color:var(--able-chapter-background);color:var(--able-chapter-color);font-size:1rem;text-align:start;padding:8px;box-sizing:border-box}div.able-chapters-div li.able-current-chapter button{background-color:var(--able-current-chapter-background);color:var(--able-current-chapter-color)}div.able-chapters-div button:focus{border:0;outline:2px solid var(--able-focus-outline);outline-offset:2px}div.able-chapters-div button:hover{outline:2px solid var(--able-hover-outline);outline-offset:2px}div.able-wrapper.fullscreen{margin:0!important;position:fixed!important;top:0!important;background:0 0!important}.able-tooltip{position:absolute;padding:4px 8px;border:1px solid var(--able-tooltip-border);color:var(--able-tooltip-color)!important;background-color:var(--able-tooltip-background);border-radius:3px;display:block;font-size:.875rem}.able .able-alert{border:none}.able-alert{background-color:var(--able-alert-background);z-index:9400;padding:4px 8px;position:absolute;height:fit-content;width:100%;border:1px solid;border-radius:0;border-left-width:0;border-right-width:0;justify-content:space-between;align-items:center;gap:12px;bottom:0;left:0}.able-popup{z-index:9200}.able-tooltip{z-index:9500}.able ul.able-popup,ul.able-popup{position:absolute;margin:0;padding:0;padding-inline-start:0;list-style-type:none;border-width:1px;border-color:var(--able-menu-border);background-color:var(--able-menu-background);outline:1px solid var(--able-menu-outline);color:var(--able-menu-color);opacity:.95;border-radius:4px;display:grid;cursor:default;width:auto}.able ul.able-popup li,ul.able-popup li{padding:4px 16px;margin:0;width:auto}.able ul.able-popup li:first-of-type,ul.able-popup li:first-of-type{border-radius:4px 4px 0 0}.able ul.able-popup li:last-of-type,ul.able-popup li:last-of-type{border-radius:0 0 4px 4px}.able ul.able-popup li.able-focus,ul.able-popup li.able-focus{background-color:var(--able-menu-focus-background);color:var(--able-menu-focus-color)}.able-popup-captions li[aria-checked=true]::before{content:"\2713"/'';margin-right:4px}.able-transcript-area{border-width:1px;border-style:solid;z-index:7000;padding-bottom:25px;background-color:var(--able-transcript-background)}.able-transcript{position:relative;overflow-y:scroll;padding-left:1rem;padding-right:1rem;background-color:#fff;height:350px}.able-transcript div{margin:1rem 0}.able-transcript-heading{font-size:1.375rem;font-weight:700;margin:.5rem 0;padding:0}.able-transcript-chapter-heading{font-size:1.125rem;font-weight:700;margin:0;padding:0}.able-transcript div.able-transcript-desc{background-color:var(--able-cue-audio-description-background);color:var(--able-cue-audio-description-color);border:1px solid;font-style:italic;padding:.5rem}.able-transcript .able-unspoken{font-weight:700}.able-highlight,.able-highlight span:active,.able-highlight span:focus,.able-highlight span:hover{background-color:var(--able-cue-highlighted-background)!important;color:var(--able-cue-highlighted-color)!important;padding:.25rem .1rem;border:none;outline:0}.able-transcript span:active,.able-transcript span:focus,.able-transcript span:hover{background:var(--able-cue-interacting-background);color:var(--able-cue-interacting-color);border:none;outline:0;border-bottom:1px solid;cursor:pointer}.able-window-toolbar label{display:inline;font-size:.875rem;margin-right:.333rem;color:var(--able-control-label-color)}.able-window-toolbar .autoscroll-transcript label{margin-right:0}.able-alert button,.able-controller div[role=button],.able-controller input,.able-modal-dialog button,.able-playlist li button,.able-popup li,.able-search-results li button,.able-seekbar-head,.able-window-toolbar .able-button-handler-preferences,.able-window-toolbar input,.able-window-toolbar select,div.able-modal-dialog button,div.able-modal-dialog input{outline-style:solid;outline-width:3px;outline-color:transparent}.able-alert button:focus,.able-controller div[role=button]:focus,.able-controller input:focus,.able-modal-dialog button:focus,.able-playlist button:focus,.able-search-results li button:focus,.able-seekbar-head:focus,.able-window-toolbar .able-button-handler-preferences:focus,.able-window-toolbar input:focus,.able-window-toolbar select:focus,.able-wrapper .able button.able-big-play-button:focus .icon-play,.able-wrapper .able button.able-big-play-button:focus svg,div.able-modal-dialog button:focus,div.able-modal-dialog input:focus{outline-color:var(--able-focus-outline)}.able-alert button:hover,.able-controller div[role=button]:hover,.able-controller input:hover,.able-modal-dialog button:hover,.able-playlist li button:hover,.able-popup li:hover,.able-search-results li button:hover,.able-seekbar-head:hover,.able-window-toolbar .able-button-handler-preferences:hover,.able-window-toolbar input:hover,.able-window-toolbar select:hover,.able-wrapper .able button.able-big-play-button:hover .icon-play,.able-wrapper .able button.able-big-play-button:hover svg,div.able-modal-dialog button:hover,div.able-modal-dialog input:hover{outline-color:var(--able-hover-outline)}.able-playlist,.able-search-results ul{list-style-type:none;margin:0;padding:0;display:grid}.able-playlist li,.able-search-results li{background-color:var(--able-playlist-item-background);color:var(--able-playlist-item-color);padding:0;margin:0;border:1px solid;width:auto;border-bottom:none;max-width:100%}.able-search-results li{display:flex}.able-playlist li:first-of-type:not(.able-player.able-playlistli),.able-search-results li:first-of-type{border-radius:5px 5px 0 0}.able-playlist li:last-of-type:not(.able-player.able-playlistli),.able-search-results li:last-of-type{border-bottom:2px solid;border-radius:0 0 5px 5px}.able-playlist li button,.able-search-results li button{border:none;color:var(--able-playlist-item-button-color);background-color:transparent;font-size:.875rem;width:100%;padding:8px;text-align:start;display:flex;align-items:center;gap:12px;outline-offset:-6px}.able-search-results li button{outline-offset:-3px;border-radius:4px}.able-search-results li>span{font-size:.875rem;padding:8px}.able-search-results li button{width:fit-content;background:var(--able-search-results-button-background);color:var(--able-search-results-buttonc-color);border-radius:3px;margin:2px}.able-playlist li button img{max-width:100px;max-height:100px;display:block}.able-playlist li.able-current{background-color:var(--able-playlist-current-background);border-color:var(--able-playlist-current-border);outline:2px solid var(--able-playlist-current-outline);outline-offset:-2px}.able-playlist li.able-current button:active,.able-playlist li.able-current button:focus,.able-playlist li.able-current button:hover{color:var(--able-playlist-current-active-color);background:var(--able-playlist-current-active-background)}#able-search-term-echo{font-style:italic}button.able-search-results-time{font-weight:700;cursor:pointer}#able-search-term-echo,.able-search-term{background-color:var(--able-search-term-background);color:var(--able-search-term-color);font-weight:700}.able-modal-dialog button svg,.able-modal-dialog div[role=button] svg,.able-wrapper button svg,.able-wrapper div[role=button] svg{display:block;fill:currentColor}#able-vts-instructions{padding:1rem;border:1px solid #999;width:100%;margin:0 auto 1.5rem;box-sizing:border-box}#able-vts fieldset{margin:0 auto 1.5rem;border:none}#able-vts fieldset legend{color:#000;font-weight:700}#able-vts fieldset div{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}#able-vts thead tr{background:#f0f0f0}#able-vts table{border-collapse:collapse}#able-vts table,#able-vts table td,#able-vts table th{border:1px solid #323232;padding:8px;color:#323232}#able-vts table td[contenteditable=true]:hover{background:#fff;color:#333}#able-vts table td[contenteditable=true]:focus-within{background:#fff;color:#000}#able-vts table td button{width:auto;padding:2px;margin:1px;display:flex;align-items:center;float:left;color:#323232;background:#f6f6f6;border-radius:2px}#able-vts table td button svg{width:22px;height:22px}#able-vts table button:hover svg{fill:#c00}tr.kind-subtitles{background-color:#fff}tr.kind-descriptions{background-color:#fee}tr.kind-chapters{background-color:#e6ffe6}.able-vts-dragging{background-color:#ffc}div#able-vts-icon-credit{font-size:.875rem}div#able-vts-alert{display:none;position:fixed;top:16px;left:16px;border:2px solid #666;background-color:var(--able-alert-background);color:var(--able-black);padding:1rem;z-index:9400}button#able-vts-save{font-size:1rem;padding:6px 12px;border-radius:4px;margin-bottom:1rem;font-weight:700}button#able-vts-save:focus,button#able-vts-save:hover{color:#fff;background-color:#060}.able-vts-output-instructions{width:720px;max-width:90%}#able-vts textarea{height:200px;width:720px;max-width:90%}@media (width < 480px){.able-control-row{gap:8px}.able-control-row div[role=button]{min-width:32px;height:32px}.able-sign-window,.able-transcript-area{position:static!important;width:100%!important}div.able-captions-wrapper:not(.able-captions-overlay){min-height:5rem}}
\ No newline at end of file
diff --git a/build/ableplayer.min.js b/build/ableplayer.min.js
index 88494f76..0a60869e 100644
--- a/build/ableplayer.min.js
+++ b/build/ableplayer.min.js
@@ -1,3 +1,3 @@
/*! ableplayer V4.7.0 with DOMPurify included */
-/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).DOMPurify=e()}(this,(function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:i,getPrototypeOf:s,getOwnPropertyDescriptor:a}=Object;let{freeze:n,seal:r,create:o}=Object,{apply:l,construct:h}="undefined"!=typeof Reflect&&Reflect;n||(n=function freeze(t){return t}),r||(r=function seal(t){return t}),l||(l=function apply(t,e,i){return t.apply(e,i)}),h||(h=function construct(t,e){return new t(...e)});const p=unapply(Array.prototype.forEach),c=unapply(Array.prototype.lastIndexOf),u=unapply(Array.prototype.pop),d=unapply(Array.prototype.push),f=unapply(Array.prototype.splice),g=unapply(String.prototype.toLowerCase),m=unapply(String.prototype.toString),v=unapply(String.prototype.match),y=unapply(String.prototype.replace),b=unapply(String.prototype.indexOf),T=unapply(String.prototype.trim),P=unapply(Object.prototype.hasOwnProperty),k=unapply(RegExp.prototype.test),C=function unconstruct(t){return function(){for(var e=arguments.length,i=new Array(e),s=0;s1?i-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:g;e&&e(t,null);let n=s.length;for(;n--;){let e=s[n];if("string"==typeof e){const t=a(e);t!==e&&(i(s)||(s[n]=t),e=t)}t[e]=!0}return t}function cleanArray(t){for(let e=0;e/gm),F=r(/\$\{[\w\W]*/gm),V=r(/^data-[\-\w.\u00B7-\uFFFF]+$/),R=r(/^aria-[\-\w]+$/),z=r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=r(/^(?:\w+script|data):/i),_=r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=r(/^html$/i),q=r(/^[a-z][.\w]*(-[.\w]+)+$/i);var j=Object.freeze({__proto__:null,ARIA_ATTR:R,ATTR_WHITESPACE:_,CUSTOM_ELEMENT:q,DATA_ATTR:V,DOCTYPE_NAME:W,ERB_EXPR:O,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:H,MUSTACHE_EXPR:E,TMPLIT_EXPR:F});const K=1,Y=3,U=7,G=8,X=9,Q=function getGlobal(){return"undefined"==typeof window?null:window};var J=function createDOMPurify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const DOMPurify=t=>createDOMPurify(t);if(DOMPurify.version="3.2.6",DOMPurify.removed=[],!e||!e.document||e.document.nodeType!==X||!e.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:i}=e;const s=i,a=s.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:h,Element:E,NodeFilter:O,NamedNodeMap:F=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:V,DOMParser:R,trustedTypes:H}=e,_=E.prototype,q=lookupGetter(_,"cloneNode"),J=lookupGetter(_,"remove"),Z=lookupGetter(_,"nextSibling"),tt=lookupGetter(_,"childNodes"),et=lookupGetter(_,"parentNode");if("function"==typeof l){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let it,st="";const{implementation:at,createNodeIterator:nt,createDocumentFragment:rt,getElementsByTagName:ot}=i,{importNode:lt}=s;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported="function"==typeof t&&"function"==typeof et&&at&&void 0!==at.createHTMLDocument;const{MUSTACHE_EXPR:pt,ERB_EXPR:ct,TMPLIT_EXPR:ut,DATA_ATTR:dt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:vt}=j;let{IS_ALLOWED_URI:yt}=j,bt=null;const Tt=addToSet({},[...w,...A,...D,...$,...N]);let Pt=null;const kt=addToSet({},[...I,...M,...B,...L]);let Ct=Object.seal(o(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,At=null,Dt=!0,xt=!0,$t=!1,St=!0,Nt=!1,It=!0,Mt=!1,Bt=!1,Lt=!1,Et=!1,Ot=!1,Ft=!1,Vt=!0,Rt=!1,zt=!0,Ht=!1,_t={},Wt=null;const qt=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let jt=null;const Kt=addToSet({},["audio","video","img","source","image","track"]);let Yt=null;const Ut=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Jt=Qt,Zt=!1,te=null;const ee=addToSet({},[Gt,Xt,Qt],m);let ie=addToSet({},["mi","mo","mn","ms","mtext"]),se=addToSet({},["annotation-xml"]);const ae=addToSet({},["title","style","font","a","script"]);let ne=null;const re=["application/xhtml+xml","text/html"];let oe=null,le=null;const he=i.createElement("form"),pe=function isRegexOrFunction(t){return t instanceof RegExp||t instanceof Function},ce=function _parseConfig(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=clone(t),ne=-1===re.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,oe="application/xhtml+xml"===ne?m:g,bt=P(t,"ALLOWED_TAGS")?addToSet({},t.ALLOWED_TAGS,oe):Tt,Pt=P(t,"ALLOWED_ATTR")?addToSet({},t.ALLOWED_ATTR,oe):kt,te=P(t,"ALLOWED_NAMESPACES")?addToSet({},t.ALLOWED_NAMESPACES,m):ee,Yt=P(t,"ADD_URI_SAFE_ATTR")?addToSet(clone(Ut),t.ADD_URI_SAFE_ATTR,oe):Ut,jt=P(t,"ADD_DATA_URI_TAGS")?addToSet(clone(Kt),t.ADD_DATA_URI_TAGS,oe):Kt,Wt=P(t,"FORBID_CONTENTS")?addToSet({},t.FORBID_CONTENTS,oe):qt,wt=P(t,"FORBID_TAGS")?addToSet({},t.FORBID_TAGS,oe):clone({}),At=P(t,"FORBID_ATTR")?addToSet({},t.FORBID_ATTR,oe):clone({}),_t=!!P(t,"USE_PROFILES")&&t.USE_PROFILES,Dt=!1!==t.ALLOW_ARIA_ATTR,xt=!1!==t.ALLOW_DATA_ATTR,$t=t.ALLOW_UNKNOWN_PROTOCOLS||!1,St=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Nt=t.SAFE_FOR_TEMPLATES||!1,It=!1!==t.SAFE_FOR_XML,Mt=t.WHOLE_DOCUMENT||!1,Et=t.RETURN_DOM||!1,Ot=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Lt=t.FORCE_BODY||!1,Vt=!1!==t.SANITIZE_DOM,Rt=t.SANITIZE_NAMED_PROPS||!1,zt=!1!==t.KEEP_CONTENT,Ht=t.IN_PLACE||!1,yt=t.ALLOWED_URI_REGEXP||z,Jt=t.NAMESPACE||Qt,ie=t.MATHML_TEXT_INTEGRATION_POINTS||ie,se=t.HTML_INTEGRATION_POINTS||se,Ct=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&pe(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&pe(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Nt&&(xt=!1),Ot&&(Et=!0),_t&&(bt=addToSet({},N),Pt=[],!0===_t.html&&(addToSet(bt,w),addToSet(Pt,I)),!0===_t.svg&&(addToSet(bt,A),addToSet(Pt,M),addToSet(Pt,L)),!0===_t.svgFilters&&(addToSet(bt,D),addToSet(Pt,M),addToSet(Pt,L)),!0===_t.mathMl&&(addToSet(bt,$),addToSet(Pt,B),addToSet(Pt,L))),t.ADD_TAGS&&(bt===Tt&&(bt=clone(bt)),addToSet(bt,t.ADD_TAGS,oe)),t.ADD_ATTR&&(Pt===kt&&(Pt=clone(Pt)),addToSet(Pt,t.ADD_ATTR,oe)),t.ADD_URI_SAFE_ATTR&&addToSet(Yt,t.ADD_URI_SAFE_ATTR,oe),t.FORBID_CONTENTS&&(Wt===qt&&(Wt=clone(Wt)),addToSet(Wt,t.FORBID_CONTENTS,oe)),zt&&(bt["#text"]=!0),Mt&&addToSet(bt,["html","head","body"]),bt.table&&(addToSet(bt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');it=t.TRUSTED_TYPES_POLICY,st=it.createHTML("")}else void 0===it&&(it=function _createTrustedTypesPolicy(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(i=e.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return null}}(H,a)),null!==it&&"string"==typeof st&&(st=it.createHTML(""));n&&n(t),le=t}},ue=addToSet({},[...A,...D,...x]),de=addToSet({},[...$,...S]),fe=function _forceRemove(t){d(DOMPurify.removed,{element:t});try{et(t).removeChild(t)}catch(e){J(t)}},ge=function _removeAttribute(t,e){try{d(DOMPurify.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(DOMPurify.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Et||Ot)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},me=function _initDocument(t){let e=null,s=null;if(Lt)t=" "+t;else{const e=v(t,/^[\r\n\t ]+/);s=e&&e[0]}"application/xhtml+xml"===ne&&Jt===Qt&&(t=''+t+"");const a=it?it.createHTML(t):t;if(Jt===Qt)try{e=(new R).parseFromString(a,ne)}catch(t){}if(!e||!e.documentElement){e=at.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=Zt?st:a}catch(t){}}const n=e.body||e.documentElement;return t&&s&&n.insertBefore(i.createTextNode(s),n.childNodes[0]||null),Jt===Qt?ot.call(e,Mt?"html":"body")[0]:Mt?e.documentElement:n},ve=function _createNodeIterator(t){return nt.call(t.ownerDocument||t,t,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT|O.SHOW_PROCESSING_INSTRUCTION|O.SHOW_CDATA_SECTION,null)},ye=function _isClobbered(t){return t instanceof V&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},be=function _isNode(t){return"function"==typeof h&&t instanceof h};function _executeHooks(t,e,i){p(t,(t=>{t.call(DOMPurify,e,i,le)}))}const Te=function _sanitizeElements(t){let e=null;if(_executeHooks(ht.beforeSanitizeElements,t,null),ye(t))return fe(t),!0;const i=oe(t.nodeName);if(_executeHooks(ht.uponSanitizeElement,t,{tagName:i,allowedTags:bt}),It&&t.hasChildNodes()&&!be(t.firstElementChild)&&k(/<[/\w!]/g,t.innerHTML)&&k(/<[/\w!]/g,t.textContent))return fe(t),!0;if(t.nodeType===U)return fe(t),!0;if(It&&t.nodeType===G&&k(/<[/\w]/g,t.data))return fe(t),!0;if(!bt[i]||wt[i]){if(!wt[i]&&ke(i)){if(Ct.tagNameCheck instanceof RegExp&&k(Ct.tagNameCheck,i))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(i))return!1}if(zt&&!Wt[i]){const e=et(t)||t.parentNode,i=tt(t)||t.childNodes;if(i&&e){for(let s=i.length-1;s>=0;--s){const a=q(i[s],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,Z(t))}}}return fe(t),!0}return t instanceof E&&!function _checkValidNamespace(t){let e=et(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const i=g(t.tagName),s=g(e.tagName);return!!te[t.namespaceURI]&&(t.namespaceURI===Xt?e.namespaceURI===Qt?"svg"===i:e.namespaceURI===Gt?"svg"===i&&("annotation-xml"===s||ie[s]):Boolean(ue[i]):t.namespaceURI===Gt?e.namespaceURI===Qt?"math"===i:e.namespaceURI===Xt?"math"===i&&se[s]:Boolean(de[i]):t.namespaceURI===Qt?!(e.namespaceURI===Xt&&!se[s])&&!(e.namespaceURI===Gt&&!ie[s])&&!de[i]&&(ae[i]||!ue[i]):!("application/xhtml+xml"!==ne||!te[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!k(/<\/no(script|embed|frames)/i,t.innerHTML)?(Nt&&t.nodeType===Y&&(e=t.textContent,p([pt,ct,ut],(t=>{e=y(e,t," ")})),t.textContent!==e&&(d(DOMPurify.removed,{element:t.cloneNode()}),t.textContent=e)),_executeHooks(ht.afterSanitizeElements,t,null),!1):(fe(t),!0)},Pe=function _isValidAttribute(t,e,s){if(Vt&&("id"===e||"name"===e)&&(s in i||s in he))return!1;if(xt&&!At[e]&&k(dt,e));else if(Dt&&k(ft,e));else if(!Pt[e]||At[e]){if(!(ke(t)&&(Ct.tagNameCheck instanceof RegExp&&k(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&k(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&k(Ct.tagNameCheck,s)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(s))))return!1}else if(Yt[e]);else if(k(yt,y(s,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==b(s,"data:")||!jt[t]){if($t&&!k(gt,y(s,mt,"")));else if(s)return!1}else;return!0},ke=function _isBasicCustomElement(t){return"annotation-xml"!==t&&v(t,vt)},Ce=function _sanitizeAttributes(t){_executeHooks(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||ye(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pt,forceKeepAttr:void 0};let s=e.length;for(;s--;){const a=e[s],{name:n,namespaceURI:r,value:o}=a,l=oe(n),h=o;let c="value"===n?h:T(h);if(i.attrName=l,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,_executeHooks(ht.uponSanitizeAttribute,t,i),c=i.attrValue,!Rt||"id"!==l&&"name"!==l||(ge(n,t),c="user-content-"+c),It&&k(/((--!?|])>)|<\/(style|title)/i,c)){ge(n,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ge(n,t);continue}if(!St&&k(/\/>/i,c)){ge(n,t);continue}Nt&&p([pt,ct,ut],(t=>{c=y(c,t," ")}));const d=oe(t.nodeName);if(Pe(d,l,c)){if(it&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(r);else switch(H.getAttributeType(d,l)){case"TrustedHTML":c=it.createHTML(c);break;case"TrustedScriptURL":c=it.createScriptURL(c)}if(c!==h)try{r?t.setAttributeNS(r,n,c):t.setAttribute(n,c),ye(t)?fe(t):u(DOMPurify.removed)}catch(e){ge(n,t)}}else ge(n,t)}_executeHooks(ht.afterSanitizeAttributes,t,null)},we=function _sanitizeShadowDOM(t){let e=null;const i=ve(t);for(_executeHooks(ht.beforeSanitizeShadowDOM,t,null);e=i.nextNode();)_executeHooks(ht.uponSanitizeShadowNode,e,null),Te(e),Ce(e),e.content instanceof r&&_sanitizeShadowDOM(e.content);_executeHooks(ht.afterSanitizeShadowDOM,t,null)};return DOMPurify.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,a=null,n=null,o=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!be(t)){if("function"!=typeof t.toString)throw C("toString is not a function");if("string"!=typeof(t=t.toString()))throw C("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return t;if(Bt||ce(e),DOMPurify.removed=[],"string"==typeof t&&(Ht=!1),Ht){if(t.nodeName){const e=oe(t.nodeName);if(!bt[e]||wt[e])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof h)i=me("\x3c!----\x3e"),a=i.ownerDocument.importNode(t,!0),a.nodeType===K&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Et&&!Nt&&!Mt&&-1===t.indexOf("<"))return it&&Ft?it.createHTML(t):t;if(i=me(t),!i)return Et?null:Ft?st:""}i&&Lt&&fe(i.firstChild);const l=ve(Ht?t:i);for(;n=l.nextNode();)Te(n),Ce(n),n.content instanceof r&&we(n.content);if(Ht)return t;if(Et){if(Ot)for(o=rt.call(i.ownerDocument);i.firstChild;)o.appendChild(i.firstChild);else o=i;return(Pt.shadowroot||Pt.shadowrootmode)&&(o=lt.call(s,o,!0)),o}let c=Mt?i.outerHTML:i.innerHTML;return Mt&&bt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&k(W,i.ownerDocument.doctype.name)&&(c="\n"+c),Nt&&p([pt,ct,ut],(t=>{c=y(c,t," ")})),it&&Ft?it.createHTML(c):c},DOMPurify.setConfig=function(){ce(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Bt=!0},DOMPurify.clearConfig=function(){le=null,Bt=!1},DOMPurify.isValidAttribute=function(t,e,i){le||ce({});const s=oe(t),a=oe(e);return Pe(s,a,i)},DOMPurify.addHook=function(t,e){"function"==typeof e&&d(ht[t],e)},DOMPurify.removeHook=function(t,e){if(void 0!==e){const i=c(ht[t],e);return-1===i?void 0:f(ht[t],i,1)[0]}return u(ht[t])},DOMPurify.removeHooks=function(t){ht[t]=[]},DOMPurify.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();return J}));var AblePlayerInstances=[];!function(t){t((function(){t("video, audio").each((function(e,i){void 0!==t(i).data("able-player")&&AblePlayerInstances.push(new AblePlayer(t(this),t(i)))}))})),window.onYouTubeIframeAPIReady=function(){AblePlayer.youTubeIframeAPIReady=!0,t("body").trigger("youTubeIframeAPIReady",[])},t(window).on("keydown",(function(t){1===AblePlayer.nextIndex&&AblePlayer.lastCreated.onPlayerKeyPress(t)})),window.AblePlayer=function(e){if(AblePlayer.lastCreated=this,this.media=e,0!==t(e).length){void 0!==t(e).attr("autoplay")?(this.autoplay=!0,this.okToPlay=!0):(this.autoplay=!1,this.okToPlay=!1),this.loop=void 0!==t(e).attr("loop"),this.playsInline=void 0!==t(e).attr("playsinline")?"1":"0",this.hasPoster=!!t(e).attr("poster"),this.width=t(e).attr("width")??0,this.height=t(e).attr("height")??0;var i=t(e).data("start-time"),s=!("number"!=typeof i&&("string"!=typeof i||""===value.trim()||isNaN(value)||!isFinite(Number(value))));if(this.startTime=void 0!==i&&s?i:0,this.debug=void 0!==t(e).data("debug")&&!1!==t(e).data("debug"),void 0!==t(e).data("root-path")?this.rootPath=t(e).data("root-path").replace(/\/?$/,"/"):this.rootPath=this.getRootPath(),this.defaultVolume=7,void 0!==t(e).data("volume")&&""!==t(e).data("volume")){var a=t(e).data("volume");a>=0&&a<=10&&(this.defaultVolume=a)}if(this.volume=this.defaultVolume,void 0!==t(e).data("use-chapters-button")&&!1===t(e).data("use-chapters-button")?this.useChaptersButton=!1:this.useChaptersButton=!0,void 0!==t(e).data("descriptions-audible")&&!1===t(e).data("descriptions-audible")||void 0!==t(e).data("description-audible")&&!1===t(e).data("description-audible")?this.readDescriptionsAloud=!1:this.readDescriptionsAloud=!0,this.descVoices=[],this.descReader="screenreader"==t(e).data("desc-reader")?"screenreader":"browser",this.defaultStateCaptions="off"==t(e).data("state-captions")?0:1,this.defaultStateDescriptions="on"==t(e).data("state-descriptions")?1:0,this.defaultDescPause="off"==t(e).data("desc-pause-default")?0:1,void 0!==t(e).data("heading-level")&&""!==t(e).data("heading-level")){var n=t(e).data("heading-level");/^[0-6]*$/.test(n)&&(this.playerHeadingLevel=n)}var r=t(e).data("transcript-div");void 0!==r&&""!==r&&null!==document.getElementById(r)?this.transcriptDivLocation=r:this.transcriptDivLocation=null;var o=t(e).data("include-transcript");this.hideTranscriptButton=void 0!==o&&!1===o,this.transcriptType=null,void 0!==t(e).data("transcript-src")?(this.transcriptSrc=t(e).data("transcript-src"),this.transcriptSrcHasRequiredParts()&&(this.transcriptType="manual")):t(e).find('track[kind="captions"],track[kind="subtitles"],track:not([kind])').length>0&&(this.transcriptType=this.transcriptDivLocation?"external":"popup"),this.lyricsMode=void 0!==t(e).data("lyrics-mode")&&!1!==t(e).data("lyrics-mode"),void 0!==t(e).data("transcript-title")&&""!==t(e).data("transcript-title")&&(this.transcriptTitle=t(e).data("transcript-title")),this.defaultCaptionsPosition="overlay"===t(e).data("captions-position")?"overlay":"below";var l=t(e).data("chapters-div");void 0!==l&&""!==l&&(this.chaptersDivLocation=l),void 0!==t(e).data("chapters-title")&&(this.chaptersTitle=t(e).data("chapters-title"));var h=t(e).data("chapters-default");this.defaultChapter=void 0!==h&&""!==h?h:null,this.speedIcons="arrows"===t(e).data("speed-icons")?"arrows":"animals";var p=t(e).data("seekbar-scope");this.seekbarScope="chapter"===p||"chapters"===p?"chapter":"video";var c=t(e).data("youtube-id");void 0!==c&&""!==c&&(this.youTubeId=this.getYouTubeId(c));var u=t(e).data("youtube-desc-id");void 0!==u&&""!==u&&(this.youTubeDescId=this.getYouTubeId(u));var d=t(e).data("youtube-sign-src");void 0!==d&&""!==d&&(this.youTubeSignId=this.getYouTubeId(d));var f=t(e).data("youtube-nocookie");this.youTubeNoCookie=!(void 0===f||!f);var g=t(e).data("vimeo-id");void 0!==g&&""!==g&&(this.vimeoId=this.getVimeoId(g));var m=t(e).data("vimeo-desc-id");if(void 0!==m&&""!==m&&(this.vimeoDescId=this.getVimeoId(m)),this.skin="legacy"==t(e).data("skin")?"legacy":"2020",void 0!==t(e).data("width")?this.playerWidth=parseInt(t(e).data("width")):t(e)[0].getAttribute("width")?this.playerWidth=parseInt(t(e)[0].getAttribute("width")):this.playerWidth=null,this.iconType="font",this.forceIconType=!1,void 0!==t(e).data("icon-type")&&""!==t(e).data("icon-type")){var v=t(e).data("icon-type");"font"!==v&&"image"!==v&&"svg"!==v||(this.iconType=v,this.forceIconType=!0)}var y=t(e).data("allow-fullscreen");if(this.allowFullscreen=void 0===y||!1!==y,this.clickedFullscreenButton=!1,this.restoringAfterFullscreen=!1,this.defaultSeekInterval=10,this.useFixedSeekInterval=!1,void 0!==t(e).data("seek-interval")&&""!==t(e).data("seek-interval")){var b=t(e).data("seek-interval");/^[1-9][0-9]*$/.test(b)&&(this.seekInterval=b,this.useFixedSeekInterval=!0)}var T=t(e).data("show-now-playing");this.showNowPlaying=void 0===T||!1!==T,void 0!==t(e).data("use-ttml")?(this.useTtml=!0,this.convert=require("xml-js")):this.useTtml=!1;var P=t(e).data("test-fallback");this.testFallback=void 0!==P&&!1!==P&&("2"==P?2:1);var k=t(e).data("lang");this.lang=void 0!==k&&""!==k?k.toLowerCase():null;var C=t(e).data("meta-type");void 0!==C&&""!==C&&(this.metaType=C);var w=t(e).data("meta-div");void 0!==w&&""!==w&&(this.metaDiv=w);var A=t(e).data("search-div");if(void 0!==A&&""!==A){this.searchDiv=A;var D=t(e).data("search");void 0!==D&&""!==D&&(this.searchString=D);var x=t(e).data("search-lang");this.searchLang=void 0!==x&&""!==x?x:null;var $=t(e).data("search-ignore-caps");this.searchIgnoreCaps=void 0!==$&&!1!==$}void 0!==t(e).data("hide-controls")&&!1!==t(e).data("hide-controls")?(this.hideControls=!0,this.hideControlsOriginal=!0):(this.hideControls=!1,this.hideControlsOriginal=!1),void 0!==t(e).data("steno-mode")&&!1!==t(e).data("steno-mode")?(this.stenoMode=!0,void 0!==t(e).data("steno-iframe-id")&&""!==t(e).data("steno-iframe-id")?(this.stenoFrameId=t(e).data("steno-iframe-id"),this.$stenoFrame=t("#"+this.stenoFrameId),this.$stenoFrame.length||(this.stenoFrameId=null,this.$stenoFrame=null)):(this.stenoFrameId=null,this.$stenoFrame=null)):(this.stenoMode=!1,this.stenoFrameId=null,this.$stenoFrame=null),this.setDefaults(),this.ableIndex=AblePlayer.nextIndex,AblePlayer.nextIndex+=1,this.title=t(e).attr("title"),this.tt={};var S=this;t.when(this.getTranslationText()).then((function(){S.countProperties(S.tt)>50?S.setup():S.provideFallback()})).fail((function(){S.provideFallback()}))}else this.provideFallback()},AblePlayer.nextIndex=0,AblePlayer.prototype.setup=function(){var t=this;this.initializing=!0,this.reinitialize().then((function(){t.player?t.setupInstance().then((function(){t.setupInstancePlaylist(),t.hasPlaylist||t.recreatePlayer().then((function(){t.initializing=!1,t.playerCreated=!0}))})):t.provideFallback()}))},AblePlayer.getActiveDOMElement=function(){for(var t=document.activeElement;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t},AblePlayer.localGetElementById=function(e,i){return e.getRootNode?t(e.getRootNode().querySelector("#"+i)):t(document.getElementById(i))},AblePlayer.youTubeIframeAPIReady=!1,AblePlayer.loadingYouTubeIframeAPI=!1}(jQuery),function(t){AblePlayer.prototype.setDefaults=function(){this.playerCreated=!1,this.playing=!1,this.paused=!0,this.clickedPlay=!1,this.fullscreen=!1,this.swappingSrc=!1,this.initializing=!1,this.cueingPlaylistItems=!1,this.buttonWithFocus=null,this.speechEnabled=null,this.setIconColor(),this.setButtonImages()},AblePlayer.prototype.getRootPath=function(){var t,e,i,s,a,n;for(t=document.getElementsByTagName("script"),e=0;e",{class:"able-controller"}).hide():"toolbar"===e[i]&&(s=t("",{class:"able-window-toolbar"}).hide()),t("body").append(s),n=.2126*(a=s.css("background-color").replace(/[^\d,]/g,"").split(","))[0]+.7152*a[1]+.0722*a[2]<125?"white":"black","controller"===e[i]?this.iconColor=n:"toolbar"===e[i]&&(this.toolbarIconColor=n),s.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.getIconData=function(t){var e=Array();switch(t){case"play":e[0]="0 0 16 20",e[1]="M0 18.393v-16.429q0-0.29 0.184-0.402t0.441 0.033l14.821 8.237q0.257 0.145 0.257 0.346t-0.257 0.346l-14.821 8.237q-0.257 0.145-0.441 0.033t-0.184-0.402z",e[2]="icon-play",e[3]=this.playButtonImg;break;case"pause":e[0]="0 0 20 20",e[1]="M0 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h5.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-5.714q-0.29 0-0.502-0.212t-0.212-0.502zM10 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h5.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-5.714q-0.29 0-0.502-0.212t-0.212-0.502z",e[2]="icon-pause",e[3]=this.pauseButtonImg;break;case"restart":e[0]="0 0 20 20",e[1]="M18 8h-6l2.243-2.243c-1.133-1.133-2.64-1.757-4.243-1.757s-3.109 0.624-4.243 1.757c-1.133 1.133-1.757 2.64-1.757 4.243s0.624 3.109 1.757 4.243c1.133 1.133 2.64 1.757 4.243 1.757s3.109-0.624 4.243-1.757c0.095-0.095 0.185-0.192 0.273-0.292l1.505 1.317c-1.466 1.674-3.62 2.732-6.020 2.732-4.418 0-8-3.582-8-8s3.582-8 8-8c2.209 0 4.209 0.896 5.656 2.344l2.344-2.344v6z",e[2]="icon-restart",e[3]=this.restartButtonImg;break;case"rewind":e[0]="0 0 20 20",e[1]="M11.25 3.125v6.25l6.25-6.25v13.75l-6.25-6.25v6.25l-6.875-6.875z",e[2]="icon-rewind",e[3]=this.rewindButtonImg;break;case"forward":e[0]="0 0 20 20",e[1]="M10 16.875v-6.25l-6.25 6.25v-13.75l6.25 6.25v-6.25l6.875 6.875z",e[2]="icon-forward",e[3]=this.forwardButtonImg;break;case"previous":e[0]="0 0 20 20",e[1]="M5 17.5v-15h2.5v6.875l6.25-6.25v13.75l-6.25-6.25v6.875z",e[2]="icon-previous",e[3]=this.previousButtonImg;break;case"next":e[0]="0 0 20 20",e[1]="M15 2.5v15h-2.5v-6.875l-6.25 6.25v-13.75l6.25 6.25v-6.875z",e[2]="icon-next",e[3]=this.nextButtonImg;break;case"slower":e[0]="0 0 11 20",e[1]="M0 7.321q0-0.29 0.212-0.502t0.502-0.212h10q0.29 0 0.502 0.212t0.212 0.502-0.212 0.502l-5 5q-0.212 0.212-0.502 0.212t-0.502-0.212l-5-5q-0.212-0.212-0.212-0.502z",e[2]="icon-slower",e[3]=this.slowerButtonImg;break;case"faster":e[0]="0 0 11 20",e[1]="M0 12.411q0-0.29 0.212-0.502l5-5q0.212-0.212 0.502-0.212t0.502 0.212l5 5q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-10q-0.29 0-0.502-0.212t-0.212-0.502z",e[2]="icon-faster",e[3]=this.fasterButtonImg;break;case"turtle":e[0]="0 0 20 20",e[1]="M17.212 3.846c-0.281-0.014-0.549 0.025-0.817 0.144-1.218 0.542-1.662 2.708-2.163 3.942-1.207 2.972-7.090 4.619-11.755 5.216-0.887 0.114-1.749 0.74-2.428 1.466 0.82-0.284 2.126-0.297 2.74 0.144 0.007 0.488-0.376 1.062-0.625 1.37-0.404 0.5-0.398 0.793 0.12 0.793 0.473 0 0.752 0.007 1.635 0 0.393-0.003 0.618-0.16 1.49-1.49 3.592 0.718 5.986-0.264 5.986-0.264s0.407 1.755 1.418 1.755h1.49c0.633 0 0.667-0.331 0.625-0.433-0.448-1.082-0.68-1.873-0.769-2.5-0.263-1.857 0.657-3.836 2.524-5.457 0.585 0.986 2.253 0.845 2.909-0.096s0.446-2.268-0.192-3.221c-0.49-0.732-1.345-1.327-2.188-1.37zM8.221 4.663c-0.722-0.016-1.536 0.111-2.5 0.409-4.211 1.302-4.177 4.951-3.51 5.745 0 0-0.955 0.479-0.409 1.274 0.448 0.652 3.139 0.191 5.409-0.529s4.226-1.793 5.312-2.692c0.948-0.785 0.551-2.106-0.505-1.947-0.494-0.98-1.632-2.212-3.798-2.26zM18.846 5.962c0.325 0 0.577 0.252 0.577 0.577s-0.252 0.577-0.577 0.577c-0.325 0-0.577-0.252-0.577-0.577s0.252-0.577 0.577-0.577z",e[2]="icon-turtle",e[3]=this.slowerButtonImg;break;case"rabbit":e[0]="0 0 20 20",e[1]="M10.817 0c-2.248 0-1.586 0.525-1.154 0.505 1.551-0.072 5.199 0.044 6.851 2.428 0 0-1.022-2.933-5.697-2.933zM10.529 0.769c-2.572 0-2.837 0.51-2.837 1.106 0 0.545 1.526 0.836 2.524 0.697 2.778-0.386 4.231-0.12 5.264 0.865-1.010 0.779-0.75 1.401-1.274 1.851-1.093 0.941-2.643-0.673-4.976-0.673-2.496 0-4.712 1.92-4.712 4.76-0.157-0.537-0.769-0.913-1.442-0.913-0.974 0-1.514 0.637-1.514 1.49 0 0.769 1.13 1.791 2.861 0.938 0.499 1.208 2.265 1.364 2.452 1.418 0.538 0.154 1.875 0.098 1.875 0.865 0 0.794-1.034 1.094-1.034 1.707 0 1.070 1.758 0.873 2.284 1.034 1.683 0.517 2.103 1.214 2.788 2.212 0.771 1.122 2.572 1.408 2.572 0.625 0-3.185-4.413-4.126-4.399-4.135 0.608-0.382 2.139-1.397 2.139-3.534 0-1.295-0.703-2.256-1.755-2.861 1.256 0.094 2.572 1.205 2.572 2.74 0 1.877-0.653 2.823-0.769 2.957 1.975-1.158 3.193-3.91 3.029-6.37 0.61 0.401 1.27 0.577 1.971 0.625 0.751 0.052 1.475-0.225 1.635-0.529 0.38-0.723 0.162-2.321-0.12-2.837-0.763-1.392-2.236-1.73-3.606-1.683-1.202-1.671-3.812-2.356-5.529-2.356zM1.37 3.077l-0.553 1.538h3.726c0.521-0.576 1.541-1.207 2.284-1.538h-5.457zM18.846 5.192c0.325 0 0.577 0.252 0.577 0.577s-0.252 0.577-0.577 0.577c-0.325 0-0.577-0.252-0.577-0.577s0.252-0.577 0.577-0.577zM0.553 5.385l-0.553 1.538h3.197c0.26-0.824 0.586-1.328 0.769-1.538h-3.413z",e[2]="icon-rabbit",e[3]=this.fasterButtonImg;break;case"ellipsis":e[0]="0 0 20 20",e[1]="M10.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.985 2.199-2.2s-0.984-2.2-2.199-2.2zM3.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.986 2.199-2.2s-0.984-2.2-2.199-2.2zM17.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.985 2.199-2.2s-0.984-2.2-2.199-2.2z",e[2]="icon-ellipsis",e[3]=!1;break;case"pipe":e[0]="0 0 20 20",e[1]="M10.15 0.179h0.623c0.069 0 0.127 0.114 0.127 0.253v19.494c0 0.139-0.057 0.253-0.127 0.253h-1.247c-0.069 0-0.126-0.114-0.126-0.253v-19.494c0-0.139 0.057-0.253 0.126-0.253h0.623z",e[2]="icon-pipe",e[3]=!1;break;case"captions":e[0]="0 0 20 20",e[1]="M0.033 3.624h19.933v12.956h-19.933v-12.956zM18.098 10.045c-0.025-2.264-0.124-3.251-0.743-3.948-0.112-0.151-0.322-0.236-0.496-0.344-0.606-0.386-3.465-0.526-6.782-0.526s-6.313 0.14-6.907 0.526c-0.185 0.108-0.396 0.193-0.519 0.344-0.607 0.697-0.693 1.684-0.731 3.948 0.037 2.265 0.124 3.252 0.731 3.949 0.124 0.161 0.335 0.236 0.519 0.344 0.594 0.396 3.59 0.526 6.907 0.547 3.317-0.022 6.176-0.151 6.782-0.547 0.174-0.108 0.384-0.183 0.496-0.344 0.619-0.697 0.717-1.684 0.743-3.949v0 0zM9.689 9.281c-0.168-1.77-1.253-2.813-3.196-2.813-1.773 0-3.168 1.387-3.168 3.617 0 2.239 1.271 3.636 3.372 3.636 1.676 0 2.851-1.071 3.035-2.852h-2.003c-0.079 0.661-0.397 1.168-1.068 1.168-1.059 0-1.253-0.91-1.253-1.876 0-1.33 0.442-2.010 1.174-2.010 0.653 0 1.068 0.412 1.13 1.129h1.977zM16.607 9.281c-0.167-1.77-1.252-2.813-3.194-2.813-1.773 0-3.168 1.387-3.168 3.617 0 2.239 1.271 3.636 3.372 3.636 1.676 0 2.851-1.071 3.035-2.852h-2.003c-0.079 0.661-0.397 1.168-1.068 1.168-1.059 0-1.253-0.91-1.253-1.876 0-1.33 0.441-2.010 1.174-2.010 0.653 0 1.068 0.412 1.13 1.129h1.976z",e[2]="icon-captions",e[3]=this.captionsButtonImg;break;case"descriptions":e[0]="0 0 20 20",e[1]="M17.623 3.57h-1.555c1.754 1.736 2.763 4.106 2.763 6.572 0 2.191-0.788 4.286-2.189 5.943h1.484c1.247-1.704 1.945-3.792 1.945-5.943-0-2.418-0.886-4.754-2.447-6.572v0zM14.449 3.57h-1.55c1.749 1.736 2.757 4.106 2.757 6.572 0 2.191-0.788 4.286-2.187 5.943h1.476c1.258-1.704 1.951-3.792 1.951-5.943-0-2.418-0.884-4.754-2.447-6.572v0zM11.269 3.57h-1.542c1.752 1.736 2.752 4.106 2.752 6.572 0 2.191-0.791 4.286-2.181 5.943h1.473c1.258-1.704 1.945-3.792 1.945-5.943 0-2.418-0.876-4.754-2.447-6.572v0zM10.24 9.857c0 3.459-2.826 6.265-6.303 6.265v0.011h-3.867v-12.555h3.896c3.477 0 6.274 2.806 6.274 6.279v0zM6.944 9.857c0-1.842-1.492-3.338-3.349-3.338h-0.876v6.686h0.876c1.858 0 3.349-1.498 3.349-3.348v0z",e[2]="icon-descriptions",e[3]=this.descriptionsButtonImg;break;case"sign":e[0]="0 0 20 20",e[1]="M10.954 10.307c0.378 0.302 0.569 1.202 0.564 1.193 0.697 0.221 1.136 0.682 1.136 0.682 1.070-0.596 1.094-0.326 1.558-0.682 0.383-0.263 0.366-0.344 0.567-1.048 0.187-0.572-0.476-0.518-1.021-1.558-0.95 0.358-1.463 0.196-1.784 0.167-0.145-0.020-0.12 0.562-1.021 1.247zM14.409 17.196c-0.133 0.182-0.196 0.218-0.363 0.454-0.28 0.361 0.076 0.906 0.253 0.82 0.206-0.076 0.341-0.488 0.567-0.623 0.115-0.061 0.422-0.513 0.709-0.82 0.211-0.238 0.363-0.344 0.564-0.594 0.341-0.422 0.412-0.744 0.709-1.193 0.184-0.236 0.312-0.307 0.481-0.594 0.886-1.679 0.628-2.432 1.475-3.629 0.26-0.353 0.552-0.442 0.964-0.653 0.383-2.793-0.888-4.356-0.879-4.361-1.067 0.623-1.644 0.879-2.751 0.82-0.417-0.005-0.636-0.182-1.048-0.145-0.385 0.015-0.582 0.159-0.964 0.29-0.589 0.182-0.91 0.344-1.529 0.535-0.393 0.11-0.643 0.115-1.050 0.255-0.348 0.147-0.182 0.029-0.427 0.312-0.317 0.348-0.238 0.623-0.535 1.222-0.371 0.785-0.326 0.891-0.115 0.987-0.14 0.402-0.174 0.672-0.14 1.107 0.039 0.331-0.101 0.562 0.255 0.825 0.483 0.361 1.499 1.205 1.757 1.217 0.39-0.012 1.521 0.029 2.096-0.368 0.13-0.081 0.167-0.162 0.056 0.145-0.022 0.037-1.433 1.136-1.585 1.131-1.794 0.056-1.193 0.157-1.303 0.115-0.091 0-0.955-1.055-1.477-0.682-0.196 0.12-0.287 0.236-0.363 0.452 0.066 0.137 0.383 0.358 0.675 0.54 0.422 0.27 0.461 0.552 0.881 0.653 0.513 0.115 1.060 0.039 1.387 0.081 0.125 0.034 1.256-0.297 1.961-0.675 0.65-0.336-0.898 0.648-1.276 1.131-1.141 0.358-0.82 0.373-1.362 0.483-0.503 0.115-0.479 0.086-0.822 0.196-0.356 0.086-0.648 0.572-0.312 0.825 0.201 0.167 0.827-0.066 1.445-0.086 0.275-0.005 1.391-0.518 1.644-0.653 0.633-0.339 1.099-0.81 1.472-1.077 0.518-0.361-0.584 0.991-1.050 1.558zM8.855 9.799c-0.378-0.312-0.569-1.212-0.564-1.217-0.697-0.206-1.136-0.667-1.136-0.653-1.070 0.582-1.099 0.312-1.558 0.653-0.388 0.277-0.366 0.363-0.567 1.045-0.187 0.594 0.471 0.535 1.021 1.561 0.95-0.344 1.463-0.182 1.784-0.142 0.145 0.010 0.12-0.572 1.021-1.247zM5.4 2.911c0.133-0.191 0.196-0.228 0.368-0.454 0.27-0.371-0.081-0.915-0.253-0.849-0.211 0.096-0.346 0.508-0.599 0.653-0.093 0.052-0.4 0.503-0.682 0.82-0.211 0.228-0.363 0.334-0.564 0.599-0.346 0.407-0.412 0.729-0.709 1.161-0.184 0.258-0.317 0.324-0.481 0.621-0.886 1.669-0.631 2.422-1.475 3.6-0.26 0.38-0.552 0.461-0.964 0.682-0.383 2.788 0.883 4.346 0.879 4.336 1.068-0.609 1.639-0.861 2.751-0.825 0.417 0.025 0.636 0.201 1.048 0.174 0.385-0.025 0.582-0.169 0.964-0.285 0.589-0.196 0.91-0.358 1.499-0.54 0.422-0.12 0.672-0.125 1.080-0.285 0.348-0.128 0.182-0.010 0.427-0.282 0.312-0.358 0.238-0.633 0.508-1.217 0.398-0.8 0.353-0.906 0.142-0.991 0.135-0.412 0.174-0.677 0.14-1.107-0.044-0.336 0.101-0.572-0.255-0.82-0.483-0.375-1.499-1.22-1.752-1.222-0.395 0.002-1.526-0.039-2.101 0.339-0.13 0.101-0.167 0.182-0.056-0.11 0.022-0.052 1.433-1.148 1.585-1.163 1.794-0.039 1.193-0.14 1.303-0.088 0.091-0.007 0.955 1.045 1.477 0.682 0.191-0.13 0.287-0.245 0.368-0.452-0.071-0.147-0.388-0.368-0.68-0.537-0.422-0.282-0.464-0.564-0.881-0.655-0.513-0.125-1.065-0.049-1.387-0.11-0.125-0.015-1.256 0.317-1.956 0.68-0.66 0.351 0.893-0.631 1.276-1.136 1.136-0.339 0.81-0.353 1.36-0.479 0.501-0.101 0.476-0.071 0.82-0.172 0.351-0.096 0.648-0.577 0.312-0.849-0.206-0.152-0.827 0.081-1.44 0.086-0.28 0.020-1.396 0.533-1.649 0.677-0.633 0.329-1.099 0.8-1.472 1.048-0.523 0.38 0.584-0.967 1.050-1.529z",e[2]="icon-sign",e[3]=this.signButtonImg;break;case"mute":case"volume-mute":e[0]="0 0 20 20",e[1]="M7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714zM18.75 12.093v1.657h-1.657l-2.093-2.093-2.093 2.093h-1.657v-1.657l2.093-2.093-2.093-2.093v-1.657h1.657l2.093 2.093 2.093-2.093h1.657v1.657l-2.093 2.093z",e[2]="icon-volume-mute",e[3]=this.imgPath+"volume-mute.png";break;case"volume-soft":e[0]="0 0 20 20",e[1]="M10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z",e[2]="icon-volume-soft",e[3]=this.imgPath+"volume-soft.png";break;case"volume-medium":e[0]="0 0 20 20",e[1]="M14.053 16.241c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 2.559-2.559 2.559-6.722 0-9.281-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c1.594 1.594 2.471 3.712 2.471 5.966s-0.878 4.373-2.471 5.966c-0.183 0.183-0.423 0.275-0.663 0.275zM10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z",e[2]="icon-volume-medium",e[3]=this.imgPath+"volume-medium.png";break;case"volume-loud":e[0]="0 0 21 20",e[1]="M17.384 18.009c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.712-1.712 2.654-3.988 2.654-6.408s-0.943-4.696-2.654-6.408c-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.066 2.066 3.204 4.813 3.204 7.734s-1.138 5.668-3.204 7.734c-0.183 0.183-0.423 0.275-0.663 0.275zM14.053 16.241c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 2.559-2.559 2.559-6.722 0-9.281-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c1.594 1.594 2.471 3.712 2.471 5.966s-0.878 4.373-2.471 5.966c-0.183 0.183-0.423 0.275-0.663 0.275zM10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z",e[2]="icon-volume-loud",e[3]=this.imgPath+"volume-loud.png";break;case"chapters":e[0]="0 0 20 20",e[1]="M5 2.5v17.5l6.25-6.25 6.25 6.25v-17.5zM15 0h-12.5v17.5l1.25-1.25v-15h11.25z",e[2]="icon-chapters",e[3]=this.chaptersButtonImg;break;case"transcript":e[0]="0 0 20 20",e[1]="M0 19.107v-17.857q0-0.446 0.313-0.759t0.759-0.313h8.929v6.071q0 0.446 0.313 0.759t0.759 0.313h6.071v11.786q0 0.446-0.313 0.759t-0.759 0.312h-15q-0.446 0-0.759-0.313t-0.313-0.759zM4.286 15.536q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM4.286 12.679q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM4.286 9.821q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM11.429 5.893v-5.268q0.246 0.156 0.402 0.313l4.554 4.554q0.156 0.156 0.313 0.402h-5.268z",e[2]="icon-transcript",e[3]=this.transcriptButtonImg;break;case"preferences":e[0]="0 0 20 20",e[1]="M18.238 11.919c-1.049-1.817-0.418-4.147 1.409-5.205l-1.965-3.404c-0.562 0.329-1.214 0.518-1.911 0.518-2.1 0-3.803-1.714-3.803-3.828h-3.931c0.005 0.653-0.158 1.314-0.507 1.919-1.049 1.818-3.382 2.436-5.212 1.382l-1.965 3.404c0.566 0.322 1.056 0.793 1.404 1.396 1.048 1.815 0.42 4.139-1.401 5.2l1.965 3.404c0.56-0.326 1.209-0.513 1.902-0.513 2.094 0 3.792 1.703 3.803 3.808h3.931c-0.002-0.646 0.162-1.3 0.507-1.899 1.048-1.815 3.375-2.433 5.203-1.387l1.965-3.404c-0.562-0.322-1.049-0.791-1.395-1.391zM10 14.049c-2.236 0-4.050-1.813-4.050-4.049s1.813-4.049 4.050-4.049 4.049 1.813 4.049 4.049c-0 2.237-1.813 4.049-4.049 4.049z",e[2]="icon-preferences",e[3]=this.prefsButtonImg;break;case"close":e[0]="0 0 16 20",e[1]="M1.228 14.933q0-0.446 0.312-0.759l3.281-3.281-3.281-3.281q-0.313-0.313-0.313-0.759t0.313-0.759l1.518-1.518q0.313-0.313 0.759-0.313t0.759 0.313l3.281 3.281 3.281-3.281q0.313-0.313 0.759-0.313t0.759 0.313l1.518 1.518q0.313 0.313 0.313 0.759t-0.313 0.759l-3.281 3.281 3.281 3.281q0.313 0.313 0.313 0.759t-0.313 0.759l-1.518 1.518q-0.313 0.313-0.759 0.313t-0.759-0.313l-3.281-3.281-3.281 3.281q-0.313 0.313-0.759 0.313t-0.759-0.313l-1.518-1.518q-0.313-0.313-0.313-0.759z",e[2]="icon-close",e[3]=null;break;case"fullscreen-expand":e[0]="0 0 20 20",e[1]="M0 18.036v-5q0-0.29 0.212-0.502t0.502-0.212 0.502 0.212l1.607 1.607 3.705-3.705q0.112-0.112 0.257-0.112t0.257 0.112l1.272 1.272q0.112 0.112 0.112 0.257t-0.112 0.257l-3.705 3.705 1.607 1.607q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-5q-0.29 0-0.502-0.212t-0.212-0.502zM8.717 8.393q0-0.145 0.112-0.257l3.705-3.705-1.607-1.607q-0.212-0.212-0.212-0.502t0.212-0.502 0.502-0.212h5q0.29 0 0.502 0.212t0.212 0.502v5q0 0.29-0.212 0.502t-0.502 0.212-0.502-0.212l-1.607-1.607-3.705 3.705q-0.112 0.112-0.257 0.112t-0.257-0.112l-1.272-1.272q-0.112-0.112-0.112-0.257z",e[2]="icon-fullscreen-expand",e[3]=this.fullscreenExpandButtonImg;break;case"fullscreen-collapse":e[0]="0 0 20 20",e[1]="M0.145 16.964q0-0.145 0.112-0.257l3.705-3.705-1.607-1.607q-0.212-0.212-0.212-0.502t0.212-0.502 0.502-0.212h5q0.29 0 0.502 0.212t0.212 0.502v5q0 0.29-0.212 0.502t-0.502 0.212-0.502-0.212l-1.607-1.607-3.705 3.705q-0.112 0.112-0.257 0.112t-0.257-0.112l-1.272-1.272q-0.112-0.112-0.112-0.257zM8.571 9.464v-5q0-0.29 0.212-0.502t0.502-0.212 0.502 0.212l1.607 1.607 3.705-3.705q0.112-0.112 0.257-0.112t0.257 0.112l1.272 1.272q0.112 0.112 0.112 0.257t-0.112 0.257l-3.705 3.705 1.607 1.607q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-5q-0.29 0-0.502-0.212t-0.212-0.502z",e[2]="icon-fullscreen-collapse",e[3]=this.fullscreenCollapseButtonImg;break;case"help":e[0]="0 0 11 20",e[1]="M0.577 6.317q-0.028-0.167 0.061-0.313 1.786-2.969 5.179-2.969 0.893 0 1.797 0.346t1.629 0.926 1.183 1.423 0.458 1.769q0 0.603-0.173 1.127t-0.391 0.854-0.614 0.664-0.642 0.485-0.681 0.396q-0.458 0.257-0.765 0.725t-0.307 0.748q0 0.19-0.134 0.363t-0.313 0.173h-2.679q-0.167 0-0.285-0.206t-0.117-0.419v-0.502q0-0.926 0.725-1.747t1.596-1.211q0.658-0.301 0.938-0.625t0.279-0.848q0-0.469-0.519-0.826t-1.2-0.357q-0.725 0-1.205 0.324-0.391 0.279-1.194 1.283-0.145 0.179-0.346 0.179-0.134 0-0.279-0.089l-1.83-1.395q-0.145-0.112-0.173-0.279zM3.786 16.875v-2.679q0-0.179 0.134-0.313t0.313-0.134h2.679q0.179 0 0.313 0.134t0.134 0.313v2.679q0 0.179-0.134 0.313t-0.313 0.134h-2.679q-0.179 0-0.313-0.134t-0.134-0.313z",e[2]="icon-help",e[3]=this.helpButtonImg}return e},AblePlayer.prototype.reinitialize=function(){var e,i;if(i=(e=new t.Deferred).promise(),this.startedPlaying=!1,this.autoScrollTranscript=!0,this.$media=t(this.media).first(),this.media=this.$media[0],this.$media.is("audio"))this.mediaType="audio";else{if(!this.$media.is("video"))return this.provideFallback(),e.fail(),i;this.mediaType="video"}return this.$sources=this.$media.find("source"),this.player=this.getPlayer(),this.player||this.provideFallback(),this.setIconType(),e.resolve(),i},AblePlayer.prototype.setPlayerSize=function(t,e){"audio"===this.mediaType?this.playerWidth&&this.$ableWrapper.css("width",this.playerWidth+"px"):t>0&&e>0&&(this.playerWidth=t,this.playerHeight=e,this.aspectRatio=e/t)},AblePlayer.prototype.setIconType=function(){if(this.forceIconType)return!1;this.iconType="svg"},AblePlayer.prototype.setupInstance=function(){var e=new t.Deferred,i=e.promise();return this.$media.attr("id")?this.mediaId=this.$media.attr("id"):(this.mediaId="ableMediaId_"+this.ableIndex,this.$media.attr("id",this.mediaId)),e.resolve(),i},AblePlayer.prototype.setupInstancePlaylist=function(){var e=this;if(this.hasPlaylist=!1,t(".able-playlist").each((function(){if(t(this).data("player")===e.mediaId){e.hasPlaylist=!0,e.$playlist=t(this).find("li"),t(this).find("li[data-youtube-id]").each((function(){var i=DOMPurify.sanitize(t(this).attr("data-youtube-id")),s=e.getYouTubePosterUrl(i,"120"),a=t("
",{src:s,alt:""});t(this).find("button").prepend(a)})),t(this).find("li[data-vimeo-id]").each((function(){var i=t(this).attr("data-vimeo-id"),s=e.getVimeoPosterUrl(i,"120"),a=t("
",{src:s,alt:""});t(this).find("button").prepend(a)})),t(this).find("li span").attr("aria-hidden","true"),e.playlistIndex=0;var i=t(this).data("embedded");e.playlistEmbed=void 0!==i&&!1!==i}})),this.hasPlaylist&&this.loop&&this.media.removeAttribute("loop"),this.hasPlaylist&&this.playlistEmbed){var i=this.$playlist.parent();this.$playlistDom=i.clone(),i.remove()}this.hasPlaylist&&0===this.$sources.length&&(this.cuePlaylistItem(0),this.$sources=this.$media.find("source"))},AblePlayer.prototype.recreatePlayer=function(){var e,i,s,a,n;if(this.player)return i=(e=new t.Deferred).promise(),s=this,this.playerDeleted=!1,this.recreatingPlayer=!0,this.playerCreated||(this.loadCurrentPreferences(),this.injectPlayerCode(),this.resizePlayer(this.media.videoWidth,this.media.videoHeight)),this.getSampleDescriptionText(),this.initSignLanguage(),this.initPlayer().then((function(){s.getTracks().then((function(){s.initDescription().then((function(){s.setupTracks().then((function(){s.hasClosedDesc&&(!s.$descDiv||s.$descDiv&&!t.contains(s.$ableDiv[0],s.$descDiv[0]))&&s.injectTextDescriptionArea(),s.initSpeech("init"),s.setupTranscript().then((function(){s.initStenoFrame().then((function(){s.stenoMode&&s.$stenoFrame&&(s.stenoFrameContents=s.$stenoFrame.contents()),s.getMediaTimes().then((function(t){for(s.duration=t.duration,s.elapsed=t.elapsed,s.setFullscreen(!1),void 0===s.volume&&(s.volume=s.defaultVolume),s.volume&&s.setVolume(s.volume),s.transcriptType&&(s.addTranscriptAreaEvents(),s.updateTranscript()),s.captions.length&&s.initDefaultCaption(),s.setMediaAttributes(),s.addControls(),s.addEventListeners(),a=s.getPreferencesGroups(),n=0;n
0){for(e=0;e",{class:"able-prefs-form "})).addClass(W),"captions"==e)n=this.tt.prefTitleCaptions;else if("descriptions"==e){n=this.tt.prefTitleDescriptions;var q=t("",{text:this.tt.prefIntroDescription1}),j=t("
"),K=t("",{text:this.tt.prefDescFormatOption1}),Y=t(" ",{text:this.tt.prefDescFormatOption2});j.append(K,Y),this.hasOpenDesc&&this.hasClosedDesc?(I=this.tt.prefIntroDescription2+" ",I+=""+this.tt.prefDescFormatOption1b+" ",I+=" "+this.tt.and+" "+this.tt.prefDescFormatOption2b+" ."):this.hasOpenDesc?(I=this.tt.prefIntroDescription2,I+=" "+this.tt.prefDescFormatOption1b+" ."):this.hasClosedDesc?(I=this.tt.prefIntroDescription2,I+=" "+this.tt.prefDescFormatOption2b+" ."):I=this.tt.prefIntroDescriptionNone,o=t("",{html:I}),l=this.tt.prefIntroDescription3,(this.hasOpenDesc||this.hasClosedDesc)&&(l+=" "+this.tt.prefIntroDescription4),h=t("
",{text:l}),a.append(q,j,o,h)}else"keyboard"==e?(n=this.tt.prefTitleKeyboard,r=this.tt.prefIntroKeyboard1,r+=" "+this.tt.prefIntroKeyboard2,r+=" "+this.tt.prefIntroKeyboard3,q=t("
",{text:r}),a.append(q)):"transcript"==e&&(n=this.tt.prefTitleTranscript);for(u=t("
").attr("role","group"),d="able-prefs-"+e,m=(f=this.mediaId+"-prefs-"+e)+"-legend",u.addClass(d).attr("id",f),"keyboard"===e?((g=t("
"+this.tt.prefHeadingKeyboard1+" ")).attr("id",m),u.attr("aria-labelledby",m),u.append(g)):"descriptions"===e&&((g=t("
"+this.tt.prefHeadingTextDescription+" ")).attr("id",m),u.attr("aria-labelledby",m),u.append(g)),p=0;p
").addClass(b),"captions"===e){for(P=t(' '+s[p].label+" "),k=t("",{name:v,id:T}),"prefCaptions"!==v&&"prefCaptionsStyle"!==v&&k.on("change",(function(){$=t(this).attr("name"),i.stylizeCaptions(i.$sampleCapsDiv,$)})),C=this.getCaptionsOptions(v),c=0;c",{value:A,text:x}),this[v]===A&&w.prop("selected",!0),k.append(w);y.append(P,k)}else if("descriptions"===e){if(P=t(' '+s[p].label+" "),"prefDescPause"===v||"prefDescVisible"===v)y.addClass("able-prefs-checkbox"),k=t(" ",{type:"checkbox",name:v,id:T,value:"true"}),1===this[v]&&k.prop("checked",!0),y.append(k,P);else if(this.synth){if(y.addClass("able-prefs-select"),k=t("",{name:v,id:T}),"prefDescVoice"===v&&this.descVoices.length){for(M=this.getPrefDescVoice(),c=0;c",{value:A,"data-lang":D,text:x}),M===A&&w.prop("selected",!0),k.append(w);this.$voiceSelectField=k}else if("prefDescPitch"==v?C=[0,.5,1,1.5,2]:"prefDescRate"==v?C=[.7,.8,.9,1,1.1,1.2,1.5,2,2.5,3]:"prefDescVolume"==v&&(C=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]),void 0!==C)for(c=0;c",{value:A,text:x}),this[v]==A&&w.prop("selected",!0),k.append(w),y.append(P,k);k.on("change",(function(){i.announceDescriptionText("sample",i.currentSampleText)})),y.append(P,k)}}else P=t(' '+s[p].label+" "),k=t(" ",{type:"checkbox",name:v,id:T,value:"true"}),1===this[v]&&k.prop("checked",!0),"keyboard"===e&&k.on("change",(function(){"prefAltKey"===($=t(this).attr("name"))?(S=".able-modkey-alt",N=i.tt.prefAltKey+" + "):"prefCtrlKey"===$?(S=".able-modkey-ctrl",N=i.tt.prefCtrlKey+" + "):"prefShiftKey"===$&&(S=".able-modkey-shift",N=i.tt.prefShiftKey+" + "),t(this).is(":checked")?t(S).text(N):t(S).text("")})),y.append(k,P);("prefDescVoice"!==v||this.descVoices.length)&&u.append(y)}if(a.append(u),"captions"===e)this.usingYouTubeCaptions||(this.$sampleCapsDiv=t("",{class:"able-captions-sample"}).text(this.tt.sampleCaptionText),a.append(this.$sampleCapsDiv),this.stylizeCaptions(this.$sampleCapsDiv));else if("descriptions"===e)this.synth&&(this.$sampleDescDiv=t("
",{class:"able-desc-sample"}).text(this.tt.sampleDescriptionText),a.append(this.$sampleDescDiv),this.currentSampleText=this.tt.sampleDescriptionText);else if("keyboard"===e){for(B=t("
",{text:this.tt.prefHeadingKeyboard2}),L=t(""),E=[],O=[],p=0;p "+this.tt.or+' '+this.tt.spacebar)):"restart"===this.controls[p]?(E.push(this.tt.restart),O.push("s")):"previous"===this.controls[p]?(E.push(this.tt.prevTrack),O.push("b")):"next"===this.controls[p]?(E.push(this.tt.nextTrack),O.push("n")):"rewind"===this.controls[p]?(E.push(this.tt.rewind),O.push("r")):"forward"===this.controls[p]?(E.push(this.tt.forward),O.push("f")):"volume"===this.controls[p]?(E.push(this.tt.volume),O.push("v "+this.tt.or+' 1-9'),E.push(this.tt.mute+"/"+this.tt.unmute),O.push("m")):"captions"===this.controls[p]?(this.captions.length>1?E.push(this.tt.captions):this.captionsOn?E.push(this.tt.hideCaptions):E.push(this.tt.showCaptions),O.push("c")):"descriptions"===this.controls[p]?(this.descOn?E.push(this.tt.turnOffDescriptions):E.push(this.tt.turnOnDescriptions),O.push("d")):"prefs"===this.controls[p]?(E.push(this.tt.preferences),O.push("e")):"help"===this.controls[p]&&(E.push(this.tt.help),O.push("h"));for(p=0;p',1===this.prefAltKey&&(F+=this.tt.prefAltKey+" + "),F+=" ",F+='',1===this.prefCtrlKey&&(F+=this.tt.prefCtrlKey+" + "),F+=" ",F+='',1===this.prefShiftKey&&(F+=this.tt.prefShiftKey+" + "),F+=" ",F+=''+O[p]+" ",F+=" = "+E[p],V=t("",{html:F}),L.append(V);F=''+this.tt.escapeKey+" ",F+=" = "+this.tt.escapeKeyFunction,V=t(" ",{html:F}),L.append(V),a.append(B,L)}t("body").append(a),R=new AccessibleDialog(a,this.$prefsButton,"dialog",!0,n,q,i.tt.closeButtonLabel,!1),_=t('
'),z=t(''+this.tt.save+" "),H=t(''+this.tt.cancel+" "),z.on("click",(function(){R.hide(),i.savePrefsFromForm()})),H.on("click",(function(){R.hide(),i.resetPrefsForm()})),_.append(z,H),a.append(_),"captions"!==e&&"transcript"!==e||u.attr("aria-labelledby",R.titleH1.attr("id")),"captions"===e?this.captionPrefsDialog=R:"descriptions"===e?this.descPrefsDialog=R:"keyboard"===e?this.keyboardPrefsDialog=R:"transcript"===e&&(this.transcriptPrefsDialog=R),t("div.able-prefs-form button.modalCloseButton").on("click",(function(){i.resetPrefsForm()})),t("div.able-prefs-form").on("keydown",(function(t){"Escape"===t.key&&i.resetPrefsForm()}))},AblePlayer.prototype.getPrefDescVoice=function(){var t,e,i;if(t=this.selectedDescriptions?this.selectedDescriptions.language:this.captionLang?this.captionLang:this.lang,(e=this.getCookie()).voices)for(i=0;i",{value:i,"data-lang":this.descVoices[e].lang.substring(0,2).toLowerCase(),text:s}),this.prefDescVoice==i&&a.prop("selected",!0),this.$voiceSelectField.append(a)},AblePlayer.prototype.makePrefsValueReadable=function(t,e){if("prefDescPitch"===t){if(0===e)return this.tt.prefDescPitch1;if(.5===e)return this.tt.prefDescPitch2;if(1===e)return this.tt.prefDescPitch3;if(1.5===e)return this.tt.prefDescPitch4;if(2===e)return this.tt.prefDescPitch5}else if("prefDescRate"===t){if(.7===e)return 1;if(.8===e)return 2;if(.9===e)return 3;if(1===e)return 4;if(1.1===e)return 5;if(1.2===e)return 6;if(1.5===e)return 7;if(2===e)return 8;if(2.5===e)return 9;if(3===e)return 10}else if("prefDescVolume"===t)return 10*e;return e},AblePlayer.prototype.resetPrefsForm=function(){var e,i,s,a;for(e=this.getCookie(),i=this.getAvailablePreferences(),s=0;s0?(this.setCookie(e),this.showAlert(this.tt.prefSuccess)):this.showAlert(this.tt.prefNoChange),"youtube"===this.player&&void 0!==this.usingYouTubeCaptions&&this.usingYouTubeCaptions&&p&&this.youTubePlayer.setOption("captions","fontSize",this.translatePrefs("size",c,"youtube")),AblePlayerInstances.length>1)for(d=0;d0&&(AblePlayerInstances[d].stylizeCaptions(AblePlayerInstances[d].$captionsDiv),void 0!==AblePlayerInstances[d].$descDiv&&AblePlayerInstances[d].stylizeCaptions(AblePlayerInstances[d].$descDiv));else this.updatePrefs(),h>0&&(this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv))},AblePlayer.prototype.updatePrefs=function(){this.$transcriptDiv&&(1===this.prefTabbable?this.$transcriptDiv.find("span.able-transcript-seekpoint").attr("tabindex","0"):this.$transcriptDiv.find("span.able-transcript-seekpoint").removeAttr("tabindex"),0===this.prefHighlight&&this.$transcriptDiv.find("span").removeClass("able-highlight")),this.updateCaption(),this.initDescription()},AblePlayer.prototype.usingModifierKeys=function(t){return!(1===this.prefAltKey&&!t.altKey)&&(!(1===this.prefCtrlKey&&!t.ctrlKey)&&!(1===this.prefShiftKey&&!t.shiftKey))}}(jQuery),function(t){function actList(t,e){for(var i=[],s=0;s=0&&e.push(i);var s=t.indexOf("\t");s>=0&&e.push(s);var a=t.indexOf("\n");return a>=0&&e.push(a),Math.min.apply(null,e)}function getMetadataKeyValue(t){var e=t.text.indexOf("\n"),i=cut(t,e),s=i.indexOf(":");return-1===s?void(t.error="Missing colon."):[i.substring(0,s),i.substring(s+1)]}function getSettingsKeyValue(t){var e=cut(t,nextSpaceOrNewline(t.text)),i=e.indexOf(":");return-1===i?void(t.error="Missing colon."):[e.substring(0,i),e.substring(i+1)]}function parseCuesAndComments(t){for(;;){var e=peekLine(t);if(0!==e.indexOf("NOTE")||4!==e.length&&" "!==e[4]&&"\t"!==e[4])if(0===e.trim().length&&t.text.length>0)act(t,eatEmptyLines);else{if(!(e.trim().length>0))return;act(t,parseCue)}else actList(t,[eatComment,eatEmptyLines])}}function parseCue(t){var e,i=peekLine(t);if(-1===i.indexOf("--\x3e")&&(e=cutLine(t),-1===(i=peekLine(t)).indexOf("--\x3e")))return"Invalid WebVTT file: "+t.src+"\n","Line: "+t.line+", ","Column: "+t.column+"\n",void(console.warn||console.log);var s=actList(t,[getTiming,eatAtLeast1SpacesOrTabs,eatArrow,eatAtLeast1SpacesOrTabs,getTiming]),a=s[0],n=s[4];if(a>=n)t.error="Start time is not sooner than end time.";else{act(t,eatSpacesOrTabs);var r=act(t,getCueSettings);cut(t,1);var o=act(t,getCuePayload);void 0===e&&(e=t.cues.length+1),t.cues.push({id:e,start:a,end:n,settings:r,components:o})}}function getCueSettings(t){for(var e={};t.text.length>0&&"\n"!==t.text[0];){var i=act(t,getSettingsKeyValue);e[i[0]]=i[1],act(t,eatSpacesOrTabs)}return e}function getCuePayload(e){for(var i={type:"internal",tagName:"",value:"",classes:[],annotation:"",parent:null,children:[],language:""},s=i,a=[];e.text.length>0;){var n=peekLine(e);if(-1!==n.indexOf("--\x3e")||/^\s+$/.test(n))break;if(e.text.length>=2&&"\n"===e.text[0]&&"\n"===e.text[1]){cut(e,2);break}var r=getCueToken(e);if("string"===r.type)s.children.push(r);else if("startTag"===r.type)r.type=r.tagName,r.parent=s,-1!==t.inArray(r.tagName,["i","b","u","ruby"])||"rt"===r.tagName&&"ruby"===s.tagName?(a.length>0&&(s.language=a[a.length-1]),s.children.push(r),s=r):"c"===r.tagName||"v"===r.tagName?(r.value=r.annotation,a.length>0&&(s.language=a[a.length-1]),s.children.push(r),s=r):"lang"===r.tagName&&(a.push(r.annotation),a.length>0&&(s.language=a[a.length-1]),s.children.push(r),s=r);else if("endTag"===r.type)r.tagName===s.type&&-1!==t.inArray(r.tagName,["c","i","b","u","ruby","rt","v"])?s=s.parent:"lang"===r.tagName&&"lang"===s.type?(s=s.parent,a.pop()):"ruby"===r.tagName&&"rt"===s.type&&(s=s.parent.parent);else if("timestampTag"===r.type){var o={text:r.value,error:null,metadata:{},cues:[],line:1,column:1};try{var l=act(o,getTiming);0===o.text.length&&(r.value=l,s.push(r))}catch(t){}}}return i}function getCueToken(t){for(var e="data",i=[],s="",a={type:"",tagName:"",value:"",classes:[],annotation:"",children:[]};;){var n;if(n=t.text.length>=2&&"\n"===t.text[0]&&"\n"===t.text[1]?"":t.text.length>0?t.text[0]:"","data"===e)if("&"===n)s="&",e="escape";else if("<"===n){if(0!==i.length)return a.type="string",a.value=i.join(""),a;e="tag"}else{if(""===n)return{type:"string",value:i.join("")};i.push(n)}else if("escape"===e)if("&"===n)i.push(s),s="&";else if(n.match(/[0-9a-z]/))s+=n;else if(";"===n)"&"===s?i.push("&"):"<"===s?i.push("<"):">"===s?i.push(">"):"&lrm"===s?i.push(""):"&rlm"===s?i.push(""):" "===s?i.push(" "):(i.push(s),i.push(";")),e="data";else{if("<"===n||""===n)return i.push(s),a.type="string",a.value=i.join(""),a;if("\t"===n||"\n"===n||"\f"===n||" "===n)return i.push(s),a.type="string",a.value=i.join(""),a;i.push(s),e="data"}else if("tag"===e)if("\t"===n||"\n"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("."===n)e="startTagClass";else if("/"===n)e="endTag";else if(n.match("[0-9]"))e="timestampTag",i.push(n);else{if(">"===n){cut(t,1);break}if(""===n)return a.tagName="",a.type="startTag",a;i.push(n),e="startTag"}else if("startTag"===e)if("\t"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("\n"===n)s=n,e="startTagAnnotation";else if("."===n)e="startTagClass";else{if(">"===n)return cut(t,1),a.tagName=i.join(""),a.type="startTag",a;if(""===n)return a.tagName=i.join(""),a.type="startTag",a;i.push(n)}else if("startTagClass"===e)if("\t"===n||"\f"===n||" "===n)a.classes.push(s),s="",e="startTagAnnotation";else if("\n"===n)a.classes.push(s),s=n,e="startTagAnnotation";else if("."===n)a.classes.push(s),s="";else{if(">"===n)return cut(t,1),a.classes.push(s),a.type="startTag",a.tagName=i.join(""),a;if(""===n)return a.classes.push(s),a.type="startTag",a.tagName=i.join(""),a;s+="c"}else if("startTagAnnotation"===e){if(">"===n)return cut(t,1),s=s.trim().replace(/ +/," "),a.type="startTag",a.tagName=i.join(""),a.annotation=s,a;if(""===n)return s=s.trim().replace(/ +/," "),a.type="startTag",a.tagName=i.join(""),a.annotation=s,a;s+=n}else if("endTag"===e){if(">"===n)return cut(t,1),a.type="endTag",a.tagName=i.join(""),a;if(""===n)return a.type="endTag",a.tagName=i.join(""),a;i.push(n)}else{if("timestampTag"!==e)throw"Unknown tokenState "+e;if(">"===n)return cut(t,1),a.type="timestampTag",a.name=i.join(""),a;if(""===n)return a.type="timestampTag",a.name=i.join(""),a;i.push(n)}cut(t,1)}}function eatComment(t){if(-1===cutLine(t).indexOf("--\x3e"))for(;;){var e=peekLine(t);if(0===e.trim().length)return;if(-1!==e.indexOf("--\x3e"))return void(t.error="Invalid syntax: --\x3e in comment.");cutLine(t)}else t.error="Invalid syntax: --\x3e in NOTE line."}function eatOptionalBOM(t){"\ufeff"===t.text[0]&&cut(t,1)}function eatSignature(t){"WEBVTT"===t.text.substring(0,6)?cut(t,6):t.error="Invalid signature."}function eatArrow(t){t.text.length<3||"--\x3e"!==t.text.substring(0,3)?t.error="Missing --\x3e":cut(t,3)}function eatSpacesOrTabs(t){for(;"\t"===t.text[0]||" "===t.text[0];)cut(t,1)}function eatAtLeast1SpacesOrTabs(t){for(var e=0;"\t"===t.text[0]||" "===t.text[0];)cut(t,1),e+=1;0===e&&(t.error="Missing space.")}function eatUntilEOLInclusive(t){var e=t.text.indexOf("\n");-1===e?t.error="Missing EOL.":cut(t,e+1)}function eatEmptyLines(t){for(;t.text.length>0;){if(0!==peekLine(t).trim().length)break;cutLine(t)}}function eatAtLeast1EmptyLines(t){for(var e=0;t.text.length>0;){if(0!==peekLine(t).trim().length)break;cutLine(t),e+=1}0===e&&(t.error="Missing empty line.")}function getTiming(t){var e=nextSpaceOrNewline(t.text);if(-1!==e){var i=cut(t,e),s=/((\d+):)?((\d\d):)(\d\d).(\d\d\d)|(\d+).(\d\d\d)/.exec(i);if(s){var a=0,n=s[2],r=s[4];if(r){if(parseInt(r,10)>59)return void(t.error="Invalid minute range");n&&(a+=3600*parseInt(n,10)),a+=60*parseInt(r,10);var o=s[5];if(parseInt(o,10)>59)return void(t.error="Invalid second range");a+=parseInt(o,10),a+=parseInt(s[6],10)/1e3}else a+=parseInt(s[7],10),a+=parseInt(s[8],10)/1e3;return a}t.error="Unable to parse timestamp"}else t.error("Missing timing.")}AblePlayer.prototype.parseWebVTT=function(t,e){var i={src:t,text:e=e.replace(/(\r\n|\n|\r)/g,"\n"),error:null,metadata:{},cues:[],line:1,column:1};try{act(i,parseFileBody)}catch(t){console.warn||console.log}return i}}(jQuery),function(t){AblePlayer.prototype.injectPlayerCode=function(){var e;this.$mediaContainer=this.$media.wrap('
').parent(),this.$ableDiv=this.$mediaContainer.wrap('
').parent(),this.$ableWrapper=this.$ableDiv.wrap('
').parent(),this.$ableWrapper.addClass("able-skin-"+this.skin),this.$ableWrapper.css({width:this.playerWidth+"px"}),"video"===this.mediaType&&("image"==this.iconType||"youtube"===this.player&&!this.hasPoster||this.injectBigPlayButton()),e=t(""),"video"===this.mediaType?e.addClass("able-vidcap-container"):"audio"===this.mediaType&&(e.addClass("able-audcap-container"),e.addClass("captions-off")),this.injectPlayerControlArea(),this.$captionsContainer=this.$mediaContainer.wrap(e).parent(),this.injectAlert(this.$ableDiv),this.injectPlaylist(),this.injectOffscreenHeading()},AblePlayer.prototype.injectOffscreenHeading=function(){var e;"0"==this.playerHeadingLevel||(void 0===this.playerHeadingLevel&&(this.playerHeadingLevel=this.getNextHeadingLevel(this.$ableDiv)),e="h"+this.playerHeadingLevel.toString(),this.$headingDiv=t("<"+e+">"),this.$ableDiv.prepend(this.$headingDiv),this.$headingDiv.addClass("able-offscreen"),this.$headingDiv.text(this.tt.playerHeading))},AblePlayer.prototype.injectBigPlayButton=function(){var e;e=this,this.$bigPlayButton=t("
",{class:"able-big-play-button","aria-hidden":!1,"aria-label":this.tt.play,type:"button",tabindex:0}),this.getIcon(this.$bigPlayButton,"play"),this.$bigPlayButton.on("click",(function(){e.handlePlay()})),this.$mediaContainer.append(this.$bigPlayButton)},AblePlayer.prototype.injectPlayerControlArea=function(){this.$playerDiv=t("",{class:"able-player",role:"region","aria-label":this.mediaType+" player"}),this.$playerDiv.addClass("able-"+this.mediaType),this.hasPlaylist&&this.showNowPlaying&&(this.$nowPlayingDiv=t("
",{class:"able-now-playing","aria-live":"assertive","aria-atomic":"true"})),this.$controllerDiv=t("
",{class:"able-controller"}),this.$controllerDiv.addClass("able-"+this.iconColor+"-controls"),this.$statusBarDiv=t("
",{class:"able-status-bar"}),this.$timer=t("
",{class:"able-timer"}),this.$elapsedTimeContainer=t("",{class:"able-elapsedTime",text:"0:00"}),this.$durationContainer=t("",{class:"able-duration"}),this.$timer.append(this.$elapsedTimeContainer).append(this.$durationContainer),this.$speed=t("",{class:"able-speed","aria-live":"assertive","aria-atomic":"true"}).text(this.tt.speed+": 1x"),this.$status=t("",{class:"able-status","aria-live":"polite"}),this.$statusBarDiv.append(this.$timer,this.$speed,this.$status),this.showNowPlaying?this.$playerDiv.append(this.$nowPlayingDiv,this.$controllerDiv,this.$statusBarDiv):this.$playerDiv.append(this.$controllerDiv,this.$statusBarDiv),"video"===this.mediaType?this.$ableDiv.append(this.$playerDiv):this.$ableDiv.prepend(this.$playerDiv)},AblePlayer.prototype.injectTextDescriptionArea=function(){this.$descDiv=t("",{class:"able-descriptions"}),this.$descDiv.attr({"aria-live":"assertive","aria-atomic":"true"}),this.$descDiv.hide(),this.$ableDiv.append(this.$descDiv)},AblePlayer.prototype.getDefaultWidth=function(t){let e=window.innerWidth;return"transcript"===t?e<=450?e:450:"sign"===t?e<=400?e:400:void 0},AblePlayer.prototype.positionDraggableWindow=function(e,i){var s,a,n,r;s=this.getCookie(),n="transcript"===e?this.$transcriptArea:this.$signWindow,"transcript"===e?void 0!==s.transcript&&(a=s.transcript):"sign"===e&&void 0!==s.sign&&(a=s.sign),void 0===a||t.isEmptyObject(a)?(r=this.getOptimumPosition(e,i),void 0===i&&(i=this.getDefaultWidth(e)),n.css({position:r[0],width:i,"z-index":r[3]}),"absolute"===r[0]&&n.css({top:r[1]+"px",left:r[2]+"px"})):(n.css({position:a.position,width:a.width,"z-index":a.zindex}),"absolute"===a.position&&(n.css({top:a.top,left:a.left}),topPosition=n.offset().top,topPosition<0&&n.css({top:a.top-topPosition,left:a.left})),this.updateZIndex(e))},AblePlayer.prototype.getOptimumPosition=function(e,i){var s,a,n,r,o;return void 0===i&&(i=this.getDefaultWidth(e)),s=[],a=this.$ableDiv.width(),n=this.$ableDiv.offset().left,r=t(window).width(),o=0,"transcript"===e?void 0!==this.$signWindow&&this.$signWindow.is(":visible")&&(o=this.$signWindow.width()+5):"sign"===e&&void 0!==this.$transcriptArea&&this.$transcriptArea.is(":visible")&&(o=this.$transcriptArea.width()+5),i
'),this.$alertBox.addClass("able-alert"),this.$alertBox.hide(),t(" ").appendTo(this.$alertBox);var i=t(' ');i.attr("aria-label",this.tt.dismissButton),i.text("×"),i.appendTo(this.$alertBox),i.on("click",(function(e){t(this).parent("div").hide()})),this.$alertBox.appendTo(e),this.$srAlertBox||(this.$srAlertBox=t('
'),this.$srAlertBox.addClass("able-screenreader-alert"),this.$srAlertBox.appendTo(e))},AblePlayer.prototype.injectPlaylist=function(){if(!0===this.playlistEmbed){var t=this.$playlistDom.clone();t.insertBefore(this.$statusBarDiv),this.$playlist=t.find("li")}},AblePlayer.prototype.createPopup=function(e,i){var s,a,n,r,o,l,h,p,c,u,d,f;if(s=this,a=t("",{id:this.mediaId+"-"+e+"-menu",class:"able-popup",role:"menu"}).hide(),"captions"===e&&a.addClass("able-popup-captions"),"prefs"===e)if(this.prefCats.length>1){for(n=0;n",{role:"menuitem",tabindex:"-1"}),"captions"===(o=this.prefCats[n])?r.text(this.tt.prefMenuCaptions):"descriptions"===o?r.text(this.tt.prefMenuDescriptions):"keyboard"===o?r.text(this.tt.prefMenuKeyboard):"transcript"===o&&r.text(this.tt.prefMenuTranscript),r.on("click",(function(){l=t(this).text(),s.showingPrefsDialog=!0,s.setFullscreen(!1),l===s.tt.prefMenuCaptions?s.captionPrefsDialog.show():l===s.tt.prefMenuDescriptions?s.descPrefsDialog.show():l===s.tt.prefMenuKeyboard?s.keyboardPrefsDialog.show():l===s.tt.prefMenuTranscript&&s.transcriptPrefsDialog.show(),s.closePopups(),s.showingPrefsDialog=!1})),a.append(r);this.$prefsButton.attr("data-prefs-popup","menu")}else 1==this.prefCats.length&&this.$prefsButton.attr("data-prefs-popup",this.prefCats[0]);else if("captions"===e||"chapters"===e){for(h=!1,n=0;n",{role:"menuitemradio",tabindex:"-1",lang:p.language}),p.def&&1==this.prefCaptions?(r.attr("aria-checked","true"),h=!0):r.attr("aria-checked","false"),"captions"==e?(r.text(p.label),r.on("click",this.getCaptionClickFunction(p))):"chapters"==e&&(r.text(this.flattenCueForCaption(p)+" - "+this.formatSecondsAsColonTime(p.start)),r.on("click",this.getChapterClickFunction(p.start))),a.append(r));"captions"===e&&(r=t(" ",{role:"menuitemradio",tabindex:"-1"}).text(this.tt.captionsOff),0===this.prefCaptions?(r.attr("aria-checked","true"),h=!0):r.attr("aria-checked","false"),r.on("click",this.getCaptionOffFunction()),a.append(r))}else if("transcript-window"===e||"sign-window"===e)for((c=[]).push({name:"move",label:this.tt.windowMove}),c.push({name:"resize",label:this.tt.windowResize}),c.push({name:"close",label:this.tt.windowClose}),n=0;n",{role:"menuitem",tabindex:"-1","data-choice":c[n].name})).text(c[n].label),r.on("click mousedown",(function(i){if(i.stopPropagation(),void 0!==i.button&&0!==i.button)return!1;s.windowMenuClickRegistered||s.finishingDrag||(s.windowMenuClickRegistered=!0,s.handleMenuChoice(e.substring(0,e.indexOf("-")),t(this).attr("data-choice"),i))})),a.append(r);return"captions"!==e||h?"chapters"===e&&(a.find('li:contains("'+this.defaultChapter+'")')?a.find('li:contains("'+this.defaultChapter+'")').attr("aria-checked","true").addClass("able-focus"):a.find("li").first().attr("aria-checked","true").addClass("able-focus")):a.find("li[lang="+this.captionLang+"]")?a.find("li[lang="+this.captionLang+"]").attr("aria-checked","true"):a.find("li").last().attr("aria-checked","true"),a.on("keydown",(function(e){(u=t(this).find("li:focus")).is(":first-child")?(d=t(this).find("li").last(),f=u.next()):u.is(":last-child")?(d=u.prev(),f=t(this).find("li").first()):(d=u.prev(),f=u.next()),"Tab"===e.key?e.shiftKey?(u.removeClass("able-focus"),d.trigger("focus").addClass("able-focus")):(u.removeClass("able-focus"),f.trigger("focus").addClass("able-focus")):"ArrowDown"===e.key||"ArrowRight"===e.key?(u.removeClass("able-focus"),f.trigger("focus").addClass("able-focus")):"ArrowUp"==e.key||"ArrowLeft"===e.key?(u.removeClass("able-focus"),d.trigger("focus").addClass("able-focus")):" "===e.key||"Enter"===e.key?u.trigger("click"):"Escape"===e.key&&(u.removeClass("able-focus"),s.closePopups(),e.stopPropagation),e.preventDefault()})),this.$controllerDiv.append(a),a},AblePlayer.prototype.closePopups=function(){var t=this;this.chaptersPopup&&this.chaptersPopup.is(":visible")&&(this.chaptersPopup.hide(),this.$chaptersButton.attr("aria-expanded","false").trigger("focus")),this.captionsPopup&&this.captionsPopup.is(":visible")&&(this.captionsPopup.hide(),this.$ccButton.attr("aria-expanded","false"),this.waitThenFocus(this.$ccButton)),this.prefsPopup&&this.prefsPopup.is(":visible")&&!this.hidingPopup&&(this.hidingPopup=!0,this.prefsPopup.hide(),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$prefsButton.attr("aria-expanded","false"),this.showingPrefsDialog||this.waitThenFocus(t.$prefsButton),setTimeout((function(){t.hidingPopup=!1}),100)),this.$volumeSlider&&this.$volumeSlider.is(":visible")&&(this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeButton.attr("aria-expanded","false").trigger("focus")),this.$transcriptPopup&&this.$transcriptPopup.is(":visible")&&(this.hidingPopup=!0,this.$transcriptPopup.hide(),this.$transcriptPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$transcriptPopupButton.attr("aria-expanded","false").trigger("focus"),setTimeout((function(){t.hidingPopup=!1}),100)),this.$signPopup&&this.$signPopup.is(":visible")&&(this.$signPopup.hide(),this.$signPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$signPopupButton.attr("aria-expanded","false").trigger("focus"))},AblePlayer.prototype.setupPopups=function(t){var e,i;if(e=[],void 0===t&&e.push("prefs"),"captions"!==t&&void 0!==t||this.captions.length>0&&e.push("captions"),"chapters"!==t&&void 0!==t||this.chapters.length>0&&this.useChaptersButton&&e.push("chapters"),"transcript-window"===t&&"popup"===this.transcriptType&&e.push("transcript-window"),"sign-window"===t&&this.hasSignLanguage&&e.push("sign-window"),e.length>0){0;for(var s=0;s=1?this.chapters[0].cues:[],void 0!==this.chaptersPopup&&this.chaptersPopup||(this.chaptersPopup=this.createPopup("chapters",i));else{if("transcript-window"==a)return this.createPopup("transcript-window");if("sign-window"==a)return this.createPopup("sign-window")}}}},AblePlayer.prototype.provideFallback=function(){var e,i;if(!this.usingFallback){if(this.usingFallback=!0,this.testFallback||(this.testFallback=1),void 0===this.$media&&(this.$media=t(this.media)),this.$media.attr("id")?this.mediaId=this.$media.attr("id"):this.mediaId="media"+Math.floor(1e9*Math.random()).toString(),this.hasFallback=!1,this.$media.children().length)for(e=0;e").text("Media player unavailable."),this.$media.append(i)),this.$media.attr("width")&&this.$media.css("width",this.$media.attr("width")+"px"),this.$media.attr("height")&&this.$media.css("height",this.$media.attr("height")+"px"),this.$media.removeAttr("data-able-player"),this.$media.prop("controls",!0),2==this.testFallback){if(t(this.$media).replaceWith(t('')),this.$newFallbackElement=t("#foobar-"+this.mediaId),this.$media.children().length)for(e=this.$media.children().length-1;e>=0;)this.$newFallbackElement.prepend(t(this.$media.children()[e])),e--;this.hasFallback||this.$newFallbackElement.append(i)}}},AblePlayer.prototype.calculateControlLayout=function(){var t,e,i;return(t=[])[0]=[],t[1]=[],"legacy"===this.skin&&(t[2]=[],t[3]=[]),t[0].push("play"),t[0].push("restart"),t[0].push("rewind"),t[0].push("forward"),"legacy"===this.skin&&t[1].push("seek"),this.hasPlaylist&&(this.skin,t[0].push("previous"),t[0].push("next")),this.isPlaybackRateSupported()?(e=!0,"legacy"===this.skin&&(t[2].push("slower"),t[2].push("faster"))):e=!1,i=0,this.hasCaptions&&(i++,"legacy"===this.skin?t[2].push("captions"):t[1].push("captions")),this.hasSignLanguage&&(i++,"legacy"===this.skin?t[2].push("sign"):t[1].push("sign")),"video"===this.mediaType&&(this.hasOpenDesc||this.hasClosedDesc)&&(i++,"legacy"===this.skin?t[2].push("descriptions"):t[1].push("descriptions")),null===this.transcriptType||this.hideTranscriptButton||(i++,"legacy"===this.skin?t[2].push("transcript"):t[1].push("transcript")),this.hasChapters&&this.useChaptersButton&&(i++,"legacy"===this.skin?t[2].push("chapters"):t[1].push("chapters")),"2020"==this.skin&&i>0&&t[1].push("pipe"),e&&"2020"===this.skin&&(t[1].push("faster"),t[1].push("slower"),t[1].push("pipe")),"legacy"===this.skin?t[3].push("preferences"):t[1].push("preferences"),"video"===this.mediaType&&this.allowFullscreen&&("legacy"===this.skin?t[3].push("fullscreen"):t[1].push("fullscreen")),this.browserSupportsVolume()?(this.volumeButton="volume-"+this.getVolumeName(this.volume),this.skin,t[1].push("volume")):this.volume=!1,t},AblePlayer.prototype.addControls=function(){var e,i,s,a,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,T,P,k,C,w,A,D,x,$;e=this,s=(i=this.calculateControlLayout()).length,T=this.mediaId+"-tooltip",this.$tooltipDiv=t("",{id:T,class:"able-tooltip"}).hide(),this.$controllerDiv.append(this.$tooltipDiv),"2020"==this.skin&&(l=t('
'),h=this.mediaType+" "+this.tt.seekbarLabel,this.$controllerDiv.append(l),this.seekBar=new AccessibleSlider(l,"horizontal",100,0,this.duration,this.seekInterval,h,"seekbar",!0,"visible"));let S=t('
');for(this.$controllerDiv.append(S),a=0;a
",a%2==0?{class:"able-left-controls"}:{class:"able-right-controls"}),S.append(o),n=0;n '),h=this.mediaType+" "+this.tt.seekbarLabel,o.append(l),void 0!==this.duration&&0!==this.duration||(this.duration=60,this.elapsed=0),this.seekBar=new AccessibleSlider(l,"horizontal",100,0,this.duration,this.seekInterval,h,"seekbar",!0,"visible");else if("pipe"===c)(p=t("",{tabindex:"-1","aria-hidden":"true",class:"able-pipe"})).append("|"),o.append(p);else{u=this.getButtonTitle(c),d=t("",{role:"button",tabindex:"0",class:"able-button-handler-"+c}),"volume"!==c&&"preferences"!==c&&"captions"!==c||("preferences"==c?(this.prefCats=this.getPreferencesGroups(),this.prefCats.length>1?($=this.mediaId+"-prefs-menu",d.attr({"aria-controls":$,"aria-haspopup":"menu","aria-expanded":"false"})):1===this.prefCats.length&&d.attr({"aria-haspopup":"dialog"})):"volume"===c?($=this.mediaId+"-volume-slider",d.attr({"aria-controls":$,"aria-expanded":"false"})):"captions"===c&&this.captions&&(this.captions.length>1?d.attr("aria-expanded","false"):d.attr("aria-pressed","false")));var N=c;"faster"===c&&"animals"===this.speedIcons&&(N="rabbit"),"slower"===c&&"animals"===this.speedIcons&&(N="turtle"),"volume"===c?this.getIcon(d,this.volumeButton):("fullscreen"===N&&(N=this.fullscreen?"fullscreen-collapse":"fullscreen-expand"),this.getIcon(d,N)),this.setText(d,u),d.on("mouseenter focus",(function(i){clearTimeout(D),f=t(this).attr("aria-label"),g=t(this).position(),m=t(this).height(),v=t(this).width(),b=e.$controllerDiv.width(),g.right=b-g.left-v,P=g.top+m+5,y=t(this).parent().hasClass("able-right-controls")?"right":"left",C=AblePlayer.localGetElementById(d[0],T).text(f).width(),"left"==y?((k=g.left-C/2)<0&&(k=2),w={left:k+"px",right:"",top:P+"px"}):((k=g.right-C/2)<0&&(k=2),w={left:"",right:k+"px",top:P+"px"}),A=AblePlayer.localGetElementById(d[0],T).text(f).css(w),e.showTooltip(A),t(this).on("mouseleave blur",(function(){clearTimeout(D),D=setTimeout((function(){AblePlayer.localGetElementById(d[0],T).text("").hide()}),500),e.$tooltipDiv.on("mouseenter focus",(function(){clearTimeout(D)})),e.$tooltipDiv.on("mouseleave blur",(function(){AblePlayer.localGetElementById(d[0],T).text("").hide()}))}))})),"captions"===c?this.prefCaptions&&1===this.prefCaptions||(x=this.captions.length>1?this.tt.captions:this.tt.showCaptions,d.addClass("buttonOff").attr("title",x),d.attr("aria-pressed","false")):"descriptions"===c&&(this.prefDesc&&1===this.prefDesc||d.addClass("buttonOff").attr("title",this.tt.turnOnDescriptions)),o.append(d),"play"===c?this.$playpauseButton=d:"previous"==c?(this.$prevButton=d,"previous"==this.buttonWithFocus&&(this.$prevButton.trigger("focus"),this.buttonWithFocus=null)):"next"==c?(this.$nextButton=d,"next"==this.buttonWithFocus&&(this.$nextButton.trigger("focus"),this.buttonWithFocus=null)):"captions"===c?this.$ccButton=d:"sign"===c?(this.$signButton=d,this.$signWindow.is(":visible")||this.$signButton.addClass("buttonOff")):"descriptions"===c?this.$descButton=d:"mute"===c?this.$muteButton=d:"transcript"===c?(this.$transcriptButton=d,this.$transcriptDiv.is(":visible")||this.$transcriptButton.addClass("buttonOff").attr("title",this.tt.showTranscript)):"fullscreen"===c?this.$fullscreenButton=d:"chapters"===c?this.$chaptersButton=d:"preferences"===c?this.$prefsButton=d:"volume"===c&&(this.$volumeButton=d)}"volume"===c&&this.addVolumeSlider(o)}a%2==1&&this.$controllerDiv.append('
')}for(var I in void 0!==this.$captionsDiv&&this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv),this.controls=[],i)i.hasOwnProperty(I)&&(this.controls=this.controls.concat(i[I]));this.refreshControls()},AblePlayer.prototype.cuePlaylistItem=function(e){var i,s,a,n,r,o,l=this;s=this.player,this.initializing||this.playerCreated&&this.deletePlayer("playlist"),this.swappingSrc=!0,this.startedPlaying?this.okToPlay=!0:this.okToPlay=!1,this.loadingMedia=!1,i=this.$playlist.eq(e),this.hasAttr(i,"data-youtube-id")?(this.youTubeId=this.getYouTubeId(i.attr("data-youtube-id")),this.hasAttr(i,"data-youtube-desc-id")&&(this.youTubeDescId=this.getYouTubeId(i.attr("data-youtube-desc-id"))),a="youtube"):this.hasAttr(i,"data-vimeo-id")?(this.vimeoId=this.getVimeoId(i.attr("data-vimeo-id")),this.hasAttr(i,"data-vimeo-desc-id")&&(this.vimeoDescId=this.getVimeoId(i.attr("data-vimeo-desc-id"))),a="vimeo"):a="html5","youtube"===a?"html5"===s&&(this.playing&&this.pauseMedia(),this.$media.hide()):(this.youTubeId=!1,"youtube"===s&&this.$media.show()),this.player=a,this.$media.empty(),this.hasAttr(i,"data-poster")&&this.$media.attr("poster",i.attr("data-poster")),this.hasAttr(i,"data-youtube-desc-id")&&this.$media.attr("data-youtube-desc-id",i.attr("data-youtube-desc-id")),this.youTubeId&&this.$media.attr("data-youtube-id",i.attr("data-youtube-id"));var h=i.children("span.able-source");h.length&&h.each((function(){const e=t(this);if(l.hasAttr(e,"data-src")){const i=DOMPurify.sanitize(e.attr("data-src"));if(validate.isProtocolSafe(i)){const s=t("
",{src:i});["data-type","data-desc-src","data-sign-src"].forEach((t=>{if(l.hasAttr(e,t)){const i=e.attr(t),a=DOMPurify.sanitize(i);t.endsWith("-src")&&validate.isProtocolSafe(a)?s.attr(t,a):t.endsWith("-src")||s.attr(t,a)}})),l.$media.append(s)}}}));var p=i.children("span.able-track");p.length&&p.each((function(){const e=t(this);if(l.hasAttr(e,"data-src")&&l.hasAttr(e,"data-kind")&&l.hasAttr(e,"data-srclang")){const i=DOMPurify.sanitize(e.attr("data-src"));if(validate.isProtocolSafe(i)){const s=t("",{src:i,kind:e.attr("data-kind"),srclang:e.attr("data-srclang")});["data-label","data-desc","data-default"].forEach((t=>{l.hasAttr(e,t)&&s.attr(t,DOMPurify.sanitize(e.attr(t)))})),l.$media.append(s)}}})),n=DOMPurify.sanitize(i.text()),this.hasAttr(i,"lang")&&(r=i.attr("lang")),this.$sources=this.$media.find("source"),this.recreatingPlayer||this.recreatePlayer().then((function(){l.$playlist.removeClass("able-current").children("button").removeAttr("aria-current"),l.$playlist.eq(e).addClass("able-current").children("button").attr("aria-current","true"),!0===l.showNowPlaying&&void 0!==l.$nowPlayingDiv&&(o=t(""),void 0!==r&&o.attr("lang",r),o.html(""+l.tt.selectedTrack+": "+n),l.$nowPlayingDiv.html(o)),l.initializing?l.swappingSrc=!1:"html5"===l.player?l.loadingMedia||(l.media.load(),l.loadingMedia=!0):"youtube"===l.player&&(l.okToPlay=!0),l.initializing=!1,l.playerCreated=!0}))},AblePlayer.prototype.deletePlayer=function(e){"youtube"===this.player&&this.youTubePlayer&&this.youTubePlayer.destroy(),"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.destroy(),this.$controllerDiv.empty(),this.$elapsedTimeContainer.empty().text("0:00"),this.$durationContainer.empty(),this.$signWindow&&this.$signWindow.remove(),this.$transcriptArea&&this.$transcriptArea.remove(),t(".able-modal-dialog").remove(),this.$captionsWrapper&&this.$captionsWrapper.remove(),this.$descDiv&&this.$descDiv.remove(),this.hasCaptions=!1,this.hasChapters=!1,this.hasDescTracks=!1,this.hasOpenDesc=!1,this.hasClosedDesc=!1,this.captionsPopup=null,this.chaptersPopup=null,this.transcriptType=null,this.playerDeleted=!0},AblePlayer.prototype.getButtonTitle=function(t){return"playpause"===t||"play"===t?this.tt.play:"pause"===t?this.tt.pause:"restart"===t?this.tt.restart:"previous"===t?this.tt.prevTrack:"next"===t?this.tt.nextTrack:"rewind"===t?this.tt.rewind:"forward"===t?this.tt.forward:"captions"===t?this.captions.length>1?this.tt.captions:this.captionsOn?this.tt.hideCaptions:this.tt.showCaptions:"descriptions"===t?this.descOn?this.tt.turnOffDescriptions:this.tt.turnOnDescriptions:"transcript"===t?this.$transcriptDiv.is(":visible")?this.tt.hideTranscript:this.tt.showTranscript:"chapters"===t?this.tt.chapters:"sign"===t?this.tt.sign:"volume"===t?this.tt.volume:"faster"===t?this.tt.faster:"slower"===t?this.tt.slower:"preferences"===t?this.tt.preferences:"help"!==t?"fullscreen"===t?this.fullscreen?this.tt.exitFullScreen:this.tt.enterFullScreen:(this.debug,this.capitalizeFirstLetter(t)):void 0}}(jQuery);var preProcessing={transformCSSClasses:function(t){return t.replace(/<(v|c|b|i|u|lang|ruby)\.([\w\.]+)([^>]*)>/g,(function(t,e,i,s){return`<${e} class="${i.replace(/\./g," ")}"${s}>`}))},transformLangTags:function(t){return t.replace(/]*)>/g,(function(t,e,i){return'"}))},transformVTags:function(t){return t.replace(/]*?)>/g,(function(t,e){var i=e.match(/class="([^"]*)"/),s=i?i[0]:"",a=e.replace(/class="[^"]*"/,"").trim().split(/\s+/),n=[],r=[];a.forEach((function(t){-1!==t.indexOf("=")?n.push(t):r.push(t)}));var o=r.join(" "),l="0&&(l+=" "+n.join(" ")),s&&(l+=" "+s),l+=">"}))}},postProcessing={postprocessCTag:function(t){return t.replace(//g,(function(t,e){return""}))},postprocessVTag:function(t){return t.replace(/]*)class="([\w\s]+)"([^>]*)>/g,(function(t,e,i,s){var a=i.trim().split(/\s+/).join("."),n=(e+s).replace(/\s*class="[\w\s]+"/,"").trim();return""}))},postprocessLangTag:function(t){return t.replace(/]*)>/g,(function(t,e,i){return""}))}},validate={preProcessVttContent:function(t){var e=preProcessing.transformCSSClasses(t),i=preProcessing.transformLangTags(e);return preProcessing.transformVTags(i)},postProcessVttContent:function(t,e){var i=postProcessing.postprocessCTag(t),s=postProcessing.postprocessVTag(i);return postProcessing.postprocessLangTag(s).replace(/-->/g,"--\x3e").replace(/<\/v>/g,(function(t,i){return-1!==e.indexOf(t,i)?t:""}))},sanitizeVttContent:function(t){if(null==t)return"";var e=validate.preProcessVttContent(t),i=DOMPurify.sanitize(e,{ALLOWED_TAGS:["b","i","u","v","c","lang","ruby","rt","rp"],ALLOWED_ATTR:["title","class","lang"],KEEP_CONTENT:!0});return validate.postProcessVttContent(i,t)},isProtocolSafe:function(t){try{const e=new URL(t,window.location.origin);return["http:","https:"].includes(e.protocol)}catch(t){return!1}}};"undefined"!=typeof module&&module.exports&&(module.exports=validate),function(t){AblePlayer.prototype.setupTracks=function(){var e,i,s,a,n,r,o,l,h;for(e=this,s=(i=new t.Deferred).promise(),a=[],t("#able-vts").length?(this.vtsTracks=[],this.hasVts=!0):this.hasVts=!1,o=this.hasDescTracks&&this.descOn?this.altTracks:this.tracks,r=0;r",{class:"able-captions"}),this.$captionsWrapper=t("",{class:"able-captions-wrapper","aria-hidden":"true"}).hide(),"below"===this.prefCaptionsPosition?this.$captionsWrapper.addClass("able-captions-below"):this.$captionsWrapper.addClass("able-captions-overlay"),this.$captionsWrapper.append(this.$captionsDiv),this.$captionsContainer.append(this.$captionsWrapper))},AblePlayer.prototype.setupDescriptions=function(t,e){this.hasClosedDesc=!0,this.currentDescription=-1,this.descriptions.push({cues:e,language:t.language})},AblePlayer.prototype.setupChapters=function(t,e){this.hasChapters=!0,this.chapters.push({cues:e,language:t.language})},AblePlayer.prototype.setupMetadata=function(e){"text"===this.metaType?this.metaDiv&&t("#"+this.metaDiv)&&(this.$metaDiv=t("#"+this.metaDiv),this.hasMeta=!0,this.meta=e):"selector"===this.metaType&&(this.hasMeta=!0,this.visibleSelectors=[],this.meta=e)},AblePlayer.prototype.loadTextObject=function(e){var i,s,a,n;return s=(i=new t.Deferred).promise(),a=this,n=t("
",{style:"display:none"}),t.ajax({url:e,dataType:"text",success:function(t){var s=validate.sanitizeVttContent(t);n.html(s),i.resolve(e,s),n.remove()},error:function(t,s,r){a.debug,i.reject(e),n.remove()}}),s}}(jQuery),function(t){AblePlayer.prototype.initYouTubePlayer=function(){var e,i,s,a;return e=this,s=(i=new t.Deferred).promise(),this.youTubePlayerReady=!1,a=this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,this.activeYouTubeId=a,AblePlayer.youTubeIframeAPIReady?e.finalizeYoutubeInit().then((function(){i.resolve()})):(AblePlayer.loadingYouTubeIframeAPI||t.getScript("https://www.youtube.com/iframe_api").fail((function(){i.fail()})),t("body").on("youTubeIframeAPIReady",(function(){e.finalizeYoutubeInit().then((function(){i.resolve()}))}))),s},AblePlayer.prototype.finalizeYoutubeInit=function(){var e,i,s,a,n;return i=(e=new t.Deferred).promise(),s=this,a=this.mediaId+"_youtube",this.$mediaContainer.prepend(t("
").attr("id",a)),n=this.okToPlay?1:0,void 0===this.captionLang&&(this.captionLang=this.lang),this.youTubePlayer=new YT.Player(a,{videoId:this.activeYouTubeId,host:this.youTubeNoCookie?"https://www.youtube-nocookie.com":"https://www.youtube.com",playerVars:{autoplay:n,cc_lang_pref:this.captionLang,cc_load_policy:1,controls:0,disableKb:1,enablejsapi:1,hl:this.lang,iv_load_policy:3,origin:window.location.origin,playsinline:this.playsInline,rel:0,start:this.startTime},events:{onReady:function(){s.youTubePlayerReady=!0,s.playerWidth&&s.playerHeight||s.getYouTubeDimensions(),s.playerWidth&&s.playerHeight&&(s.youTubePlayer.setSize(s.playerWidth,s.playerHeight),s.$ableWrapper.css({width:s.playerWidth+"px"})),s.swappingSrc&&(s.swappingSrc=!1,s.restoreFocus(),s.cueingPlaylistItem=!1,(s.playing||s.okToPlay)&&s.playMedia()),s.userClickedPlaylist&&(s.userClickedPlaylist=!1),s.recreatingPlayer&&(s.recreatingPlayer=!1),e.resolve()},onError:function(t){e.fail()},onStateChange:function(t){s.getPlayerState().then((function(t){"playing"===t?(s.hasSignLanguage&&s.signVideo&&s.signVideo.play(!0),s.playing=!0,s.startedPlaying=!0,s.paused=!1):"ended"==t?s.onMediaComplete():(s.playing=!1,s.paused=!0),s.stoppingYouTube&&"paused"===t&&(s.hasSignLanguage&&s.signVideo&&s.signVideo.pause(!0),void 0!==s.$posterImg&&s.$posterImg.show(),s.stoppingYouTube=!1,s.seeking=!1,s.playing=!1,s.paused=!0)})),"youtube"!==s.player||s.usingYouTubeCaptions||s.youTubePlayer.getOptions("captions")&&s.youTubePlayer.unloadModule("captions")},onApiChange:function(){s.duration=s.youTubePlayer.getDuration()},onPlaybackQualityChange:function(){}}}),this.hasPlaylist||this.$media.remove(),i},AblePlayer.prototype.getYouTubeDimensions=function(t){var e,i,s;void 0!==(e=this.$ableWrapper.find("iframe"))&&e.prop("width")&&(i=e.prop("width"),e.prop("height")&&(s=e.prop("height"),this.resizePlayer(i,s)))},AblePlayer.prototype.getYouTubeCaptionTracks=function(e){var i,s,a,n,r,o,l=new t.Deferred,h=l.promise();return i=this,this.youTubePlayer.getOption("captions","tracklist")||(this.youTubePlayer.addEventListener("onApiChange",(function(t){if(i.duration=i.youTubePlayer.getDuration(),i.loadingYouTubeCaptions){if(s=i.youTubePlayer.getOption("captions","tracklist"),i.okToPlay||i.youTubePlayer.pauseVideo(),s&&s.length){for(a=0;a
"),this.playedDiv=t("
")),this.seekHead=t("
",{"aria-orientation":i,class:"able-"+l+"-head"}),"visible"===p?this.seekHead.attr("tabindex","0"):this.seekHead.attr("tabindex","-1"),this.seekHead.attr({role:"slider","aria-label":o,"aria-valuemin":a,"aria-valuemax":n}),this.timeTooltipTimeoutId=null,this.overTooltip=!1,this.timeTooltip=t("
"),this.bodyDiv.append(this.timeTooltip),this.timeTooltip.attr("role","tooltip"),this.timeTooltip.addClass("able-tooltip"),this.timeTooltip.on("mouseenter focus",(function(){c.overTooltip=!0,clearInterval(c.timeTooltipTimeoutId)})),this.timeTooltip.on("mouseleave blur",(function(){c.overTooltip=!1,t(this).hide()})),this.timeTooltip.hide(),this.bodyDiv.append(this.loadedDiv),this.bodyDiv.append(this.playedDiv),this.bodyDiv.append(this.seekHead),this.bodyDiv.wrap("
"),this.wrapperDiv=this.bodyDiv.parent(),"legacy"===this.skin&&("horizontal"===i?(this.wrapperDiv.width(s),this.loadedDiv.width(0)):(this.wrapperDiv.height(s),this.loadedDiv.height(0))),this.wrapperDiv.addClass("able-"+l+"-wrapper"),h&&(this.loadedDiv.addClass("able-"+l+"-loaded"),this.playedDiv.width(0),this.playedDiv.addClass("able-"+l+"-played"),this.setDuration(n)),this.seekHead.on("mouseenter mouseleave mousemove mousedown mouseup focus blur touchstart touchmove touchend",(function(t){u=c.pointerEventToXY(t),"mouseenter"===t.type||"focus"===t.type?c.overHead=!0:"mouseleave"===t.type||"blur"===t.type?(c.overHead=!1,!c.overBody&&c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x))):"mousemove"===t.type||"touchmove"===t.type?c.tracking&&"mouse"===c.trackDevice&&c.trackHeadAtPageX(u.x):"mousedown"===t.type||"touchstart"===t.type?(c.startTracking("mouse",c.pageXToPosition(c.seekHead.offset()+c.seekHead.width()/2)),c.bodyDiv.is(":focus")||c.bodyDiv.focus(),t.preventDefault()):"mouseup"!==t.type&&"touchend"!==t.type||c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x)),"mousemove"!==t.type&&"mousedown"!==t.type&&"mouseup"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&c.refreshTooltip()})),this.bodyDiv.on("mouseenter mouseleave mousemove mousedown mouseup keydown keyup touchstart touchmove touchend",(function(t){if(2==t.button&&"mousedown"==t.type)return;u=c.pointerEventToXY(t);let e=t.key;if("mouseenter"===t.type)c.overBody=!0,c.overBodyMousePos={x:u.x,y:u.y};else if("mouseleave"===t.type)c.overBody=!1,c.overBodyMousePos=null,!c.overHead&&c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x));else if("mousemove"===t.type||"touchmove"===t.type)c.overBodyMousePos={x:u.x,y:u.y},c.tracking&&"mouse"===c.trackDevice&&c.trackHeadAtPageX(u.x);else if("mousedown"===t.type||"touchstart"===t.type)c.startTracking("mouse",c.pageXToPosition(u.x)),c.trackHeadAtPageX(u.x),c.seekHead.is(":focus")||c.seekHead.focus(),t.preventDefault();else if("mouseup"===t.type||"touchend"===t.type)c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x));else if("keydown"===t.type){if("Home"===t.key)c.trackImmediatelyTo(0);else if("End"===t.key)c.trackImmediatelyTo(c.duration);else if("ArrowLeft"===t.key||"ArrowDown"===t.key)c.arrowKeyDown(-1);else if("ArrowRight"===t.key||"ArrowUp"===t.key)c.arrowKeyDown(1);else if("PageUp"===t.key&&r>0)c.arrowKeyDown(r);else{if(!("PageDown"===t.key&&r>0))return;c.arrowKeyDown(-r)}t.preventDefault()}else"keyup"===t.type&&e===t.key&&(c.tracking&&"keyboard"===c.trackDevice&&c.stopTracking(c.keyTrackPosition),t.preventDefault());c.overTooltip||"mouseup"===t.type||"keydown"===t.type||"keydown"===t.type||c.refreshTooltip()}))},AccessibleSlider.prototype.arrowKeyDown=function(t){this.tracking&&"keyboard"===this.trackDevice?(this.keyTrackPosition=this.boundPos(this.keyTrackPosition+this.nextStep*t),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*t),this.startTracking("keyboard",this.keyTrackPosition),this.trackHeadAtPosition(this.keyTrackPosition))},AccessibleSlider.prototype.pageXToPosition=function(t){var e=t-this.bodyDiv.offset().left,i=this.duration*(e/this.bodyDiv.width());return this.boundPos(i)},AccessibleSlider.prototype.boundPos=function(t){return Math.max(0,Math.min(t,this.duration))},AccessibleSlider.prototype.setDuration=function(t){t!==this.duration&&(this.duration=t,this.resetHeadLocation(),this.seekHead.attr("aria-valuemax",t))},AccessibleSlider.prototype.setWidth=function(t){this.wrapperDiv.width(t),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 t=this.position/this.duration,e=this.bodyDiv.width()*t;this.seekHead.css("left",e-this.seekHead.width()/2),this.tracking&&this.stopTracking(this.position)},AccessibleSlider.prototype.setPosition=function(t,e){this.position=t,this.resetHeadLocation(),this.overHead&&this.refreshTooltip(),this.resizeDivs(),this.updateAriaValues(t,e)},AccessibleSlider.prototype.setBuffered=function(t){isNaN(t)||(this.buffered=t,this.redrawDivs)},AccessibleSlider.prototype.startTracking=function(t,e){this.tracking||(this.trackDevice=t,this.tracking=!0,this.bodyDiv.trigger("startTracking",[e]))},AccessibleSlider.prototype.stopTracking=function(t){this.trackDevice=null,this.tracking=!1,this.bodyDiv.trigger("stopTracking",[t]),this.setPosition(t,!0)},AccessibleSlider.prototype.trackHeadAtPageX=function(t){var e=this.pageXToPosition(t),i=t-this.bodyDiv.offset().left-this.seekHead.width()/2;i=Math.max(0,Math.min(i,this.bodyDiv.width()-this.seekHead.width())),this.lastTrackPosition=e,this.seekHead.css("left",i),this.reportTrackAtPosition(e)},AccessibleSlider.prototype.trackHeadAtPosition=function(t){var e=t/this.duration,i=this.bodyDiv.width()*e;this.lastTrackPosition=t,this.seekHead.css("left",i-this.seekHead.width()/2),this.reportTrackAtPosition(t)},AccessibleSlider.prototype.reportTrackAtPosition=function(t){this.bodyDiv.trigger("tracking",[t]),this.updateAriaValues(t,!0)},AccessibleSlider.prototype.updateAriaValues=function(e,i){var s,a=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),o=1===n?"minute":"minutes",l=1===r?"second":"seconds";s=a>0?a+" "+(1===a?"hour":"hours")+", "+n+" "+o+", "+r+" "+l:n>0?n+" "+o+", "+r+" "+l:r+" "+l,this.liveAriaRegion||(this.liveAriaRegion=t("
",{class:"able-offscreen","aria-live":"polite"}),this.wrapperDiv.append(this.liveAriaRegion)),i&&this.liveAriaRegion.text()!==s&&this.liveAriaRegion.text(s),this.seekHead.attr("aria-valuetext",s),this.seekHead.attr("aria-valuenow",Math.floor(e).toString())},AccessibleSlider.prototype.trackImmediatelyTo=function(t){this.startTracking("keyboard",t),this.trackHeadAtPosition(t),this.keyTrackPosition=t},AccessibleSlider.prototype.refreshTooltip=function(){if(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);else if(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);else{clearTimeout(this.timeTooltipTimeoutId);var t=this;this.timeTooltipTimeoutId=setTimeout((function(){t.timeTooltip.hide()}),500)}},AccessibleSlider.prototype.hideSliderTooltips=function(){this.overHead=!1,this.overBody=!1,this.timeTooltip.hide()},AccessibleSlider.prototype.setTooltipPosition=function(t){this.timeTooltip.css({left:t-this.timeTooltip.width()/2-10,bottom:this.seekHead.height()})},AccessibleSlider.prototype.positionToStr=function(t){var e=Math.floor(t/3600),i=Math.floor(t/60)%60,s=Math.floor(t%60);return s<10&&(s="0"+s),e>0?(i<10&&(i="0"+i),e+":"+i+":"+s):i+":"+s},AccessibleSlider.prototype.pointerEventToXY=function(t){var e={x:0,y:0};if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];e.x=i.pageX,e.y=i.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(e.x=t.pageX,e.y=t.pageY);return e}}(jQuery),function(t){AblePlayer.prototype.addVolumeSlider=function(e){var i,s,a,n,r,o;i=this,s=this.mediaId+"-volume-slider",a=this.mediaId+"-volume-help",this.$volumeSlider=t("",{id:s,class:"able-volume-slider","aria-hidden":"true"}).hide(),this.$volumeSliderTooltip=t("
",{class:"able-tooltip",role:"tooltip"}).hide(),this.$volumeRange=t("
",{type:"range",min:"0",max:"10",step:"1",orient:"vertical","aria-label":this.tt.volumeUpDown,value:this.volume}),n=parseInt(i.volume)/10*100,this.$volumeHelp=t("
",{id:a,class:"able-volume-help","aria-live":"polite"}).text(n+"%"),r=this.$volumeButton.attr("aria-label"),this.$volumeButton.attr("aria-label",r+" "+n+"%"),this.$volumeSlider.append(this.$volumeSliderTooltip,this.$volumeRange,this.$volumeHelp),o=this.$volumeButton.parents(".able-control-row")[0],this.$volumeSlider.css("bottom",o.offsetHeight),e.append(this.$volumeSlider),this.$volumeRange.on("change",(function(e){i.handleVolumeChange(t(this).val())})),this.$volumeRange.on("input",(function(e){i.handleVolumeChange(t(this).val())})),this.$volumeRange.on("keydown",(function(t){"Escape"!==t.key&&"Tab"!==t.key&&"Enter"!==t.key||(i.$volumeSlider.is(":visible")?(i.closingVolume=!0,i.hideVolumePopup()):i.closingVolume||i.showVolumePopup())}))},AblePlayer.prototype.refreshVolumeHelp=function(t){var e;e=t/10*100,this.$volumeHelp&&this.$volumeHelp.text(e+"%"),this.$volumeRange.attr("value",t)},AblePlayer.prototype.refreshVolumeButton=function(t){var e,i,s;e=this.getVolumeName(t),i=t/10*100,s=this.tt.volume+" "+i+"%",this.getIcon(this.$volumeButton,"volume-"+e),this.$volumeButton.attr("aria-label",s),this.$volumeButton.find("span.able-clipped").text(s)},AblePlayer.prototype.handleVolumeButtonClick=function(){this.$volumeSlider.is(":visible")?this.hideVolumePopup():this.showVolumePopup()},AblePlayer.prototype.handleVolumeKeystroke=function(t){this.isMuted()&&t>0?this.setMute(!1):0===t?this.setMute(!0):(this.setVolume(t),this.refreshVolumeHelp(t),this.refreshVolumeButton(t))},AblePlayer.prototype.handleVolumeChange=function(t){this.isMuted()&&t>0?this.setMute(!1):0===t?this.setMute(!0):(this.setVolume(t),this.refreshVolumeHelp(t),this.refreshVolumeButton(t))},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.$volumeButton.attr("aria-expanded","true"),this.$volumeButton.focus(),this.waitThenFocus(this.$volumeRange)},AblePlayer.prototype.hideVolumePopup=function(){var t=this;this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeButton.attr("aria-expanded","false").focus(),setTimeout((function(){t.closingVolume=!1}),1e3)},AblePlayer.prototype.isMuted=function(){return"html5"===this.player?this.media.muted:"youtube"===this.player?this.youTubePlayer.isMuted():void 0},AblePlayer.prototype.setMute=function(t){t?(this.lastVolume=this.volume,this.volume=0):void 0!==this.lastVolume&&(this.volume=this.lastVolume),"html5"===this.player?this.media.muted=t:"youtube"===this.player&&(t?this.youTubePlayer.mute():this.youTubePlayer.unMute()),this.setVolume(this.volume),this.refreshVolumeHelp(this.volume),this.refreshVolumeButton(this.volume)},AblePlayer.prototype.setVolume=function(t){var e;this.syncSignVideo({volume:0}),"html5"===this.player?(e=t/10,this.media.volume=e):"youtube"===this.player?(e=10*t,this.youTubePlayer.setVolume(e),this.volume=t):"vimeo"===this.player&&(e=t/10,this.vimeoPlayer.setVolume(e).then((function(){}))),this.lastVolume=t},AblePlayer.prototype.getVolume=function(t){return"html5"===this.player?10*this.media.volume:"youtube"===this.player&&this.youTubePlayerReady?this.youTubePlayer.getVolume()/10:"vimeo"===this.player?this.volume:void 0},AblePlayer.prototype.getVolumeName=function(t){return 0==t?"mute":10==t?"loud":t<5?"soft":"medium"}}(jQuery),function(t){var e="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";window.AccessibleDialog=function(i,s,a,n,r,o,l,h,p,c){this.title=r,this.closeButtonLabel=l,this.focusedElementBeforeModal=s,this.escapeHook=c,this.baseId=t(i).attr("id")||Math.floor(1e9*Math.random()).toString();var u=this,d=i;if(this.modal=d,h&&d.css({width:h}),d.addClass("able-modal-dialog"),!p){var f=t("
",{class:"modalCloseButton",title:u.closeButtonLabel,"aria-label":u.closeButtonLabel}).text("×");f.on("keydown",(function(t){" "===t.key&&u.hide()})).on("click",(function(){u.hide()}));var g=t(" ");g.attr("id","modalTitle-"+this.baseId),g.text(r),this.titleH1=g,d.attr({"aria-labelledby":"modalTitle-"+this.baseId});var m=t("",{class:"able-modal-header"});m.prepend(g),m.prepend(f),d.prepend(m)}d.attr({"aria-hidden":"true",role:a}),n&&d.attr("aria-modal","true"),d.on("keydown",(function(i){if("Escape"===i.key)u.escapeHook?u.escapeHook(i,this):(u.hide(),i.preventDefault());else if("Tab"===i.key){var s=d.find("*").filter(e).filter(":visible");if(0===s.length)return;var a=t(":focus"),n=s.index(a);i.shiftKey?0===n&&(s.get(s.length-1).trigger("focus"),i.preventDefault()):n===s.length-1&&(s.get(0).trigger("focus"),i.preventDefault())}i.stopPropagation()})),t("body").hasClass("able-modal-active")&&(t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("inert"),t("body").removeClass("able-modal-active"))},AccessibleDialog.prototype.show=function(){if(!this.overlay){var i=t("
").attr({class:"able-modal-overlay",tabindex:"-1"});this.overlay=i,t("body").append(i),i.on("mousedown.accessibleModal",(function(t){t.preventDefault(),s.hide()}))}t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("inert",!0),t("body").addClass("able-modal-active"),this.overlay.css("display","block"),this.modal.css("display","block"),this.modal.attr({"aria-hidden":"false",tabindex:"-1"}),0===this.modal.find("*").filter(e).filter(":visible").length&&this.focusedElementBeforeModal.blur();var s=this;setTimeout((function(){s.modal.find("button.modalCloseButton").first().trigger("focus")}),300)},AccessibleDialog.prototype.hide=function(){this.overlay&&this.overlay.css("display","none"),this.modal.css("display","none"),this.modal.attr("aria-hidden","true"),t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("inert"),t("body").removeClass("able-modal-active"),this.focusedElementBeforeModal.trigger("focus")},AccessibleDialog.prototype.getInputs=function(){return!!this.modal&&this.modal.find("input")}}(jQuery),function(t){AblePlayer.prototype.getNextHeadingLevel=function(e){var i,s,a,n;return e.parents().each((function(){if(i=t(this).children(":header"),s=i.length)return a=i.eq(s-1).prop("tagName"),!1})),void 0===a?n=1:(n=parseInt(a[1]),(n+=1)>6&&(n=6)),n},AblePlayer.prototype.countProperties=function(t){var e,i;for(i in e=0,t)t.hasOwnProperty(i)&&++e;return e},AblePlayer.prototype.formatSecondsAsColonTime=function(t,e){var i,s,a,n,r,o,l;if(e)if(2===(n=t.toString().split(".")).length){if((r=n[1]).length<3)for(o=3-r.length,l=1;l<=o;l++)r+="0"}else r="000";return i=Math.floor(t/3600),s=Math.floor(t/60)%60,(a=Math.floor(t%60))<10&&(a="0"+a),i>0?(s<10&&(s="0"+s),e?i+":"+s+":"+a+"."+r:i+":"+s+":"+a):e?(i<1?i="00":i<10&&(i="0"+i),s<1?s="00":s<10&&(s="0"+s),i+":"+s+":"+a+"."+r):s+":"+a},AblePlayer.prototype.getSecondsFromColonTime=function(t){var e;return 3===(e=t.split(":")).length?3600*parseInt(e[0])+60*parseInt(e[1])+parseFloat(e[2]):2===e.length?60*parseInt(e[0])+parseFloat(e[1]):1===e.length?parseFloat(e[0]):void 0},AblePlayer.prototype.capitalizeFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},AblePlayer.prototype.roundDown=function(t,e){return Number(Math.floor(t+"e"+e)+"e-"+e)},AblePlayer.prototype.hasAttr=function(t,e){var i=t.attr(e);return void 0!==i&&!1!==i}}(jQuery),function(t){AblePlayer.prototype.initDescription=function(){var e,i;return i=(e=new t.Deferred).promise(),"audio"===this.mediaType&&e.resolve(),this.descFile=this.$sources.first().attr("data-desc-src"),void 0!==this.descFile?this.hasOpenDesc=!0:this.hasOpenDesc=!(!this.youTubeDescId&&!this.vimeoDescId),this.descMethod=null,this.hasOpenDesc&&this.hasClosedDesc?this.descMethod=this.prefDescMethod?this.prefDescMethod:"video":this.hasOpenDesc?this.descMethod="video":this.hasClosedDesc&&(this.descMethod="text"),this.descOn=!1,this.descMethod&&(1===this.prefDesc?this.descOn=!0:0===this.prefDesc?this.descOn=!1:this.descOn=1===this.defaultStateDescriptions),void 0===this.$descDiv&&this.hasClosedDesc&&this.injectTextDescriptionArea(),this.descOn?("video"!==this.descMethod||this.usingDescribedVersion()||this.swapDescription(),this.hasClosedDesc&&(this.prefDescVisible?void 0!==this.$descDiv&&(this.$descDiv.show(),this.$descDiv.removeClass("able-clipped")):void 0!==this.$descDiv&&this.$descDiv.addClass("able-clipped"))):"video"===this.descMethod?this.usingDescribedVersion()&&this.swapDescription():"text"===this.descMethod&&void 0!==this.$descDiv&&(this.$descDiv.hide(),this.$descDiv.removeClass("able-clipped")),e.resolve(),i},AblePlayer.prototype.usingDescribedVersion=function(){return"youtube"===this.player?this.activeYouTubeId===this.youTubeDescId:"vimeo"===this.player?this.activeVimeoId===this.vimeoDescId:this.$sources.first().attr("data-desc-src")===this.$sources.first().attr("src")},AblePlayer.prototype.initSpeech=function(e){var i=this;function attemptEnableSpeech(){var t=new SpeechSynthesisUtterance(" ");t.onend=function(){i.getBrowserVoices(),(Array.isArray(i.descVoices)&&i.descVoices.length||"init"!==e)&&(i.speechEnabled=!0)},i.synth.speak(t)}null===this.speechEnabled&&(window.speechSynthesis?(this.synth=window.speechSynthesis,this.synth.cancel(),"init"===e?(attemptEnableSpeech(),t(document).on("click",(function handleInitialClick(){attemptEnableSpeech(),t(document).off("click",handleInitialClick)}))):attemptEnableSpeech()):this.speechEnabled=!1)},AblePlayer.prototype.getBrowserVoices=function(){var t,e,i,s;if(s=this.captionLang?this.captionLang.substring(0,2).toLowerCase():this.lang.substring(0,2).toLowerCase(),this.descVoices=[],t=this.synth.getVoices(),e=this.getDescriptionLangs(),t.length>0){this.descVoices=[];for(var a=0;a
0){if(e){a=!1;for(var n=0;n0?this.swapTime=this.elapsed:this.swapTime=0,this.duration>0&&(this.prevDuration=this.duration),this.okToPlay||(this.okToPlay=this.playing),this.descOn?this.showAlert(this.tt.alertDescribedVersion):this.showAlert(this.tt.alertNonDescribedVersion),"html5"===this.player){if(this.swappingSrc=!0,this.paused=!0,this.usingDescribedVersion())for(i=0;i=1&&(e=this.descriptions[0].cues),i=0;it){s=i;break}void 0!==s?this.currentDescription!==s&&(this.$status.removeAttr("aria-live"),a=flattenComponentForDescription(e[s].components),"screenreader"===this.descReader?this.$descDiv.html(a):this.speechEnabled?("video"!==this.descMethod&&this.announceDescriptionText("description",a),this.prefDescVisible&&this.$descDiv.html(a).removeAttr("aria-live aria-atomic")):this.$descDiv.html(a),this.prefDescPause&&"text"===this.descMethod&&(this.pauseMedia(),this.pausedForDescription=!0),this.currentDescription=s):(this.$descDiv.html(""),this.currentDescription=-1,this.$status.attr("aria-live","polite"))}},AblePlayer.prototype.syncSpeechToPlaybackRate=function(t){var e;.5===t?e=.7:.75===t?e=.8:1===t?e=1:1.25===t?e=1.1:1.5===t?e=1.2:1.75===t?e=1.5:2===t?e=2:2.25===t?e=2.5:t>=2.5&&(e=3),this.prefDescRate=e},AblePlayer.prototype.announceDescriptionText=function(e,i){var s,a,n,r,o,l,h,p,c;s=this;if(this.speechEnabled||this.initSpeech("desc"),"sample"===e?(a=t("#"+this.mediaId+"_prefDescVoice").val(),o=t("#"+this.mediaId+"_prefDescPitch").val(),l=t("#"+this.mediaId+"_prefDescRate").val(),h=t("#"+this.mediaId+"_prefDescVolume").val()):(a=this.prefDescVoice,o=this.prefDescPitch,l=this.prefDescRate,h=this.prefDescVolume),this.descVoices){if(this.descVoices.length>0){if(a)for(n=0;n100?(t.elapsedTime/1e3).toFixed(2):t.elapsedTime.toFixed(2),this.debug,"description"===e&&s.prefDescPause&&s.pausedForDescription&&(s.playMedia(),this.pausedForDescription=!1)},p.onerror=function(t){},this.synth.paused&&this.synth.resume(),this.synth.speak(p),this.speakingDescription=!0}}(jQuery),jQuery,AblePlayer.prototype.isIOS=function(t){var e;return e=navigator.userAgent.toLowerCase(),!!/ipad|iphone|ipod/.exec(e)&&(void 0===t||-1!==e.indexOf("os "+t))},AblePlayer.prototype.browserSupportsVolume=function(){var t;return!this.isIOS()&&((t=new Audio).volume=.9,.9===t.volume)},AblePlayer.prototype.nativeFullscreenSupported=function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled},function(t){AblePlayer.prototype.seekTo=function(t){var e,i=this;(this.seekFromTime=this.media.currentTime,this.seekToTime=t,this.seeking=!0,this.liveUpdatePending=!0,this.speakingDescription&&this.synth.cancel(),this.syncSignVideo({time:this.startTime}),"html5"===this.player)?(this.startTime=t,(e=this.media.seekable).length>0&&this.startTime>=e.start(0)&&this.startTime<=e.end(0)&&(this.media.currentTime=this.startTime,this.seekStatus="complete",this.syncSignVideo({time:this.startTime}))):"youtube"===this.player?(this.youTubePlayer.seekTo(t,!0),t>0&&void 0!==this.$posterImg&&this.$posterImg.hide(),this.syncSignVideo({time:t})):"vimeo"===this.player&&this.vimeoPlayer.setCurrentTime(t).then((function(){i.elapsed=t,i.refreshControls("timeline")}));this.refreshControls("timeline")},AblePlayer.prototype.getMediaTimes=function(e,i){var s,a,n,r;return r={},a=(s=new t.Deferred).promise(),n=this,void 0!==e&&void 0!==i?(r.duration=e,r.elapsed=i,s.resolve(r)):this.getDuration().then((function(t){r.duration=n.roundDown(t,6),n.getElapsed().then((function(t){r.elapsed=n.roundDown(t,6),s.resolve(r)}))})),a},AblePlayer.prototype.getDuration=function(){var e,i,s;(i=(e=new t.Deferred).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getDuration().then((function(t){void 0===t||isNaN(t)||-1===t?e.resolve(0):e.resolve(t)})):e.resolve(0):("html5"===this.player?s=this.media.duration:"youtube"===this.player&&(s=this.youTubePlayerReady?this.duration>0?this.duration:this.youTubePlayer.getDuration():0),void 0===s||isNaN(s)||-1===s?e.resolve(0):e.resolve(s));return i},AblePlayer.prototype.getElapsed=function(){var e,i,s;(i=(e=new t.Deferred).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getCurrentTime().then((function(t){void 0===t||isNaN(t)||-1===t?e.resolve(0):e.resolve(t)})):e.resolve(0):("html5"===this.player?s=this.media.currentTime:"youtube"===this.player&&(s=this.youTubePlayerReady?this.youTubePlayer.getCurrentTime():0),void 0===s||isNaN(s)||-1===s?e.resolve(0):e.resolve(s));return i},AblePlayer.prototype.getPlayerState=function(){var e,i,s;if(i=(e=new t.Deferred).promise(),s=this,"html5"===this.player)this.media.ended?e.resolve("ended"):this.media.paused?e.resolve("paused"):4!==this.media.readyState?e.resolve("buffering"):e.resolve("playing");else if("youtube"===this.player&&this.youTubePlayerReady){var a=this.youTubePlayer.getPlayerState();-1===a||5===a?e.resolve("stopped"):0===a?e.resolve("ended"):1===a?e.resolve("playing"):2===a?e.resolve("paused"):3===a&&e.resolve("buffering")}else"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.getPaused().then((function(t){t?e.resolve("paused"):s.vimeoPlayer.getEnded().then((function(t){t?e.resolve("ended"):e.resolve("playing")}))}));return i},AblePlayer.prototype.isPlaybackRateSupported=function(){return"html5"===this.player?!!this.media.playbackRate:"youtube"===this.player?!!this.youTubePlayerReady&&this.youTubePlayer.getAvailablePlaybackRates().length>1:"vimeo"===this.player?this.vimeoSupportsPlaybackRateChange:void 0},AblePlayer.prototype.setPlaybackRate=function(t){t=Math.max(.5,t),this.hasClosedDesc&&"text"===this.descMethod&&this.syncSpeechToPlaybackRate(t),this.syncSignVideo({rate:t}),"html5"===this.player?this.media.playbackRate=t:"youtube"===this.player?this.youTubePlayer.setPlaybackRate(t):"vimeo"===this.player&&this.vimeoPlayer.setPlaybackRate(t),this.syncSignVideo({rate:t}),this.playbackRate=t,this.$speed.text(this.tt.speed+": "+t.toFixed(2).toString()+"x")},AblePlayer.prototype.getPlaybackRate=function(){return"html5"===this.player?this.media.playbackRate:"youtube"===this.player&&this.youTubePlayerReady?this.youTubePlayer.getPlaybackRate():void 0},AblePlayer.prototype.isPaused=function(){if("vimeo"===this.player)return!this.playing;this.getPlayerState().then((function(t){return"paused"===t||"stopped"===t||"ended"===t}))},AblePlayer.prototype.syncSignVideo=function(t){this.hasSignLanguage&&(this.signVideo||this.signYoutube)&&(t&&void 0!==t.time&&(this.signVideo?this.signVideo.currentTime=t.time:this.youTubeSignPlayer.seekTo(t.time,!0)),t&&void 0!==t.rate&&(this.signVideo?this.signVideo.playbackRate=t.rate:this.youTubeSignPlayer.setPlaybackRate(t.rate)),t&&void 0!==t.pause&&(this.signVideo?this.signVideo.pause(!0):this.youTubeSignPlayer.pauseVideo()),t&&void 0!==t.play&&(this.signVideo?this.signVideo.play(!0):this.youTubeSignPlayer.playVideo()),t&&void 0!==t.volume&&this.signVideo&&(this.signVideo.volume=0))},AblePlayer.prototype.pauseMedia=function(){this.syncSignVideo({pause:!0}),"html5"===this.player?this.media.pause(!0):"youtube"===this.player?this.youTubePlayer.pauseVideo():"vimeo"===this.player&&this.vimeoPlayer.pause()},AblePlayer.prototype.playMedia=function(){this.syncSignVideo({play:!0}),"html5"===this.player?this.media.play(!0):"youtube"===this.player?(this.youTubePlayer.playVideo(),void 0!==this.$posterImg&&this.$posterImg.hide(),this.stoppingYouTube=!1):"vimeo"===this.player&&this.vimeoPlayer.play(),this.startedPlaying=!0,this.hideControls&&(this.hidingControls=!0,this.invokeHideControlsTimeout())},AblePlayer.prototype.fadeControls=function(t){"out"==t?(this.$mediaContainer.height()+this.$playerDiv.height(),this.$playerDiv.fadeTo(2e3,0,(function(){}))):"in"==t&&this.$playerDiv.fadeTo(100,1)},AblePlayer.prototype.invokeHideControlsTimeout=function(){var t=this;this.hideControlsTimeout=window.setTimeout((function(){void 0!==t.playing&&!0===t.playing&&t.hideControls&&(t.fadeControls("out"),t.controlsHidden=!0)}),5e3),this.hideControlsTimeoutStatus="active"},AblePlayer.prototype.refreshControls=function(e="init",i,s){var a,n,r,o,l,h,p,c,u,d,f,g,m;if((e="init",a=this,!this.swappingSrc||!this.playing)&&void 0!==this.duration){if(this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.chapterElapsed=this.getChapterElapsed()),!this.useFixedSeekInterval&&!this.seekIntervalCalculated&&this.duration>0&&this.setSeekInterval(),this.seekBar&&(this.useChapterTimes?(h=this.selectedChapters.cues.length-1,this.selectedChapters.cues[h]==this.currentChapter&&this.currentChapter.end!==this.duration?this.seekBar.setDuration(this.duration-this.currentChapter.start):this.seekBar.setDuration(this.chapterDuration)):void 0===this.duration||isNaN(this.duration)||-1===this.duration||this.seekBar.setDuration(this.duration),this.seekBar.tracking||(c=this.liveUpdatePending||this.seekBar.seekHead.is(t(document.activeElement)),this.liveUpdatePending=!1,this.useChapterTimes?this.seekBar.setPosition(this.chapterElapsed,c):this.seekBar.setPosition(this.elapsed,c)),p=this.seekBar.tracking?this.seekBar.lastTrackPosition:this.useChapterTimes?this.chapterElapsed:this.elapsed),void 0!==this.$durationContainer&&(this.useChapterTimes?this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.chapterDuration)):this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.duration))),void 0!==this.$elapsedTimeContainer&&this.$elapsedTimeContainer.text(this.formatSecondsAsColonTime(p)),"legacy"===this.skin&&this.seekBar){let e=this.seekBar.wrapperDiv.parent().parent();f=(d=this.seekBar.wrapperDiv.parent().prev("div.able-left-controls")).next("div.able-right-controls"),u=d.outerWidth(!0),f.children().each((function(){"button"==t(this).attr("role")&&(u+=t(this).outerWidth(!0)+5)})),g=this.fullscreen?t(window).width()-u:e.width()-u-10,Math.abs(g-this.seekBar.getWidth())>5&&this.seekBar.setWidth(g)}if("html5"===this.player&&this.media.buffered.length>0?(m=this.media.buffered.end(0),this.useChapterTimes?(m>this.chapterDuration&&(m=this.chapterDuration),this.seekBar&&this.seekBar.setBuffered(m/this.chapterDuration)):this.seekBar&&!isNaN(m)&&this.seekBar.setBuffered(m/i)):"youtube"===this.player&&this.seekBar&&this.youTubePlayerReady?this.seekBar.setBuffered(this.youTubePlayer.getVideoLoadedFraction()):this.player,this.$descButton&&this.toggleButtonState(this.$descButton,this.descOn,this.tt.turnOffDescriptions,this.tt.turnOnDescriptions),this.$ccButton){(o=this.captions.length)>1&&this.$ccButton.attr({"aria-haspopup":"true","aria-controls":this.mediaId+"-captions-menu"});var v=o>1?this.tt.captions:this.tt.showCaptions,y=o>1?this.tt.captions:this.tt.hideCaptions,b=o>1;this.toggleButtonState(this.$ccButton,this.captionsOn,y,v,b)}this.$fullscreenButton&&(this.fullscreen?(this.$fullscreenButton.attr("aria-label",this.tt.exitFullscreen),this.getIcon(this.$fullscreenButton,"fullscreen-collapse"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.exitFullscreen)):(this.$fullscreenButton.attr("aria-label",this.tt.enterFullScreen),this.getIcon(this.$fullscreenButton,"fullscreen-expand"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.enterFullScreen))),void 0!==this.$bigPlayButton&&void 0!==this.seekBar&&(this.paused&&!this.seekBar.tracking?this.hideBigPlayButton||(this.$bigPlayButton.show(),this.$bigPlayButton.attr("aria-hidden","false")):(this.$bigPlayButton.hide(),this.$bigPlayButton.attr("aria-hidden","true"))),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&&(l=Math.floor(this.$transcriptDiv.scrollTop()+t(this.currentHighlight).position().top-this.$transcriptDiv.height()/2+t(this.currentHighlight).height()/2))!==Math.floor(this.$transcriptDiv.scrollTop())&&(this.scrollingTranscript=!0,this.movingHighlight&&(this.$transcriptDiv.scrollTop(l),this.movingHighlight=!1))),this.$chaptersButton&&this.$chaptersButton.attr({"aria-label":this.tt.chapters,"aria-haspopup":"true","aria-controls":this.mediaId+"-chapters-menu"}),n={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.getIcon(this.$playpauseButton,"play"),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):void 0!==this.$status&&void 0!==this.seekBar&&this.getPlayerState().then((function(t){a.$status.text()===n[t]||a.seekBar.tracking?(a.statusDebounceStart=null,a.debouncingStatus=!1,clearTimeout(a.statusTimeout),a.statusTimeout=null):(a.swappingSrc?a.debouncingStatus||(a.statusMessageThreshold=2e3):a.debouncingStatus||(a.statusMessageThreshold=250),r=(new Date).getTime(),a.statusDebounceStart?r-a.statusDebounceStart>a.statusMessageThreshold&&(a.$status.text(n[t]),a.statusDebounceStart=null,clearTimeout(a.statusTimeout),a.statusTimeout=null):(a.statusDebounceStart=r,a.debouncingStatus=!0,a.statusTimeout=setTimeout((function(){a.debouncingStatus=!1,a.refreshControls(e)}),a.statusMessageThreshold))),a.seekBar.tracking||a.stoppingYouTube||("paused"===t||"stopped"===t||"ended"===t?(a.$playpauseButton.attr("aria-label",a.tt.play),a.getIcon(a.$playpauseButton,"play"),a.$playpauseButton.find("span.able-clipped").text(a.tt.play)):(a.$playpauseButton.attr("aria-label",a.tt.pause),a.getIcon(a.$playpauseButton,"pause"),a.$playpauseButton.find("span.able-clipped").text(a.tt.pause)))})),this.fullscreen||(this.$statusBarDiv.width()<300?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1))}},AblePlayer.prototype.handlePlay=function(t){this.paused?(this.okToPlay=!0,this.playMedia(),this.synth.paused&&this.synth.resume()):(this.okToPlay=!1,this.pauseMedia(),this.speakingDescription&&this.synth.pause()),null===this.speechEnabled&&this.initSpeech("play")},AblePlayer.prototype.handleRestart=function(){this.speakingDescription&&this.synth.cancel(),this.seekTo(0)},AblePlayer.prototype.handlePrevTrack=function(){this.playlistIndex=0===this.playlistIndex?this.$playlist.length-1:this.playlistIndex--,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleNextTrack=function(){this.playlistIndex=this.playlistIndex===this.$playlist.length-1?0:this.playlistIndex++,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleRewind=function(){var t;t=this.elapsed-this.seekInterval,this.useChapterTimes&&tthis.duration||t>this.currentChapter.end||this.duration%tthis.currentChapter.end&&(t=this.currentChapter.end):t>this.duration&&(t=this.duration),this.seekTo(t)},AblePlayer.prototype.handleRateIncrease=function(){this.changeRate(1)},AblePlayer.prototype.handleRateDecrease=function(){this.changeRate(-1)},AblePlayer.prototype.changeRate=function(t){var e,i,s,a;"html5"===this.player?this.setPlaybackRate(this.getPlaybackRate()+.25*t):"youtube"===this.player?this.youTubePlayerReady&&(e=this.youTubePlayer.getAvailablePlaybackRates(),i=this.getPlaybackRate(),-1===(s=e.indexOf(i))||(s+=t)=0&&this.setPlaybackRate(e[s])):"vimeo"===this.player&&(1===t?a=this.vimeoPlaybackRate+.5<=2?this.vimeoPlaybackRate+.5:2:-1===t&&(a=this.vimeoPlaybackRate-.5>=.5?this.vimeoPlaybackRate-.5:.5),this.setPlaybackRate(a))},AblePlayer.prototype.handleCaptionToggle=function(){var t,e,i=this;if(this.hidingPopup)return this.hidingPopup=!1,!1;if(1===(t=this.captions.length?this.captions:[]).length)if(!0===this.captionsOn)this.captionsOn=!1,this.prefCaptions=0,e=!1,this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.unloadModule("captions"):this.usingVimeoCaptions?this.vimeoPlayer.disableTextTrack():this.$captionsWrapper.hide();else{this.captionsOn=!0,this.prefCaptions=1,e=!0,this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.loadModule("captions"):this.usingVimeoCaptions?this.vimeoPlayer.enableTextTrack(this.captionLang).then((function(t){})).catch((function(t){t.name})):this.$captionsWrapper.show();for(var s=0;s=0&&(this.selectedDescriptions=this.descriptions[0])}else this.captionsPopup&&this.captionsPopup.is(":visible")?(this.captionsPopup.hide(),this.hidingPopup=!1,this.$ccButton.attr("aria-expanded","false"),this.waitThenFocus(this.$ccButton)):(this.closePopups(),this.captionsPopup&&(this.captionsPopup.show(),this.$ccButton.attr("aria-expanded","true"),setTimeout((function(){i.captionsPopup.css("top",i.$ccButton.position().top-i.captionsPopup.outerHeight()),i.captionsPopup.css("left",i.$ccButton.position().left),i.captionsPopup.find("li").removeClass("able-focus"),i.captionsPopup.find("li").first().trigger("focus").addClass("able-focus")}),50)));var a=t.length>1?this.tt.captions:this.tt.showCaptions,n=t.length>1?this.tt.captions:this.tt.hideCaptions;this.toggleButtonState(this.$ccButton,this.captionsOn,n,a,e)},AblePlayer.prototype.waitThenFocus=function(t,e){setTimeout((function(){t.trigger("focus")}),null==e?50:e)},AblePlayer.prototype.handleChapters=function(){if(this.hidingPopup)return this.hidingPopup=!1,!1;this.chaptersPopup.is(":visible")?(this.chaptersPopup.hide(),this.hidingPopup=!1,this.$chaptersButton.attr("aria-expanded","false").trigger("focus")):(this.closePopups(),this.chaptersPopup.show(),this.$chaptersButton.attr("aria-expanded","true"),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('li[aria-checked="true"]').length?this.chaptersPopup.find('li[aria-checked="true"]').trigger("focus").addClass("able-focus"):this.chaptersPopup.find("li").first().addClass("able-focus").attr("aria-checked","true").trigger("focus"))},AblePlayer.prototype.handleDescriptionToggle=function(){this.descOn=!this.descOn,this.prefDesc=+this.descOn,this.updateCookie("prefDesc"),void 0!==this.$descDiv&&(this.$descDiv.is(":hidden")||this.$descDiv.hide()),this.initDescription(),this.refreshControls("descriptions")},AblePlayer.prototype.handlePrefsClick=function(t){var e,i,s,a;if(e=this,null===this.speechEnabled&&this.initSpeech("prefs"),this.hidingPopup)return this.hidingPopup=!1,!1;this.prefsPopup.is(":visible")?(this.prefsPopup.hide(),this.$prefsButton.attr("aria-expanded","false"),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.showingPrefsDialog||this.$prefsButton.trigger("focus"),setTimeout((function(){e.hidingPopup=!1}),100)):(this.closePopups(),this.prefsPopup.show(),this.$prefsButton.attr("aria-expanded","true"),this.$prefsButton.trigger("focus"),setTimeout((function(){i=e.$prefsButton.position(),s=e.$ableDiv.width()-5,a=s-e.prefsPopup.width(),e.prefsPopup.css("top",i.top-e.prefsPopup.outerHeight()),e.prefsPopup.css("left",a),e.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","0"),e.prefsPopup.find("li").first().trigger("focus").addClass("able-focus")}),50))},AblePlayer.prototype.handleHelpClick=function(){this.setFullscreen(!1),this.helpDialog.show()},AblePlayer.prototype.handleTranscriptToggle=function(){var t=this,e=this.$transcriptDiv.is(":visible");e?(this.$transcriptArea.hide(),this.toggleButtonState(this.$transcriptButton,!e,this.tt.hideTranscript,this.tt.showTranscript),this.prefTranscript=0,"popup"===this.transcriptType&&(this.$transcriptButton.trigger("focus").addClass("able-focus"),setTimeout((function(){t.closingTranscript=!1}),100))):"popup"===this.transcriptType?(this.positionDraggableWindow("transcript"),this.$transcriptArea.show(),this.$transcriptPopup.hide(),this.toggleButtonState(this.$transcriptButton,!e,this.tt.hideTranscript,this.tt.showTranscript),this.prefTranscript=1,this.focusNotClick=!0,this.$transcriptArea.find("button").first().trigger("focus"),setTimeout((function(){t.focusNotClick=!1}),100)):(this.toggleButtonState(this.$transcriptButton,!e,this.tt.hideTranscript,this.tt.showTranscript),this.$transcriptArea.show()),this.updateCookie("prefTranscript")},AblePlayer.prototype.handleSignToggle=function(){var t=this,e=this.$signWindow.is(":visible");e?(this.$signWindow.hide(),this.toggleButtonState(this.$signButton,!e,this.tt.hideSign,this.tt.showSign),this.prefSign=0,this.$signButton.trigger("focus").addClass("able-focus"),setTimeout((function(){t.closingSign=!1}),100)):(this.positionDraggableWindow("sign"),this.$signWindow.show(),this.$signPopup.hide(),this.toggleButtonState(this.$signButton,!e,this.tt.hideSign,this.tt.showSign),this.prefSign=1,this.focusNotClick=!0,this.$signWindow.find("button").first().trigger("focus"),setTimeout((function(){t.focusNotClick=!1}),100)),this.updateCookie("prefSign")},AblePlayer.prototype.isFullscreen=function(){return this.nativeFullscreenSupported()?!!(document.fullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullscreenElement):!!this.modalFullscreenActive},AblePlayer.prototype.setFullscreen=function(e){if(this.fullscreen!=e){var i=this,s=this.$ableWrapper,a=s[0];if(this.nativeFullscreenSupported())if(e){var n={x:window.pageXOffset||0,y:window.pageYOffset||0};this.scrollPosition=n,a.requestFullscreen?a.requestFullscreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen(),this.fullscreen=!0}else this.restoringAfterFullscreen=!0,document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullscreen&&document.webkitCancelFullscreen(),this.fullscreen=!1;else{if(!this.fullscreenDialog){var r=t(""),o=t("
",{class:"able-screenreader-alert"}).text(this.tt.fullScreen);r.append(o),this.fullscreenDialog=new AccessibleDialog(r,this.$fullscreenButton,"dialog",!0,"Fullscreen video player",o,this.tt.exitFullscreen,"100%",!0,(function(){i.handleFullscreenToggle()})),t("body").append(r)}var l=this.paused;if(e){this.modalFullscreenActive=!0,this.fullscreenDialog.show(),this.$modalFullscreenPlaceholder=t('
'),this.$modalFullscreenPlaceholder.insertAfter(s),s.appendTo(this.fullscreenDialog.modal);t(window).height(),this.$playerDiv.height();void 0===this.$descDiv||this.$descDiv.is(":hidden")||this.$descDiv.height()}else this.modalFullscreenActive=!1,s.insertAfter(this.$modalFullscreenPlaceholder),this.$modalFullscreenPlaceholder.remove(),this.fullscreenDialog.hide();!l&&this.paused&&this.playMedia()}t(document).on("fullscreenchange webkitfullscreenchange",(function(t){i.fullscreen?i.clickedFullscreenButton||(i.fullscreen=!1,i.restoringAfterFullscreen=!0):i.restoringAfterFullscreen=!0,i.resizePlayer(),i.refreshControls("fullscreen"),i.scrollPosition&&(n=i.scrollPosition,window.scrollTo(n.x,n.y)),setTimeout((function(){i.clickedFullscreenButton=!1,i.restoringAfterFullscreen=!1}),100)}))}},AblePlayer.prototype.handleFullscreenToggle=function(){var t=this.paused;this.setFullscreen(!this.fullscreen),t?this.pauseMedia():t||this.playMedia(),this.fullscreen?(this.hideControls=!0,this.playing&&(this.fadeControls("out"),this.controlsHidden=!0)):(this.hideControls=this.hideControlsOriginal,this.hideControls||(this.controlsHidden&&(this.fadeControls("in"),this.controlsHidden=!1),"active"===this.hideControlsTimeoutStatus&&(window.clearTimeout(this.hideControlsTimeout),this.hideControlsTimeoutStatus="clear")))},AblePlayer.prototype.handleTranscriptLockToggle=function(t){this.autoScrollTranscript=t,this.prefAutoScrollTranscript=+t,this.updateCookie("prefAutoScrollTranscript"),this.refreshControls("transcript")},AblePlayer.prototype.getIcon=function(e,i,s=!1){e.find("svg, img, span:not(.able-clipped)").remove();var a=this.getIconData(i),n=this.iconType;if(n=null===a[3]?"svg":n,"font"===(n=!0===s?"image":n)){var r=t("
",{class:a[2]});e.append(r)}else if("svg"===n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("focusable","false"),o.setAttribute("aria-hidden","true"),o.setAttribute("viewBox",a[0]);let t=function getNode(t,e){for(var i in t=document.createElementNS("http://www.w3.org/2000/svg",t),e)t.setAttributeNS(null,i.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()})),e[i]);return t}("path",{d:a[1]});o.appendChild(t),e.append(o),e.html(e.html())}else{var l=t(" ",{src:a[3],alt:"",role:"presentation"});e.append(l),e.find("img").attr("src",a[3])}},AblePlayer.prototype.setText=function(e,i){e.attr("aria-label",i),$buttonLabel=t("",{class:"able-clipped"}).text(i),e.append($buttonLabel)},AblePlayer.prototype.toggleButtonState=function(t,e,i,s,a=!1,n=!1){let r=!!t.hasClass("buttonOff");r&&!e||!r&&e||(e?(t.removeClass("buttonOff").attr("aria-label",i),t.find("span.able-clipped").text(i),a&&t.attr("aria-pressed","true"),n&&t.attr("aria-expanded","true")):(t.addClass("buttonOff").attr("aria-label",s),t.find("span.able-clipped").text(s),a&&t.attr("aria-pressed","false"),n&&t.attr("aria-expanded","false")))},AblePlayer.prototype.showTooltip=function(t){t.is(":animated")?t.stop(!0,!0).show():t.stop().show()},AblePlayer.prototype.showAlert=function(t,e="main"){var i,s,a;s=(i=this).$alertBox,a=i.$ableDiv,"transcript"===e?a=i.$transcriptArea:"sign"===e?a=i.$signWindow:"screenreader"===e&&(s=i.$srAlertBox),s.find("span").text(t),s.appendTo(a),s.css({display:"flex"}),"screenreader"!==e&&setTimeout((function(){s.fadeOut(300)}),3e4)},AblePlayer.prototype.showedAlert=function(t){return"transcript"===t?this.showedTranscriptAlert??!1:"sign"===t&&(this.showedSignAlert??!1)},AblePlayer.prototype.resizePlayer=function(e,i){var s,a,n,r;if("audio"!==this.mediaType){if(void 0!==e&&void 0!==i?(this.aspectRatio=i/e,this.playerWidth?(a=this.playerWidth,this.playerHeight?n=this.playerHeight:(n=Math.round(a*this.aspectRatio),this.playerHeight=n)):(a="html5"===this.player?t(window).width():this.$ableWrapper.width(),n=Math.round(a*this.aspectRatio))):this.fullscreen?(this.$ableWrapper.addClass("fullscreen"),a=t(window).width(),n=t(window).height()-this.$playerDiv.outerHeight()-5,this.positionCaptions("overlay")):(this.$ableWrapper.removeClass("fullscreen"),a="html5"===this.player?this.playerWidth?this.playerWidth:t(window).width():this.$ableWrapper.width(),n=Math.round(a*this.aspectRatio),this.positionCaptions(this.prefCaptionsPosition)),this.debug,"youtube"===this.player||"vimeo"===this.player?(r=this.$ableWrapper.find("iframe"),"youtube"===this.player&&this.youTubePlayer?this.youTubePlayer.setSize(a,n):r.attr({width:a,height:n}),this.playerWidth&&this.playerHeight&&(this.fullscreen?r.css({"max-width":"","max-height":""}):r.css({"max-width":this.playerWidth+"px","max-height":this.playerHeight+"px"}))):"html5"===this.player&&(this.fullscreen?(this.$media.attr({width:a,height:n}),this.$ableWrapper.css({width:a,height:n})):(this.$media.removeAttr("width height"),this.$ableWrapper.css({width:a+"px",height:"auto"}))),void 0!==this.$captionsDiv){var o=!1;window.screen.width<1200&&(o=!0),s=parseInt(this.prefCaptionsSize,10),this.fullscreen&&!o?s=s/100+"vw":this.fullscreen&&o?s="1.2rem":s+="%",this.$captionsDiv.css({"font-size":s})}this.refreshControls()}},AblePlayer.prototype.retrieveOffscreenWindow=function(t,e,i){var s,a,n,r,o,l,h,p;"transcript"==t?s=this.$transcriptArea:"sign"==t&&(s=this.$signWindow),l=s.width(),p=s.height(),n=(a=s.position()).top,o=(r=a.left)+l,h=n+p,n<0&&(n=10,s.css("top",n)),r<0&&(r=10,s.css("left",r)),o>e&&(r=e-20-l,s.css("left",r)),h>i&&(n=i-10-p,s.css("top",n))},AblePlayer.prototype.updateZIndex=function(t){var e,i,s,a,n,r;if(e=8e3,i=7e3,void 0===this.$transcriptArea||void 0===this.$signWindow)return void 0!==this.$transcriptArea?(s=parseInt(this.$transcriptArea.css("z-index")))>i&&this.$transcriptArea.css("z-index",i):void 0!==this.$signWindow&&(a=parseInt(this.$signWindow.css("z-index")))>e&&this.$signWindow.css("z-index",e),!1;if((s=parseInt(this.$transcriptArea.css("z-index")))===(a=parseInt(this.$signWindow.css("z-index"))))n=e,r=i;else if(s>a){if("transcript"===t)return!1;n=s,r=a}else{if("sign"===t)return!1;n=a,r=s}"transcript"===t?(this.$transcriptArea.css("z-index",n),this.$signWindow.css("z-index",r)):"sign"===t&&(this.$signWindow.css("z-index",n),this.$transcriptArea.css("z-index",r))},AblePlayer.prototype.syncTrackLanguages=function(t,e){var i,s,a,n,r;for(i=0;i=1?this.captions[0].cues:[],e=0;et){i=e;break}void 0!==i?this.currentCaption!==i&&(s=this.flattenCueForCaption(a[i]).replace(/\n/g," "),this.$captionsDiv.html(s),this.currentCaption=i,0===s.length?this.$captionsDiv.css("display","none"):this.$captionsDiv.css("display","inline-block")):(this.$captionsDiv.html("").css("display","none"),this.currentCaption=-1)},AblePlayer.prototype.flattenCueForCaption=function(t){var e=[],flattenComponent=function(t){var e,i=[];if("string"===t.type)i.push(t.value);else if("v"===t.type)for(i.push("("+t.value+")"),e=0;e"),e=0;e")}else if("b"===t.type){for(i.push(""),e=0;e")}else for(e=0;e",{class:"able-chapters-heading",id:i}).text(this.chaptersTitle),this.$chaptersDiv.append(s)),this.$chaptersNav=t(""),this.chaptersTitle?this.$chaptersNav.attr("aria-labelledby",i):this.$chaptersNav.attr("aria-label",this.tt.chapters),this.$chaptersDiv.append(this.$chaptersNav),this.updateChaptersList())},AblePlayer.prototype.updateChaptersList=function(){var e,i,s,a,n,r,o,l,h,p;if(e=this,!this.$chaptersNav)return!1;if(void 0===this.useChapterTimes&&(this.useChapterTimes=!("chapter"!==this.seekbarScope||!this.selectedChapters.cues.length)),(i=this.useChapterTimes?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[]).length>0){for(p=t(""),s=0;s"),l=function(i){return function(){e.seekTrigger="chapter",h=t(this).closest("li"),(p=t(this).closest("ul").find("li")).removeClass("able-current-chapter").children("button").removeAttr("aria-current"),h.addClass("able-current-chapter").children("button").attr("aria-current","true"),e.updateChapter(i),e.seekTo(i)}},(r=t("",{type:"button",val:a}).text(this.flattenCueForCaption(i[a]))).on("click",l(i[a].start)),r.on("focus",(function(){t(this).closest("ul").find("li").removeClass("able-focus"),t(this).closest("li").addClass("able-focus")})),n.on("hover",(function(){t(this).closest("ul").find("li").removeClass("able-focus"),t(this).addClass("able-focus")})),n.on("mouseleave",(function(){t(this).removeClass("able-focus")})),r.on("blur",(function(){t(this).closest("li").removeClass("able-focus")})),n.append(r),p.append(n),this.defaultChapter===i[a].id&&(r.attr("aria-current","true").parent("li").addClass("able-current-chapter"),this.currentChapter=i[a],o=!0);o||(this.currentChapter=i[0],p.find("button").first().attr("aria-current","true").parent("li").addClass("able-current-chapter")),this.$chaptersNav.html(p)}return!1},AblePlayer.prototype.seekToChapter=function(t){for(var e=0;et){s=i;break}void 0!==s&&this.currentChapter!==e[s]&&(this.currentChapter=e[s],this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.seekIntervalCalculated=!1),void 0!==this.$chaptersDiv&&(this.$chaptersDiv.find("ul").find("li").removeClass("able-current-chapter").children("button").removeAttr("aria-current"),this.$chaptersDiv.find("ul").find("li").eq(s).addClass("able-current-chapter").children("button").attr("aria-current","true")))}},AblePlayer.prototype.getChapterDuration=function(){var t,e;return void 0===this.currentChapter||void 0===this.duration?0:(t=this.selectedChapters.cues.length-1,this.selectedChapters.cues[t]==this.currentChapter&&this.currentChapter.end!==this.duration?(e=this.duration,this.currentChapter.end=this.duration):e=this.currentChapter.end,e-this.currentChapter.start)},AblePlayer.prototype.getChapterElapsed=function(){return void 0===this.currentChapter?0:this.elapsed>this.currentChapter.start?this.elapsed-this.currentChapter.start:0},AblePlayer.prototype.convertChapterTimeToVideoTime=function(t){if(void 0!==this.currentChapter){var e=this.currentChapter.start+t;return e>this.currentChapter.end?this.currentChapter.end:e}return t},AblePlayer.prototype.getChapterClickFunction=function(t){var e=this;return function(){e.seekTrigger="chapter",e.seekTo(t),e.hidingPopup=!0,e.chaptersPopup.hide(),setTimeout((function(){e.hidingPopup=!1}),100),e.$chaptersButton.trigger("focus")}}}(jQuery),function(t){AblePlayer.prototype.updateMeta=function(t){this.hasMeta&&("text"===this.metaType?(this.$metaDiv.show(),this.showMeta(t||this.elapsed)):this.showMeta(t||this.elapsed))},AblePlayer.prototype.showMeta=function(e){var i,s,a,n,r,o,l,h,p;for(i=[],n=this.meta.length>=1?this.meta:[],s=0;se){a=s;break}if(void 0!==a){if(this.currentMeta!==a)if("text"===this.metaType)this.$metaDiv.html(this.flattenCueForMeta(n[a]).replace(/\n/g," "));else if("selector"===this.metaType){for(r=this.flattenCueForMeta(n[a]).split("\n"),o=0;o=0;o--)-1==t.inArray(this.visibleSelectors[o],i)&&(t(this.visibleSelectors[o]).hide(),this.visibleSelectors.splice(o,1))}}else{if(void 0!==this.$metaDiv&&this.$metaDiv.html(""),this.visibleSelectors&&this.visibleSelectors.length){for(o=0;o",{class:"able-transcript-area",role:"dialog","aria-label":this.tt.transcriptTitle}),this.$transcriptToolbar=t("",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$transcriptDiv=t("
",{class:"able-transcript"}),this.$autoScrollTranscriptCheckbox=t("
",{id:"autoscroll-transcript-checkbox-"+this.mediaId,type:"checkbox"}),e=t("
",{for:"autoscroll-transcript-checkbox-"+this.mediaId}).text(this.tt.autoScroll),$autoScrollContainer=t("",{class:"autoscroll-transcript"}),$autoScrollContainer.append(e,this.$autoScrollTranscriptCheckbox),this.$transcriptToolbar.append($autoScrollContainer),this.captions.length>1)for(i=t("
",{class:"transcript-language-select-wrapper"}),s=t("
",{for:"transcript-language-select-"+this.mediaId}).text(this.tt.language),this.$transcriptLanguageSelect=t("",{id:"transcript-language-select-"+this.mediaId}),a=0;a",{value:this.captions[a].language,lang:this.captions[a].language}).text(this.captions[a].label),this.captions[a].def&&n.prop("selected",!0),this.$transcriptLanguageSelect.append(n);i&&(i.append(s,this.$transcriptLanguageSelect),this.$transcriptToolbar.append(i)),this.$transcriptArea.append(this.$transcriptToolbar,this.$transcriptDiv),this.transcriptDivLocation?(this.$transcriptArea.removeAttr("role"),this.$transcriptArea.removeAttr("aria-label"),t("#"+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 t=this;this.$autoScrollTranscriptCheckbox.on("click",(function(){t.handleTranscriptLockToggle(t.$autoScrollTranscriptCheckbox.prop("checked"))})),this.$transcriptDiv.on("mousewheel DOMMouseScroll click scroll",(function(e){t.scrollingTranscript||(t.autoScrollTranscript=!1,t.refreshControls("transcript")),t.scrollingTranscript=!1})),void 0!==this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.on("click mousedown",(function(t){t.stopPropagation()})),this.$transcriptLanguageSelect.on("change",(function(){var e=t.$transcriptLanguageSelect.val();t.syncTrackLanguages("transcript",e)})))},AblePlayer.prototype.transcriptSrcHasRequiredParts=function(){return!!(t("#"+this.transcriptSrc).length&&(this.$transcriptArea=t("#"+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)},AblePlayer.prototype.setupManualTranscript=function(){var e,i;e=t(" ",{id:"autoscroll-transcript-checkbox-"+this.mediaId,type:"checkbox"}),i=t("",{for:"autoscroll-transcript-checkbox-"+this.mediaId}).text(this.tt.autoScroll),this.$autoScrollTranscriptCheckbox=e,this.$transcriptToolbar.append(i,this.$autoScrollTranscriptCheckbox)},AblePlayer.prototype.updateTranscript=function(){if(this.transcriptType&&(!this.playerCreated||this.$transcriptArea)){if("external"===this.transcriptType||"popup"===this.transcriptType){var e,i,s;if(this.transcriptLang?i=this.transcriptCaptions.cues:this.transcriptCaptions?(this.transcriptLang=this.transcriptCaptions.language,i=this.transcriptCaptions.cues):this.selectedCaptions&&(this.transcriptLang=this.captionLang,i=this.selectedCaptions.cues),this.transcriptChapters)e=this.transcriptChapters.cues;else if(this.chapters.length>0){if(this.transcriptLang)for(var a=0;a0){if(this.transcriptLang)for(a=0;a0&&this.$transcriptArea.find("span.able-transcript-seekpoint").on("click",(function(e){r.seekTrigger="transcript";var i=parseFloat(t(this).attr("data-start"));i+=.01,r.seekingFromTranscript?r.seekingFromTranscript=!1:(r.seekingFromTranscript=!0,r.seekTo(i))}))}},AblePlayer.prototype.highlightTranscript=function(e){if(this.transcriptType){var i,s,a,n=this;e=parseFloat(e),this.$transcriptArea.find("span.able-transcript-seekpoint").each((function(){if(i=parseFloat(t(this).attr("data-start")),s=parseFloat(t(this).attr("data-end")),a=!!t(this).parent().hasClass("able-transcript-chapter-heading"),e>=i&&e<=s&&!a)return t(this).hasClass("able-highlight")||(n.$transcriptArea.find(".able-highlight").removeClass("able-highlight"),t(this).addClass("able-highlight"),n.movingHighlight=!0),!1})),n.currentHighlight=n.$transcriptArea.find(".able-highlight"),0===n.currentHighlight.length&&(n.currentHighlight=null)}},AblePlayer.prototype.generateTranscript=function(e,i,s){var a,n=this,r=t('
');if(r.attr("lang",this.transcriptLang),a=void 0!==this.transcriptTitle?this.transcriptTitle:this.lyricsMode?this.tt.lyricsTitle:this.tt.transcriptTitle,!this.transcriptDivLocation){var o=this.playerHeadingLevel,l=(o+=1)+1;if(o<=6)var h="h"+o.toString();else h="div";var p=t("<"+h+">");p.addClass("able-transcript-heading"),o>6&&p.attr({role:"heading","aria-level":o}),p.text(a),p.attr("lang",this.lang),r.append(p)}for(var c=0,u=0,d=0,addChapter=function(e,i){if(l<=6)var s="h"+l.toString();else s="div";var a=t("<"+s+">",{class:"able-transcript-chapter-heading"});l>6&&a.attr({role:"heading","aria-level":l});for(var flattenComponentForChapter=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i",{class:"able-transcript-seekpoint"}),r=0;r",{class:"able-transcript-desc"}),a=t("",{class:"able-hidden"});a.attr("lang",n.lang),a.text(n.tt.prefHeadingDescription+": "),s.append(a);for(var flattenComponentForDescription=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i",{class:"able-transcript-seekpoint"}),o=0;o",{class:"able-transcript-seekpoint able-transcript-caption"}),flattenComponentForCaption=function(e){var i=[],s=0,flattenString=function(t){var e;s++;var i=[];if(""===t)return i;var a=t.indexOf("["),n=t.indexOf("]"),r=t.indexOf("("),o=t.indexOf(")"),l=-1!==a&&-1!==n,h=-1!==r&&-1!==o;if(h||l){if(s>1)var p=" ";else p="";var c=p+'',u=" ";h&&l&&(a",{class:"able-unspoken"});e.value=e.value.replace(/^title="|\"$/g,""),a.text("("+e.value+")"),i.push(a);for(var n=0;n");else if("i"===e.type)l=t("");for(n=0;n"),(!r||"i"!==r&&"b"!==r)&&(h+=" ")):h+=" "),s.append(h)}}s.attr("data-start",i.start.toString()),s.attr("data-end",i.end.toString()),e.append(s),e.append(" \n")};c0&&(r=wrapTranscriptBlocks(r),m=0),t(this).addClass("able-block-temp"),m++):m>0&&(r=wrapTranscriptBlocks(r),m=0)})),r=wrapTranscriptBlocks(r)};var wrapTranscriptBlocks=function(t){return t.find(".able-block-temp").removeClass("able-block-temp").wrapAll('
'),t}}(jQuery),function(t){AblePlayer.prototype.showSearchResults=function(){var e=this;if(this.searchDiv&&this.searchString){var i=DOMPurify.sanitize(this.searchString);if(t("#"+this.SearchDiv)){var s=""+this.tt.resultsSummary1+" ";s+=''+i+" ",s+="
";var a=this.searchFor(i,this.searchIgnoreCaps);if(a.length>0){var n=t("",{class:"able-search-results-summary"}),r=this.tt.resultsSummary2;r+=" "+a.length+" ",r+=this.tt.resultsSummary3+" ",r+=this.tt.resultsSummary4,n.html(r);for(var o=t("
"),l=0;l",{}),c=this.secondsToTime(a[l].start),u=this.tt.searchButtonLabel+" "+c.title,d=t("