Skip to content

Commit

Permalink
fix(FEC-13517): Wrong and inconsistent order of plugins (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold and JonathanTGold authored Jan 24, 2024
1 parent 5daee98 commit 6fa24aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Related} from './related';
import {pluginName, Related} from './related';

declare let __VERSION__: string;
declare let __NAME__: string;
Expand All @@ -9,6 +9,4 @@ const NAME = __NAME__;
export {Related as Plugin};
export {VERSION, NAME};

const pluginName = 'related';

KalturaPlayer.core.registerPlugin(pluginName, Related);
11 changes: 9 additions & 2 deletions src/related.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {UpperBarManager, SidePanelsManager} from '@playkit-js/ui-managers';
import {Icon, RelatedConfig} from 'types';
import {RelatedInternalEvent} from 'event';

export const pluginName = 'related';

const PRESETS = ['Playback', 'Live'];

/**
Expand Down Expand Up @@ -178,9 +180,14 @@ class Related extends KalturaPlayer.core.BasePlugin {
addRelatedListComponents() {
const {relatedManager} = this;
if (this.iconId > 0 || !relatedManager.entries.length) return;

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.iconId = this.upperBarManager.add({
label: 'Related',
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
displayName: 'Related',
ariaLabel: 'Related',
order: 60,
svgIcon: {
viewBox: '0 0 32 32',
path: Icon.LIST_TOGGLE
Expand Down

0 comments on commit 6fa24aa

Please sign in to comment.