@flowplayer/player 3.14.1 → 3.15.0-rc.10
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/events.d.ts +575 -68
- package/core/events.js +286 -34
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/flowplayer.css +1 -1
- package/index.d.ts +1480 -91
- package/package.json +1 -1
- package/plugins/ads.d.ts +3744 -112
- package/plugins/ads.js +1 -1
- package/plugins/airplay.d.ts +1440 -116
- package/plugins/airplay.js +1 -1
- package/plugins/analytics.d.ts +1409 -82
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +1409 -82
- package/plugins/asel.js +1 -1
- package/plugins/audio.d.ts +1409 -82
- package/plugins/audio.js +1 -1
- package/plugins/chapters.d.ts +1409 -82
- package/plugins/chapters.js +1 -1
- package/plugins/chromecast.d.ts +1464 -80
- package/plugins/chromecast.js +1 -1
- package/plugins/comscore.d.ts +1409 -82
- package/plugins/consent.d.ts +1409 -82
- package/plugins/consent.js +1 -1
- package/plugins/context-menu.d.ts +1443 -116
- package/plugins/cuepoints.d.ts +1443 -116
- package/plugins/cuepoints.js +1 -1
- package/plugins/dash.d.ts +1445 -115
- package/plugins/dash.js +1 -1
- package/plugins/drm.d.ts +1409 -82
- package/plugins/drm.js +1 -1
- package/plugins/endscreen.d.ts +1442 -115
- package/plugins/endscreen.js +1 -1
- package/plugins/fas.d.ts +1409 -82
- package/plugins/float-on-scroll.d.ts +1443 -116
- package/plugins/float-on-scroll.js +1 -1
- package/plugins/ga4.d.ts +1409 -82
- package/plugins/gemius.d.ts +1439 -112
- package/plugins/google-analytics.d.ts +1409 -82
- package/plugins/health.d.ts +1435 -107
- package/plugins/health.js +1 -1
- package/plugins/hls.d.ts +1431 -104
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +1409 -82
- package/plugins/id3.js +1 -1
- package/plugins/iframe.d.ts +1440 -116
- package/plugins/iframe.js +1 -1
- package/plugins/keyboard.d.ts +1409 -82
- package/plugins/media-session.d.ts +1409 -82
- package/plugins/message.d.ts +1409 -82
- package/plugins/message.js +1 -1
- package/plugins/ovp.d.ts +1435 -110
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.d.ts +1409 -82
- package/plugins/playlist.js +1 -1
- package/plugins/preview.d.ts +1409 -82
- package/plugins/preview.js +1 -1
- package/plugins/qsel.d.ts +1409 -82
- package/plugins/qsel.js +1 -1
- package/plugins/qul.d.ts +1441 -114
- package/plugins/qul.js +1 -1
- package/plugins/rts.d.ts +1409 -82
- package/plugins/rts.js +1 -1
- package/plugins/share.d.ts +1409 -82
- package/plugins/share.js +1 -1
- package/plugins/speed.d.ts +1434 -107
- package/plugins/speed.js +1 -1
- package/plugins/ssai.d.ts +1412 -82
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +1426 -102
- package/plugins/thumbnails.d.ts +1434 -107
- package/plugins/thumbnails.js +1 -1
- package/plugins/tizen.d.ts +1409 -82
- package/plugins/tizen.js +1 -1
- package/plugins/vtsel.d.ts +1409 -82
- package/plugins/vtsel.js +1 -1
- package/plugins/webos.d.ts +1409 -82
- package/plugins/webos.js +1 -1
- package/util/loader.d.ts +1436 -101
- package/util/loader.js +13 -2
package/plugins/airplay.d.ts
CHANGED
|
@@ -1,38 +1,59 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import type { BitrateInfo } from 'dashjs';
|
|
1
4
|
import type { HlsConfig } from 'hls.js';
|
|
2
5
|
import type { MediaKeyFunc } from 'hls.js';
|
|
3
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Airplay plugin for Safari and AppleTV
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
declare const Airplay: PluginCtor<AirplayConfig, AirplayPlayer>;
|
|
12
|
+
export default Airplay;
|
|
13
|
+
|
|
4
14
|
/**
|
|
5
15
|
* @public
|
|
6
16
|
* This type is used to extend the Player configuration with the Airplay plugin configuration.
|
|
7
17
|
*/
|
|
8
|
-
export declare type AirplayConfig = {
|
|
18
|
+
export declare type AirplayConfig = ConfigWith<{
|
|
9
19
|
/**
|
|
10
20
|
* The Airplay plugin does not have any configuration options.
|
|
11
21
|
*/
|
|
12
22
|
airplay?: never;
|
|
13
|
-
}
|
|
23
|
+
}>;
|
|
14
24
|
|
|
15
25
|
/* Excluded from this release type: _AirplayConfig */
|
|
16
26
|
|
|
17
27
|
/**
|
|
18
28
|
* @public
|
|
19
29
|
*/
|
|
20
|
-
export declare type AirplayPlayer = {
|
|
30
|
+
export declare type AirplayPlayer = PlayerWith<{
|
|
21
31
|
airplay?: never;
|
|
22
|
-
}
|
|
32
|
+
}>;
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
* Airplay plugin for Safari and AppleTV
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
declare const AirplayPlugin: PluginCtor<AirplayConfig, AirplayPlayer>;
|
|
29
|
-
export default AirplayPlugin;
|
|
34
|
+
/* Excluded from this release type: AnyLoader */
|
|
30
35
|
|
|
31
36
|
declare type ArrayToIntersection<T extends Array<unknown>> = T extends [
|
|
32
37
|
infer Current,
|
|
33
38
|
...infer Remaining
|
|
34
39
|
] ? Current & ArrayToIntersection<Remaining> : unknown;
|
|
35
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Each loader must
|
|
43
|
+
*/
|
|
44
|
+
declare type _AttachedEventCheck = {
|
|
45
|
+
on(event: `${string}:attached`, handler: (e: FPEvent<unknown>) => void): Player;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/* Excluded from this release type: AUDIO_ONLY_SOURCE */
|
|
49
|
+
|
|
50
|
+
/* Excluded from this release type: AudioOnlySourceEventDetail */
|
|
51
|
+
|
|
52
|
+
declare const AUTOPLAY = "is-autoplay";
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
36
57
|
declare type Autoplay = BitOpts | boolean;
|
|
37
58
|
|
|
38
59
|
declare enum AutoplayOpts {
|
|
@@ -41,19 +62,60 @@ declare enum AutoplayOpts {
|
|
|
41
62
|
AUDIO_REQUIRED = 2
|
|
42
63
|
}
|
|
43
64
|
|
|
44
|
-
|
|
65
|
+
/* Excluded from this release type: BEFORE_PAUSE */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: BEFORE_PLAY */
|
|
45
68
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
/**
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
declare type BeforePauseEventDetail = {
|
|
73
|
+
forced: boolean;
|
|
49
74
|
};
|
|
50
75
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
/**
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
declare type BeforePlayEventDetail = {
|
|
80
|
+
forced: boolean;
|
|
81
|
+
};
|
|
56
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
declare type BitOpts = number;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
declare const /**
|
|
92
|
+
@public
|
|
93
|
+
* when a new player is inserted into the HTML
|
|
94
|
+
*/ /**
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
CAN_PLAY = "canplay";
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
declare const /**
|
|
103
|
+
@public
|
|
104
|
+
* when a new player is inserted into the HTML
|
|
105
|
+
*/ /**
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
CLICK = "click";
|
|
109
|
+
|
|
110
|
+
/* Excluded from this release type: Component */
|
|
111
|
+
|
|
112
|
+
/* Excluded from this release type: Components */
|
|
113
|
+
|
|
114
|
+
/* Excluded from this release type: CONFIG */
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
57
119
|
declare interface Config {
|
|
58
120
|
src?: UnsafeSource;
|
|
59
121
|
preload?: "none" | "metadata" | "auto";
|
|
@@ -63,7 +125,7 @@ declare interface Config {
|
|
|
63
125
|
autopause?: boolean;
|
|
64
126
|
rewind?: boolean;
|
|
65
127
|
loop?: boolean;
|
|
66
|
-
seamless
|
|
128
|
+
/* Excluded from this release type: seamless */
|
|
67
129
|
retry?: boolean;
|
|
68
130
|
autoplay?: Autoplay;
|
|
69
131
|
start_quality?: BitOpts;
|
|
@@ -71,10 +133,7 @@ declare interface Config {
|
|
|
71
133
|
poster?: string;
|
|
72
134
|
disabled?: boolean;
|
|
73
135
|
muted?: boolean;
|
|
74
|
-
|
|
75
|
-
* is src handled by one of plugins loaders
|
|
76
|
-
*/
|
|
77
|
-
is_native?: boolean;
|
|
136
|
+
/* Excluded from this release type: is_native */
|
|
78
137
|
/**
|
|
79
138
|
* bitflags for UI options
|
|
80
139
|
*/
|
|
@@ -83,10 +142,7 @@ declare interface Config {
|
|
|
83
142
|
* your user access token
|
|
84
143
|
*/
|
|
85
144
|
token?: string;
|
|
86
|
-
|
|
87
|
-
* manually configured duration for pre-rendering usually
|
|
88
|
-
*/
|
|
89
|
-
duration?: number;
|
|
145
|
+
/* Excluded from this release type: duration */
|
|
90
146
|
/**
|
|
91
147
|
* can the content be seeked to any position
|
|
92
148
|
*/
|
|
@@ -104,12 +160,120 @@ declare interface Config {
|
|
|
104
160
|
seconds_to_dvr?: number;
|
|
105
161
|
}
|
|
106
162
|
|
|
163
|
+
/* Excluded from this release type: ConfigEventDetail */
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
107
168
|
declare type ConfigWith<T> = Config & T;
|
|
108
169
|
|
|
109
|
-
|
|
170
|
+
/* Excluded from this release type: CONTENT_REAL_LOAD_START */
|
|
110
171
|
|
|
172
|
+
/**
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
declare const /**
|
|
176
|
+
@public
|
|
177
|
+
* when a new player is inserted into the HTML
|
|
178
|
+
*/ /**
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
CONTEXT_MENU = "contextmenu";
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
declare type ContextMenuEventDetail = null;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @public
|
|
190
|
+
* when a cuepoint becomes inactive
|
|
191
|
+
*/
|
|
192
|
+
declare const /**
|
|
193
|
+
@public
|
|
194
|
+
* when a new player is inserted into the HTML
|
|
195
|
+
*/ /**
|
|
196
|
+
* @public
|
|
197
|
+
* when a cuepoint becomes inactive
|
|
198
|
+
*/
|
|
199
|
+
CUEPOINT_END = "cuepointend";
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @public
|
|
203
|
+
* when a cuepoint is active
|
|
204
|
+
*/
|
|
205
|
+
declare const /**
|
|
206
|
+
@public
|
|
207
|
+
* when a new player is inserted into the HTML
|
|
208
|
+
*/ /**
|
|
209
|
+
* @public
|
|
210
|
+
* when a cuepoint is active
|
|
211
|
+
*/
|
|
212
|
+
CUEPOINT_START = "cuepointstart";
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
declare type CuePointEndEventDetail = null;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @public
|
|
221
|
+
* cuepoints parsing is asynchronous
|
|
222
|
+
* you cannot rely on them existing until
|
|
223
|
+
* this event is emitted
|
|
224
|
+
*/
|
|
225
|
+
declare const /**
|
|
226
|
+
@public
|
|
227
|
+
* when a new player is inserted into the HTML
|
|
228
|
+
*/ /**
|
|
229
|
+
* @public
|
|
230
|
+
* cuepoints parsing is asynchronous
|
|
231
|
+
* you cannot rely on them existing until
|
|
232
|
+
* this event is emitted
|
|
233
|
+
*/
|
|
234
|
+
CUEPOINTS = "cuepoints";
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
declare type CuePointStartEventDetail = null;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
declare const /**
|
|
245
|
+
@public
|
|
246
|
+
* when a new player is inserted into the HTML
|
|
247
|
+
*/ /**
|
|
248
|
+
* @public
|
|
249
|
+
*/
|
|
250
|
+
DATA = "loadeddata";
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @public
|
|
254
|
+
*/
|
|
255
|
+
declare const /**
|
|
256
|
+
@public
|
|
257
|
+
* when a new player is inserted into the HTML
|
|
258
|
+
*/ /**
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
DBL_CLICK = "dblclick";
|
|
262
|
+
|
|
263
|
+
declare const DESTROYED = "is-destroyed";
|
|
264
|
+
|
|
265
|
+
/* Excluded from this release type: DeviceId */
|
|
266
|
+
|
|
267
|
+
declare const DISABLED = "is-disabled";
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @public
|
|
271
|
+
*/
|
|
111
272
|
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
112
273
|
|
|
274
|
+
/**
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
113
277
|
declare type DRMConfiguration = {
|
|
114
278
|
license_server: string;
|
|
115
279
|
http_headers?: Record<string, string>;
|
|
@@ -119,10 +283,16 @@ declare type DRMConfiguration = {
|
|
|
119
283
|
query_params?: Record<string, string>;
|
|
120
284
|
};
|
|
121
285
|
|
|
286
|
+
/**
|
|
287
|
+
* @public
|
|
288
|
+
*/
|
|
122
289
|
declare type DRMSourceConfiguration = {
|
|
123
290
|
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
124
291
|
};
|
|
125
292
|
|
|
293
|
+
/**
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
126
296
|
declare type DRMVendorImplementation = {
|
|
127
297
|
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
128
298
|
fairplay_request_license: (url: string, params: {
|
|
@@ -131,41 +301,229 @@ declare type DRMVendorImplementation = {
|
|
|
131
301
|
}, cb: (license_data: Uint8Array) => void) => void;
|
|
132
302
|
};
|
|
133
303
|
|
|
304
|
+
/**
|
|
305
|
+
* @public
|
|
306
|
+
*/
|
|
307
|
+
declare const /**
|
|
308
|
+
@public
|
|
309
|
+
* when a new player is inserted into the HTML
|
|
310
|
+
*/ /**
|
|
311
|
+
* @public
|
|
312
|
+
*/
|
|
313
|
+
DURATION_CHANGE = "durationchange";
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @public
|
|
317
|
+
* when the player has started playing dvr content
|
|
318
|
+
*/
|
|
319
|
+
declare const /**
|
|
320
|
+
@public
|
|
321
|
+
* when a new player is inserted into the HTML
|
|
322
|
+
*/ /**
|
|
323
|
+
* @public
|
|
324
|
+
* when the player has started playing dvr content
|
|
325
|
+
*/
|
|
326
|
+
DVR = "dvr";
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @public
|
|
330
|
+
*/
|
|
331
|
+
declare type DvrEventDetail = number;
|
|
332
|
+
|
|
333
|
+
declare const ENDED = "is-ended";
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
338
|
+
declare const /**
|
|
339
|
+
@public
|
|
340
|
+
* when a new player is inserted into the HTML
|
|
341
|
+
*/ /**
|
|
342
|
+
* @public
|
|
343
|
+
*/
|
|
344
|
+
ENDED_2 = "ended";
|
|
345
|
+
|
|
346
|
+
declare type EnsureOnAttached<P extends Function, T extends Player> = ExtractPureAPI<T> extends _AttachedEventCheck ? P : "Loaders must implement on('<pluginname>:attached') event";
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* @public
|
|
350
|
+
*/
|
|
351
|
+
declare const /**
|
|
352
|
+
@public
|
|
353
|
+
* when a new player is inserted into the HTML
|
|
354
|
+
*/ /**
|
|
355
|
+
* @public
|
|
356
|
+
*/
|
|
357
|
+
ERROR = "error";
|
|
358
|
+
|
|
359
|
+
declare const ERRORED = "is-error";
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @public
|
|
363
|
+
*/
|
|
364
|
+
declare type ErrorEventDetail = {
|
|
365
|
+
src?: string;
|
|
366
|
+
type?: string;
|
|
367
|
+
code?: number | string;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
/* Excluded from this release type: _ErrorEventDetail */
|
|
371
|
+
|
|
372
|
+
declare namespace events {
|
|
373
|
+
export {
|
|
374
|
+
MOUNT,
|
|
375
|
+
ERROR,
|
|
376
|
+
CONTEXT_MENU,
|
|
377
|
+
CLICK,
|
|
378
|
+
DBL_CLICK,
|
|
379
|
+
KEYUP,
|
|
380
|
+
KEYDOWN,
|
|
381
|
+
LOAD,
|
|
382
|
+
MOUSE_ENTER,
|
|
383
|
+
MOUSE_LEAVE,
|
|
384
|
+
MOUSE_UP,
|
|
385
|
+
MOUSE_DOWN,
|
|
386
|
+
MOUSE_MOVE,
|
|
387
|
+
TOUCH_START,
|
|
388
|
+
TOUCH_MOVE,
|
|
389
|
+
TOUCH_END,
|
|
390
|
+
TOUCH_CANCEL,
|
|
391
|
+
RESIZE,
|
|
392
|
+
SCROLL,
|
|
393
|
+
FULLSCREEN_ENTER,
|
|
394
|
+
FULLSCREEN_EXIT,
|
|
395
|
+
FULLSCREEN_CHANGE,
|
|
396
|
+
METADATA,
|
|
397
|
+
DATA,
|
|
398
|
+
PROGRESS,
|
|
399
|
+
TIME_UPDATE,
|
|
400
|
+
LOAD_START,
|
|
401
|
+
VOLUME_CHANGE,
|
|
402
|
+
PAUSE,
|
|
403
|
+
PLAYING_2 as PLAYING,
|
|
404
|
+
PLAY,
|
|
405
|
+
WAITING_2 as WAITING,
|
|
406
|
+
CAN_PLAY,
|
|
407
|
+
ENDED_2 as ENDED,
|
|
408
|
+
SEEKED,
|
|
409
|
+
SEEKING_2 as SEEKING,
|
|
410
|
+
DURATION_CHANGE,
|
|
411
|
+
CUEPOINTS,
|
|
412
|
+
CUEPOINT_START,
|
|
413
|
+
CUEPOINT_END,
|
|
414
|
+
VIEW_ENTER,
|
|
415
|
+
VIEW_LEAVE,
|
|
416
|
+
SOURCE,
|
|
417
|
+
REAP,
|
|
418
|
+
QUALITIES,
|
|
419
|
+
VIDEO_TRACKS,
|
|
420
|
+
SET_QUALITY,
|
|
421
|
+
VIDEO_TRACK_SELECT,
|
|
422
|
+
RECOMMENDATIONS_READY,
|
|
423
|
+
LANDSCAPE,
|
|
424
|
+
PORTRAIT,
|
|
425
|
+
DVR,
|
|
426
|
+
LIVE_2 as LIVE
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
declare type ExtractPureAPI<T> = T extends PlayerWith<infer PureAPI> ? PureAPI : never;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* @public
|
|
434
|
+
*/
|
|
134
435
|
declare type FlowplayerCustomElementRegistry = Map<string, string>;
|
|
135
436
|
|
|
437
|
+
/**
|
|
438
|
+
* @public
|
|
439
|
+
*/
|
|
440
|
+
declare type FlowplayerStates = typeof states;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @public
|
|
444
|
+
*/
|
|
136
445
|
declare interface FlowplayerUMD extends FlowplayerUMDBase {
|
|
446
|
+
/**
|
|
447
|
+
* Configure flowplayer and display it in the UI
|
|
448
|
+
* @param selector - query selector of the HTML element where player will render
|
|
449
|
+
* @param config - configuration of flowplayer
|
|
450
|
+
*/
|
|
137
451
|
(selector: string, config?: Config): Player;
|
|
452
|
+
/**
|
|
453
|
+
* Configure flowplayer and display it in the UI
|
|
454
|
+
* @param element - HTML element where player will render
|
|
455
|
+
* @param config - configuration of flowplayer
|
|
456
|
+
*/
|
|
138
457
|
(element: HTMLElement, config?: Config): Player;
|
|
458
|
+
/**
|
|
459
|
+
* Configure flowplayer and display it in the UI
|
|
460
|
+
* @param selector - query selector of the HTML element where player will render
|
|
461
|
+
* @param config - configuration of flowplayer
|
|
462
|
+
*/
|
|
139
463
|
<T>(selector: string, config?: ConfigWith<T>): Player;
|
|
464
|
+
/**
|
|
465
|
+
* Configure flowplayer and display it in the UI
|
|
466
|
+
* @param element - HTML element where player will render
|
|
467
|
+
* @param config - configuration of flowplayer
|
|
468
|
+
*/
|
|
140
469
|
<T>(element: HTMLElement, config?: ConfigWith<T>): Player;
|
|
470
|
+
/**
|
|
471
|
+
* Register plugins in flowplayer
|
|
472
|
+
* @returns flowplayer instance with registered plugins
|
|
473
|
+
*/
|
|
141
474
|
<PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<ConfigWith<MergeConfigs<PluginCtors>>, PlayerWith<MergePlayerAPIExtensions<PluginCtors>>>;
|
|
142
475
|
}
|
|
143
476
|
|
|
144
477
|
declare interface FlowplayerUMDBase {
|
|
478
|
+
/**
|
|
479
|
+
* All player instances on the page
|
|
480
|
+
*/
|
|
145
481
|
instances: Player[];
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
482
|
+
/**
|
|
483
|
+
* Flowplayer core events
|
|
484
|
+
*/
|
|
485
|
+
events: typeof events;
|
|
486
|
+
/**
|
|
487
|
+
* Flowplayer ui states map
|
|
488
|
+
*/
|
|
489
|
+
states: FlowplayerStates;
|
|
152
490
|
quality: typeof QualityOpts;
|
|
491
|
+
autoplay: typeof AutoplayOpts;
|
|
153
492
|
commit: string;
|
|
154
493
|
version: string;
|
|
494
|
+
/**
|
|
495
|
+
* Flowplayer's custom element registry
|
|
496
|
+
*/
|
|
155
497
|
customElements: FlowplayerCustomElementRegistry;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
498
|
+
/* Excluded from this release type: extensions */
|
|
499
|
+
/* Excluded from this release type: defaultElements */
|
|
500
|
+
/* Excluded from this release type: components */
|
|
501
|
+
/* Excluded from this release type: support */
|
|
502
|
+
/* Excluded from this release type: jwt */
|
|
503
|
+
/* Excluded from this release type: loaders */
|
|
162
504
|
}
|
|
163
505
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
506
|
+
/**
|
|
507
|
+
* @public
|
|
508
|
+
*/
|
|
509
|
+
declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config, PluginPlayer extends Player = Player> extends FlowplayerUMDBase {
|
|
510
|
+
/**
|
|
511
|
+
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
512
|
+
* @param selector - query selector of the HTML element where player will render
|
|
513
|
+
* @param config - Configuration of the flowplayer and the attached plugins
|
|
514
|
+
*/
|
|
515
|
+
(selector: string, config?: ConfigWithPlugins): PluginPlayer;
|
|
516
|
+
/**
|
|
517
|
+
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
518
|
+
* @param element - HTML element where player will render
|
|
519
|
+
* @param config - Configuration of the flowplayer and the attached plugins
|
|
520
|
+
*/
|
|
521
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PluginPlayer;
|
|
167
522
|
}
|
|
168
523
|
|
|
524
|
+
/**
|
|
525
|
+
* @public
|
|
526
|
+
*/
|
|
169
527
|
declare interface FPEvent<T> extends CustomEvent<T> {
|
|
170
528
|
/**
|
|
171
529
|
* @deprecated
|
|
@@ -175,120 +533,1086 @@ declare interface FPEvent<T> extends CustomEvent<T> {
|
|
|
175
533
|
data?: T;
|
|
176
534
|
}
|
|
177
535
|
|
|
178
|
-
|
|
536
|
+
declare const FULLSCREEN = "is-fullscreen";
|
|
179
537
|
|
|
180
|
-
|
|
538
|
+
/**
|
|
539
|
+
* @public
|
|
540
|
+
*/
|
|
541
|
+
declare const /**
|
|
542
|
+
@public
|
|
543
|
+
* when a new player is inserted into the HTML
|
|
544
|
+
*/ /**
|
|
545
|
+
* @public
|
|
546
|
+
*/
|
|
547
|
+
FULLSCREEN_CHANGE = "fullscreenchange";
|
|
181
548
|
|
|
182
|
-
|
|
549
|
+
/**
|
|
550
|
+
* @public
|
|
551
|
+
*/
|
|
552
|
+
declare const /**
|
|
553
|
+
@public
|
|
554
|
+
* when a new player is inserted into the HTML
|
|
555
|
+
*/ /**
|
|
556
|
+
* @public
|
|
557
|
+
*/
|
|
558
|
+
FULLSCREEN_ENTER = "fullscreenenter";
|
|
183
559
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
560
|
+
/**
|
|
561
|
+
* @public
|
|
562
|
+
*/
|
|
563
|
+
declare const /**
|
|
564
|
+
@public
|
|
565
|
+
* when a new player is inserted into the HTML
|
|
566
|
+
*/ /**
|
|
567
|
+
* @public
|
|
568
|
+
*/
|
|
569
|
+
FULLSCREEN_EXIT = "fullscreenexit";
|
|
189
570
|
|
|
190
|
-
declare
|
|
191
|
-
[PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
|
|
192
|
-
};
|
|
571
|
+
declare const GRABBING = "is-grabbing";
|
|
193
572
|
|
|
194
|
-
declare
|
|
195
|
-
[PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer _uConfigType, infer PlayerAPIExtension> ? PlayerAPIExtension : never;
|
|
196
|
-
};
|
|
573
|
+
declare const HAS_POSTER = "has-poster";
|
|
197
574
|
|
|
198
|
-
|
|
575
|
+
/* Excluded from this release type: HLSConfig */
|
|
199
576
|
|
|
200
|
-
declare
|
|
577
|
+
declare const HOVERED = "is-hovered";
|
|
201
578
|
|
|
202
|
-
declare
|
|
203
|
-
renderPlugin: (pluginContainer: HTMLElement) => void;
|
|
204
|
-
toggleDisable: (flag: boolean) => void;
|
|
205
|
-
original_src: string;
|
|
206
|
-
root: PlayerRoot;
|
|
207
|
-
playerState: Record<string, boolean>;
|
|
208
|
-
reaper: Map<string, any> | 0;
|
|
209
|
-
hasState(state: PlayerState): boolean;
|
|
210
|
-
transitionState(to: PlayerState, from: PlayerState, timer?: number): void;
|
|
211
|
-
togglePlay(on?: boolean): Promise<void>;
|
|
212
|
-
toggleFullScreen(on?: boolean, state_only?: boolean): void;
|
|
213
|
-
toggleMute(on?: boolean): void;
|
|
214
|
-
destroy(): void;
|
|
215
|
-
render(): void;
|
|
216
|
-
render(component: string, args: any[]): void;
|
|
217
|
-
createComponents(...args: string[]): HTMLElement[];
|
|
218
|
-
setOpts(config: Config): void;
|
|
219
|
-
setSrc(sources: UnsafeSource): Player;
|
|
220
|
-
on<T>(event: string | string[], handler: (e: FPEvent<T>) => void): Player;
|
|
221
|
-
once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
222
|
-
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
223
|
-
poll<T>(event: string, data?: T): FPEvent<T>;
|
|
224
|
-
emit<T>(event: string, data?: T): Player;
|
|
225
|
-
setAttrs(attrs: Config): Player;
|
|
226
|
-
opt<T>(key: string, fallback?: T): T;
|
|
227
|
-
enqueueSeek(offset: number): any;
|
|
228
|
-
setState(state: string, flag: boolean): Player;
|
|
229
|
-
toJSON(): JSONPlayer;
|
|
230
|
-
i18n(k: string, fallback?: string): string;
|
|
231
|
-
deviceId(): DeviceId;
|
|
232
|
-
live_state: {
|
|
233
|
-
dvr?: boolean;
|
|
234
|
-
dvr_window?: number;
|
|
235
|
-
};
|
|
236
|
-
opts: Config;
|
|
237
|
-
plugins: Array<Plugin_2 | Loader>;
|
|
238
|
-
dvr_offset?: number;
|
|
239
|
-
message?: {
|
|
240
|
-
events: Record<string, string>;
|
|
241
|
-
};
|
|
242
|
-
disabled: boolean;
|
|
243
|
-
started?: boolean;
|
|
244
|
-
token: string;
|
|
245
|
-
tracks?: VideoTrack[];
|
|
246
|
-
_customElements: FlowplayerCustomElementRegistry;
|
|
247
|
-
_storage: Storage;
|
|
248
|
-
}
|
|
579
|
+
declare const IN_VIEWPORT = "is-in-viewport";
|
|
249
580
|
|
|
250
|
-
|
|
251
|
-
prevWidth?: number;
|
|
252
|
-
};
|
|
581
|
+
/* Excluded from this release type: INTERSECTIONCHANGE */
|
|
253
582
|
|
|
254
|
-
|
|
583
|
+
/* Excluded from this release type: IntersectionChangeEventDetail */
|
|
255
584
|
|
|
585
|
+
declare const IS_SOURCE_PROCESSING = "is-source-processing";
|
|
586
|
+
|
|
587
|
+
declare type JSONPlayer = any;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* @public
|
|
591
|
+
*/
|
|
592
|
+
declare const /**
|
|
593
|
+
@public
|
|
594
|
+
* when a new player is inserted into the HTML
|
|
595
|
+
*/ /**
|
|
596
|
+
* @public
|
|
597
|
+
*/
|
|
598
|
+
KEYDOWN = "keydown";
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* @public
|
|
602
|
+
*/
|
|
603
|
+
declare const /**
|
|
604
|
+
@public
|
|
605
|
+
* when a new player is inserted into the HTML
|
|
606
|
+
*/ /**
|
|
607
|
+
* @public
|
|
608
|
+
*/
|
|
609
|
+
KEYUP = "keyup";
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* @public
|
|
613
|
+
*/
|
|
614
|
+
declare type KeyValue = Record<string, any>;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @public
|
|
618
|
+
*/
|
|
619
|
+
declare const /**
|
|
620
|
+
@public
|
|
621
|
+
* when a new player is inserted into the HTML
|
|
622
|
+
*/ /**
|
|
623
|
+
* @public
|
|
624
|
+
*/
|
|
625
|
+
LANDSCAPE = "landscape";
|
|
626
|
+
|
|
627
|
+
declare const LIVE = "is-live";
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* @public
|
|
631
|
+
* when src is a livestream
|
|
632
|
+
*/
|
|
633
|
+
declare const /**
|
|
634
|
+
@public
|
|
635
|
+
* when a new player is inserted into the HTML
|
|
636
|
+
*/ /**
|
|
637
|
+
* @public
|
|
638
|
+
* when src is a livestream
|
|
639
|
+
*/
|
|
640
|
+
LIVE_2 = "live";
|
|
641
|
+
|
|
642
|
+
declare const LIVE_SEEKED = "is-live-seeked";
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @public
|
|
646
|
+
*/
|
|
647
|
+
declare type LiveEventDetail = null;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* @public
|
|
651
|
+
*/
|
|
652
|
+
declare const /**
|
|
653
|
+
@public
|
|
654
|
+
* when a new player is inserted into the HTML
|
|
655
|
+
*/ /**
|
|
656
|
+
* @public
|
|
657
|
+
*/
|
|
658
|
+
LOAD = "load";
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* @public
|
|
662
|
+
*/
|
|
663
|
+
declare const /**
|
|
664
|
+
@public
|
|
665
|
+
* when a new player is inserted into the HTML
|
|
666
|
+
*/ /**
|
|
667
|
+
* @public
|
|
668
|
+
*/
|
|
669
|
+
LOAD_START = "loadstart";
|
|
670
|
+
|
|
671
|
+
declare const LOADED = "is-loaded";
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* @public A plugin that supports loading new media formats. Use 'class MyPlugin implements Loader\<...\>' when writing your custom Loader
|
|
675
|
+
* @typeParam PluginPlayer- Player API that will be implemented by the loader. Loader at least must implement on(\<loader-name\>:attached, ...) event handler
|
|
676
|
+
*/
|
|
677
|
+
declare interface Loader<PluginOwnConfig extends KeyValue, // FIXME extends Config
|
|
678
|
+
PluginPlayer extends PlayerWith<_AttachedEventCheck>> extends Plugin_2<PluginOwnConfig, PluginPlayer> {
|
|
679
|
+
onload: EnsureOnAttached<(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayer>, src: SourceObj) => void, PluginPlayer>;
|
|
680
|
+
wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
|
|
681
|
+
wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
declare const LOADING = "is-loading";
|
|
685
|
+
|
|
686
|
+
declare type MapToConfigs<Arr extends PluginCtor[]> = {
|
|
687
|
+
[PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<ConfigWith<infer ConfigType>> ? ConfigType : never;
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
declare type MapToPlayerApiExtensions<Arr extends PluginCtor[]> = {
|
|
691
|
+
[PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer _uConfigType, PlayerWith<infer PlayerAPIExtension>> ? PlayerAPIExtension : never;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
declare const MENU_OPENED = "has-menu-opened";
|
|
695
|
+
|
|
696
|
+
declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
|
|
697
|
+
|
|
698
|
+
declare type MergePlayerAPIExtensions<Arr extends PluginCtor[]> = ArrayToIntersection<MapToPlayerApiExtensions<Arr>>;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* @public
|
|
702
|
+
* general video events flowplayer uses internally
|
|
703
|
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
|
|
704
|
+
*/
|
|
705
|
+
declare const /**
|
|
706
|
+
@public
|
|
707
|
+
* when a new player is inserted into the HTML
|
|
708
|
+
*/ /**
|
|
709
|
+
* @public
|
|
710
|
+
* general video events flowplayer uses internally
|
|
711
|
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
|
|
712
|
+
*/
|
|
713
|
+
METADATA = "loadedmetadata";
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
@public
|
|
717
|
+
* when a new player is inserted into the HTML
|
|
718
|
+
*/
|
|
719
|
+
declare const /**
|
|
720
|
+
@public
|
|
721
|
+
* when a new player is inserted into the HTML
|
|
722
|
+
*/ /**
|
|
723
|
+
@public
|
|
724
|
+
* when a new player is inserted into the HTML
|
|
725
|
+
*/ MOUNT = "mount";
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* @public
|
|
729
|
+
*/
|
|
730
|
+
declare type MountEventDetail = null;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* @public
|
|
734
|
+
*/
|
|
735
|
+
declare const /**
|
|
736
|
+
@public
|
|
737
|
+
* when a new player is inserted into the HTML
|
|
738
|
+
*/ /**
|
|
739
|
+
* @public
|
|
740
|
+
*/
|
|
741
|
+
MOUSE_DOWN = "mousedown";
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* @public
|
|
745
|
+
*/
|
|
746
|
+
declare const /**
|
|
747
|
+
@public
|
|
748
|
+
* when a new player is inserted into the HTML
|
|
749
|
+
*/ /**
|
|
750
|
+
* @public
|
|
751
|
+
*/
|
|
752
|
+
MOUSE_ENTER = "mouseenter";
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @public
|
|
756
|
+
*/
|
|
757
|
+
declare const /**
|
|
758
|
+
@public
|
|
759
|
+
* when a new player is inserted into the HTML
|
|
760
|
+
*/ /**
|
|
761
|
+
* @public
|
|
762
|
+
*/
|
|
763
|
+
MOUSE_LEAVE = "mouseleave";
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* @public
|
|
767
|
+
*/
|
|
768
|
+
declare const /**
|
|
769
|
+
@public
|
|
770
|
+
* when a new player is inserted into the HTML
|
|
771
|
+
*/ /**
|
|
772
|
+
* @public
|
|
773
|
+
*/
|
|
774
|
+
MOUSE_MOVE = "mousemove";
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @public
|
|
778
|
+
*/
|
|
779
|
+
declare const /**
|
|
780
|
+
@public
|
|
781
|
+
* when a new player is inserted into the HTML
|
|
782
|
+
*/ /**
|
|
783
|
+
* @public
|
|
784
|
+
*/
|
|
785
|
+
MOUSE_UP = "mouseup";
|
|
786
|
+
|
|
787
|
+
declare const MUTED = "is-muted";
|
|
788
|
+
|
|
789
|
+
declare const NO_CONTROLS = "no-controls";
|
|
790
|
+
|
|
791
|
+
declare const NO_DVR = "no-timeline";
|
|
792
|
+
|
|
793
|
+
/* Excluded from this release type: NON_RECOVERABLE_ERROR */
|
|
794
|
+
|
|
795
|
+
/* Excluded from this release type: NonRecoverableErrorEventDetail */
|
|
796
|
+
|
|
797
|
+
/* Excluded from this release type: NQState */
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* @public
|
|
801
|
+
*/
|
|
802
|
+
declare type OVPMetadata = {
|
|
803
|
+
player_id?: string;
|
|
804
|
+
media_id?: string;
|
|
805
|
+
ad_keywords?: string;
|
|
806
|
+
title?: string;
|
|
807
|
+
description?: string;
|
|
808
|
+
category_name?: string;
|
|
809
|
+
duration?: number;
|
|
810
|
+
tags?: string;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* @public
|
|
815
|
+
*/
|
|
816
|
+
declare const /**
|
|
817
|
+
@public
|
|
818
|
+
* when a new player is inserted into the HTML
|
|
819
|
+
*/ /**
|
|
820
|
+
* @public
|
|
821
|
+
*/
|
|
822
|
+
PAUSE = "pause";
|
|
823
|
+
|
|
824
|
+
declare const PAUSED = "is-paused";
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* @public
|
|
828
|
+
*/
|
|
829
|
+
declare const /**
|
|
830
|
+
@public
|
|
831
|
+
* when a new player is inserted into the HTML
|
|
832
|
+
*/ /**
|
|
833
|
+
* @public
|
|
834
|
+
*/
|
|
835
|
+
PLAY = "play";
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* @public
|
|
839
|
+
*/
|
|
840
|
+
declare type Player = HTMLVideoElement & PlayerEventOverloads & {
|
|
841
|
+
/* Excluded from this release type: renderPlugin */
|
|
842
|
+
/**
|
|
843
|
+
* Disables and enables the player.
|
|
844
|
+
* @param flag -Forces disabled mode (true) or enabled mode (false). Disabled player cannot be seeked forward.
|
|
845
|
+
*/
|
|
846
|
+
toggleDisable: (flag?: boolean) => void;
|
|
847
|
+
/* Excluded from this release type: original_src */
|
|
848
|
+
/**
|
|
849
|
+
* The root element of the video player. This is the immediate parent element of the video tag.
|
|
850
|
+
*/
|
|
851
|
+
root: PlayerRoot;
|
|
852
|
+
/* Excluded from this release type: playerState */
|
|
853
|
+
/* Excluded from this release type: reaper */
|
|
854
|
+
/* Excluded from this release type: hasState */
|
|
855
|
+
/* Excluded from this release type: transitionState */
|
|
856
|
+
/**
|
|
857
|
+
* Toggles between playing and paused mode.
|
|
858
|
+
* @param on - Forces the playback (true) or paused state (false). Use this for initial playback of a source configured with setSrc() and when changing the state.
|
|
859
|
+
*/
|
|
860
|
+
togglePlay(on?: boolean): Promise<void>;
|
|
861
|
+
/* Excluded from this release type: toggleFullScreen */
|
|
862
|
+
/**
|
|
863
|
+
* @public
|
|
864
|
+
* Toggles between normal and fullscreen mode. The optional flag attribute forces the normal sized (false) or fullscreen (false) mode.
|
|
865
|
+
* The custom fullscreenenter and fullscreenexit events are sent respectively.
|
|
866
|
+
*/
|
|
867
|
+
toggleFullScreen(on?: boolean): void;
|
|
868
|
+
/* Excluded from this release type: toggleMute */
|
|
869
|
+
/**
|
|
870
|
+
* Toggles between muted and original volume level.
|
|
871
|
+
*/
|
|
872
|
+
toggleMute(): void;
|
|
873
|
+
/**
|
|
874
|
+
* Removes a Flowplayer instance from `flowplayer.instances` and emits the `flowplayer.events.REAP` event, enabling cleanup of unsafe resources.
|
|
875
|
+
*/
|
|
876
|
+
destroy(): void;
|
|
877
|
+
/* Excluded from this release type: render */
|
|
878
|
+
/* Excluded from this release type: render */
|
|
879
|
+
createComponents(...args: string[]): HTMLElement[];
|
|
880
|
+
/**
|
|
881
|
+
* Adds or changes configuration object. Usually used in conjunction with `setSrc()`. You can use all top-level config options like `subtitle:` , `logo:`, `ima:` etc.
|
|
882
|
+
* @example
|
|
883
|
+
* ```
|
|
884
|
+
* setOpts({
|
|
885
|
+
* subtitles:{
|
|
886
|
+
* tracks:[
|
|
887
|
+
* {
|
|
888
|
+
* src: "1.vtt",
|
|
889
|
+
* label: "English",
|
|
890
|
+
* default: true
|
|
891
|
+
* }, {
|
|
892
|
+
* src: "2.vtt",
|
|
893
|
+
* label: "Spanish",
|
|
894
|
+
* default : false }]},
|
|
895
|
+
* logo: "https://myserver.com/logo.png"
|
|
896
|
+
* })
|
|
897
|
+
* ```
|
|
898
|
+
*/
|
|
899
|
+
setOpts(config: Config): void;
|
|
900
|
+
/**
|
|
901
|
+
* Sets the video source to be played. The src attribute can be a string or an object similar to the src property.
|
|
902
|
+
*/
|
|
903
|
+
setSrc(sources: UnsafeSource): void;
|
|
904
|
+
/* Excluded from this release type: setSrc */
|
|
905
|
+
/* Excluded from this release type: setAttrs */
|
|
906
|
+
/* Excluded from this release type: opt */
|
|
907
|
+
/* Excluded from this release type: enqueueSeek */
|
|
908
|
+
/* Excluded from this release type: setState */
|
|
909
|
+
setState(state: PlayerState, flag: boolean): void;
|
|
910
|
+
/* Excluded from this release type: toJSON */
|
|
911
|
+
/**
|
|
912
|
+
* Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
|
|
913
|
+
*/
|
|
914
|
+
i18n(k: string, fallback?: string): string;
|
|
915
|
+
/* Excluded from this release type: deviceId */
|
|
916
|
+
/* Excluded from this release type: live_state */
|
|
917
|
+
/**
|
|
918
|
+
* A reference to the configuration state of the player.
|
|
919
|
+
*/
|
|
920
|
+
opts: Config;
|
|
921
|
+
/* Excluded from this release type: plugins */
|
|
922
|
+
/* Excluded from this release type: dvr_offset */
|
|
923
|
+
message?: {
|
|
924
|
+
events: Record<string, string>;
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* A boolean specifying whether the player is disabled and the user cannot seek forward using the mouse or keyboard.
|
|
928
|
+
* Player is disabled and enabled with the `toggleDisable()` method.
|
|
929
|
+
*/
|
|
930
|
+
disabled: boolean;
|
|
931
|
+
/* Excluded from this release type: started */
|
|
932
|
+
/* Excluded from this release type: token */
|
|
933
|
+
tracks?: VideoTrack[];
|
|
934
|
+
/* Excluded from this release type: _customElements */
|
|
935
|
+
/* Excluded from this release type: _storage */
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
|
|
939
|
+
|
|
940
|
+
declare type PlayerCustomEventsDetailMap = {
|
|
941
|
+
[MOUNT]: MountEventDetail;
|
|
942
|
+
[ERROR]: ErrorEventDetail;
|
|
943
|
+
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
944
|
+
/* Excluded from this release type: beforeplay */
|
|
945
|
+
/* Excluded from this release type: beforepause */
|
|
946
|
+
/* Excluded from this release type: state */
|
|
947
|
+
[CUEPOINT_START]: CuePointStartEventDetail;
|
|
948
|
+
[CUEPOINT_END]: CuePointEndEventDetail;
|
|
949
|
+
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
950
|
+
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
951
|
+
[SOURCE]: SourceEventDetail;
|
|
952
|
+
/* Excluded from this release type: recover */
|
|
953
|
+
[REAP]: ReapEventDetail;
|
|
954
|
+
/* Excluded from this release type: config */
|
|
955
|
+
[QUALITIES]: QualitiesEventDetail;
|
|
956
|
+
/* Excluded from this release type: "error:fatal" */
|
|
957
|
+
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
958
|
+
/* Excluded from this release type: audioonlysource */
|
|
959
|
+
/* Excluded from this release type: renderplugin */
|
|
960
|
+
[DVR]: DvrEventDetail;
|
|
961
|
+
[LIVE_2]: LiveEventDetail;
|
|
962
|
+
/* Excluded from this release type: "seek:queued" */
|
|
963
|
+
/* Excluded from this release type: "seek:cancel" */
|
|
964
|
+
/* Excluded from this release type: "plugin:registered" */
|
|
965
|
+
/* Excluded from this release type: intersectionchange */
|
|
966
|
+
/* Excluded from this release type: retry */
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
declare type PlayerCustomEventsOverloads = {
|
|
970
|
+
/**
|
|
971
|
+
* Sent when the player interface is completely rendered and you can access all the elements with CSS and JavaScript. Due to the way mounting works, this event is only accessible inside of a custom extension.
|
|
972
|
+
*/
|
|
973
|
+
on(event: typeof MOUNT, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof MOUNT]>) => void): Player;
|
|
974
|
+
/**
|
|
975
|
+
* Sent when an error occurs. Learn more about error handling.
|
|
976
|
+
*/
|
|
977
|
+
on(event: typeof ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof ERROR]>) => void): Player;
|
|
978
|
+
on(// FIXME - this event is in context-menu plugin
|
|
979
|
+
event: typeof CONTEXT_MENU, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CONTEXT_MENU]>) => void): Player;
|
|
980
|
+
/* Excluded from this release type: on */
|
|
981
|
+
/* Excluded from this release type: on */
|
|
982
|
+
/* Excluded from this release type: on */
|
|
983
|
+
/**
|
|
984
|
+
* TODO - move to Cuepoints? Sent when a configured cuepoint is entered.
|
|
985
|
+
*/
|
|
986
|
+
on(event: typeof CUEPOINT_START, // TODO: move to Cuepoints
|
|
987
|
+
handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CUEPOINT_START]>) => void): Player;
|
|
988
|
+
/**
|
|
989
|
+
* Sent when a configured cuepoint is terminated.
|
|
990
|
+
*/
|
|
991
|
+
on(event: typeof CUEPOINT_END, // TODO: move to Cuepoints
|
|
992
|
+
handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CUEPOINT_END]>) => void): Player;
|
|
993
|
+
/**
|
|
994
|
+
* Sent when the player becomes visible for the user.
|
|
995
|
+
*/
|
|
996
|
+
on(event: typeof VIEW_ENTER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_ENTER]>) => void): Player;
|
|
997
|
+
/**
|
|
998
|
+
* Sent when the player leaves the users viewport and is longer visible.
|
|
999
|
+
*/
|
|
1000
|
+
on(event: typeof VIEW_LEAVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_LEAVE]>) => void): Player;
|
|
1001
|
+
/**
|
|
1002
|
+
* Sent right before the player src attribute is set. This allows you to change the video URL before playback.
|
|
1003
|
+
*/
|
|
1004
|
+
on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
|
|
1005
|
+
/* Excluded from this release type: on */
|
|
1006
|
+
/**
|
|
1007
|
+
* Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
|
|
1008
|
+
*/
|
|
1009
|
+
on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
|
|
1010
|
+
/* Excluded from this release type: on */
|
|
1011
|
+
/**
|
|
1012
|
+
* Emitted when the set of underlying qualities has changed.
|
|
1013
|
+
*/
|
|
1014
|
+
on(event: typeof QUALITIES, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITIES]>) => void): Player;
|
|
1015
|
+
/* Excluded from this release type: on */
|
|
1016
|
+
/**
|
|
1017
|
+
* Listen to this event to create a recommendations grid using the data passed with the event.
|
|
1018
|
+
*/
|
|
1019
|
+
on(event: typeof RECOMMENDATIONS_READY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOMMENDATIONS_READY]>) => void): Player;
|
|
1020
|
+
/* Excluded from this release type: on */
|
|
1021
|
+
/* Excluded from this release type: on */
|
|
1022
|
+
/**
|
|
1023
|
+
* when the player has started playing dvr content
|
|
1024
|
+
*/
|
|
1025
|
+
on(event: typeof DVR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof DVR]>) => void): Player;
|
|
1026
|
+
/**
|
|
1027
|
+
* when src is a livestream
|
|
1028
|
+
*/
|
|
1029
|
+
on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
|
|
1030
|
+
/* Excluded from this release type: on */
|
|
1031
|
+
/* Excluded from this release type: on */
|
|
1032
|
+
/* Excluded from this release type: on */
|
|
1033
|
+
/* Excluded from this release type: on */
|
|
1034
|
+
/* Excluded from this release type: on */
|
|
1035
|
+
on<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1036
|
+
/* Excluded from this release type: on */
|
|
1037
|
+
/**
|
|
1038
|
+
* Same as `on()`, but the handler function is executed only once.
|
|
1039
|
+
*/
|
|
1040
|
+
once<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
|
|
1041
|
+
/**
|
|
1042
|
+
* Same as `on()`, but the handler function is executed only once.
|
|
1043
|
+
*/
|
|
1044
|
+
once<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
|
|
1045
|
+
once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1046
|
+
/**
|
|
1047
|
+
* Removes the event handler with the specified event type.
|
|
1048
|
+
*/
|
|
1049
|
+
off<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
|
|
1050
|
+
/**
|
|
1051
|
+
* Removes the event handler with the specified event type.
|
|
1052
|
+
*/
|
|
1053
|
+
off<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
|
|
1054
|
+
/**
|
|
1055
|
+
* Removes the event handler with the specified event type.
|
|
1056
|
+
*/
|
|
1057
|
+
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1058
|
+
/* Excluded from this release type: poll */
|
|
1059
|
+
emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1060
|
+
/* Excluded from this release type: emit */
|
|
1061
|
+
emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
|
|
1065
|
+
|
|
1066
|
+
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
1067
|
+
|
|
1068
|
+
declare type PlayerNativeEventsDetailMap = Omit<HTMLVideoElementEventMap, "error">;
|
|
1069
|
+
|
|
1070
|
+
declare type PlayerNativeEventsOverloads = {
|
|
1071
|
+
on<K extends keyof PlayerNativeEventsDetailMap>(event: K, handler: (ev: PlayerNativeEventsDetailMap[K]) => void): Player;
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* @public
|
|
1076
|
+
* The root element of the video player. This is the immediate parent element of the video tag.
|
|
1077
|
+
*/
|
|
1078
|
+
declare type PlayerRoot = HTMLElement & {
|
|
1079
|
+
/* Excluded from this release type: prevWidth */
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* @public
|
|
1084
|
+
*/
|
|
1085
|
+
declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
1086
|
+
|
|
1087
|
+
/* Excluded from this release type: _PlayerState */
|
|
1088
|
+
|
|
1089
|
+
/* Excluded from this release type: PlayerStates */
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* @public
|
|
1093
|
+
*/
|
|
256
1094
|
declare type PlayerWith<T> = T & Player;
|
|
257
1095
|
|
|
258
|
-
declare
|
|
1096
|
+
declare const PLAYING = "is-playing";
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* @public
|
|
1100
|
+
*/
|
|
1101
|
+
declare const /**
|
|
1102
|
+
@public
|
|
1103
|
+
* when a new player is inserted into the HTML
|
|
1104
|
+
*/ /**
|
|
1105
|
+
* @public
|
|
1106
|
+
*/
|
|
1107
|
+
PLAYING_2 = "playing";
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* @public
|
|
1111
|
+
*/
|
|
1112
|
+
declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
259
1113
|
/**
|
|
260
1114
|
* a plugin must always implement the init method so a player instance knows how to initialize it
|
|
261
1115
|
*/
|
|
262
|
-
init(config:
|
|
1116
|
+
init(config: PluginConfig, container: PlayerRoot, player: PluginPlayer): void;
|
|
263
1117
|
}
|
|
264
1118
|
|
|
265
|
-
|
|
266
|
-
|
|
1119
|
+
/* Excluded from this release type: PLUGIN_REGISTERED */
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* @public
|
|
1123
|
+
*/
|
|
1124
|
+
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1125
|
+
new (umd: FlowplayerUMD, player: PluginPlayer): Plugin_2<PluginConfig, PluginPlayer>;
|
|
267
1126
|
}
|
|
268
1127
|
|
|
1128
|
+
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
1129
|
+
|
|
1130
|
+
declare type PluginStates = string;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* @public
|
|
1134
|
+
*/
|
|
1135
|
+
declare const /**
|
|
1136
|
+
@public
|
|
1137
|
+
* when a new player is inserted into the HTML
|
|
1138
|
+
*/ /**
|
|
1139
|
+
* @public
|
|
1140
|
+
*/
|
|
1141
|
+
PORTRAIT = "portrait";
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* @public
|
|
1145
|
+
*/
|
|
1146
|
+
declare const /**
|
|
1147
|
+
@public
|
|
1148
|
+
* when a new player is inserted into the HTML
|
|
1149
|
+
*/ /**
|
|
1150
|
+
* @public
|
|
1151
|
+
*/
|
|
1152
|
+
PROGRESS = "progress";
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* @public
|
|
1156
|
+
* emitted whenever a list of qualities has been made available
|
|
1157
|
+
* when index 0 is the highest quality and index 0+N is the lowest
|
|
1158
|
+
*/
|
|
1159
|
+
declare const /**
|
|
1160
|
+
@public
|
|
1161
|
+
* when a new player is inserted into the HTML
|
|
1162
|
+
*/ /**
|
|
1163
|
+
* @public
|
|
1164
|
+
* emitted whenever a list of qualities has been made available
|
|
1165
|
+
* when index 0 is the highest quality and index 0+N is the lowest
|
|
1166
|
+
*/
|
|
1167
|
+
QUALITIES = "qualities";
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* @public
|
|
1171
|
+
*/
|
|
1172
|
+
declare type QualitiesEventDetail = QualityDetail[];
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* @public
|
|
1176
|
+
*/
|
|
1177
|
+
declare type QualityDetail = {
|
|
1178
|
+
level: number;
|
|
1179
|
+
text: string;
|
|
1180
|
+
width: number;
|
|
1181
|
+
height: number;
|
|
1182
|
+
videoCodec: string;
|
|
1183
|
+
} | BitrateInfo | {
|
|
1184
|
+
text: string | number;
|
|
1185
|
+
encodingId: string;
|
|
1186
|
+
spatialLayerId: number;
|
|
1187
|
+
temporalLayerId: number;
|
|
1188
|
+
maxSpatialLayerId: number;
|
|
1189
|
+
maxTemporalLayerId: number;
|
|
1190
|
+
height: number;
|
|
1191
|
+
width: number;
|
|
1192
|
+
};
|
|
1193
|
+
|
|
269
1194
|
declare enum QualityOpts {
|
|
270
1195
|
LOW = 1,
|
|
271
1196
|
MEDIUM = 2,
|
|
272
1197
|
HIGH = 4
|
|
273
1198
|
}
|
|
274
1199
|
|
|
1200
|
+
/**
|
|
1201
|
+
* @public
|
|
1202
|
+
* emitted when it is safe to clean up a fp instance
|
|
1203
|
+
*/
|
|
1204
|
+
declare const /**
|
|
1205
|
+
@public
|
|
1206
|
+
* when a new player is inserted into the HTML
|
|
1207
|
+
*/ /**
|
|
1208
|
+
* @public
|
|
1209
|
+
* emitted when it is safe to clean up a fp instance
|
|
1210
|
+
*/
|
|
1211
|
+
REAP = "reap";
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* @public
|
|
1215
|
+
*/
|
|
1216
|
+
declare type ReapEventDetail = null;
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* @public
|
|
1220
|
+
*/
|
|
1221
|
+
declare type RecommendationItem = {
|
|
1222
|
+
poster?: string;
|
|
1223
|
+
src?: UnsafeSource;
|
|
1224
|
+
title?: string;
|
|
1225
|
+
description?: string;
|
|
1226
|
+
metadata: OVPMetadata;
|
|
1227
|
+
chapters?: {
|
|
1228
|
+
src: string;
|
|
1229
|
+
};
|
|
1230
|
+
thumbnails?: {
|
|
1231
|
+
src: string;
|
|
1232
|
+
};
|
|
1233
|
+
subtitles?: string[];
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* @public
|
|
1238
|
+
*/
|
|
1239
|
+
declare const /**
|
|
1240
|
+
@public
|
|
1241
|
+
* when a new player is inserted into the HTML
|
|
1242
|
+
*/ /**
|
|
1243
|
+
* @deprecated please use Endscreen.events.RECOMMENDATIONS_READY / flowplayer.endscreen.events.RECOMMENDATIONS_READY
|
|
1244
|
+
**/
|
|
1245
|
+
/**
|
|
1246
|
+
* @public
|
|
1247
|
+
*/
|
|
1248
|
+
RECOMMENDATIONS_READY = "recommendationsready";
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* @public
|
|
1252
|
+
*/
|
|
1253
|
+
declare type RecommendationsReadyEventDetail = {
|
|
1254
|
+
playlist: RecommendationItem[];
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
/* Excluded from this release type: RECOVER */
|
|
1258
|
+
|
|
1259
|
+
/* Excluded from this release type: RecoverEventDetail */
|
|
1260
|
+
|
|
1261
|
+
/* Excluded from this release type: REMOTE_SESSION_ENDED */
|
|
1262
|
+
|
|
1263
|
+
/* Excluded from this release type: REMOTE_SESSION_STARTED */
|
|
1264
|
+
|
|
1265
|
+
/* Excluded from this release type: RENDER_PLUGIN */
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* @public
|
|
1269
|
+
*/
|
|
1270
|
+
declare type RenderPluginEventDetail = HTMLElement;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* @public
|
|
1274
|
+
*/
|
|
1275
|
+
declare const /**
|
|
1276
|
+
@public
|
|
1277
|
+
* when a new player is inserted into the HTML
|
|
1278
|
+
*/ /**
|
|
1279
|
+
* @public
|
|
1280
|
+
*/
|
|
1281
|
+
RESIZE = "resize";
|
|
1282
|
+
|
|
1283
|
+
/* Excluded from this release type: RETRY */
|
|
1284
|
+
|
|
1285
|
+
/* Excluded from this release type: RetryEventDetail */
|
|
1286
|
+
|
|
1287
|
+
declare const RTL = "is-rtl";
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* @public
|
|
1291
|
+
*/
|
|
1292
|
+
declare const /**
|
|
1293
|
+
@public
|
|
1294
|
+
* when a new player is inserted into the HTML
|
|
1295
|
+
*/ /**
|
|
1296
|
+
* @public
|
|
1297
|
+
*/
|
|
1298
|
+
SCROLL = "scroll";
|
|
1299
|
+
|
|
1300
|
+
declare const SEAMLESS = "is-seamless";
|
|
1301
|
+
|
|
1302
|
+
/* Excluded from this release type: SEEK_CANCEL */
|
|
1303
|
+
|
|
1304
|
+
/* Excluded from this release type: SEEK_QUEUED */
|
|
1305
|
+
|
|
1306
|
+
declare const SEEKABLE = "is-seekable";
|
|
1307
|
+
|
|
1308
|
+
/* Excluded from this release type: SeekCancelEventDetail */
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* @public
|
|
1312
|
+
*/
|
|
1313
|
+
declare const /**
|
|
1314
|
+
@public
|
|
1315
|
+
* when a new player is inserted into the HTML
|
|
1316
|
+
*/ /**
|
|
1317
|
+
* @public
|
|
1318
|
+
*/
|
|
1319
|
+
SEEKED = "seeked";
|
|
1320
|
+
|
|
1321
|
+
declare const SEEKING = "is-seeking";
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* @public
|
|
1325
|
+
*/
|
|
1326
|
+
declare const /**
|
|
1327
|
+
@public
|
|
1328
|
+
* when a new player is inserted into the HTML
|
|
1329
|
+
*/ /**
|
|
1330
|
+
* @public
|
|
1331
|
+
*/
|
|
1332
|
+
SEEKING_2 = "seeking";
|
|
1333
|
+
|
|
1334
|
+
/* Excluded from this release type: SeekQueuedEventDetail */
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* @public
|
|
1338
|
+
* allows plugins to listen for forced quality changes
|
|
1339
|
+
* it should emit the index of the quality to set
|
|
1340
|
+
* -1 is a special idx saying to use ABR if the plugin
|
|
1341
|
+
* exposes an ABR implementation
|
|
1342
|
+
*/
|
|
1343
|
+
declare const /**
|
|
1344
|
+
@public
|
|
1345
|
+
* when a new player is inserted into the HTML
|
|
1346
|
+
*/ /**
|
|
1347
|
+
* @public
|
|
1348
|
+
* allows plugins to listen for forced quality changes
|
|
1349
|
+
* it should emit the index of the quality to set
|
|
1350
|
+
* -1 is a special idx saying to use ABR if the plugin
|
|
1351
|
+
* exposes an ABR implementation
|
|
1352
|
+
*/
|
|
1353
|
+
SET_QUALITY = "quality:set";
|
|
1354
|
+
|
|
1355
|
+
declare const SMALL = "is-small";
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* @public
|
|
1359
|
+
* emitted when a valid source is found prior to mounting
|
|
1360
|
+
*/
|
|
1361
|
+
declare const /**
|
|
1362
|
+
@public
|
|
1363
|
+
* when a new player is inserted into the HTML
|
|
1364
|
+
*/ /**
|
|
1365
|
+
* @public
|
|
1366
|
+
* emitted when a valid source is found prior to mounting
|
|
1367
|
+
*/
|
|
1368
|
+
SOURCE = "src";
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* @public
|
|
1372
|
+
*/
|
|
1373
|
+
declare type SourceEventDetail = SourceObj;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* @public
|
|
1377
|
+
*/
|
|
275
1378
|
declare type SourceObj = {
|
|
276
1379
|
src?: SourceStr;
|
|
1380
|
+
/**
|
|
1381
|
+
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1382
|
+
*/
|
|
277
1383
|
type?: string;
|
|
278
1384
|
drm?: DRMSourceConfiguration;
|
|
279
1385
|
};
|
|
280
1386
|
|
|
1387
|
+
/**
|
|
1388
|
+
* @public
|
|
1389
|
+
*/
|
|
281
1390
|
declare type SourceStr = string;
|
|
282
1391
|
|
|
1392
|
+
/**
|
|
1393
|
+
* @public
|
|
1394
|
+
*/
|
|
283
1395
|
declare type SourceWith<T> = SourceObj & T;
|
|
284
1396
|
|
|
1397
|
+
declare const STARTING = "is-starting";
|
|
1398
|
+
|
|
1399
|
+
/* Excluded from this release type: STATE */
|
|
1400
|
+
|
|
1401
|
+
/* Excluded from this release type: StateEventDetail */
|
|
1402
|
+
|
|
1403
|
+
declare namespace states {
|
|
1404
|
+
export {
|
|
1405
|
+
PLAYING,
|
|
1406
|
+
FULLSCREEN,
|
|
1407
|
+
PAUSED,
|
|
1408
|
+
MUTED,
|
|
1409
|
+
LOADED,
|
|
1410
|
+
LOADING,
|
|
1411
|
+
STARTING,
|
|
1412
|
+
SEEKING,
|
|
1413
|
+
GRABBING,
|
|
1414
|
+
DISABLED,
|
|
1415
|
+
SMALL,
|
|
1416
|
+
TINY,
|
|
1417
|
+
RTL,
|
|
1418
|
+
TV,
|
|
1419
|
+
ENDED,
|
|
1420
|
+
LIVE,
|
|
1421
|
+
ERRORED,
|
|
1422
|
+
WAITING,
|
|
1423
|
+
AUTOPLAY,
|
|
1424
|
+
SEAMLESS,
|
|
1425
|
+
TOGGLING,
|
|
1426
|
+
LIVE_SEEKED,
|
|
1427
|
+
NO_DVR,
|
|
1428
|
+
HAS_POSTER,
|
|
1429
|
+
WILL_PLAY,
|
|
1430
|
+
WILL_PAUSE,
|
|
1431
|
+
MENU_OPENED,
|
|
1432
|
+
TOUCHED,
|
|
1433
|
+
HOVERED,
|
|
1434
|
+
TOUCH_DEVICE,
|
|
1435
|
+
WILL_SEEK,
|
|
1436
|
+
SEEKABLE,
|
|
1437
|
+
IN_VIEWPORT,
|
|
1438
|
+
NO_CONTROLS,
|
|
1439
|
+
DESTROYED,
|
|
1440
|
+
IS_SOURCE_PROCESSING
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* @public
|
|
1446
|
+
*/
|
|
1447
|
+
declare const /**
|
|
1448
|
+
@public
|
|
1449
|
+
* when a new player is inserted into the HTML
|
|
1450
|
+
*/ /**
|
|
1451
|
+
* @public
|
|
1452
|
+
*/
|
|
1453
|
+
TIME_UPDATE = "timeupdate";
|
|
1454
|
+
|
|
1455
|
+
declare const TINY = "is-tiny";
|
|
1456
|
+
|
|
1457
|
+
declare const TOGGLING = "is-toggling";
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* @public
|
|
1461
|
+
*/
|
|
1462
|
+
declare const /**
|
|
1463
|
+
@public
|
|
1464
|
+
* when a new player is inserted into the HTML
|
|
1465
|
+
*/ /**
|
|
1466
|
+
* @public
|
|
1467
|
+
*/
|
|
1468
|
+
TOUCH_CANCEL = "touchcancel";
|
|
1469
|
+
|
|
1470
|
+
declare const TOUCH_DEVICE = "is-touch-device";
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* @public
|
|
1474
|
+
*/
|
|
1475
|
+
declare const /**
|
|
1476
|
+
@public
|
|
1477
|
+
* when a new player is inserted into the HTML
|
|
1478
|
+
*/ /**
|
|
1479
|
+
* @public
|
|
1480
|
+
*/
|
|
1481
|
+
TOUCH_END = "touchend";
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* @public
|
|
1485
|
+
*/
|
|
1486
|
+
declare const /**
|
|
1487
|
+
@public
|
|
1488
|
+
* when a new player is inserted into the HTML
|
|
1489
|
+
*/ /**
|
|
1490
|
+
* @public
|
|
1491
|
+
*/
|
|
1492
|
+
TOUCH_MOVE = "touchmove";
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* @public
|
|
1496
|
+
*/
|
|
1497
|
+
declare const /**
|
|
1498
|
+
@public
|
|
1499
|
+
* when a new player is inserted into the HTML
|
|
1500
|
+
*/ /**
|
|
1501
|
+
* @public
|
|
1502
|
+
*/
|
|
1503
|
+
TOUCH_START = "touchstart";
|
|
1504
|
+
|
|
1505
|
+
declare const TOUCHED = "is-touched";
|
|
1506
|
+
|
|
1507
|
+
declare const TV = "is-tv";
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* @public
|
|
1511
|
+
*/
|
|
285
1512
|
declare type UnsafeSource = SourceStr | SourceObj | Array<SourceStr | SourceObj>;
|
|
286
1513
|
|
|
1514
|
+
/**
|
|
1515
|
+
* @public
|
|
1516
|
+
* emitted when a video track is selected
|
|
1517
|
+
*/
|
|
1518
|
+
declare const /**
|
|
1519
|
+
@public
|
|
1520
|
+
* when a new player is inserted into the HTML
|
|
1521
|
+
*/ /**
|
|
1522
|
+
* @public
|
|
1523
|
+
* emitted when a video track is selected
|
|
1524
|
+
*/
|
|
1525
|
+
VIDEO_TRACK_SELECT = "tracks:video:select";
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* @public
|
|
1529
|
+
* emitted whenever multiple video tracks are detected
|
|
1530
|
+
*/
|
|
1531
|
+
declare const /**
|
|
1532
|
+
@public
|
|
1533
|
+
* when a new player is inserted into the HTML
|
|
1534
|
+
*/ /**
|
|
1535
|
+
* @public
|
|
1536
|
+
* emitted whenever multiple video tracks are detected
|
|
1537
|
+
*/
|
|
1538
|
+
VIDEO_TRACKS = "videoTracks";
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* @public
|
|
1542
|
+
*/
|
|
287
1543
|
declare interface VideoTrack {
|
|
288
1544
|
name: string;
|
|
289
|
-
|
|
1545
|
+
/* Excluded from this release type: data */
|
|
290
1546
|
default: boolean;
|
|
291
1547
|
selected: boolean;
|
|
292
1548
|
}
|
|
293
1549
|
|
|
1550
|
+
/**
|
|
1551
|
+
* @public
|
|
1552
|
+
* when a player enters the viewpoint
|
|
1553
|
+
*/
|
|
1554
|
+
declare const /**
|
|
1555
|
+
@public
|
|
1556
|
+
* when a new player is inserted into the HTML
|
|
1557
|
+
*/ /**
|
|
1558
|
+
* @public
|
|
1559
|
+
* when a player enters the viewpoint
|
|
1560
|
+
*/
|
|
1561
|
+
VIEW_ENTER = "viewenter";
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* @public
|
|
1565
|
+
* when a player leaves the viewport
|
|
1566
|
+
*/
|
|
1567
|
+
declare const /**
|
|
1568
|
+
@public
|
|
1569
|
+
* when a new player is inserted into the HTML
|
|
1570
|
+
*/ /**
|
|
1571
|
+
* @public
|
|
1572
|
+
* when a player leaves the viewport
|
|
1573
|
+
*/
|
|
1574
|
+
VIEW_LEAVE = "viewleave";
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* @public
|
|
1578
|
+
*/
|
|
1579
|
+
declare type ViewEnterEventDetail = null;
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* @public
|
|
1583
|
+
*/
|
|
1584
|
+
declare type ViewLeaveEventDetail = null;
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* @public
|
|
1588
|
+
*/
|
|
1589
|
+
declare const /**
|
|
1590
|
+
@public
|
|
1591
|
+
* when a new player is inserted into the HTML
|
|
1592
|
+
*/ /**
|
|
1593
|
+
* @public
|
|
1594
|
+
*/
|
|
1595
|
+
VOLUME_CHANGE = "volumechange";
|
|
1596
|
+
|
|
1597
|
+
declare const WAITING = "is-waiting";
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* @public
|
|
1601
|
+
*/
|
|
1602
|
+
declare const /**
|
|
1603
|
+
@public
|
|
1604
|
+
* when a new player is inserted into the HTML
|
|
1605
|
+
*/ /**
|
|
1606
|
+
* @public
|
|
1607
|
+
*/
|
|
1608
|
+
WAITING_2 = "waiting";
|
|
1609
|
+
|
|
1610
|
+
/* Excluded from this release type: WEBKIT_NEEDKEY */
|
|
1611
|
+
|
|
1612
|
+
declare const WILL_PAUSE = "will-pause";
|
|
1613
|
+
|
|
1614
|
+
declare const WILL_PLAY = "will-play";
|
|
1615
|
+
|
|
1616
|
+
declare const WILL_SEEK = "will-seek";
|
|
1617
|
+
|
|
294
1618
|
export { }
|