@playkit-js/transcript 3.5.22 → 3.5.23-canary.0-cbd0e0f
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
|
@@ -4,12 +4,15 @@ import {secondsToTime} from '../../utils';
|
|
|
4
4
|
import {CuePointData} from '../../types';
|
|
5
5
|
import * as styles from './caption.scss';
|
|
6
6
|
|
|
7
|
+
const {withText, Text} = KalturaPlayer.ui.preacti18n;
|
|
8
|
+
|
|
7
9
|
export interface CaptionProps {
|
|
8
10
|
showTime: boolean;
|
|
9
11
|
searchLength: number;
|
|
10
12
|
scrollTo(el: HTMLElement): void;
|
|
11
13
|
scrollToSearchMatch(el: HTMLElement): void;
|
|
12
14
|
videoDuration: number;
|
|
15
|
+
captionLabel?: string;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
interface ExtendedCaptionProps extends CaptionProps {
|
|
@@ -24,6 +27,11 @@ interface ExtendedCaptionProps extends CaptionProps {
|
|
|
24
27
|
isAutoScrollEnabled: boolean;
|
|
25
28
|
}
|
|
26
29
|
|
|
30
|
+
const translates = {
|
|
31
|
+
captionLabel: <Text id="transcript.caption_label">Jump to this point in video</Text>
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
@withText(translates)
|
|
27
35
|
export class Caption extends Component<ExtendedCaptionProps> {
|
|
28
36
|
private _hotspotRef: HTMLElement | null = null;
|
|
29
37
|
|
|
@@ -107,7 +115,7 @@ export class Caption extends Component<ExtendedCaptionProps> {
|
|
|
107
115
|
const captionA11yProps: Record<string, any> = {
|
|
108
116
|
ariaCurrent: isHighlighted,
|
|
109
117
|
tabIndex: 0,
|
|
110
|
-
ariaLabel: `${time}${showTime ? ' ' : ''}${caption.text}`,
|
|
118
|
+
ariaLabel: `${time}${showTime ? ' ' : ''}${caption.text} ${this.props.captionLabel}`,
|
|
111
119
|
role: 'button'
|
|
112
120
|
};
|
|
113
121
|
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"attachTranscriptButton": "Bring it back",
|
|
22
22
|
"attachTranscript": "Bring Transcript back",
|
|
23
23
|
"detachTranscript": "Popout Transcript",
|
|
24
|
-
"transcript": "Transcript"
|
|
24
|
+
"transcript": "Transcript",
|
|
25
|
+
"caption_label": "Jump to this point in video"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|