@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playkit-js/transcript",
3
- "version": "3.5.22",
3
+ "version": "3.5.23-canary.0-f10827a",
4
4
  "main": "dist/playkit-transcript.js",
5
5
  "license": "AGPL-3.0",
6
6
  "private": false,
@@ -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.attachTranscriptText">Transcript popped out</Text>
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.attachTranscriptButton">Bring it back</Text>
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 Transcript</Text>
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
- "attachTranscriptText": "Transcript popped out",
21
- "attachTranscriptButton": "Bring it back",
22
- "attachTranscript": "Bring Transcript back",
23
- "detachTranscript": "Popout Transcript",
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
  }