@flowplayer/player 3.11.1 → 3.11.2-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/index.d.ts +0 -3
- package/package.json +39 -1
- package/plugins/ads.d.ts +775 -0
- package/plugins/ads.js +1 -1
- package/plugins/airplay.d.ts +377 -0
- package/plugins/analytics.d.ts +242 -0
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +360 -0
- package/plugins/audio.d.ts +347 -0
- package/plugins/chapters.d.ts +391 -0
- package/plugins/chromecast.d.ts +422 -0
- package/plugins/consent.d.ts +373 -0
- package/plugins/context-menu.d.ts +212 -0
- package/plugins/cuepoints.d.ts +0 -3
- package/plugins/dash.d.ts +235 -0
- package/plugins/drm.d.ts +248 -0
- package/plugins/endscreen.d.ts +407 -0
- package/plugins/fas.d.ts +364 -0
- package/plugins/float-on-scroll.d.ts +367 -0
- package/plugins/ga4.d.ts +454 -0
- package/plugins/gemius.d.ts +385 -0
- package/plugins/google-analytics.d.ts +456 -0
- package/plugins/health.d.ts +385 -0
- package/plugins/health.js +1 -1
- package/plugins/hls.d.ts +229 -0
- package/plugins/id3.d.ts +198 -0
- package/plugins/iframe.d.ts +356 -0
- package/plugins/keyboard.d.ts +189 -0
- package/plugins/media-session.d.ts +189 -0
- package/plugins/message.d.ts +193 -0
- package/plugins/ovp.d.ts +411 -0
- package/plugins/playlist.d.ts +394 -0
- package/plugins/preview.d.ts +243 -0
- package/plugins/qsel.d.ts +352 -0
- package/plugins/qul.d.ts +220 -0
- package/plugins/rts.d.ts +273 -0
- package/plugins/share.d.ts +361 -0
- package/plugins/speed.d.ts +346 -0
- package/plugins/ssai.d.ts +412 -0
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +362 -0
- package/plugins/thumbnails.d.ts +375 -0
- package/plugins/tizen.d.ts +430 -0
- package/plugins/vtsel.d.ts +348 -0
- package/plugins/webos.d.ts +430 -0
- package/util/loader.d.ts +0 -3
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import type { MediaKeyFunc } from 'hls.js';
|
|
2
|
+
import { MediaPlayer } from 'dashjs';
|
|
3
|
+
import type { MediaPlayerClass } from 'dashjs';
|
|
4
|
+
import type { MediaSettings } from 'dashjs';
|
|
5
|
+
import type { ProtectionDataSet } from 'dashjs';
|
|
6
|
+
|
|
7
|
+
declare type BitOpts = number;
|
|
8
|
+
|
|
9
|
+
declare interface Config {
|
|
10
|
+
src?: UnsafeSource;
|
|
11
|
+
preload?: "none" | "metadata" | "auto";
|
|
12
|
+
controls?: boolean;
|
|
13
|
+
lang?: string;
|
|
14
|
+
start_time?: number;
|
|
15
|
+
autopause?: boolean;
|
|
16
|
+
rewind?: boolean;
|
|
17
|
+
loop?: boolean;
|
|
18
|
+
seamless?: boolean;
|
|
19
|
+
retry?: boolean;
|
|
20
|
+
autoplay?: BitOpts;
|
|
21
|
+
start_quality?: BitOpts;
|
|
22
|
+
live?: boolean;
|
|
23
|
+
poster?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
muted?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* is src handled by one of plugins loaders
|
|
28
|
+
*/
|
|
29
|
+
is_native?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* bitflags for UI options
|
|
32
|
+
*/
|
|
33
|
+
ui?: BitOpts;
|
|
34
|
+
/**
|
|
35
|
+
* your user access token
|
|
36
|
+
*/
|
|
37
|
+
token?: string;
|
|
38
|
+
/**
|
|
39
|
+
* manually configured duration for pre-rendering usually
|
|
40
|
+
*/
|
|
41
|
+
duration?: number;
|
|
42
|
+
/**
|
|
43
|
+
* can the content be seeked to any position
|
|
44
|
+
*/
|
|
45
|
+
seekable?: boolean;
|
|
46
|
+
multiplay?: boolean;
|
|
47
|
+
ratio?: number | string;
|
|
48
|
+
logo?: string;
|
|
49
|
+
logo_href?: string;
|
|
50
|
+
logo_alt_text?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
/**
|
|
54
|
+
* the number of seconds to have in the buffer before dvr is activated
|
|
55
|
+
*/
|
|
56
|
+
seconds_to_dvr?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare namespace Configs {
|
|
60
|
+
export {
|
|
61
|
+
BitOpts,
|
|
62
|
+
FlowplayerCustomElementRegistry,
|
|
63
|
+
Config,
|
|
64
|
+
CustomConfig,
|
|
65
|
+
PluginConfig
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare type ConfigWith<T> = Configs.Config & T;
|
|
70
|
+
|
|
71
|
+
declare type CustomConfig<T> = Config & T;
|
|
72
|
+
|
|
73
|
+
declare class Dash implements Loader {
|
|
74
|
+
static MediaPlayer: typeof MediaPlayer;
|
|
75
|
+
dash?: MediaPlayerClass;
|
|
76
|
+
init(config: DashConfig, _root: PlayerRoot, player: DashPlayer): void;
|
|
77
|
+
onload(config: DashConfig, _root: PlayerRoot, player: DashPlayer, { src }: SourceObj): void | "";
|
|
78
|
+
wants(srcString: string, srcObj: SourceObj, config: Config): boolean;
|
|
79
|
+
set_drm(player: DashPlayer, config: DashConfig, dash: MediaPlayerClass): Player | undefined;
|
|
80
|
+
wireup(player: DashPlayer, dash: MediaPlayerClass): void;
|
|
81
|
+
}
|
|
82
|
+
export default Dash;
|
|
83
|
+
|
|
84
|
+
/* Excluded from this release type: DashConfig */
|
|
85
|
+
|
|
86
|
+
/* Excluded from this release type: DashPlayer */
|
|
87
|
+
|
|
88
|
+
declare type DashSettings = MediaSettings & {
|
|
89
|
+
drm: ProtectionDataSet;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
declare type DeviceId = string;
|
|
93
|
+
|
|
94
|
+
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
95
|
+
|
|
96
|
+
declare type DRMConfiguration = {
|
|
97
|
+
license_server: string;
|
|
98
|
+
http_headers?: Record<string, string>;
|
|
99
|
+
certificate?: string;
|
|
100
|
+
vendor?: string | DRMVendorImplementation;
|
|
101
|
+
request_media_key_system_access_function?: MediaKeyFunc;
|
|
102
|
+
query_params?: Record<string, string>;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
declare type DRMSourceConfiguration = {
|
|
106
|
+
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type DRMVendorImplementation = {
|
|
110
|
+
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
111
|
+
fairplay_request_license: (url: string, params: {
|
|
112
|
+
message: any;
|
|
113
|
+
assetId: string;
|
|
114
|
+
}, cb: (license_data: Uint8Array) => void) => void;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
declare type FlowplayerCustomElementRegistry = Map<string, string>;
|
|
118
|
+
|
|
119
|
+
declare interface FPEvent<T> extends CustomEvent<T> {
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated
|
|
122
|
+
the data attribute has been migrated to details to match the CustomEvent spec
|
|
123
|
+
more info: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
|
124
|
+
*/
|
|
125
|
+
data?: T;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare type JSONPlayer = any;
|
|
129
|
+
|
|
130
|
+
declare type KeyValue = Record<string, any>;
|
|
131
|
+
|
|
132
|
+
declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue> extends Plugin_2<PluginOwnConfig> {
|
|
133
|
+
onload<T = KeyValue>(config: PluginConfig<T>, root: PlayerRoot, video: Player, src?: SourceObj): void;
|
|
134
|
+
wants<S = SourceObj, T = KeyValue>(srcString: SourceStr, srcObj: S, config: PluginConfig<T>): boolean;
|
|
135
|
+
wants<S = KeyValue, T = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: PluginConfig<T>): boolean;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare interface Player extends HTMLVideoElement {
|
|
139
|
+
renderPlugin: (pluginContainer: HTMLElement) => void;
|
|
140
|
+
toggleDisable: (flag: boolean) => void;
|
|
141
|
+
original_src: string;
|
|
142
|
+
root: PlayerRoot;
|
|
143
|
+
playerState: Record<string, boolean>;
|
|
144
|
+
reaper: Map<string, any> | 0;
|
|
145
|
+
hasState(state: PlayerState): boolean;
|
|
146
|
+
transitionState(to: PlayerState, from: PlayerState, timer?: number): void;
|
|
147
|
+
togglePlay(on?: boolean): Promise<void>;
|
|
148
|
+
toggleFullScreen(on?: boolean, state_only?: boolean): void;
|
|
149
|
+
toggleMute(on?: boolean): void;
|
|
150
|
+
destroy(): void;
|
|
151
|
+
render(): void;
|
|
152
|
+
render(component: string, args: any[]): void;
|
|
153
|
+
createComponents(...args: string[]): HTMLElement[];
|
|
154
|
+
setOpts(config: Config): void;
|
|
155
|
+
setSrc(sources: UnsafeSource): Player;
|
|
156
|
+
on<T>(event: string | string[], handler: (e: FPEvent<T>) => void): Player;
|
|
157
|
+
once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
158
|
+
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
159
|
+
poll<T>(event: string, data?: T): FPEvent<T>;
|
|
160
|
+
emit<T>(event: string, data?: T): Player;
|
|
161
|
+
setAttrs(attrs: Config): Player;
|
|
162
|
+
opt<T>(key: string, fallback?: T): T;
|
|
163
|
+
enqueueSeek(offset: number): any;
|
|
164
|
+
setState(state: string, flag: boolean): Player;
|
|
165
|
+
toJSON(): JSONPlayer;
|
|
166
|
+
i18n(k: string, fallback?: string): string;
|
|
167
|
+
deviceId(): DeviceId;
|
|
168
|
+
live_state: {
|
|
169
|
+
dvr?: boolean;
|
|
170
|
+
dvr_window?: number;
|
|
171
|
+
};
|
|
172
|
+
opts: Config;
|
|
173
|
+
plugins: Array<Plugin_2 | Loader>;
|
|
174
|
+
dvr_offset?: number;
|
|
175
|
+
message?: {
|
|
176
|
+
events: Record<string, string>;
|
|
177
|
+
};
|
|
178
|
+
disabled: boolean;
|
|
179
|
+
started?: boolean;
|
|
180
|
+
token: string;
|
|
181
|
+
tracks?: VideoTrack[];
|
|
182
|
+
_customElements: FlowplayerCustomElementRegistry;
|
|
183
|
+
_storage: Storage;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
declare type PlayerRoot = HTMLElement & {
|
|
187
|
+
prevWidth?: number;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
declare namespace Players {
|
|
191
|
+
export {
|
|
192
|
+
VideoTrack,
|
|
193
|
+
PlayerState,
|
|
194
|
+
FPEvent,
|
|
195
|
+
DeviceId,
|
|
196
|
+
JSONPlayer,
|
|
197
|
+
PlayerRoot,
|
|
198
|
+
Player
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare type PlayerState = string;
|
|
203
|
+
|
|
204
|
+
declare type PlayerWith<T> = Players.Player & T;
|
|
205
|
+
|
|
206
|
+
declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
|
|
207
|
+
/**
|
|
208
|
+
* a plugin must always implement the init method so a player instance knows how to initialize it
|
|
209
|
+
*/
|
|
210
|
+
init<T>(config: PluginConfig<T>, container: PlayerRoot, player: Player): void;
|
|
211
|
+
init(config: PluginConfig<PluginOwnConfig>, container: PlayerRoot, player: Player): void;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
declare type PluginConfig<T> = Config & T;
|
|
215
|
+
|
|
216
|
+
declare type SourceObj = {
|
|
217
|
+
src?: SourceStr;
|
|
218
|
+
type?: string;
|
|
219
|
+
drm?: DRMSourceConfiguration;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
declare type SourceStr = string;
|
|
223
|
+
|
|
224
|
+
declare type SourceWith<T> = SourceObj & T;
|
|
225
|
+
|
|
226
|
+
declare type UnsafeSource = SourceStr | SourceObj | Array<SourceStr | SourceObj>;
|
|
227
|
+
|
|
228
|
+
declare interface VideoTrack {
|
|
229
|
+
name: string;
|
|
230
|
+
data: any;
|
|
231
|
+
default: boolean;
|
|
232
|
+
selected: boolean;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export { }
|
package/plugins/drm.d.ts
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { HlsConfig } from 'hls.js';
|
|
2
|
+
import type { MediaKeyFunc } from 'hls.js';
|
|
3
|
+
import type { MediaSettings } from 'dashjs';
|
|
4
|
+
import type { ProtectionDataSet } from 'dashjs';
|
|
5
|
+
|
|
6
|
+
declare type BitOpts = number;
|
|
7
|
+
|
|
8
|
+
declare interface Config {
|
|
9
|
+
src?: UnsafeSource;
|
|
10
|
+
preload?: "none" | "metadata" | "auto";
|
|
11
|
+
controls?: boolean;
|
|
12
|
+
lang?: string;
|
|
13
|
+
start_time?: number;
|
|
14
|
+
autopause?: boolean;
|
|
15
|
+
rewind?: boolean;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
seamless?: boolean;
|
|
18
|
+
retry?: boolean;
|
|
19
|
+
autoplay?: BitOpts;
|
|
20
|
+
start_quality?: BitOpts;
|
|
21
|
+
live?: boolean;
|
|
22
|
+
poster?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
muted?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* is src handled by one of plugins loaders
|
|
27
|
+
*/
|
|
28
|
+
is_native?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* bitflags for UI options
|
|
31
|
+
*/
|
|
32
|
+
ui?: BitOpts;
|
|
33
|
+
/**
|
|
34
|
+
* your user access token
|
|
35
|
+
*/
|
|
36
|
+
token?: string;
|
|
37
|
+
/**
|
|
38
|
+
* manually configured duration for pre-rendering usually
|
|
39
|
+
*/
|
|
40
|
+
duration?: number;
|
|
41
|
+
/**
|
|
42
|
+
* can the content be seeked to any position
|
|
43
|
+
*/
|
|
44
|
+
seekable?: boolean;
|
|
45
|
+
multiplay?: boolean;
|
|
46
|
+
ratio?: number | string;
|
|
47
|
+
logo?: string;
|
|
48
|
+
logo_href?: string;
|
|
49
|
+
logo_alt_text?: string;
|
|
50
|
+
title?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
/**
|
|
53
|
+
* the number of seconds to have in the buffer before dvr is activated
|
|
54
|
+
*/
|
|
55
|
+
seconds_to_dvr?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare namespace Configs {
|
|
59
|
+
export {
|
|
60
|
+
BitOpts,
|
|
61
|
+
FlowplayerCustomElementRegistry,
|
|
62
|
+
Config,
|
|
63
|
+
CustomConfig,
|
|
64
|
+
PluginConfig
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare type ConfigWith<T> = Configs.Config & T;
|
|
69
|
+
|
|
70
|
+
declare type CustomConfig<T> = Config & T;
|
|
71
|
+
|
|
72
|
+
/* Excluded from this release type: DashConfig */
|
|
73
|
+
|
|
74
|
+
declare type DashSettings = MediaSettings & {
|
|
75
|
+
drm: ProtectionDataSet;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
declare type DeviceId = string;
|
|
79
|
+
|
|
80
|
+
declare class DRM implements Plugin_2 {
|
|
81
|
+
init(config: DRMConfig, _: PlayerRoot, player: DRMPlayer): void;
|
|
82
|
+
hls_drm(player: DRMPlayer, config: DRMConfig, drm_config?: DRMSourceConfiguration): void;
|
|
83
|
+
dash_drm(player: DRMPlayer, config: DRMConfig, drm_config?: DRMSourceConfiguration): void;
|
|
84
|
+
}
|
|
85
|
+
export default DRM;
|
|
86
|
+
|
|
87
|
+
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
88
|
+
|
|
89
|
+
declare type DRMConfig = ConfigWith<{
|
|
90
|
+
hls?: Partial<HlsConfig>;
|
|
91
|
+
dash?: Partial<DashConfig>;
|
|
92
|
+
}>;
|
|
93
|
+
|
|
94
|
+
declare type DRMConfiguration = {
|
|
95
|
+
license_server: string;
|
|
96
|
+
http_headers?: Record<string, string>;
|
|
97
|
+
certificate?: string;
|
|
98
|
+
vendor?: string | DRMVendorImplementation;
|
|
99
|
+
request_media_key_system_access_function?: MediaKeyFunc;
|
|
100
|
+
query_params?: Record<string, string>;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
declare type DRMPlayer = Player & {
|
|
104
|
+
webkitSetMediaKeys(key: WebKitMediaKeys): void;
|
|
105
|
+
webkitKeys: WebKitMediaKeys;
|
|
106
|
+
on: (event: "src", handler: (e: FPEvent<SourceObj>) => void) => DRMPlayer;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type DRMSourceConfiguration = {
|
|
110
|
+
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
declare type DRMVendorImplementation = {
|
|
114
|
+
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
115
|
+
fairplay_request_license: (url: string, params: {
|
|
116
|
+
message: any;
|
|
117
|
+
assetId: string;
|
|
118
|
+
}, cb: (license_data: Uint8Array) => void) => void;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
declare type EventHandler = (ev: any) => void;
|
|
122
|
+
|
|
123
|
+
declare type FlowplayerCustomElementRegistry = Map<string, string>;
|
|
124
|
+
|
|
125
|
+
declare interface FPEvent<T> extends CustomEvent<T> {
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated
|
|
128
|
+
the data attribute has been migrated to details to match the CustomEvent spec
|
|
129
|
+
more info: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
|
130
|
+
*/
|
|
131
|
+
data?: T;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare type JSONPlayer = any;
|
|
135
|
+
|
|
136
|
+
declare type KeyValue = Record<string, any>;
|
|
137
|
+
|
|
138
|
+
declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue> extends Plugin_2<PluginOwnConfig> {
|
|
139
|
+
onload<T = KeyValue>(config: PluginConfig<T>, root: PlayerRoot, video: Player, src?: SourceObj): void;
|
|
140
|
+
wants<S = SourceObj, T = KeyValue>(srcString: SourceStr, srcObj: S, config: PluginConfig<T>): boolean;
|
|
141
|
+
wants<S = KeyValue, T = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: PluginConfig<T>): boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare interface Player extends HTMLVideoElement {
|
|
145
|
+
renderPlugin: (pluginContainer: HTMLElement) => void;
|
|
146
|
+
toggleDisable: (flag: boolean) => void;
|
|
147
|
+
original_src: string;
|
|
148
|
+
root: PlayerRoot;
|
|
149
|
+
playerState: Record<string, boolean>;
|
|
150
|
+
reaper: Map<string, any> | 0;
|
|
151
|
+
hasState(state: PlayerState): boolean;
|
|
152
|
+
transitionState(to: PlayerState, from: PlayerState, timer?: number): void;
|
|
153
|
+
togglePlay(on?: boolean): Promise<void>;
|
|
154
|
+
toggleFullScreen(on?: boolean, state_only?: boolean): void;
|
|
155
|
+
toggleMute(on?: boolean): void;
|
|
156
|
+
destroy(): void;
|
|
157
|
+
render(): void;
|
|
158
|
+
render(component: string, args: any[]): void;
|
|
159
|
+
createComponents(...args: string[]): HTMLElement[];
|
|
160
|
+
setOpts(config: Config): void;
|
|
161
|
+
setSrc(sources: UnsafeSource): Player;
|
|
162
|
+
on<T>(event: string | string[], handler: (e: FPEvent<T>) => void): Player;
|
|
163
|
+
once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
164
|
+
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
165
|
+
poll<T>(event: string, data?: T): FPEvent<T>;
|
|
166
|
+
emit<T>(event: string, data?: T): Player;
|
|
167
|
+
setAttrs(attrs: Config): Player;
|
|
168
|
+
opt<T>(key: string, fallback?: T): T;
|
|
169
|
+
enqueueSeek(offset: number): any;
|
|
170
|
+
setState(state: string, flag: boolean): Player;
|
|
171
|
+
toJSON(): JSONPlayer;
|
|
172
|
+
i18n(k: string, fallback?: string): string;
|
|
173
|
+
deviceId(): DeviceId;
|
|
174
|
+
live_state: {
|
|
175
|
+
dvr?: boolean;
|
|
176
|
+
dvr_window?: number;
|
|
177
|
+
};
|
|
178
|
+
opts: Config;
|
|
179
|
+
plugins: Array<Plugin_2 | Loader>;
|
|
180
|
+
dvr_offset?: number;
|
|
181
|
+
message?: {
|
|
182
|
+
events: Record<string, string>;
|
|
183
|
+
};
|
|
184
|
+
disabled: boolean;
|
|
185
|
+
started?: boolean;
|
|
186
|
+
token: string;
|
|
187
|
+
tracks?: VideoTrack[];
|
|
188
|
+
_customElements: FlowplayerCustomElementRegistry;
|
|
189
|
+
_storage: Storage;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare type PlayerRoot = HTMLElement & {
|
|
193
|
+
prevWidth?: number;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
declare type PlayerState = string;
|
|
197
|
+
|
|
198
|
+
declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
|
|
199
|
+
/**
|
|
200
|
+
* a plugin must always implement the init method so a player instance knows how to initialize it
|
|
201
|
+
*/
|
|
202
|
+
init<T>(config: PluginConfig<T>, container: PlayerRoot, player: Player): void;
|
|
203
|
+
init(config: PluginConfig<PluginOwnConfig>, container: PlayerRoot, player: Player): void;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare type PluginConfig<T> = Config & T;
|
|
207
|
+
|
|
208
|
+
declare type SourceObj = {
|
|
209
|
+
src?: SourceStr;
|
|
210
|
+
type?: string;
|
|
211
|
+
drm?: DRMSourceConfiguration;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
declare type SourceStr = string;
|
|
215
|
+
|
|
216
|
+
declare type SourceWith<T> = SourceObj & T;
|
|
217
|
+
|
|
218
|
+
declare type UnsafeSource = SourceStr | SourceObj | Array<SourceStr | SourceObj>;
|
|
219
|
+
|
|
220
|
+
declare interface VideoTrack {
|
|
221
|
+
name: string;
|
|
222
|
+
data: any;
|
|
223
|
+
default: boolean;
|
|
224
|
+
selected: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare interface WebKitMediaKeyError {
|
|
228
|
+
code: number;
|
|
229
|
+
systemCode: number;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
declare interface WebKitMediaKeys {
|
|
233
|
+
keySystem: string;
|
|
234
|
+
createSession(mimeType: string, cert: Uint8Array): WebKitMediaKeySession;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare interface WebKitMediaKeySession extends EventTarget {
|
|
238
|
+
error: WebKitMediaKeyError;
|
|
239
|
+
keySystem: string;
|
|
240
|
+
onwebkitkeyadded: EventHandler;
|
|
241
|
+
onwebkitkeyerror: EventHandler;
|
|
242
|
+
onwebkitkeymessage: EventHandler;
|
|
243
|
+
sessionId: string;
|
|
244
|
+
close: () => void;
|
|
245
|
+
update: (key: Uint8Array) => void;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export { }
|