[@types/jwplayer] Add setCaptions, getVisualQuality (#31749)

*  Add missing setCaptions method
      - per docs https://developer.jwplayer.com/jw-player/docs/javascript-api-reference/#captions

* Add missing getVisualQuality method
      - per docs https://developer.jwplayer.com/jw-player/docs/javascript-api-reference/#quality
This commit is contained in:
Be
2018-12-31 07:59:30 -08:00
committed by Wesley Wigham
parent 86d7939a7d
commit df309e0eb0
+28
View File
@@ -5,6 +5,7 @@
// Philipp Gürtler <https://github.com/philippguertler>
// Daniel McGraw <https://github.com/danielmcgraw>
// Benjamin Dobson <https://github.com/bpdsw>
// Be Birchall <https://gitnub.com/bebebebebe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -241,6 +242,31 @@ interface Region {
height: number;
}
interface CaptionOptions {
color: string;
fontSize: number;
fontFamily: string;
fontOpacity: number;
backgroundColor: string;
backgroundOpacity: number;
edgeStyle: string;
windowColor: string;
windowOpacity: number;
}
interface Level {
bitrate: number;
height: number;
width: number;
label: string;
}
interface QualityLevel {
mode: 'auto' | 'manual';
level: Level;
reason: 'auto' | 'api' | 'initial choice';
}
interface JWPlayer {
addButton(icon: string, label: string, handler: () => void, id: string): void;
getAudioTracks(): any[];
@@ -266,6 +292,7 @@ interface JWPlayer {
getContainer(): HTMLElement;
getEnvironment(): Environment;
getWidth(): number;
getVisualQuality(): QualityLevel | undefined;
load(playlist: any[]): void;
load(playlist: string): void;
on(event: 'adClick', callback: EventCallback<AdProgressParam>): void;
@@ -469,6 +496,7 @@ interface JWPlayer {
setMute(state?: boolean): void;
setup(options: any): JWPlayer;
setVolume(volume: number): void;
setCaptions(options: CaptionOptions): void;
stop(): void;
}