@playkit-js/transcript 3.5.22 → 3.5.23-canary.0-f10827a
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/CHANGELOG.md +7 -0
- package/dist/playkit-transcript.js +1 -1
- package/dist/playkit-transcript.js.map +1 -1
- package/package.json +1 -1
- package/src/components/attach-placeholder/attach-placeholder.tsx +2 -2
- package/src/components/caption/caption.tsx +9 -1
- package/src/components/transcript/transcript.tsx +1 -1
- package/translations/en.i18n.json +6 -5
package/package.json
CHANGED
|
@@ -22,10 +22,10 @@ export const AttachPlaceholder = ({onAttach, onClose}: AttachPlaceholderProps) =
|
|
|
22
22
|
</div>
|
|
23
23
|
<div className={styles.attachContent}>
|
|
24
24
|
<div className={styles.attachText}>
|
|
25
|
-
<Text id="transcript.
|
|
25
|
+
<Text id="transcript.attach_transcript_text">Transcript popped out</Text>
|
|
26
26
|
</div>
|
|
27
27
|
<Button type={ButtonType.primary} size={ButtonSize.medium} className={styles.attachButton} onClick={onAttach} testId="transcriptAttachButton">
|
|
28
|
-
<Text id="transcript.
|
|
28
|
+
<Text id="transcript.attach_transcript_button">Bring it back</Text>
|
|
29
29
|
</Button>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
@@ -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
|
|
|
@@ -28,7 +28,7 @@ const translates = {
|
|
|
28
28
|
errorTitle: <Text id="transcript.whoops">Whoops!</Text>,
|
|
29
29
|
errorDescripton: <Text id="transcript.load_failed">Failed to load transcript</Text>,
|
|
30
30
|
attachTranscript: <Text id="transcript.attach_transcript">Bring Transcript back</Text>,
|
|
31
|
-
detachTranscript: <Text id="transcript.detach_transcript">Popout
|
|
31
|
+
detachTranscript: <Text id="transcript.detach_transcript">Popout transcript</Text>
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export interface TranscriptProps {
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
"skip_transcript": "Skip transcript",
|
|
18
18
|
"smallScreenText": "To see the transcript, go to full screen",
|
|
19
19
|
"smallScreenMobileText": "To see the transcript, rotate the phone",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"transcript": "Transcript"
|
|
20
|
+
"attach_transcript_text": "Transcript popped out",
|
|
21
|
+
"attach_transcript_button": "Bring it back",
|
|
22
|
+
"attach_transcript": "Bring Transcript back",
|
|
23
|
+
"detach_transcript": "Popout transcript",
|
|
24
|
+
"transcript": "Transcript",
|
|
25
|
+
"caption_label": "Jump to this point in video"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|