(function ($) { AblePlayer.prototype.setupTranscript = function () { var deferred = new $.Deferred(); var promise = deferred.promise(); if (this.usingYouTubeCaptions || this.usingVimeoCaptions) { // a transcript is not possible this.transcriptType = null; deferred.resolve(); } else { if (!this.transcriptType) { // previously set transcriptType to null since there are no elements // check again to see if captions have been collected from other sources (e.g., YouTube) if (this.captions.length) { // captions are possible! Use the default type (popup) // if other types ('external' and 'manual') were desired, transcriptType would not be null here this.transcriptType = "popup"; } } if (this.transcriptType) { if ( this.transcriptType === "popup" || this.transcriptType === "external" ) { this.injectTranscriptArea(); deferred.resolve(); } else if (this.transcriptType === "manual") { this.setupManualTranscript(); deferred.resolve(); } } else { // there is no transcript deferred.resolve(); } } return promise; }; AblePlayer.prototype.injectTranscriptArea = function () { var thisObj, $autoScrollLabel, $languageSelectWrapper, $languageSelectLabel, i, $option; thisObj = this; this.$transcriptArea = $("
", { class: "able-transcript-area", role: "dialog", "aria-label": this.tt.transcriptTitle, }); this.$transcriptToolbar = $("
", { class: "able-window-toolbar able-" + this.toolbarIconColor + "-controls", }); this.$transcriptDiv = $("
", { class: "able-transcript", }); // Transcript toolbar content // Add auto Scroll checkbox this.$autoScrollTranscriptCheckbox = $("", { id: "autoscroll-transcript-checkbox-" + this.mediaId, type: "checkbox", }); $autoScrollLabel = $("