@playkit-js/transcript 3.1.0 → 3.1.1-canary.1-015410f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -86,10 +86,6 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
86
86
|
this.eventManager.listen(this.player, this.player.Event.TIMED_METADATA_CHANGE, this._onTimedMetadataChange);
|
|
87
87
|
this.eventManager.listen(this.player, this.player.Event.TIMED_METADATA_ADDED, this._onTimedMetadataAdded);
|
|
88
88
|
this.eventManager.listen(this.player, this.player.Event.TEXT_TRACK_CHANGED, this._handleLanguageChange);
|
|
89
|
-
this._addDownloadIcon();
|
|
90
|
-
this._addPrintIcon();
|
|
91
|
-
this._addTranscriptItem();
|
|
92
|
-
this._initLoading();
|
|
93
89
|
}
|
|
94
90
|
});
|
|
95
91
|
}
|
|
@@ -131,6 +127,9 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
131
127
|
});
|
|
132
128
|
if (captionData.length) {
|
|
133
129
|
this._addCaptionData(captionData);
|
|
130
|
+
this._addDownloadIcon();
|
|
131
|
+
this._addPrintIcon();
|
|
132
|
+
this._addTranscriptItem();
|
|
134
133
|
}
|
|
135
134
|
};
|
|
136
135
|
|
|
@@ -206,6 +205,7 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
206
205
|
private _addDownloadIcon(): void {
|
|
207
206
|
const {downloadDisabled} = this.config;
|
|
208
207
|
if (this._downloadIcon > 0 || downloadDisabled) {
|
|
208
|
+
// download icon already exist or download disabled
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
const translate = {
|
|
@@ -223,6 +223,7 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
223
223
|
private _addPrintIcon(): void {
|
|
224
224
|
const {printDisabled} = this.config;
|
|
225
225
|
if (this._printIcon > 0 || printDisabled) {
|
|
226
|
+
// print icon already exist or download disabled
|
|
226
227
|
return;
|
|
227
228
|
}
|
|
228
229
|
const translate = {
|
|
@@ -239,7 +240,8 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
private _addTranscriptItem(): void {
|
|
242
|
-
if (this._transcriptPanel > 0) {
|
|
243
|
+
if (Math.max(this._transcriptPanel, this._transcriptIcon) > 0) {
|
|
244
|
+
// transcript panel or icon already exist
|
|
243
245
|
return;
|
|
244
246
|
}
|
|
245
247
|
|