Skip to content

Commit

Permalink
fix(FEV-1011): add TS-types for cue-point manager and cues (#499)
Browse files Browse the repository at this point in the history
* fix(FEV-1011): add TS-types for cue-point manager and cues

* fix(FEV-1011): add TS-types for player
  • Loading branch information
semarche-kaltura authored Oct 7, 2021
1 parent b8f548e commit 5abb342
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions ts-typed/cue-point-manager.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
declare namespace KalturaPlayerTypes {
export interface CuePoint {
id: string;
startTime: number;
endTime: number;
}
export interface CuePointManager {
getAllCuePoints(): Array<VTTCue>;
getActiveCuePoints(): Array<VTTCue>;
getCuePointById(id: string): VTTCue;
removeCuePoint(cuePoint: VTTCue): void;
addCuePoints(cuePointData: Array<CuePoint & any>): void;
clearAllCuePoints(): void;
reset(): void;
destroy(): void;
}
}
1 change: 1 addition & 0 deletions ts-typed/kaltura-player.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ declare module 'global' {
};
};
};
cuepoint: {[key: string]: string};
getPlayer(targetId?: string): any;
setup(options: any): KalturaPlayer;
};
Expand Down
4 changes: 2 additions & 2 deletions ts-typed/player.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ declare namespace KalturaPlayerTypes {
configure: Function;
ui: any;
config: KalturaPlayerTypes.PlayerConfig;
cuepoint: any;
provider: any;
cuePointManager: any;
cuePointManager: KalturaPlayerTypes.CuePointManager;
ready: () => Promise<*>;
}
}

0 comments on commit 5abb342

Please sign in to comment.