Skip to content

Commit

Permalink
fix(FEC-12113): Add Side Panels Management to player UI (#547)
Browse files Browse the repository at this point in the history
Add a minor fix type in TS decalcomania file
  • Loading branch information
JonathanTGold authored May 16, 2022
1 parent 85bd014 commit 5ea1b5b
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {Store} from 'redux';
import * as preactLib from 'preact';
import {BasePlugin} from "kaltura-player-js";
import {BasePlugin} from 'kaltura-player-js';

declare module 'kaltura-player-js' {
export const ui: typeof PlaykitUI
export const ui: typeof PlaykitUI;
export class BasePlugin {
protected static defaultConfig: {};
protected constructor(name: string, player: KalturaPlayer);
Expand All @@ -14,17 +14,17 @@ declare module 'kaltura-player-js' {
public destroy(): void;
public static isValid(): boolean;
}
export function registerPlugin(pluginName: string, plugin: IBasePlugin): void
export function registerPlugin(pluginName: string, plugin: IBasePlugin): void;
}

export interface IBasePlugin {
new(name: string, player: KalturaPlayer): BasePlugin;
new (name: string, player: KalturaPlayer): BasePlugin;
}

export class KalturaPlayer {
public registerService(pluginName: string, service: Object): void;
public getService<T>(serviceName: string): T;
public get ui(): UIWrapper
public get ui(): UIWrapper;
}

export class UIWrapper {
Expand All @@ -49,59 +49,63 @@ declare module PlaykitUI {
export type SidePanelPosition = 'top' | 'bottom' | 'right' | 'left';
export type SidePanelMode = 'alongside' | 'hidden' | 'over';
export type ReservedPresetName = 'Playback' | 'Live' | 'Idle' | 'Ads' | 'Error';
export const SidePanelOrientation: {
VERTICAL: 'vertical',
HORIZONTAL: 'horizontal'
export const SidePanelOrientation: {
VERTICAL: 'vertical';
HORIZONTAL: 'horizontal';
};

export const SidePanelPositions: {
LEFT: 'left',
TOP: 'top',
BOTTOM: 'bottom',
RIGHT: 'right'
LEFT: 'left';
TOP: 'top';
BOTTOM: 'bottom';
RIGHT: 'right';
};

export const SidePanelModes: {
ALONGSIDE: 'alongside',
HIDDEN: 'hidden',
OVER: 'over'
ALONGSIDE: 'alongside';
HIDDEN: 'hidden';
OVER: 'over';
};

export const ReservedPresetNames: {
Playback: 'Playback',
Live: 'Live'
Idle: 'Idle'
Ads: 'Ads'
Error: 'Error'
Playback: 'Playback';
Live: 'Live';
Idle: 'Idle';
Ads: 'Ads';
Error: 'Error';
};

export const ReservedPresetAreas: {
PresetFloating: 'PresetFloating',
BottomBarLeftControls: 'BottomBarLeftControls',
BottomBarRightControls: 'BottomBarRightControls',
TopBarLeftControls: 'TopBarLeftControls',
TopBarRightControls: 'TopBarRightControls',
SidePanelTop: 'SidePanelTop',
SidePanelLeft: 'SidePanelLeft',
SidePanelRight: 'SidePanelRight',
SidePanelBottom: 'SidePanelBottom',
PresetArea: 'PresetArea',
InteractiveArea: 'InteractiveArea',
PlayerArea: 'PlayerArea',
VideoArea: 'VideoArea'
PresetFloating: 'PresetFloating';
BottomBarLeftControls: 'BottomBarLeftControls';
BottomBarRightControls: 'BottomBarRightControls';
TopBarLeftControls: 'TopBarLeftControls';
TopBarRightControls: 'TopBarRightControls';
SidePanelTop: 'SidePanelTop';
SidePanelLeft: 'SidePanelLeft';
SidePanelRight: 'SidePanelRight';
SidePanelBottom: 'SidePanelBottom';
PresetArea: 'PresetArea';
InteractiveArea: 'InteractiveArea';
PlayerArea: 'PlayerArea';
VideoArea: 'VideoArea';
};

export const reducers: {
shell: {
actions: {
updateSidePanelMode: (position: SidePanelPosition, sidePanelMode: SidePanelMode) => ({
type: string,
updateSidePanelMode: (
position: SidePanelPosition,
sidePanelMode: SidePanelMode
}),
}
}
) => {
type: string;
position: SidePanelPosition;
sidePanelMode: SidePanelMode;
};
};
};
};
export const style: {[cssClassName: string]: string};
export const h: typeof preact.h;
export const preact: typeof preactLib
export const preact: typeof preactLib;
}

0 comments on commit 5ea1b5b

Please sign in to comment.