Skip to content

Commit

Permalink
fix(FEC-13517): Wrong and inconsistent order of plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold committed Jan 17, 2024
1 parent b63c10e commit e9a4f61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ const NAME = __NAME__;
export {TranscriptPlugin as Plugin};
export {VERSION, NAME};

const pluginName: string = 'playkit-js-transcript';
export const pluginName: string = 'playkit-js-transcript';

KalturaPlayer.core.registerPlugin(pluginName, TranscriptPlugin);
10 changes: 8 additions & 2 deletions src/transcript-plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {PluginButton} from './components/plugin-button/plugin-button';
import {Transcript} from './components/transcript';
import {getConfigValue, isBoolean, makePlainText, prepareCuePoint} from './utils';
import {TranscriptConfig, PluginStates, HighlightedMap, CuePointData, ItemTypes, CuePoint} from './types';
import { pluginName } from "./index";

const {SidePanelModes, SidePanelPositions, ReservedPresetNames, ReservedPresetAreas} = ui;
const {withText, Text} = KalturaPlayer.ui.preacti18n;
Expand Down Expand Up @@ -267,8 +268,13 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
showTranscript: <Text id="transcript.show_plugin">Show Transcript</Text>,
hideTranscript: <Text id="transcript.hide_plugin">Hide Transcript</Text>
};
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this._transcriptIcon = this.upperBarManager!.add({
label: 'Transcript',
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
displayName: 'Transcript',
ariaLabel: 'Transcript',
svgIcon: {path: icons.PLUGIN_ICON, viewBox: `0 0 ${icons.BigSize} ${icons.BigSize}`},
onClick: this._handleClickOnPluginIcon as () => void,
component: withText(translates)((props: {showTranscript: string; hideTranscript: string}) => {
Expand All @@ -277,7 +283,7 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
return (
<PluginButton
isActive={isActive}
id="transcript-icon"
id={pluginName}
label={label}
icon={icons.PLUGIN_ICON}
dataTestId="transcript_pluginButton"
Expand Down

0 comments on commit e9a4f61

Please sign in to comment.