@playkit-js/transcript 3.5.23 → 3.5.24-canary.0-77806af

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.23",
3
+ "version": "3.5.24-canary.0-77806af",
4
4
  "main": "dist/playkit-transcript.js",
5
5
  "license": "AGPL-3.0",
6
6
  "private": false,
@@ -120,7 +120,6 @@ class PopoverMenu extends Component<PopoverMenuProps, PopoverMenuState> {
120
120
  this.togglePopover();
121
121
  }}>
122
122
  <div
123
- aria-label={this.props.moreOptionsLabel!}
124
123
  tabIndex={0}
125
124
  data-testid="popover-anchor-container"
126
125
  className={`${styles.popoverAnchorContainer} ${this.state.isOpen ? styles.active : ''}`}
@@ -8,6 +8,7 @@ const {withText, Text} = KalturaPlayer.ui.preacti18n;
8
8
  interface TranscriptMenuProps {
9
9
  printTranscript?: string;
10
10
  downloadTranscript?: string;
11
+ moreOptionsLabel?: string;
11
12
  onDownload: () => void;
12
13
  onPrint: () => void;
13
14
  downloadDisabled?: boolean;
@@ -28,7 +29,8 @@ interface TranscriptMenuState {
28
29
 
29
30
  const translates = {
30
31
  printTranscript: <Text id="transcript.print_transcript">Print current transcript</Text>,
31
- downloadTranscript: <Text id="transcript.download_transcript">Download current transcript</Text>
32
+ downloadTranscript: <Text id="transcript.download_transcript">Download current transcript</Text>,
33
+ moreOptionsLabel: <Text id="transcript.more_options">More transcript options</Text>
32
34
  };
33
35
 
34
36
  @withText(translates)
@@ -71,7 +73,7 @@ class TranscriptMenu extends Component<TranscriptMenuProps, TranscriptMenuState>
71
73
 
72
74
  return items.length ? (
73
75
  <PopoverMenu items={items} kitchenSinkDetached={kitchenSinkDetached}>
74
- <Button type={ButtonType.borderless} icon={'more'} tabIndex={-1} />
76
+ <Button type={ButtonType.borderless} icon={'more'} tabIndex={-1} ariaLabel={this.props.moreOptionsLabel} />
75
77
  </PopoverMenu>
76
78
  ) : null;
77
79
  }
@@ -174,6 +174,10 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
174
174
  const allTextTracks = this._getTextTracks();
175
175
  const activeTextTrack = allTextTracks.find(track => track.active);
176
176
  if (activeTextTrack?.language === 'off') {
177
+ if (this._activeCaptionMapId) {
178
+ // use current captions language
179
+ return this._activeCaptionMapId;
180
+ }
177
181
  // use 1st captions from text-track list
178
182
  return this._makeCaptionKey(allTextTracks[0]?.language, allTextTracks[0]?.label);
179
183
  }