@playkit-js/transcript 3.5.35 → 3.5.36-canary.0-434c243
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
|
@@ -147,7 +147,7 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
147
147
|
if (captionData.length) {
|
|
148
148
|
// take metadata from the first caption, as all captions in captionData have the same language and label
|
|
149
149
|
const captionMetadata = payload.cues[0].metadata;
|
|
150
|
-
const captionKey =
|
|
150
|
+
const captionKey = captionMetadata.language || 'default';
|
|
151
151
|
this._addCaptionData(captionData, captionKey);
|
|
152
152
|
this._addTranscriptItem();
|
|
153
153
|
}
|
|
@@ -194,14 +194,9 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
194
194
|
return this._activeCaptionMapId;
|
|
195
195
|
}
|
|
196
196
|
// use 1st captions from text-track list
|
|
197
|
-
return
|
|
197
|
+
return allTextTracks[0]?.language || 'default';
|
|
198
198
|
}
|
|
199
|
-
return
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
private _makeCaptionKey = (language?: string, label?: string): string => {
|
|
203
|
-
// use 'default' language as fallback when language argument is undefined or empty string
|
|
204
|
-
return `${language || 'default'}-${label}`;
|
|
199
|
+
return activeTextTrack?.language || 'default';
|
|
205
200
|
};
|
|
206
201
|
|
|
207
202
|
private _activatePlugin = (isFirstOpen = false) => {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ca": {
|
|
3
|
+
"transcript": {
|
|
4
|
+
"hide_plugin": "Amagar la transcripció",
|
|
5
|
+
"show_plugin": "Mostrar la transcripció",
|
|
6
|
+
"more_options": "Més opcions de transcripció",
|
|
7
|
+
"print_transcript": "Imprimir la transcripció actual",
|
|
8
|
+
"download_transcript": "Descarregar la transcripció actual",
|
|
9
|
+
"search": "Cercar a la transcripció",
|
|
10
|
+
"clear_search": "Esborrar la cerca",
|
|
11
|
+
"next_search_match": "Següent resultat de la cerca",
|
|
12
|
+
"prev_search_match": "Resultat anterior de la cerca",
|
|
13
|
+
"search_results": "Resultat de la cerca {{current}} de {{total}}",
|
|
14
|
+
"auto_scroll": "Reprendre AutoScroll",
|
|
15
|
+
"whoops": "Ups!",
|
|
16
|
+
"load_failed": "No s'ha pogut carregar la transcripció",
|
|
17
|
+
"skip_transcript": "Salt de la transcripció",
|
|
18
|
+
"smallScreenText": "Per veure la transcripció, vés a pantalla completa",
|
|
19
|
+
"smallScreenMobileText": "Per veure la transcripció, gira el telèfon",
|
|
20
|
+
"attach_transcript_text": "La transcripció ha aparegut",
|
|
21
|
+
"attach_transcript_button": "Torna a portar-la",
|
|
22
|
+
"attach_transcript": "Torna a portar la transcripció",
|
|
23
|
+
"detach_transcript": "Desplegar transcripció",
|
|
24
|
+
"transcript": "Transcripció",
|
|
25
|
+
"caption_label": "Salta a aquest punt del vídeo",
|
|
26
|
+
"move_to_search": "Fes clic per saltar al resultat de la cerca",
|
|
27
|
+
"to_search_result": "Vés al resultat",
|
|
28
|
+
"to_search_result_label": "Fes clic per saltar a aquest punt del vídeo"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|