@flowplayer/player 3.34.3 → 3.35.0-rc
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/flowplayer.css +1 -1
- package/package/core/events.d.ts +710 -0
- package/package/core/events.js +403 -0
- package/package/core.js +1 -0
- package/package/default.js +1 -0
- package/package/embed.js +7 -0
- package/package/flowplayer.css +1 -0
- package/package/index.d.ts +2238 -0
- package/package/plugins/ads.d.ts +4468 -0
- package/package/plugins/ads.js +7 -0
- package/package/plugins/airplay.d.ts +2152 -0
- package/package/plugins/airplay.js +1 -0
- package/package/plugins/analytics.d.ts +2146 -0
- package/package/plugins/analytics.js +1 -0
- package/package/plugins/asel.d.ts +2293 -0
- package/package/plugins/asel.js +1 -0
- package/package/plugins/audio.d.ts +2146 -0
- package/package/plugins/audio.js +1 -0
- package/package/plugins/chapters.d.ts +2155 -0
- package/package/plugins/chapters.js +1 -0
- package/package/plugins/chromecast.d.ts +2221 -0
- package/package/plugins/chromecast.js +1 -0
- package/package/plugins/comscore.d.ts +2146 -0
- package/package/plugins/comscore.js +1 -0
- package/package/plugins/consent.d.ts +2194 -0
- package/package/plugins/consent.js +1 -0
- package/package/plugins/context-menu.d.ts +2160 -0
- package/package/plugins/context-menu.js +1 -0
- package/package/plugins/cuepoints.d.ts +2270 -0
- package/package/plugins/cuepoints.js +1 -0
- package/package/plugins/dash.d.ts +2302 -0
- package/package/plugins/dash.js +2 -0
- package/package/plugins/drm.d.ts +2271 -0
- package/package/plugins/drm.js +1 -0
- package/package/plugins/endscreen.d.ts +2165 -0
- package/package/plugins/endscreen.js +1 -0
- package/package/plugins/fas.d.ts +2200 -0
- package/package/plugins/fas.js +1 -0
- package/package/plugins/float-on-scroll.d.ts +2234 -0
- package/package/plugins/float-on-scroll.js +1 -0
- package/package/plugins/ga4.d.ts +2146 -0
- package/package/plugins/ga4.js +1 -0
- package/package/plugins/gemius.d.ts +2171 -0
- package/package/plugins/gemius.js +1 -0
- package/package/plugins/google-analytics.d.ts +2146 -0
- package/package/plugins/google-analytics.js +1 -0
- package/package/plugins/hls.d.ts +2271 -0
- package/package/plugins/hls.js +1 -0
- package/package/plugins/id3.d.ts +2212 -0
- package/package/plugins/id3.js +1 -0
- package/package/plugins/iframe.d.ts +2147 -0
- package/package/plugins/iframe.js +1 -0
- package/package/plugins/keyboard.d.ts +2146 -0
- package/package/plugins/keyboard.js +1 -0
- package/package/plugins/media-session.d.ts +2146 -0
- package/package/plugins/media-session.js +1 -0
- package/package/plugins/message.d.ts +2205 -0
- package/package/plugins/message.js +1 -0
- package/package/plugins/ovp.d.ts +2208 -0
- package/package/plugins/ovp.js +1 -0
- package/package/plugins/playlist.d.ts +2465 -0
- package/package/plugins/playlist.js +1 -0
- package/package/plugins/preview.d.ts +2236 -0
- package/package/plugins/preview.js +1 -0
- package/package/plugins/qsel.d.ts +2236 -0
- package/package/plugins/qsel.js +1 -0
- package/package/plugins/qul.d.ts +2161 -0
- package/package/plugins/qul.js +1 -0
- package/package/plugins/rts.d.ts +2551 -0
- package/package/plugins/rts.js +25 -0
- package/package/plugins/share.d.ts +2181 -0
- package/package/plugins/share.js +1 -0
- package/package/plugins/speed.d.ts +2173 -0
- package/package/plugins/speed.js +1 -0
- package/package/plugins/ssai.d.ts +2502 -0
- package/package/plugins/ssai.js +7 -0
- package/package/plugins/subtitles.d.ts +2287 -0
- package/package/plugins/subtitles.js +1 -0
- package/package/plugins/thumbnails.d.ts +2164 -0
- package/package/plugins/thumbnails.js +1 -0
- package/package/plugins/tizen.d.ts +2152 -0
- package/package/plugins/tizen.js +1 -0
- package/package/plugins/vtsel.d.ts +2250 -0
- package/package/plugins/vtsel.js +1 -0
- package/package/plugins/webos.d.ts +2152 -0
- package/package/plugins/webos.js +1 -0
- package/package/util/loader.d.ts +2163 -0
- package/package/util/loader.js +63 -0
- package/package.json +2364 -1
- package/plugins/ads.js +1 -1
- package/plugins/analytics.js +1 -1
- package/plugins/ovp.js +1 -1
- package/plugins/rts.js +1 -1
- package/plugins/ssai.js +1 -1
|
@@ -0,0 +1,2551 @@
|
|
|
1
|
+
import type { Get } from 'type-fest';
|
|
2
|
+
import type { Level } from 'hls.js';
|
|
3
|
+
import type { MediaStreamSource } from '@millicast/sdk';
|
|
4
|
+
import type { Paths } from 'type-fest';
|
|
5
|
+
import type { Representation } from 'dashjs';
|
|
6
|
+
import type { Translation } from '@flowplayer/translations';
|
|
7
|
+
import type { TupleToUnion } from 'type-fest';
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AnyLoader */
|
|
10
|
+
|
|
11
|
+
declare type ArrayToIntersection<T extends Array<unknown>> = T extends [
|
|
12
|
+
infer Current,
|
|
13
|
+
...infer Remaining
|
|
14
|
+
] ? Current & ArrayToIntersection<Remaining> : unknown;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Each loader must
|
|
18
|
+
*/
|
|
19
|
+
declare type _AttachedEventCheck = {
|
|
20
|
+
on(event: `${string}:attached`, handler: (e: FPEvent<unknown>) => void): Player;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: AUDIO_ONLY_SOURCE */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: AudioOnlySourceEventDetail */
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Represents the parsed WebRTC statistics collected for an input or output audio & video stream.
|
|
29
|
+
*/
|
|
30
|
+
declare interface AudioVideoCollect<TAudio, TVideo> {
|
|
31
|
+
/** Audio statistics. */
|
|
32
|
+
audio: TAudio[];
|
|
33
|
+
/** Video statistics. */
|
|
34
|
+
video: TVideo[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const AUTOPLAY = "is-autoplay";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
declare type Autoplay = BitOpts | boolean;
|
|
43
|
+
|
|
44
|
+
declare enum AutoplayOpts {
|
|
45
|
+
OFF = 0,
|
|
46
|
+
ON = 1,
|
|
47
|
+
AUDIO_REQUIRED = 2
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Excluded from this release type: BEFORE_PAUSE */
|
|
51
|
+
|
|
52
|
+
/* Excluded from this release type: BEFORE_PLAY */
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
declare type BeforePauseEventDetail = {
|
|
58
|
+
forced: boolean;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
declare type BeforePlayEventDetail = {
|
|
65
|
+
forced: boolean;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
declare type BitOpts = number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
declare const /**
|
|
77
|
+
@public
|
|
78
|
+
* when a new player is inserted into the HTML
|
|
79
|
+
*/ /**
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
CAN_PLAY = "canplay";
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
declare const /**
|
|
88
|
+
@public
|
|
89
|
+
* when a new player is inserted into the HTML
|
|
90
|
+
*/ /**
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
CLICK = "click";
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* For plugins that add new properties to all source types, combine their src-mixins into one SourceObject
|
|
97
|
+
* @example
|
|
98
|
+
* ```
|
|
99
|
+
* type Combined = CombineGlobalSrcExtensions<DRMPlugin, PluginWithFooFieldInSrc> // Combined = SourceObject<DRMConfig & FooFieldConfig>
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
declare type CombineGlobalSrcExtensions<PluginSrcs extends unknown[]> = HasGlobalSrcExtensios<PluginSrcs> extends false ? SourceObj : SourceObj & ArrayToIntersection<PickGlobalSrcExtension<PluginSrcs>>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* For plugins that define a new src type, make a union of all new src.type declarations
|
|
106
|
+
* @example
|
|
107
|
+
* ```
|
|
108
|
+
* type Combined = CombineNewSourceTypes<RTSPlugin, SSAIPlugin> // Combined = DRMConfig | FooFieldConfig
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare type CombineNewSourceTypes<PluginSrcs extends unknown[]> = TupleToUnion<FilterNewSourceTypes<PluginSrcs>>;
|
|
112
|
+
|
|
113
|
+
declare type CombineSrc<PluginSrcs extends unknown[]> = UnsafeSource<CombineGlobalSrcExtensions<PluginSrcs> | (CombineNewSourceTypes<PluginSrcs> & CombineGlobalSrcExtensions<PluginSrcs>)>;
|
|
114
|
+
|
|
115
|
+
/* Excluded from this release type: Component */
|
|
116
|
+
|
|
117
|
+
/* Excluded from this release type: Components */
|
|
118
|
+
|
|
119
|
+
/* Excluded from this release type: CONFIG */
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
declare interface Config {
|
|
125
|
+
src?: UnsafeSource;
|
|
126
|
+
preload?: "none" | "metadata" | "auto";
|
|
127
|
+
controls?: boolean;
|
|
128
|
+
lang?: string;
|
|
129
|
+
start_time?: number;
|
|
130
|
+
autopause?: boolean;
|
|
131
|
+
rewind?: boolean;
|
|
132
|
+
loop?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* an access token for the media
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
playback_token?: string;
|
|
138
|
+
/* Excluded from this release type: seamless */
|
|
139
|
+
retry?: boolean;
|
|
140
|
+
autoplay?: Autoplay;
|
|
141
|
+
start_quality?: BitOpts;
|
|
142
|
+
live?: boolean;
|
|
143
|
+
poster?: string;
|
|
144
|
+
disabled?: boolean;
|
|
145
|
+
muted?: boolean;
|
|
146
|
+
/* Excluded from this release type: is_native */
|
|
147
|
+
/**
|
|
148
|
+
* bitflags for UI options
|
|
149
|
+
*/
|
|
150
|
+
ui?: BitOpts;
|
|
151
|
+
/**
|
|
152
|
+
* your user access token
|
|
153
|
+
*/
|
|
154
|
+
token?: string;
|
|
155
|
+
/* Excluded from this release type: duration */
|
|
156
|
+
/**
|
|
157
|
+
* can the content be seeked to any position
|
|
158
|
+
*/
|
|
159
|
+
seekable?: boolean;
|
|
160
|
+
multiplay?: boolean;
|
|
161
|
+
ratio?: number | string;
|
|
162
|
+
logo?: string;
|
|
163
|
+
logo_href?: string;
|
|
164
|
+
logo_alt_text?: string;
|
|
165
|
+
title?: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
/**
|
|
168
|
+
* the number of seconds to have in the buffer before dvr is activated
|
|
169
|
+
*/
|
|
170
|
+
seconds_to_dvr?: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Excluded from this release type: ConfigEventDetail */
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
declare type ConfigWith<T> = Config & T;
|
|
179
|
+
|
|
180
|
+
declare type ConfigWithSourceExtensions<PluginBareConfigs extends unknown[]> = Omit<ConfigWith<ArrayToIntersection<PluginBareConfigs>>, "src"> & {
|
|
181
|
+
src?: CombineSrc<PickSrcExtensions<PluginBareConfigs>>;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/* Excluded from this release type: CONTENT_REAL_LOAD_START */
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
declare const /**
|
|
190
|
+
@public
|
|
191
|
+
* when a new player is inserted into the HTML
|
|
192
|
+
*/ /**
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
CONTEXT_MENU = "contextmenu";
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
declare type ContextMenuEventDetail = null;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @public
|
|
204
|
+
* @deprecated
|
|
205
|
+
* when a cuepoint becomes inactive
|
|
206
|
+
*/
|
|
207
|
+
declare const /**
|
|
208
|
+
@public
|
|
209
|
+
* when a new player is inserted into the HTML
|
|
210
|
+
*/ /**
|
|
211
|
+
* @public
|
|
212
|
+
* @deprecated
|
|
213
|
+
* when a cuepoint becomes inactive
|
|
214
|
+
*/
|
|
215
|
+
CUEPOINT_END = "cuepointend";
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @public
|
|
219
|
+
* @deprecated
|
|
220
|
+
* when a cuepoint is active
|
|
221
|
+
*/
|
|
222
|
+
declare const /**
|
|
223
|
+
@public
|
|
224
|
+
* when a new player is inserted into the HTML
|
|
225
|
+
*/ /**
|
|
226
|
+
* @public
|
|
227
|
+
* @deprecated
|
|
228
|
+
* when a cuepoint is active
|
|
229
|
+
*/
|
|
230
|
+
CUEPOINT_START = "cuepointstart";
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @public
|
|
234
|
+
* @deprecated
|
|
235
|
+
* cuepoints parsing is asynchronous
|
|
236
|
+
* you cannot rely on them existing until
|
|
237
|
+
* this event is emitted
|
|
238
|
+
*/
|
|
239
|
+
declare const /**
|
|
240
|
+
@public
|
|
241
|
+
* when a new player is inserted into the HTML
|
|
242
|
+
*/ /**
|
|
243
|
+
* @public
|
|
244
|
+
* @deprecated
|
|
245
|
+
* cuepoints parsing is asynchronous
|
|
246
|
+
* you cannot rely on them existing until
|
|
247
|
+
* this event is emitted
|
|
248
|
+
*/
|
|
249
|
+
CUEPOINTS = "cuepoints";
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
254
|
+
declare const /**
|
|
255
|
+
@public
|
|
256
|
+
* when a new player is inserted into the HTML
|
|
257
|
+
*/ /**
|
|
258
|
+
* @public
|
|
259
|
+
*/
|
|
260
|
+
DATA = "loadeddata";
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @public
|
|
264
|
+
*/
|
|
265
|
+
declare const /**
|
|
266
|
+
@public
|
|
267
|
+
* when a new player is inserted into the HTML
|
|
268
|
+
*/ /**
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
271
|
+
DBL_CLICK = "dblclick";
|
|
272
|
+
|
|
273
|
+
declare const DESTROYED = "is-destroyed";
|
|
274
|
+
|
|
275
|
+
/* Excluded from this release type: DeviceId */
|
|
276
|
+
|
|
277
|
+
declare const DISABLED = "is-disabled";
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @public
|
|
281
|
+
*/
|
|
282
|
+
declare const /**
|
|
283
|
+
@public
|
|
284
|
+
* when a new player is inserted into the HTML
|
|
285
|
+
*/ /**
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
DURATION_CHANGE = "durationchange";
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @public
|
|
292
|
+
* when the player has started playing dvr content
|
|
293
|
+
*/
|
|
294
|
+
declare const /**
|
|
295
|
+
@public
|
|
296
|
+
* when a new player is inserted into the HTML
|
|
297
|
+
*/ /**
|
|
298
|
+
* @public
|
|
299
|
+
* when the player has started playing dvr content
|
|
300
|
+
*/
|
|
301
|
+
DVR = "dvr";
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @public
|
|
305
|
+
*/
|
|
306
|
+
declare type DvrEventDetail = number;
|
|
307
|
+
|
|
308
|
+
declare const ENDED = "is-ended";
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @public
|
|
312
|
+
*/
|
|
313
|
+
declare const /**
|
|
314
|
+
@public
|
|
315
|
+
* when a new player is inserted into the HTML
|
|
316
|
+
*/ /**
|
|
317
|
+
* @public
|
|
318
|
+
*/
|
|
319
|
+
ENDED_2 = "ended";
|
|
320
|
+
|
|
321
|
+
declare type EnsureOnAttached<P extends Function, T extends Player> = ExtractPureAPI<T> extends _AttachedEventCheck ? P : "Loaders must implement on('<pluginname>:attached') event";
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @public
|
|
325
|
+
*/
|
|
326
|
+
declare const /**
|
|
327
|
+
@public
|
|
328
|
+
* when a new player is inserted into the HTML
|
|
329
|
+
*/ /**
|
|
330
|
+
* @public
|
|
331
|
+
*/
|
|
332
|
+
ERROR = "error";
|
|
333
|
+
|
|
334
|
+
declare const ERRORED = "is-error";
|
|
335
|
+
|
|
336
|
+
declare namespace events {
|
|
337
|
+
export {
|
|
338
|
+
STATUS,
|
|
339
|
+
VIEWER_COUNT,
|
|
340
|
+
STATS
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
declare namespace events_2 {
|
|
345
|
+
export {
|
|
346
|
+
MOUNT,
|
|
347
|
+
RETRY,
|
|
348
|
+
ERROR,
|
|
349
|
+
CONTEXT_MENU,
|
|
350
|
+
CLICK,
|
|
351
|
+
DBL_CLICK,
|
|
352
|
+
KEYUP,
|
|
353
|
+
KEYDOWN,
|
|
354
|
+
LOAD,
|
|
355
|
+
MOUSE_ENTER,
|
|
356
|
+
MOUSE_LEAVE,
|
|
357
|
+
MOUSE_UP,
|
|
358
|
+
MOUSE_DOWN,
|
|
359
|
+
MOUSE_MOVE,
|
|
360
|
+
TOUCH_START,
|
|
361
|
+
TOUCH_MOVE,
|
|
362
|
+
TOUCH_END,
|
|
363
|
+
TOUCH_CANCEL,
|
|
364
|
+
RESIZE,
|
|
365
|
+
SCROLL,
|
|
366
|
+
FULLSCREEN_ENTER,
|
|
367
|
+
FULLSCREEN_EXIT,
|
|
368
|
+
FULLSCREEN_CHANGE,
|
|
369
|
+
METADATA,
|
|
370
|
+
DATA,
|
|
371
|
+
PROGRESS,
|
|
372
|
+
TIME_UPDATE,
|
|
373
|
+
LOAD_START,
|
|
374
|
+
VOLUME_CHANGE,
|
|
375
|
+
PAUSE,
|
|
376
|
+
PLAYING_2 as PLAYING,
|
|
377
|
+
PLAY,
|
|
378
|
+
WAITING_2 as WAITING,
|
|
379
|
+
CAN_PLAY,
|
|
380
|
+
ENDED_2 as ENDED,
|
|
381
|
+
SEEKED,
|
|
382
|
+
SEEKING_2 as SEEKING,
|
|
383
|
+
DURATION_CHANGE,
|
|
384
|
+
VIEW_ENTER,
|
|
385
|
+
VIEW_LEAVE,
|
|
386
|
+
SOURCE,
|
|
387
|
+
REAP,
|
|
388
|
+
QUALITIES,
|
|
389
|
+
QUALITY_CHANGE,
|
|
390
|
+
VIDEO_TRACKS,
|
|
391
|
+
SET_QUALITY,
|
|
392
|
+
VIDEO_TRACK_SELECT,
|
|
393
|
+
RECOMMENDATIONS_READY,
|
|
394
|
+
LANDSCAPE,
|
|
395
|
+
PORTRAIT,
|
|
396
|
+
DVR,
|
|
397
|
+
LIVE,
|
|
398
|
+
RECOVER,
|
|
399
|
+
CUEPOINTS,
|
|
400
|
+
CUEPOINT_START,
|
|
401
|
+
CUEPOINT_END,
|
|
402
|
+
STANDARD_ERROR
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
declare type ExtractBareConfig<Plugins extends PluginCtor> = Plugins extends PluginCtor<ConfigWith<infer ConfigType>> ? ConfigType : never;
|
|
407
|
+
|
|
408
|
+
declare type ExtractPluginPlayerExtension<Plugin extends PluginCtor> = Plugin extends PluginCtor<infer _uConfigType, PlayerWith<infer PluginPlayer>> ? PluginPlayer : never;
|
|
409
|
+
|
|
410
|
+
declare type ExtractPureAPI<T> = T extends PlayerWith<infer PureAPI> ? PureAPI : never;
|
|
411
|
+
|
|
412
|
+
declare type ExtractSrcExtension<PluginBareConfig> = Get<PluginBareConfig, "src"> extends UnsafeSource<infer SrcMixinType> ? SrcMixinType : never;
|
|
413
|
+
|
|
414
|
+
declare const FEATURE_USAGE = "flowplayer:feature";
|
|
415
|
+
|
|
416
|
+
/* Excluded from this release type: FeatureUsageEventDetail */
|
|
417
|
+
|
|
418
|
+
declare type FilterNewSourceTypes<PluginSrcs extends unknown[]> = {
|
|
419
|
+
[Index in keyof PluginSrcs]: PluginSrcs[Index] extends {
|
|
420
|
+
type: string;
|
|
421
|
+
} ? PluginSrcs[Index] : never;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @public
|
|
426
|
+
*/
|
|
427
|
+
declare type FlowplayerCustomElementRegistry = Map<string, string>;
|
|
428
|
+
|
|
429
|
+
declare class FlowplayerError extends Error {
|
|
430
|
+
readonly message: string;
|
|
431
|
+
readonly flowplayerErrorCode: FlowplayerErrorCode;
|
|
432
|
+
readonly config: FlowplayerErrorConfig;
|
|
433
|
+
static getErrorKey(code: FlowplayerErrorCode): FlowplayerErrorCodeName;
|
|
434
|
+
readonly id: string;
|
|
435
|
+
readonly isFatal: boolean;
|
|
436
|
+
readonly errorKey: string;
|
|
437
|
+
constructor(message: string, flowplayerErrorCode: FlowplayerErrorCode, config?: FlowplayerErrorConfig);
|
|
438
|
+
toJSON(): {
|
|
439
|
+
message: string;
|
|
440
|
+
flowplayer_error_code: FlowplayerErrorCode;
|
|
441
|
+
id: string;
|
|
442
|
+
root_error_id: string | undefined;
|
|
443
|
+
resource: string | undefined;
|
|
444
|
+
is_fatal: boolean;
|
|
445
|
+
is_retry: boolean;
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
declare type FlowplayerErrorCode = (typeof FlowplayerErrorCodeMap)[keyof typeof FlowplayerErrorCodeMap];
|
|
450
|
+
|
|
451
|
+
declare const FlowplayerErrorCodeMap: {
|
|
452
|
+
/** Unknown */
|
|
453
|
+
readonly Unknown: "00-00";
|
|
454
|
+
/** Media Section */
|
|
455
|
+
readonly MediaUnknown: "01-00";
|
|
456
|
+
readonly MediaUnavailable: "01-01";
|
|
457
|
+
readonly MediaUnsupportedVideoFormat: "01-02";
|
|
458
|
+
readonly MediaUnsupportedAudioFormat: "01-03";
|
|
459
|
+
readonly MediaBitrateExceeded: "01-04";
|
|
460
|
+
readonly MediaBufferOverread: "01-05";
|
|
461
|
+
readonly MediaIntegerOverflow: "01-06";
|
|
462
|
+
readonly MediaQuotaExceeded: "01-07";
|
|
463
|
+
readonly MediaInvalidCompositionDuration: "01-08";
|
|
464
|
+
readonly MediaInvalidCompositionSourceDuration: "01-09";
|
|
465
|
+
readonly MediaInvalidCompositionSourceStartTime: "01-10";
|
|
466
|
+
readonly MediaMalformedDepth: "01-11";
|
|
467
|
+
/** Playback Section */
|
|
468
|
+
readonly PlaybackUnknown: "02-00";
|
|
469
|
+
readonly PlaybackVideoBufferUnderRun: "02-01";
|
|
470
|
+
readonly PlaybackAudioBufferUnderRun: "02-02";
|
|
471
|
+
readonly PlaybackVideoBufferingTimeout: "02-03";
|
|
472
|
+
readonly PlaybackAudioBufferingTimeout: "02-04";
|
|
473
|
+
readonly PlaybackManifestParseError: "02-05";
|
|
474
|
+
readonly PlaybackVideoDecodeError: "02-06";
|
|
475
|
+
readonly PlaybackAudioDecodeError: "02-07";
|
|
476
|
+
readonly PlaybackDroppedFramesExceeded: "02-08";
|
|
477
|
+
readonly PlaybackPlayheadExceedsDuration: "02-09";
|
|
478
|
+
readonly PlaybackUnsupportedDevice: "02-10";
|
|
479
|
+
readonly PlaybackManifestLoadError: "02-11";
|
|
480
|
+
readonly PlaybackManifestLoadTimeout: "02-12";
|
|
481
|
+
readonly PlaybackManifestParsingError: "02-13";
|
|
482
|
+
readonly PlaybackManifestIncompatibleCodecs: "02-14";
|
|
483
|
+
readonly PlaybackLevelEmptyError: "02-15";
|
|
484
|
+
readonly PlaybackLevelLoadError: "02-16";
|
|
485
|
+
readonly PlaybackLevelLoadTimeout: "02-17";
|
|
486
|
+
readonly PlaybackLevelSwitchError: "02-18";
|
|
487
|
+
readonly PlaybackAudioTrackLoadError: "02-19";
|
|
488
|
+
readonly PlaybackAudioTrackLoadTimeout: "02-20";
|
|
489
|
+
readonly PlaybackFragLoadError: "02-21";
|
|
490
|
+
readonly PlaybackFragLoadTimeout: "02-22";
|
|
491
|
+
readonly PlaybackFragDecryptError: "02-23";
|
|
492
|
+
readonly PlaybackFragParsingError: "02-24";
|
|
493
|
+
readonly PlaybackFragGap: "02-25";
|
|
494
|
+
readonly PlaybackRemuxAllocError: "02-26";
|
|
495
|
+
readonly PlaybackBufferAddCodecError: "02-27";
|
|
496
|
+
readonly PlaybackBufferIncompatibleCodecs: "02-28";
|
|
497
|
+
readonly PlaybackBufferAppendError: "02-29";
|
|
498
|
+
readonly PlaybackBufferStalledError: "02-30";
|
|
499
|
+
readonly PlaybackBufferFullError: "02-31";
|
|
500
|
+
readonly PlaybackBufferSeekOverHole: "02-32";
|
|
501
|
+
readonly PlaybackBufferNudgeOnStall: "02-33";
|
|
502
|
+
readonly PlaybackInternalException: "02-34";
|
|
503
|
+
readonly PlaybackInternalAborted: "02-35";
|
|
504
|
+
readonly PlaybackManifestLoaderFailure: "02-36";
|
|
505
|
+
readonly PlaybackSegmentBaseLoaderError: "02-37";
|
|
506
|
+
readonly PlaybackTimeSyncFailed: "02-38";
|
|
507
|
+
readonly PlaybackFragmentLoaderFailure: "02-39";
|
|
508
|
+
readonly PlaybackAppendError: "02-40";
|
|
509
|
+
readonly PlaybackRemoveError: "02-41";
|
|
510
|
+
readonly PlaybackDataUpdateFailed: "02-42";
|
|
511
|
+
readonly PlaybackManifestNoStreams: "02-43";
|
|
512
|
+
readonly PlaybackUnknownManifestType: "02-44";
|
|
513
|
+
readonly PlaybackDashInsufficientSegmentInfo: "02-45";
|
|
514
|
+
readonly PlaybackDashNoRepresentations: "02-46";
|
|
515
|
+
readonly PlaybackDashNoAdaptationSets: "02-47";
|
|
516
|
+
readonly PlaybackDashNoInitSegment: "02-48";
|
|
517
|
+
readonly PlaybackDashUnsupportedContainerFormat: "02-49";
|
|
518
|
+
readonly PlaybackDashKeySystemMismatch: "02-50";
|
|
519
|
+
readonly PlaybackMultipleKeyIDs: "02-51";
|
|
520
|
+
readonly PlaybackDashConflictingKeyIDs: "02-52";
|
|
521
|
+
readonly PlaybackRestrictedStreams: "02-53";
|
|
522
|
+
readonly PlaybackHlsMasterAndMediaTags: "02-54";
|
|
523
|
+
readonly PlaybackRepresentationIdConflict: "02-55";
|
|
524
|
+
readonly PlaybackHlsUnsupportedKeyFormats: "02-56";
|
|
525
|
+
readonly PlaybackManifestNoVariants: "02-57";
|
|
526
|
+
readonly PlaybackHlsUndeclaredVariables: "02-58";
|
|
527
|
+
readonly PlaybackAes128InvalidKeyLength: "02-59";
|
|
528
|
+
readonly PlaybackDashConflictingAes128Keys: "02-60";
|
|
529
|
+
readonly PlaybackDashUnsupportedAes128Encryption: "02-61";
|
|
530
|
+
readonly PlaybackManifestPatchMismatch: "02-62";
|
|
531
|
+
readonly PlaybackEmptyMediaPlaylist: "02-63";
|
|
532
|
+
readonly PlaybackNonContiguousCompositionTrack: "02-64";
|
|
533
|
+
readonly PlaybackDecoderNotFound: "02-65";
|
|
534
|
+
readonly PlaybackDecoderTemporarilyUnavailable: "02-66";
|
|
535
|
+
readonly PlaybackIncompatibleAsset: "02-67";
|
|
536
|
+
readonly PlaybackNoCompatibleExternalDisplay: "02-69";
|
|
537
|
+
readonly PlaybackOutOfMemory: "02-70";
|
|
538
|
+
readonly PlaybackToneMappingFailed: "02-71";
|
|
539
|
+
readonly PlaybackVideoCompositorFailed: "02-72";
|
|
540
|
+
/** Network Section */
|
|
541
|
+
readonly NetworkUnknown: "03-00";
|
|
542
|
+
readonly NetworkNoInternet: "03-01";
|
|
543
|
+
readonly NetworkRequestTimeout: "03-02";
|
|
544
|
+
readonly NetworkUnableToResolveHost: "03-03";
|
|
545
|
+
readonly NetworkResourceNotFound: "03-04";
|
|
546
|
+
readonly NetworkExpiredUrl: "03-05";
|
|
547
|
+
readonly NetworkUrlResolutionFailed: "03-06";
|
|
548
|
+
readonly NetworkDownloadErrorIdManifest: "03-07";
|
|
549
|
+
readonly NetworkDownloadErrorIdSidx: "03-08";
|
|
550
|
+
readonly NetworkDownloadErrorIdContent: "03-09";
|
|
551
|
+
readonly NetworkDownloadErrorIdInitialization: "03-10";
|
|
552
|
+
readonly NetworkDownloadErrorIdXlink: "03-11";
|
|
553
|
+
readonly NetworkHttpRequestFailed: "03-12";
|
|
554
|
+
readonly NetworkMaxRetriesExceeded: "03-13";
|
|
555
|
+
readonly NetworkSegmentMissing: "03-14";
|
|
556
|
+
/** HTTP Error Codes */
|
|
557
|
+
readonly NetworkHttp400BadRequest: "03-400";
|
|
558
|
+
readonly NetworkHttp401Unauthorized: "03-401";
|
|
559
|
+
readonly NetworkHttp402PaymentRequired: "03-402";
|
|
560
|
+
readonly NetworkHttp403Forbidden: "03-403";
|
|
561
|
+
readonly NetworkHttp404NotFound: "03-404";
|
|
562
|
+
readonly NetworkHttp405MethodNotAllowed: "03-405";
|
|
563
|
+
readonly NetworkHttp406NotAcceptable: "03-406";
|
|
564
|
+
readonly NetworkHttp407ProxyAuthenticationRequired: "03-407";
|
|
565
|
+
readonly NetworkHttp408RequestTimeout: "03-408";
|
|
566
|
+
readonly NetworkHttp409Conflict: "03-409";
|
|
567
|
+
readonly NetworkHttp410Gone: "03-410";
|
|
568
|
+
readonly NetworkHttp411LengthRequired: "03-411";
|
|
569
|
+
readonly NetworkHttp412PreconditionFailed: "03-412";
|
|
570
|
+
readonly NetworkHttp413PayloadTooLarge: "03-413";
|
|
571
|
+
readonly NetworkHttp414URITooLong: "03-414";
|
|
572
|
+
readonly NetworkHttp415UnsupportedMediaType: "03-415";
|
|
573
|
+
readonly NetworkHttp416RangeNotSatisfiable: "03-416";
|
|
574
|
+
readonly NetworkHttp417ExpectationFailed: "03-417";
|
|
575
|
+
readonly NetworkHttp418ImATeapot: "03-418";
|
|
576
|
+
readonly NetworkHttp421MisdirectedRequest: "03-421";
|
|
577
|
+
readonly NetworkHttp422UnprocessableEntity: "03-422";
|
|
578
|
+
readonly NetworkHttp423Locked: "03-423";
|
|
579
|
+
readonly NetworkHttp424FailedDependency: "03-424";
|
|
580
|
+
readonly NetworkHttp425TooEarly: "03-425";
|
|
581
|
+
readonly NetworkHttp426UpgradeRequired: "03-426";
|
|
582
|
+
readonly NetworkHttp428PreconditionRequired: "03-428";
|
|
583
|
+
readonly NetworkHttp429TooManyRequests: "03-429";
|
|
584
|
+
readonly NetworkHttp431RequestHeaderFieldsTooLarge: "03-431";
|
|
585
|
+
readonly NetworkHttp451UnavailableForLegalReasons: "03-451";
|
|
586
|
+
readonly NetworkHttp500InternalServerError: "03-500";
|
|
587
|
+
readonly NetworkHttp501NotImplemented: "03-501";
|
|
588
|
+
readonly NetworkHttp502BadGateway: "03-502";
|
|
589
|
+
readonly NetworkHttp503ServiceUnavailable: "03-503";
|
|
590
|
+
readonly NetworkHttp504GatewayTimeout: "03-504";
|
|
591
|
+
readonly NetworkHttp505HTTPVersionNotSupported: "03-505";
|
|
592
|
+
readonly NetworkHttp506VariantAlsoNegotiates: "03-506";
|
|
593
|
+
readonly NetworkHttp507InsufficientStorage: "03-507";
|
|
594
|
+
readonly NetworkHttp508LoopDetected: "03-508";
|
|
595
|
+
readonly NetworkHttp510NotExtended: "03-510";
|
|
596
|
+
readonly NetworkHttp511NetworkAuthenticationRequired: "03-511";
|
|
597
|
+
/** Content Protection Section */
|
|
598
|
+
readonly ContentProtectionUnknown: "04-00";
|
|
599
|
+
readonly ContentProtectionConcurrentStreamLimitExceeded: "04-01";
|
|
600
|
+
readonly ContentProtectionEntitlementRefused: "04-02";
|
|
601
|
+
readonly ContentProtectionLicenseExpired: "04-03";
|
|
602
|
+
readonly ContentProtectionBadLicenseRequest: "04-04";
|
|
603
|
+
readonly ContentProtectionLicenseServerTimeout: "04-05";
|
|
604
|
+
readonly ContentProtectionInsufficientHDCPSupport: "04-06";
|
|
605
|
+
readonly ContentProtectionGeoRestricted: "04-07";
|
|
606
|
+
readonly ContentProtectionParentalControlRestricted: "04-08";
|
|
607
|
+
readonly ContentProtectionCDNUnauthorized: "04-09";
|
|
608
|
+
readonly ContentProtectionInvalidAccessToken: "04-10";
|
|
609
|
+
readonly ContentProtectionKeySystemNoKeys: "04-11";
|
|
610
|
+
readonly ContentProtectionKeySystemNoAccess: "04-12";
|
|
611
|
+
readonly ContentProtectionKeySystemNoSession: "04-13";
|
|
612
|
+
readonly ContentProtectionKeySystemNoConfiguredLicense: "04-14";
|
|
613
|
+
readonly ContentProtectionKeySystemCertificateRequestFailed: "04-15";
|
|
614
|
+
readonly ContentProtectionKeySystemCertificateUpdateFailed: "04-16";
|
|
615
|
+
/** Key System: Session update failed */
|
|
616
|
+
readonly ContentProtectionKeySystemSessionUpdateFailed: "04-17";
|
|
617
|
+
/** Key System: Status output restricted */
|
|
618
|
+
readonly ContentProtectionKeySystemStatusOutputRestricted: "04-18";
|
|
619
|
+
/** Key System: Status internal error */
|
|
620
|
+
readonly ContentProtectionKeySystemStatusInternalError: "04-19";
|
|
621
|
+
/** Key Load Error */
|
|
622
|
+
readonly ContentProtectionKeyLoadError: "04-20";
|
|
623
|
+
/** Key Load Timeout */
|
|
624
|
+
readonly ContentProtectionKeyLoadTimeout: "04-21";
|
|
625
|
+
/** Capability MediaKeys Error */
|
|
626
|
+
readonly ContentProtectionCapabilityMediaKeysError: "04-22";
|
|
627
|
+
/** Manifest indicated protected content, but unable to determine key systems */
|
|
628
|
+
readonly ContentProtectionManifestKeySystemUnknown: "04-23";
|
|
629
|
+
/**
|
|
630
|
+
* None of the requested key system configurations are available.
|
|
631
|
+
* Possible reasons:
|
|
632
|
+
* - Key system not supported
|
|
633
|
+
* - Requested features (e.g., persistent state) not supported
|
|
634
|
+
* - User denied access in prompt
|
|
635
|
+
* - Key system unavailable in insecure contexts (requires HTTPS)
|
|
636
|
+
*/
|
|
637
|
+
readonly ContentProtectionKeySystemUnavailable: "04-24";
|
|
638
|
+
/** Browser found requested key system, but failed to create CDM instance */
|
|
639
|
+
readonly ContentProtectionCDMCreationFailed: "04-25";
|
|
640
|
+
/** Browser created CDM instance but failed to attach it to the video */
|
|
641
|
+
readonly ContentProtectionCDMAttachFailed: "04-26";
|
|
642
|
+
/** CDM rejected the server certificate (malformed or unsupported format) */
|
|
643
|
+
readonly ContentProtectionCDMServerCertificateRejected: "04-27";
|
|
644
|
+
/** CDM refused to create a session for unknown reasons */
|
|
645
|
+
readonly ContentProtectionCDMSessionCreationFailed: "04-28";
|
|
646
|
+
/** CDM unable to generate a license request due to malformed or unsupported init data */
|
|
647
|
+
readonly ContentProtectionCDMLicenseRequestFailed: "04-29";
|
|
648
|
+
/** License response rejected by the CDM (invalid/malformed response) */
|
|
649
|
+
readonly ContentProtectionCDMLicenseResponseRejected: "04-30";
|
|
650
|
+
/** Manifest does not specify DRM info, but content is encrypted */
|
|
651
|
+
readonly ContentProtectionManifestMissingDRMInfo: "04-31";
|
|
652
|
+
/** No license server was provided for the key system signaled by the manifest */
|
|
653
|
+
readonly ContentProtectionLicenseServerMissing: "04-32";
|
|
654
|
+
/** A required offline session was removed, affecting playback */
|
|
655
|
+
readonly ContentProtectionOfflineSessionRemoved: "04-33";
|
|
656
|
+
/** Error while executing init data transformation */
|
|
657
|
+
readonly ContentProtectionInitDataTransformationError: "04-34";
|
|
658
|
+
/** Server certificate request failed */
|
|
659
|
+
readonly ContentProtectionServerCertificateRequestFailed: "04-35";
|
|
660
|
+
/** HDCP version does not meet the requirements */
|
|
661
|
+
readonly ContentProtectionInsufficientHDCPVersion: "04-36";
|
|
662
|
+
/** Error when checking HDCP version */
|
|
663
|
+
readonly ContentProtectionHDCPVersionCheckFailed: "04-37";
|
|
664
|
+
/** Ads Section */
|
|
665
|
+
readonly AdsUnknown: "08-00";
|
|
666
|
+
readonly AdsVastParseError: "08-100";
|
|
667
|
+
readonly AdsInvalidVastSchema: "08-101";
|
|
668
|
+
readonly AdsVastVersionNotSupported: "08-102";
|
|
669
|
+
readonly AdsUnexpectedAdType: "08-200";
|
|
670
|
+
readonly AdsCreativeLinearityMismatch: "08-201";
|
|
671
|
+
readonly AdsCreativeDurationMismatch: "08-202";
|
|
672
|
+
readonly AdsCreativeSizeMismatch: "08-203";
|
|
673
|
+
readonly AdsWrapperVastError: "08-300";
|
|
674
|
+
readonly AdsVastResponseRedirectTimeout: "08-301";
|
|
675
|
+
readonly AdsWrapperLimitReached: "08-302";
|
|
676
|
+
readonly AdsVastResponseEmpty: "08-303";
|
|
677
|
+
readonly AdsLinearAdDisplayError: "08-400";
|
|
678
|
+
readonly AdsMediaFileNotFound: "08-401";
|
|
679
|
+
readonly AdsMediaFileUnavailable: "08-402";
|
|
680
|
+
readonly AdsUnsupportedMimeType: "08-403";
|
|
681
|
+
readonly AdsUnableToDisplayMediaFile: "08-405";
|
|
682
|
+
readonly AdsMezzanineFileMissing: "08-406";
|
|
683
|
+
readonly AdsMezzanineFileDownloaded: "08-407";
|
|
684
|
+
readonly AdsRejectedAd: "08-408";
|
|
685
|
+
readonly AdsInteractiveCreativeError: "08-409";
|
|
686
|
+
readonly AdsVerificationNodeExecutionError: "08-410";
|
|
687
|
+
readonly AdsNonLinearAdDisplayError: "08-500";
|
|
688
|
+
readonly AdsNonLinearAdSizeMismatch: "08-501";
|
|
689
|
+
readonly AdsNonLinearAdFetchError: "08-502";
|
|
690
|
+
readonly AdsNonLinearUnsupportedType: "08-503";
|
|
691
|
+
readonly AdsCompanionAdDisplayError: "08-600";
|
|
692
|
+
readonly AdsCompanionAdSizeMismatch: "08-601";
|
|
693
|
+
readonly AdsRequiredCompanionAdError: "08-602";
|
|
694
|
+
readonly AdsCompanionAdFetchError: "08-603";
|
|
695
|
+
readonly AdsUndefinedVastError: "08-900";
|
|
696
|
+
readonly AdsUnknownVpaidError: "08-901";
|
|
697
|
+
readonly AdsVastDocumentEmpty: "08-999";
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
declare type FlowplayerErrorCodeName = keyof typeof FlowplayerErrorCodeMap;
|
|
701
|
+
|
|
702
|
+
declare type FlowplayerErrorConfig = Partial<{
|
|
703
|
+
isFatal: boolean;
|
|
704
|
+
showErrorUI: boolean;
|
|
705
|
+
isRetry: boolean;
|
|
706
|
+
resource: string;
|
|
707
|
+
rootErrorId: string;
|
|
708
|
+
retryOpts: Partial<{
|
|
709
|
+
retry: (typeof RetryMap)[keyof typeof RetryMap];
|
|
710
|
+
retryTimeout: number;
|
|
711
|
+
}>;
|
|
712
|
+
}> & Record<string, any>;
|
|
713
|
+
|
|
714
|
+
declare type FlowplayerErrorEventDetail = {
|
|
715
|
+
error: FlowplayerError;
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* @public
|
|
720
|
+
*/
|
|
721
|
+
declare type FlowplayerStates = typeof states;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* @public
|
|
725
|
+
*/
|
|
726
|
+
declare interface FlowplayerUMD extends FlowplayerUMDBase {
|
|
727
|
+
/**
|
|
728
|
+
* Configure flowplayer and display it in the UI
|
|
729
|
+
* @param selector - query selector of the HTML element where player will render
|
|
730
|
+
* @param config - configuration of flowplayer
|
|
731
|
+
*/
|
|
732
|
+
(selector: string, config?: Config): Player;
|
|
733
|
+
/**
|
|
734
|
+
* Configure flowplayer and display it in the UI
|
|
735
|
+
* @param element - HTML element where player will render
|
|
736
|
+
* @param config - configuration of flowplayer
|
|
737
|
+
*/
|
|
738
|
+
(element: HTMLElement, config?: Config): Player;
|
|
739
|
+
/**
|
|
740
|
+
* Configure flowplayer and display it in the UI
|
|
741
|
+
* @param selector - query selector of the HTML element where player will render
|
|
742
|
+
* @param config - configuration of flowplayer
|
|
743
|
+
*/
|
|
744
|
+
<T>(selector: string, config?: ConfigWith<T>): Player;
|
|
745
|
+
/**
|
|
746
|
+
* Configure flowplayer and display it in the UI
|
|
747
|
+
* @param element - HTML element where player will render
|
|
748
|
+
* @param config - configuration of flowplayer
|
|
749
|
+
*/
|
|
750
|
+
<T>(element: HTMLElement, config?: ConfigWith<T>): Player;
|
|
751
|
+
/**
|
|
752
|
+
* Register plugins in flowplayer
|
|
753
|
+
* @returns flowplayer instance with registered plugins
|
|
754
|
+
*/
|
|
755
|
+
<PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<MergeConfigs<PluginCtors>, PlayerWith<MergePlayerExtensions<PluginCtors>>>;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
declare interface FlowplayerUMDBase {
|
|
759
|
+
/**
|
|
760
|
+
* All player instances on the page
|
|
761
|
+
*/
|
|
762
|
+
instances: Player[];
|
|
763
|
+
/**
|
|
764
|
+
* Flowplayer core events
|
|
765
|
+
*/
|
|
766
|
+
events: typeof events_2;
|
|
767
|
+
/**
|
|
768
|
+
* Flowplayer ui states map
|
|
769
|
+
*/
|
|
770
|
+
states: FlowplayerStates;
|
|
771
|
+
/**
|
|
772
|
+
* Flowplayer errors map
|
|
773
|
+
*/
|
|
774
|
+
errors: typeof FlowplayerErrorCodeMap;
|
|
775
|
+
quality: typeof QualityOpts;
|
|
776
|
+
autoplay: typeof AutoplayOpts;
|
|
777
|
+
commit: string;
|
|
778
|
+
version: string;
|
|
779
|
+
/**
|
|
780
|
+
* Flowplayer's custom element registry
|
|
781
|
+
*/
|
|
782
|
+
customElements: FlowplayerCustomElementRegistry;
|
|
783
|
+
/* Excluded from this release type: extensions */
|
|
784
|
+
/* Excluded from this release type: defaultElements */
|
|
785
|
+
/* Excluded from this release type: components */
|
|
786
|
+
/* Excluded from this release type: support */
|
|
787
|
+
/* Excluded from this release type: jwt */
|
|
788
|
+
/* Excluded from this release type: loaders */
|
|
789
|
+
/**
|
|
790
|
+
* @public
|
|
791
|
+
* Translations dictionaries to be used with `@flowplayer/translations` package
|
|
792
|
+
*
|
|
793
|
+
* See [official documentation](https://developer.wowza.com/docs/wowza-flowplayer/player/translations/)
|
|
794
|
+
*/
|
|
795
|
+
i18n: typeof I18n;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* @public
|
|
800
|
+
*/
|
|
801
|
+
declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config, PluginPlayer extends Player = Player> extends FlowplayerUMDBase {
|
|
802
|
+
/**
|
|
803
|
+
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
804
|
+
* @param selector - query selector of the HTML element where player will render
|
|
805
|
+
* @param config - Configuration of the flowplayer and the attached plugins
|
|
806
|
+
*/
|
|
807
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
808
|
+
/**
|
|
809
|
+
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
810
|
+
* @param element - HTML element where player will render
|
|
811
|
+
* @param config - Configuration of the flowplayer and the attached plugins
|
|
812
|
+
*/
|
|
813
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* @public
|
|
818
|
+
*/
|
|
819
|
+
declare interface FPEvent<T> extends CustomEvent<T> {
|
|
820
|
+
/**
|
|
821
|
+
* @deprecated
|
|
822
|
+
the data attribute has been migrated to details to match the CustomEvent spec
|
|
823
|
+
more info: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
|
824
|
+
*/
|
|
825
|
+
data?: T;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
declare const FULLSCREEN = "is-fullscreen";
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* @public
|
|
832
|
+
*/
|
|
833
|
+
declare const /**
|
|
834
|
+
@public
|
|
835
|
+
* when a new player is inserted into the HTML
|
|
836
|
+
*/ /**
|
|
837
|
+
* @public
|
|
838
|
+
*/
|
|
839
|
+
FULLSCREEN_CHANGE = "fullscreenchange";
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* @public
|
|
843
|
+
*/
|
|
844
|
+
declare const /**
|
|
845
|
+
@public
|
|
846
|
+
* when a new player is inserted into the HTML
|
|
847
|
+
*/ /**
|
|
848
|
+
* @public
|
|
849
|
+
*/
|
|
850
|
+
FULLSCREEN_ENTER = "fullscreenenter";
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* @public
|
|
854
|
+
*/
|
|
855
|
+
declare const /**
|
|
856
|
+
@public
|
|
857
|
+
* when a new player is inserted into the HTML
|
|
858
|
+
*/ /**
|
|
859
|
+
* @public
|
|
860
|
+
*/
|
|
861
|
+
FULLSCREEN_EXIT = "fullscreenexit";
|
|
862
|
+
|
|
863
|
+
declare const GRABBING = "is-grabbing";
|
|
864
|
+
|
|
865
|
+
declare const HAS_POSTER = "has-poster";
|
|
866
|
+
|
|
867
|
+
declare type HasGlobalSrcExtensios<PluginSrcs extends unknown[]> = ArrayToIntersection<PickGlobalSrcExtension<PluginSrcs>>;
|
|
868
|
+
|
|
869
|
+
declare type HasSrcExtensions<PluginBareConfigs extends unknown[]> = TupleToUnion<PickSrcExtensions<PluginBareConfigs>> extends never ? false : true;
|
|
870
|
+
|
|
871
|
+
declare const HOVERED = "is-hovered";
|
|
872
|
+
|
|
873
|
+
declare class I18n implements Plugin_2 {
|
|
874
|
+
static pluginName: string;
|
|
875
|
+
static en: {
|
|
876
|
+
ads: {
|
|
877
|
+
ad: string;
|
|
878
|
+
ads: string;
|
|
879
|
+
advertisement: string;
|
|
880
|
+
indicator: string;
|
|
881
|
+
adchoices: string;
|
|
882
|
+
};
|
|
883
|
+
audio: {
|
|
884
|
+
button_txt: string;
|
|
885
|
+
menu_title: string;
|
|
886
|
+
};
|
|
887
|
+
cc: {
|
|
888
|
+
button: string;
|
|
889
|
+
menu_title: string;
|
|
890
|
+
options: string;
|
|
891
|
+
tracks: string;
|
|
892
|
+
reset: string;
|
|
893
|
+
colors: {
|
|
894
|
+
Black: string;
|
|
895
|
+
Blue: string;
|
|
896
|
+
Cyan: string;
|
|
897
|
+
Green: string;
|
|
898
|
+
Magenta: string;
|
|
899
|
+
Red: string;
|
|
900
|
+
White: string;
|
|
901
|
+
Yellow: string;
|
|
902
|
+
};
|
|
903
|
+
edgeStyle: {
|
|
904
|
+
None: string;
|
|
905
|
+
"Drop shadow": string;
|
|
906
|
+
Raised: string;
|
|
907
|
+
Depressed: string;
|
|
908
|
+
Outline: string;
|
|
909
|
+
};
|
|
910
|
+
fontFamily: {
|
|
911
|
+
"Monospaced Serif": string;
|
|
912
|
+
"Proportional Serif": string;
|
|
913
|
+
"Monospaced Sans-Serif": string;
|
|
914
|
+
"Proportional Sans-Serif": string;
|
|
915
|
+
Casual: string;
|
|
916
|
+
Cursive: string;
|
|
917
|
+
};
|
|
918
|
+
properties: {
|
|
919
|
+
fontFamily: string;
|
|
920
|
+
fontSize: string;
|
|
921
|
+
fontColor: string;
|
|
922
|
+
fontOpacity: string;
|
|
923
|
+
backgroundColor: string;
|
|
924
|
+
backgroundOpacity: string;
|
|
925
|
+
characterEdgeStyle: string;
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
chromecast: {
|
|
929
|
+
start: string;
|
|
930
|
+
stop: string;
|
|
931
|
+
};
|
|
932
|
+
core: {
|
|
933
|
+
exit_fullscreen: string;
|
|
934
|
+
fullscreen: string;
|
|
935
|
+
mute: string;
|
|
936
|
+
muted: string;
|
|
937
|
+
pause: string;
|
|
938
|
+
play: string;
|
|
939
|
+
seconds: string;
|
|
940
|
+
timeline_aria_label: string;
|
|
941
|
+
unmute: string;
|
|
942
|
+
volume: string;
|
|
943
|
+
close: string;
|
|
944
|
+
"skip-next": string;
|
|
945
|
+
"skip-prev": string;
|
|
946
|
+
};
|
|
947
|
+
ovp: {
|
|
948
|
+
starting_in: string;
|
|
949
|
+
};
|
|
950
|
+
playlist: {
|
|
951
|
+
cancel: string;
|
|
952
|
+
up_next: string;
|
|
953
|
+
autoplay: string;
|
|
954
|
+
now_playing: string;
|
|
955
|
+
turn_off_autoplay: string;
|
|
956
|
+
playlist: string;
|
|
957
|
+
};
|
|
958
|
+
qsel: {
|
|
959
|
+
menu_title: string;
|
|
960
|
+
};
|
|
961
|
+
share: {
|
|
962
|
+
clipboard_failure: string;
|
|
963
|
+
clipboard_success: string;
|
|
964
|
+
embed: string;
|
|
965
|
+
link: string;
|
|
966
|
+
menu_title: string;
|
|
967
|
+
};
|
|
968
|
+
speed: {
|
|
969
|
+
menu_title: string;
|
|
970
|
+
};
|
|
971
|
+
vtsel: {
|
|
972
|
+
button_txt: string;
|
|
973
|
+
menu_title: string;
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
init(config: Config, _root: never, video: Player): void;
|
|
977
|
+
/* Excluded from this release type: _nonLanguageFields */
|
|
978
|
+
/* Excluded from this release type: languagesLoaded */
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
declare const IN_VIEWPORT = "is-in-viewport";
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Represents the statistics object for an input audio stream.
|
|
985
|
+
*/
|
|
986
|
+
declare interface InputAudio extends StatsBase, StatsCodec {
|
|
987
|
+
/** The value of the MediaStreamTrack's id attribute. */
|
|
988
|
+
trackIdentifier: string;
|
|
989
|
+
/** Packet Jitter measured in seconds for this SSRC. */
|
|
990
|
+
jitter?: number;
|
|
991
|
+
/**
|
|
992
|
+
* The purpose of the jitter buffer is to recombine RTP packets into frames (in the case of video) and have smooth playout.
|
|
993
|
+
* The model described here assumes that the samples or frames are still compressed and have not yet been decoded.
|
|
994
|
+
* It is the sum of the time, in seconds, each audio sample or a video frame takes from the time the first packet
|
|
995
|
+
* is received by the jitter buffer (ingest timestamp) to the time it exits the jitter buffer (emit timestamp).
|
|
996
|
+
*/
|
|
997
|
+
jitterBufferDelay?: number;
|
|
998
|
+
/** The total number of audio samples or video frames that have come out of the jitter buffer (increasing {@link jitterBufferDelay}). */
|
|
999
|
+
jitterBufferEmittedCount?: number;
|
|
1000
|
+
/** Total number of bytes received for this SSRC. */
|
|
1001
|
+
totalBytesReceived?: number;
|
|
1002
|
+
/** Total number of packets received for this SSRC. */
|
|
1003
|
+
totalPacketsReceived?: number;
|
|
1004
|
+
/**
|
|
1005
|
+
* Total number of RTP packets lost for this SSRC.
|
|
1006
|
+
* Note that because of how this is estimated, it can be negative if more packets are received than sent.
|
|
1007
|
+
*/
|
|
1008
|
+
totalPacketsLost?: number;
|
|
1009
|
+
/** The ratio of packet loss. */
|
|
1010
|
+
packetLossRatio?: number;
|
|
1011
|
+
/** Number of packets lost since last collection. */
|
|
1012
|
+
packetLossDelta?: number;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Represents the statistics object for an input video stream.
|
|
1017
|
+
*/
|
|
1018
|
+
declare interface InputVideo extends InputAudio {
|
|
1019
|
+
/**
|
|
1020
|
+
* Represents the total number of key frames, such as key frames in VP8 [RFC6386]
|
|
1021
|
+
* or IDR-frames in H.264 [RFC6184], successfully decoded for this RTP media stream.
|
|
1022
|
+
*/
|
|
1023
|
+
keyFramesDecoded?: number;
|
|
1024
|
+
/** Represents the width of the last decoded frame. */
|
|
1025
|
+
frameWidth?: number;
|
|
1026
|
+
/** Represents the height of the last decoded frame. */
|
|
1027
|
+
frameHeight?: number;
|
|
1028
|
+
/** Represents the total number of frames correctly decoded for this RTP stream, i.e., frames that would be displayed if no frames are dropped. */
|
|
1029
|
+
framesDecoded?: number;
|
|
1030
|
+
/** The total number of frames dropped prior to decode or dropped because the frame missed its display deadline for this receiver's track. */
|
|
1031
|
+
framesDropped?: number;
|
|
1032
|
+
/** The number of decoded frames in the last second. */
|
|
1033
|
+
framesPerSecond?: number;
|
|
1034
|
+
/** Represents the total number of complete frames received on this RTP stream. This metric is incremented when the complete frame is received. */
|
|
1035
|
+
framesReceived?: number;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/* Excluded from this release type: INTERSECTIONCHANGE */
|
|
1039
|
+
|
|
1040
|
+
/* Excluded from this release type: IntersectionChangeEventDetail */
|
|
1041
|
+
|
|
1042
|
+
declare const IS_SOURCE_PROCESSING = "is-source-processing";
|
|
1043
|
+
|
|
1044
|
+
declare type JSONPlayer = any;
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* @public
|
|
1048
|
+
*/
|
|
1049
|
+
declare const /**
|
|
1050
|
+
@public
|
|
1051
|
+
* when a new player is inserted into the HTML
|
|
1052
|
+
*/ /**
|
|
1053
|
+
* @public
|
|
1054
|
+
*/
|
|
1055
|
+
KEYDOWN = "keydown";
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* @public
|
|
1059
|
+
*/
|
|
1060
|
+
declare const /**
|
|
1061
|
+
@public
|
|
1062
|
+
* when a new player is inserted into the HTML
|
|
1063
|
+
*/ /**
|
|
1064
|
+
* @public
|
|
1065
|
+
*/
|
|
1066
|
+
KEYUP = "keyup";
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* @public
|
|
1070
|
+
*/
|
|
1071
|
+
declare type KeyValue = Record<string, any>;
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* @public
|
|
1075
|
+
*/
|
|
1076
|
+
declare const /**
|
|
1077
|
+
@public
|
|
1078
|
+
* when a new player is inserted into the HTML
|
|
1079
|
+
*/ /**
|
|
1080
|
+
* @public
|
|
1081
|
+
*/
|
|
1082
|
+
LANDSCAPE = "landscape";
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* @public
|
|
1086
|
+
* when src is a livestream
|
|
1087
|
+
*/
|
|
1088
|
+
declare const /**
|
|
1089
|
+
@public
|
|
1090
|
+
* when a new player is inserted into the HTML
|
|
1091
|
+
*/ /**
|
|
1092
|
+
* @public
|
|
1093
|
+
* when src is a livestream
|
|
1094
|
+
*/
|
|
1095
|
+
LIVE = "live";
|
|
1096
|
+
|
|
1097
|
+
declare const LIVE_2 = "is-live";
|
|
1098
|
+
|
|
1099
|
+
declare const LIVE_SEEKED = "is-live-seeked";
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* @public
|
|
1103
|
+
*/
|
|
1104
|
+
declare type LiveEventDetail = null;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* @public
|
|
1108
|
+
*/
|
|
1109
|
+
declare const /**
|
|
1110
|
+
@public
|
|
1111
|
+
* when a new player is inserted into the HTML
|
|
1112
|
+
*/ /**
|
|
1113
|
+
* @public
|
|
1114
|
+
*/
|
|
1115
|
+
LOAD = "load";
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* @public
|
|
1119
|
+
*/
|
|
1120
|
+
declare const /**
|
|
1121
|
+
@public
|
|
1122
|
+
* when a new player is inserted into the HTML
|
|
1123
|
+
*/ /**
|
|
1124
|
+
* @public
|
|
1125
|
+
*/
|
|
1126
|
+
LOAD_START = "loadstart";
|
|
1127
|
+
|
|
1128
|
+
declare const LOADED = "is-loaded";
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* @public A plugin that supports loading new media formats. Use 'class MyPlugin implements Loader\<...\>' when writing your custom Loader
|
|
1132
|
+
* @typeParam PluginPlayer- Player API that will be implemented by the loader. Loader at least must implement on(\<loader-name\>:attached, ...) event handler
|
|
1133
|
+
*/
|
|
1134
|
+
declare interface Loader<PluginOwnConfig extends KeyValue, // FIXME extends Config
|
|
1135
|
+
PluginPlayer extends PlayerWith<_AttachedEventCheck>> extends Plugin_2<PluginOwnConfig, PluginPlayer> {
|
|
1136
|
+
onload: EnsureOnAttached<(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayer>, src: SourceObj) => void, PluginPlayer>;
|
|
1137
|
+
wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
|
|
1138
|
+
wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
declare const LOADING = "is-loading";
|
|
1142
|
+
|
|
1143
|
+
declare interface Logger {
|
|
1144
|
+
(...args: any[]): void;
|
|
1145
|
+
log(...args: any[]): void;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
declare type MapToBareConfigs<Plugins extends PluginCtor[]> = {
|
|
1149
|
+
[PluginType in keyof Plugins]: ExtractBareConfig<Plugins[PluginType]>;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
declare type MapToPlayerExtensions<Plugins extends PluginCtor[]> = {
|
|
1153
|
+
[PluginIndex in keyof Plugins]: ExtractPluginPlayerExtension<Plugins[PluginIndex]>;
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
declare const MENU_OPENED = "has-menu-opened";
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Combines plugin config and returns a type derived from Config
|
|
1160
|
+
*/
|
|
1161
|
+
declare type MergeConfigs<Plugins extends PluginCtor[]> = MergePluginConfigs<MapToBareConfigs<Plugins>>;
|
|
1162
|
+
|
|
1163
|
+
declare type MergePlayerExtensions<Plugins extends PluginCtor[]> = ArrayToIntersection<MapToPlayerExtensions<Plugins>>;
|
|
1164
|
+
|
|
1165
|
+
declare type MergePluginConfigs<PluginBareConfigs extends unknown[]> = HasSrcExtensions<PluginBareConfigs> extends true ? ConfigWithSourceExtensions<PluginBareConfigs> : ConfigWith<ArrayToIntersection<PluginBareConfigs>>;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* @public
|
|
1169
|
+
* general video events flowplayer uses internally
|
|
1170
|
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
|
|
1171
|
+
*/
|
|
1172
|
+
declare const /**
|
|
1173
|
+
@public
|
|
1174
|
+
* when a new player is inserted into the HTML
|
|
1175
|
+
*/ /**
|
|
1176
|
+
* @public
|
|
1177
|
+
* general video events flowplayer uses internally
|
|
1178
|
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
|
|
1179
|
+
*/
|
|
1180
|
+
METADATA = "loadedmetadata";
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* @public
|
|
1184
|
+
*/
|
|
1185
|
+
export declare type MillicastSrc = {
|
|
1186
|
+
/**
|
|
1187
|
+
* Stream name. use the Stream Name that you entered when you created the real-time stream in Wowza Video, either through
|
|
1188
|
+
* the {@link https://developer.wowza.com/docs/wowza-video/guides/video-source/encoder-camera/deliver-real-time-streams/ |REST API} or
|
|
1189
|
+
* in the {@link https://www.wowza.com/docs/deliver-real-time-streams-to-viewers-with-wowza-video| UI}.
|
|
1190
|
+
*/
|
|
1191
|
+
streamName: string;
|
|
1192
|
+
/* Excluded from this release type: streamAccountId */
|
|
1193
|
+
/**
|
|
1194
|
+
* Subscriber token. If you set a Playback Token by enabling stream security in the RTS Wowza Video configuration, you would add it as the subscriberToken.
|
|
1195
|
+
*/
|
|
1196
|
+
subscriberToken?: string;
|
|
1197
|
+
/* Excluded from this release type: __TEST_STREAM_ACCOUNT_ID__ */
|
|
1198
|
+
type: "wowza/rts";
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
@public
|
|
1203
|
+
* when a new player is inserted into the HTML
|
|
1204
|
+
*/
|
|
1205
|
+
declare const /**
|
|
1206
|
+
@public
|
|
1207
|
+
* when a new player is inserted into the HTML
|
|
1208
|
+
*/ /**
|
|
1209
|
+
@public
|
|
1210
|
+
* when a new player is inserted into the HTML
|
|
1211
|
+
*/ MOUNT = "mount";
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* @public
|
|
1215
|
+
*/
|
|
1216
|
+
declare type MountEventDetail = null;
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* @public
|
|
1220
|
+
*/
|
|
1221
|
+
declare const /**
|
|
1222
|
+
@public
|
|
1223
|
+
* when a new player is inserted into the HTML
|
|
1224
|
+
*/ /**
|
|
1225
|
+
* @public
|
|
1226
|
+
*/
|
|
1227
|
+
MOUSE_DOWN = "mousedown";
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* @public
|
|
1231
|
+
*/
|
|
1232
|
+
declare const /**
|
|
1233
|
+
@public
|
|
1234
|
+
* when a new player is inserted into the HTML
|
|
1235
|
+
*/ /**
|
|
1236
|
+
* @public
|
|
1237
|
+
*/
|
|
1238
|
+
MOUSE_ENTER = "mouseenter";
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* @public
|
|
1242
|
+
*/
|
|
1243
|
+
declare const /**
|
|
1244
|
+
@public
|
|
1245
|
+
* when a new player is inserted into the HTML
|
|
1246
|
+
*/ /**
|
|
1247
|
+
* @public
|
|
1248
|
+
*/
|
|
1249
|
+
MOUSE_LEAVE = "mouseleave";
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* @public
|
|
1253
|
+
*/
|
|
1254
|
+
declare const /**
|
|
1255
|
+
@public
|
|
1256
|
+
* when a new player is inserted into the HTML
|
|
1257
|
+
*/ /**
|
|
1258
|
+
* @public
|
|
1259
|
+
*/
|
|
1260
|
+
MOUSE_MOVE = "mousemove";
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* @public
|
|
1264
|
+
*/
|
|
1265
|
+
declare const /**
|
|
1266
|
+
@public
|
|
1267
|
+
* when a new player is inserted into the HTML
|
|
1268
|
+
*/ /**
|
|
1269
|
+
* @public
|
|
1270
|
+
*/
|
|
1271
|
+
MOUSE_UP = "mouseup";
|
|
1272
|
+
|
|
1273
|
+
declare const MUTED = "is-muted";
|
|
1274
|
+
|
|
1275
|
+
declare const NO_CONTROLS = "no-controls";
|
|
1276
|
+
|
|
1277
|
+
declare const NO_DVR = "no-timeline";
|
|
1278
|
+
|
|
1279
|
+
/* Excluded from this release type: NON_RECOVERABLE_ERROR */
|
|
1280
|
+
|
|
1281
|
+
/* Excluded from this release type: NonRecoverableErrorEventDetail */
|
|
1282
|
+
|
|
1283
|
+
/* Excluded from this release type: NQState */
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* @public
|
|
1287
|
+
*/
|
|
1288
|
+
export declare type OnStats = OnStats_2;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Represents the parsed WebRTC statistics collected.
|
|
1292
|
+
*/
|
|
1293
|
+
declare interface OnStats_2 {
|
|
1294
|
+
/** Gets the time at which the statistics were collected as a string value in ISO format. */
|
|
1295
|
+
timestamp: string;
|
|
1296
|
+
/** List of audio & video output statistics. */
|
|
1297
|
+
output: AudioVideoCollect<OutputAudio, OutputVideo>;
|
|
1298
|
+
/** List of audio & video input statistics. */
|
|
1299
|
+
input: AudioVideoCollect<InputAudio, InputVideo>;
|
|
1300
|
+
/** Raw statistics, if {@link WebRTCStatsOptions.includeRawStats | includeRawStats} is set to `true` in the collection options. */
|
|
1301
|
+
rawStats?: RTCStatsReport;
|
|
1302
|
+
/**
|
|
1303
|
+
* Represents the sum of all round trip time measurements in seconds since the beginning of the session,
|
|
1304
|
+
* based on STUN connectivity check [STUN-PATH-CHAR] responses (responsesReceived),
|
|
1305
|
+
* including those that reply to requests that are sent in order to verify consent [RFC7675].
|
|
1306
|
+
* The average round trip time can be computed from {@link totalRoundTripTime} by dividing it by {@link responsesReceived}.
|
|
1307
|
+
*/
|
|
1308
|
+
totalRoundTripTime?: number;
|
|
1309
|
+
/** Represents the total number of connectivity check responses received. */
|
|
1310
|
+
responsesReceived?: number;
|
|
1311
|
+
/**
|
|
1312
|
+
* Represents the latest round trip time measured in seconds, computed from both STUN connectivity checks [STUN-PATH-CHAR],
|
|
1313
|
+
* including those that are sent for consent verification [RFC7675].
|
|
1314
|
+
*/
|
|
1315
|
+
currentRoundTripTime?: number;
|
|
1316
|
+
/**
|
|
1317
|
+
* It is calculated by the underlying congestion control by combining the available
|
|
1318
|
+
* bitrate for all the outgoing RTP streams using this candidate pair.
|
|
1319
|
+
* The bitrate measurement does not count the size of the IP or other transport layers like TCP or UDP.
|
|
1320
|
+
* It is similar to the TIAS defined in [RFC3890], i.e.,
|
|
1321
|
+
* it is measured in bits per second and the bitrate is calculated over a 1 second window.
|
|
1322
|
+
*/
|
|
1323
|
+
availableOutgoingBitrate?: number;
|
|
1324
|
+
/**
|
|
1325
|
+
* It is calculated by the underlying congestion control by combining the available
|
|
1326
|
+
* bitrate for all the incoming RTP streams using this candidate pair.
|
|
1327
|
+
* The bitrate measurement does not count the size of the IP or other transport layers like TCP or UDP.
|
|
1328
|
+
* It is similar to the TIAS defined in [RFC3890], i.e.,
|
|
1329
|
+
* it is measured in bits per second and the bitrate is calculated over a 1 second window.
|
|
1330
|
+
*/
|
|
1331
|
+
availableIncomingBitrate?: number;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Represents the statistics object for an output audio stream.
|
|
1336
|
+
*/
|
|
1337
|
+
declare interface OutputAudio extends OutputBase {
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Represents the base statistics object for an output stream.
|
|
1342
|
+
*/
|
|
1343
|
+
declare interface OutputBase extends StatsBase, StatsCodec {
|
|
1344
|
+
/** Total number of bytes sent for this SSRC. */
|
|
1345
|
+
totalBytesSent?: number;
|
|
1346
|
+
/** Number of bytes sent for this SSRC since last collection. */
|
|
1347
|
+
bytesSentDelta?: number;
|
|
1348
|
+
/** Total number of packets sent for this SSRC. */
|
|
1349
|
+
totalPacketsSent?: number;
|
|
1350
|
+
/** Number of packets sent for this SSRC since last collection. */
|
|
1351
|
+
packetsSentDelta?: number;
|
|
1352
|
+
/**
|
|
1353
|
+
* Reflects the current encoder target in bits per second.
|
|
1354
|
+
* The target is an instantaneous value reflecting the encoder's settings,
|
|
1355
|
+
* but the resulting payload bytes sent per second, excluding retransmissions,
|
|
1356
|
+
* should closely correlate to the target.
|
|
1357
|
+
*/
|
|
1358
|
+
targetBitrate?: number;
|
|
1359
|
+
/** The total number of packets that were retransmitted for this SSRC. */
|
|
1360
|
+
retransmittedPacketsSent?: number;
|
|
1361
|
+
/** Number of packets that were retransmitted for this SSRC since last collection. */
|
|
1362
|
+
retransmittedPacketsSentDelta?: number;
|
|
1363
|
+
/**
|
|
1364
|
+
* The total number of bytes that were retransmitted for this SSRC,
|
|
1365
|
+
* only including payload bytes.
|
|
1366
|
+
*/
|
|
1367
|
+
retransmittedBytesSent?: number;
|
|
1368
|
+
/**
|
|
1369
|
+
* Number of bytes that were retransmitted for this SSRC,
|
|
1370
|
+
* only including payload bytes since last collection.
|
|
1371
|
+
*/
|
|
1372
|
+
retransmittedBytesSentDelta?: number;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Represents the statistics object for an output video stream.
|
|
1377
|
+
*/
|
|
1378
|
+
declare interface OutputVideo extends OutputBase {
|
|
1379
|
+
/** Represents the width of the last encoded frame. */
|
|
1380
|
+
frameWidth?: number;
|
|
1381
|
+
/** Represents the height of the last encoded frame. */
|
|
1382
|
+
frameHeight?: number;
|
|
1383
|
+
/** The number of encoded frames during the last second. */
|
|
1384
|
+
framesPerSecond?: number;
|
|
1385
|
+
/** Represents the total number of frames sent on this RTP stream. */
|
|
1386
|
+
framesSent?: number;
|
|
1387
|
+
/** The current reason for limiting the resolution and/or framerate, or "none" if not limited. */
|
|
1388
|
+
qualityLimitationReason: QualityLimitationReason;
|
|
1389
|
+
/** A record of the total time, in seconds, that this stream has spent in each quality limitation state. */
|
|
1390
|
+
qualityLimitationDurations?: Record<string, number>;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* @public
|
|
1395
|
+
*/
|
|
1396
|
+
declare type OVPMetadata = {
|
|
1397
|
+
player_id?: string;
|
|
1398
|
+
media_id?: string;
|
|
1399
|
+
ad_keywords?: string;
|
|
1400
|
+
title?: string;
|
|
1401
|
+
description?: string;
|
|
1402
|
+
category_name?: string;
|
|
1403
|
+
duration?: number;
|
|
1404
|
+
tags?: string;
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* @public
|
|
1409
|
+
*/
|
|
1410
|
+
declare const /**
|
|
1411
|
+
@public
|
|
1412
|
+
* when a new player is inserted into the HTML
|
|
1413
|
+
*/ /**
|
|
1414
|
+
* @public
|
|
1415
|
+
*/
|
|
1416
|
+
PAUSE = "pause";
|
|
1417
|
+
|
|
1418
|
+
declare const PAUSED = "is-paused";
|
|
1419
|
+
|
|
1420
|
+
declare type PickGlobalSrcExtension<PluginSrcs extends unknown[]> = {
|
|
1421
|
+
[Index in keyof PluginSrcs]: PluginSrcs[Index] extends {
|
|
1422
|
+
type: string;
|
|
1423
|
+
} ? unknown : PluginSrcs[Index];
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Maps incoming array to the src extension type
|
|
1428
|
+
* @example
|
|
1429
|
+
* ```
|
|
1430
|
+
* PickSrcExtensions<[
|
|
1431
|
+
* {configProp: boolean, src: UnsafeSource<{srcProp: boolean}>},
|
|
1432
|
+
* {}
|
|
1433
|
+
* ]> // = [{srcProp: boolean}, never]
|
|
1434
|
+
* ```
|
|
1435
|
+
*/
|
|
1436
|
+
declare type PickSrcExtensions<PluginBareConfigs extends unknown[]> = {
|
|
1437
|
+
[PluginType in keyof PluginBareConfigs]: ExtractSrcExtension<PluginBareConfigs[PluginType]>;
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* @public
|
|
1442
|
+
*/
|
|
1443
|
+
declare const /**
|
|
1444
|
+
@public
|
|
1445
|
+
* when a new player is inserted into the HTML
|
|
1446
|
+
*/ /**
|
|
1447
|
+
* @public
|
|
1448
|
+
*/
|
|
1449
|
+
PLAY = "play";
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* @public
|
|
1453
|
+
*/
|
|
1454
|
+
declare type Player = HTMLVideoElement & PlayerEventOverloads & {
|
|
1455
|
+
/* Excluded from this release type: renderPlugin */
|
|
1456
|
+
/**
|
|
1457
|
+
* Disables and enables the player.
|
|
1458
|
+
* @param flag -Forces disabled mode (true) or enabled mode (false). Disabled player cannot be seeked forward.
|
|
1459
|
+
*/
|
|
1460
|
+
toggleDisable: (flag?: boolean) => void;
|
|
1461
|
+
/* Excluded from this release type: original_src */
|
|
1462
|
+
/**
|
|
1463
|
+
* The root element of the video player. This is the immediate parent element of the video tag.
|
|
1464
|
+
*/
|
|
1465
|
+
root: PlayerRoot;
|
|
1466
|
+
/* Excluded from this release type: playerState */
|
|
1467
|
+
/* Excluded from this release type: reaper */
|
|
1468
|
+
/* Excluded from this release type: hasState */
|
|
1469
|
+
/* Excluded from this release type: transitionState */
|
|
1470
|
+
/**
|
|
1471
|
+
* Toggles between playing and paused mode.
|
|
1472
|
+
* @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.
|
|
1473
|
+
*/
|
|
1474
|
+
togglePlay(on?: boolean): Promise<void>;
|
|
1475
|
+
/* Excluded from this release type: toggleFullScreen */
|
|
1476
|
+
/**
|
|
1477
|
+
* @public
|
|
1478
|
+
* Toggles between normal and fullscreen mode. The optional flag attribute forces the normal sized (false) or fullscreen (false) mode.
|
|
1479
|
+
* The custom fullscreenenter and fullscreenexit events are sent respectively.
|
|
1480
|
+
*/
|
|
1481
|
+
toggleFullScreen(on?: boolean): void;
|
|
1482
|
+
/* Excluded from this release type: toggleMute */
|
|
1483
|
+
/**
|
|
1484
|
+
* Toggles between muted and original volume level.
|
|
1485
|
+
*/
|
|
1486
|
+
toggleMute(): void;
|
|
1487
|
+
/**
|
|
1488
|
+
* Removes a Flowplayer instance from `flowplayer.instances` and emits the `flowplayer.events.REAP` event, enabling cleanup of unsafe resources.
|
|
1489
|
+
*/
|
|
1490
|
+
destroy(): void;
|
|
1491
|
+
/* Excluded from this release type: render */
|
|
1492
|
+
/* Excluded from this release type: render */
|
|
1493
|
+
createComponents(...args: string[]): HTMLElement[];
|
|
1494
|
+
/**
|
|
1495
|
+
* Adds or changes configuration object. Usually used in conjunction with `setSrc()`. You can use all top-level config options like `subtitle:` , `logo:`, `ima:` etc.
|
|
1496
|
+
* @example
|
|
1497
|
+
* ```
|
|
1498
|
+
* setOpts({
|
|
1499
|
+
* subtitles:{
|
|
1500
|
+
* tracks:[
|
|
1501
|
+
* {
|
|
1502
|
+
* src: "1.vtt",
|
|
1503
|
+
* label: "English",
|
|
1504
|
+
* default: true
|
|
1505
|
+
* }, {
|
|
1506
|
+
* src: "2.vtt",
|
|
1507
|
+
* label: "Spanish",
|
|
1508
|
+
* default : false }]},
|
|
1509
|
+
* logo: "https://myserver.com/logo.png"
|
|
1510
|
+
* })
|
|
1511
|
+
* ```
|
|
1512
|
+
*/
|
|
1513
|
+
setOpts(config: Config): void;
|
|
1514
|
+
/**
|
|
1515
|
+
* Sets the video source to be played. The src attribute can be a string or an object similar to the src property.
|
|
1516
|
+
*/
|
|
1517
|
+
setSrc(sources: UnsafeSource): void;
|
|
1518
|
+
/* Excluded from this release type: setSrc */
|
|
1519
|
+
/* Excluded from this release type: setAttrs */
|
|
1520
|
+
/* Excluded from this release type: opt */
|
|
1521
|
+
/* Excluded from this release type: enqueueSeek */
|
|
1522
|
+
/* Excluded from this release type: setState */
|
|
1523
|
+
setState(state: PlayerState, flag: boolean): void;
|
|
1524
|
+
/* Excluded from this release type: toJSON */
|
|
1525
|
+
/**
|
|
1526
|
+
* Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
|
|
1527
|
+
*/
|
|
1528
|
+
i18n(k: TranslationKey): string;
|
|
1529
|
+
i18n(k: string, fallback: string): string;
|
|
1530
|
+
/* Excluded from this release type: deviceId */
|
|
1531
|
+
/* Excluded from this release type: live_state */
|
|
1532
|
+
/**
|
|
1533
|
+
* A reference to the configuration state of the player.
|
|
1534
|
+
*/
|
|
1535
|
+
opts: Config;
|
|
1536
|
+
/* Excluded from this release type: plugins */
|
|
1537
|
+
/* Excluded from this release type: dvr_offset */
|
|
1538
|
+
message?: {
|
|
1539
|
+
events: Record<string, string>;
|
|
1540
|
+
};
|
|
1541
|
+
/**
|
|
1542
|
+
* A boolean specifying whether the player is disabled and the user cannot seek forward using the mouse or keyboard.
|
|
1543
|
+
* Player is disabled and enabled with the `toggleDisable()` method.
|
|
1544
|
+
*/
|
|
1545
|
+
disabled: boolean;
|
|
1546
|
+
/* Excluded from this release type: started */
|
|
1547
|
+
/* Excluded from this release type: token */
|
|
1548
|
+
/* Excluded from this release type: _customElements */
|
|
1549
|
+
/* Excluded from this release type: _storage */
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
|
|
1553
|
+
|
|
1554
|
+
declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
|
|
1555
|
+
[REAP]: ReapEventDetail;
|
|
1556
|
+
[SOURCE]: SourceEventDetail;
|
|
1557
|
+
[MOUNT]: MountEventDetail;
|
|
1558
|
+
[LIVE]: LiveEventDetail;
|
|
1559
|
+
[DVR]: DvrEventDetail;
|
|
1560
|
+
[RETRY]: RetryEventDetail;
|
|
1561
|
+
[RECOVER]: RecoverEventDetail;
|
|
1562
|
+
[QUALITIES]: QualitiesEventDetail;
|
|
1563
|
+
[QUALITY_CHANGE]: QualityChangeEventDetail;
|
|
1564
|
+
[STANDARD_ERROR]: FlowplayerErrorEventDetail;
|
|
1565
|
+
/* Excluded from this release type: audioonlysource */
|
|
1566
|
+
/* Excluded from this release type: renderplugin */
|
|
1567
|
+
/* Excluded from this release type: "seek:queued" */
|
|
1568
|
+
/* Excluded from this release type: "seek:cancel" */
|
|
1569
|
+
/* Excluded from this release type: "plugin:registered" */
|
|
1570
|
+
/* Excluded from this release type: intersectionchange */
|
|
1571
|
+
/* Excluded from this release type: "flowplayer:feature" */
|
|
1572
|
+
/* Excluded from this release type: beforeplay */
|
|
1573
|
+
/* Excluded from this release type: beforepause */
|
|
1574
|
+
/* Excluded from this release type: state */
|
|
1575
|
+
/* Excluded from this release type: config */
|
|
1576
|
+
/* Excluded from this release type: "error:fatal" */
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
|
+
declare type PlayerCustomEventsOverloads = {
|
|
1580
|
+
/**
|
|
1581
|
+
* 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.
|
|
1582
|
+
*/
|
|
1583
|
+
on(event: typeof MOUNT, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof MOUNT]>) => void): Player;
|
|
1584
|
+
/**
|
|
1585
|
+
* Sent when an error occurs. Learn more about error handling.
|
|
1586
|
+
*/
|
|
1587
|
+
on(// FIXME - this event is in context-menu plugin
|
|
1588
|
+
event: typeof CONTEXT_MENU, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CONTEXT_MENU]>) => void): Player;
|
|
1589
|
+
/* Excluded from this release type: on */
|
|
1590
|
+
/* Excluded from this release type: on */
|
|
1591
|
+
/* Excluded from this release type: on */
|
|
1592
|
+
/**
|
|
1593
|
+
* Sent when the player becomes visible for the user.
|
|
1594
|
+
*/
|
|
1595
|
+
on(event: typeof VIEW_ENTER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_ENTER]>) => void): Player;
|
|
1596
|
+
/**
|
|
1597
|
+
* Sent when the player leaves the users viewport and is longer visible.
|
|
1598
|
+
*/
|
|
1599
|
+
on(event: typeof VIEW_LEAVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_LEAVE]>) => void): Player;
|
|
1600
|
+
/**
|
|
1601
|
+
* Sent right before the player src attribute is set. This allows you to change the video URL before playback.
|
|
1602
|
+
*/
|
|
1603
|
+
on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
|
|
1604
|
+
/**
|
|
1605
|
+
* Emitted when an Error recovery is attempted
|
|
1606
|
+
*/
|
|
1607
|
+
on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
|
|
1608
|
+
/**
|
|
1609
|
+
* 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.
|
|
1610
|
+
*/
|
|
1611
|
+
on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
|
|
1612
|
+
/**
|
|
1613
|
+
* Emitted when a player will retry to reload
|
|
1614
|
+
*/
|
|
1615
|
+
on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
|
|
1616
|
+
/* Excluded from this release type: on */
|
|
1617
|
+
/**
|
|
1618
|
+
* Emitted when the set of underlying qualities has changed.
|
|
1619
|
+
*/
|
|
1620
|
+
on(event: typeof QUALITIES, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITIES]>) => void): Player;
|
|
1621
|
+
/**
|
|
1622
|
+
* Emitted when the media changes quality.
|
|
1623
|
+
*/
|
|
1624
|
+
on(event: typeof QUALITY_CHANGE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITY_CHANGE]>) => void): Player;
|
|
1625
|
+
/**
|
|
1626
|
+
* Emitted when a standard FlowplayerError is encountered
|
|
1627
|
+
*/
|
|
1628
|
+
on(event: typeof STANDARD_ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof STANDARD_ERROR]>) => void): Player;
|
|
1629
|
+
/* Excluded from this release type: on */
|
|
1630
|
+
/**
|
|
1631
|
+
* Listen to this event to create a recommendations grid using the data passed with the event.
|
|
1632
|
+
*/
|
|
1633
|
+
on(event: typeof RECOMMENDATIONS_READY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOMMENDATIONS_READY]>) => void): Player;
|
|
1634
|
+
/* Excluded from this release type: on */
|
|
1635
|
+
/* Excluded from this release type: on */
|
|
1636
|
+
/**
|
|
1637
|
+
* when the player has started playing dvr content
|
|
1638
|
+
*/
|
|
1639
|
+
on(event: typeof DVR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof DVR]>) => void): Player;
|
|
1640
|
+
/**
|
|
1641
|
+
* when src is a livestream
|
|
1642
|
+
*/
|
|
1643
|
+
on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
|
|
1644
|
+
/* Excluded from this release type: on */
|
|
1645
|
+
/* Excluded from this release type: on */
|
|
1646
|
+
/* Excluded from this release type: on */
|
|
1647
|
+
/* Excluded from this release type: on */
|
|
1648
|
+
/* Excluded from this release type: on */
|
|
1649
|
+
/* Excluded from this release type: on */
|
|
1650
|
+
/**
|
|
1651
|
+
* TODO: this is a workaround, since not all event overloads are typed. when all plugin work is finished, remove this
|
|
1652
|
+
* https://wowzamedia.jira.com/browse/PLAY-653
|
|
1653
|
+
*/
|
|
1654
|
+
on<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1655
|
+
/* Excluded from this release type: on */
|
|
1656
|
+
/**
|
|
1657
|
+
* Same as `on()`, but the handler function is executed only once.
|
|
1658
|
+
*/
|
|
1659
|
+
once<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
|
|
1660
|
+
/**
|
|
1661
|
+
* Same as `on()`, but the handler function is executed only once.
|
|
1662
|
+
*/
|
|
1663
|
+
once<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
|
|
1664
|
+
once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1665
|
+
/**
|
|
1666
|
+
* Removes the event handler with the specified event type.
|
|
1667
|
+
*/
|
|
1668
|
+
off<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
|
|
1669
|
+
/**
|
|
1670
|
+
* Removes the event handler with the specified event type.
|
|
1671
|
+
*/
|
|
1672
|
+
off<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
|
|
1673
|
+
/**
|
|
1674
|
+
* Removes the event handler with the specified event type.
|
|
1675
|
+
*/
|
|
1676
|
+
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1677
|
+
/* Excluded from this release type: poll */
|
|
1678
|
+
emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1679
|
+
emit(event: never, data?: never): Player;
|
|
1680
|
+
/* Excluded from this release type: emit */
|
|
1681
|
+
/* Excluded from this release type: emit */
|
|
1682
|
+
};
|
|
1683
|
+
|
|
1684
|
+
declare type PlayerEmittableCustomEventsDetailMap = {
|
|
1685
|
+
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
1686
|
+
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
1687
|
+
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
1688
|
+
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
1689
|
+
};
|
|
1690
|
+
|
|
1691
|
+
declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* @public
|
|
1695
|
+
*/
|
|
1696
|
+
declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
|
|
1697
|
+
|
|
1698
|
+
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
1699
|
+
|
|
1700
|
+
declare type PlayerNativeEventsDetailMap = HTMLVideoElementEventMap;
|
|
1701
|
+
|
|
1702
|
+
declare type PlayerNativeEventsOverloads = {
|
|
1703
|
+
on<K extends keyof PlayerNativeEventsDetailMap>(event: K, handler: (ev: PlayerNativeEventsDetailMap[K]) => void): Player;
|
|
1704
|
+
};
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* @public
|
|
1708
|
+
* The root element of the video player. This is the immediate parent element of the video tag.
|
|
1709
|
+
*/
|
|
1710
|
+
declare type PlayerRoot = HTMLElement & {
|
|
1711
|
+
/* Excluded from this release type: prevWidth */
|
|
1712
|
+
};
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* @public
|
|
1716
|
+
*/
|
|
1717
|
+
declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
1718
|
+
|
|
1719
|
+
/* Excluded from this release type: _PlayerState */
|
|
1720
|
+
|
|
1721
|
+
/* Excluded from this release type: PlayerStates */
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* @public
|
|
1725
|
+
*/
|
|
1726
|
+
declare type PlayerWith<T> = T & Player;
|
|
1727
|
+
|
|
1728
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = {
|
|
1729
|
+
/* Excluded from this release type: on */
|
|
1730
|
+
} & Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1731
|
+
opts: PluginConfig;
|
|
1732
|
+
setOpts: (config: PluginConfig) => void;
|
|
1733
|
+
};
|
|
1734
|
+
|
|
1735
|
+
declare const PLAYING = "is-playing";
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* @public
|
|
1739
|
+
*/
|
|
1740
|
+
declare const /**
|
|
1741
|
+
@public
|
|
1742
|
+
* when a new player is inserted into the HTML
|
|
1743
|
+
*/ /**
|
|
1744
|
+
* @public
|
|
1745
|
+
*/
|
|
1746
|
+
PLAYING_2 = "playing";
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* @public
|
|
1750
|
+
*/
|
|
1751
|
+
declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1752
|
+
/**
|
|
1753
|
+
* a plugin must always implement the init method so a player instance knows how to initialize it
|
|
1754
|
+
*/
|
|
1755
|
+
init(config: PluginConfig, container: PlayerRoot, player: PluginPlayer): void;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
/* Excluded from this release type: PLUGIN_REGISTERED */
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* @public
|
|
1762
|
+
*/
|
|
1763
|
+
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1764
|
+
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
1765
|
+
pluginName: string;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
1769
|
+
|
|
1770
|
+
declare type PluginStates = string;
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* @public
|
|
1774
|
+
*/
|
|
1775
|
+
declare const /**
|
|
1776
|
+
@public
|
|
1777
|
+
* when a new player is inserted into the HTML
|
|
1778
|
+
*/ /**
|
|
1779
|
+
* @public
|
|
1780
|
+
*/
|
|
1781
|
+
PORTRAIT = "portrait";
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* @public
|
|
1785
|
+
*/
|
|
1786
|
+
declare const /**
|
|
1787
|
+
@public
|
|
1788
|
+
* when a new player is inserted into the HTML
|
|
1789
|
+
*/ /**
|
|
1790
|
+
* @public
|
|
1791
|
+
*/
|
|
1792
|
+
PROGRESS = "progress";
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* @public
|
|
1796
|
+
*/
|
|
1797
|
+
declare type QselOption = (Level & {
|
|
1798
|
+
level: number;
|
|
1799
|
+
}) | Representation | {
|
|
1800
|
+
name: string | number;
|
|
1801
|
+
encodingId: string;
|
|
1802
|
+
spatialLayerId: number;
|
|
1803
|
+
temporalLayerId: number;
|
|
1804
|
+
maxSpatialLayerId: number;
|
|
1805
|
+
maxTemporalLayerId: number;
|
|
1806
|
+
height: number;
|
|
1807
|
+
width: number;
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* @public
|
|
1812
|
+
* emitted whenever a list of qualities has been made available
|
|
1813
|
+
* when index 0 is the highest quality and index 0+N is the lowest
|
|
1814
|
+
*/
|
|
1815
|
+
declare const /**
|
|
1816
|
+
@public
|
|
1817
|
+
* when a new player is inserted into the HTML
|
|
1818
|
+
*/ /**
|
|
1819
|
+
* @public
|
|
1820
|
+
* emitted whenever a list of qualities has been made available
|
|
1821
|
+
* when index 0 is the highest quality and index 0+N is the lowest
|
|
1822
|
+
*/
|
|
1823
|
+
QUALITIES = "qualities";
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* @public
|
|
1827
|
+
*/
|
|
1828
|
+
declare type QualitiesEventDetail = QselOption[];
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* @public
|
|
1832
|
+
* emitted whenever the media changes quality
|
|
1833
|
+
*/
|
|
1834
|
+
declare const /**
|
|
1835
|
+
@public
|
|
1836
|
+
* when a new player is inserted into the HTML
|
|
1837
|
+
*/ /**
|
|
1838
|
+
* @public
|
|
1839
|
+
* emitted whenever the media changes quality
|
|
1840
|
+
*/
|
|
1841
|
+
QUALITY_CHANGE = "qualitychange";
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* @public
|
|
1845
|
+
*/
|
|
1846
|
+
declare type QualityChangeEventDetail = {
|
|
1847
|
+
before?: (Level & {
|
|
1848
|
+
level?: number;
|
|
1849
|
+
}) | Representation;
|
|
1850
|
+
after: (Level & {
|
|
1851
|
+
level?: number;
|
|
1852
|
+
}) | Representation;
|
|
1853
|
+
plugin: string;
|
|
1854
|
+
automatic: boolean;
|
|
1855
|
+
/* Excluded from this release type: downscale */
|
|
1856
|
+
};
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* The enum representing a reason for limiting the resolution and/or framerate, or `none` if not limited.
|
|
1860
|
+
*
|
|
1861
|
+
* @see [RTCQualityLimitationReason](https://w3c.github.io/webrtc-stats/#rtcqualitylimitationreason-enum)
|
|
1862
|
+
*/
|
|
1863
|
+
declare enum QualityLimitationReason {
|
|
1864
|
+
/** The resolution and/or framerate is not limited. */
|
|
1865
|
+
'none' = 0,
|
|
1866
|
+
/** The resolution and/or framerate is primarily limited due to CPU load. */
|
|
1867
|
+
'cpu' = 1,
|
|
1868
|
+
/**
|
|
1869
|
+
* The resolution and/or framerate is primarily limited due to congestion cues during bandwidth estimation.
|
|
1870
|
+
* Typical, congestion control algorithms use inter-arrival time,
|
|
1871
|
+
* round-trip time, packet or other congestion cues to perform bandwidth estimation.
|
|
1872
|
+
*/
|
|
1873
|
+
'bandwidth' = 2,
|
|
1874
|
+
/** The resolution and/or framerate is primarily limited for a reason other than the above. */
|
|
1875
|
+
'other' = 3
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
declare enum QualityOpts {
|
|
1879
|
+
LOW = 1,
|
|
1880
|
+
MEDIUM = 2,
|
|
1881
|
+
HIGH = 4
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
/**
|
|
1885
|
+
* @public
|
|
1886
|
+
* emitted when it is safe to clean up a fp instance
|
|
1887
|
+
*/
|
|
1888
|
+
declare const /**
|
|
1889
|
+
@public
|
|
1890
|
+
* when a new player is inserted into the HTML
|
|
1891
|
+
*/ /**
|
|
1892
|
+
* @public
|
|
1893
|
+
* emitted when it is safe to clean up a fp instance
|
|
1894
|
+
*/
|
|
1895
|
+
REAP = "reap";
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* @public
|
|
1899
|
+
*/
|
|
1900
|
+
declare type ReapEventDetail = null;
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* @public
|
|
1904
|
+
*/
|
|
1905
|
+
declare type RecommendationItem = {
|
|
1906
|
+
poster?: string;
|
|
1907
|
+
src?: UnsafeSource;
|
|
1908
|
+
title?: string;
|
|
1909
|
+
description?: string;
|
|
1910
|
+
metadata: OVPMetadata;
|
|
1911
|
+
chapters?: {
|
|
1912
|
+
src: string;
|
|
1913
|
+
};
|
|
1914
|
+
thumbnails?: {
|
|
1915
|
+
src: string;
|
|
1916
|
+
};
|
|
1917
|
+
subtitles?: string[];
|
|
1918
|
+
};
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* @public
|
|
1922
|
+
*/
|
|
1923
|
+
declare const /**
|
|
1924
|
+
@public
|
|
1925
|
+
* when a new player is inserted into the HTML
|
|
1926
|
+
*/ /**
|
|
1927
|
+
* @deprecated please use Endscreen.events.RECOMMENDATIONS_READY / flowplayer.endscreen.events.RECOMMENDATIONS_READY
|
|
1928
|
+
**/
|
|
1929
|
+
/**
|
|
1930
|
+
* @public
|
|
1931
|
+
*/
|
|
1932
|
+
RECOMMENDATIONS_READY = "recommendationsready";
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* @public
|
|
1936
|
+
*/
|
|
1937
|
+
declare type RecommendationsReadyEventDetail = {
|
|
1938
|
+
playlist: RecommendationItem[];
|
|
1939
|
+
};
|
|
1940
|
+
|
|
1941
|
+
declare const RECORD = "health:record";
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* @public
|
|
1945
|
+
* emitted when an Error recovery is attempted
|
|
1946
|
+
*/
|
|
1947
|
+
declare const /**
|
|
1948
|
+
@public
|
|
1949
|
+
* when a new player is inserted into the HTML
|
|
1950
|
+
*/ /**
|
|
1951
|
+
* @public
|
|
1952
|
+
* emitted when an Error recovery is attempted
|
|
1953
|
+
*/
|
|
1954
|
+
RECOVER = "recover";
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* @public
|
|
1958
|
+
*/
|
|
1959
|
+
declare type RecoverEventDetail = null;
|
|
1960
|
+
|
|
1961
|
+
/* Excluded from this release type: REMOTE_SESSION_ENDED */
|
|
1962
|
+
|
|
1963
|
+
/* Excluded from this release type: REMOTE_SESSION_STARTED */
|
|
1964
|
+
|
|
1965
|
+
/* Excluded from this release type: RENDER_PLUGIN */
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* @public
|
|
1969
|
+
*/
|
|
1970
|
+
declare type RenderPluginEventDetail = HTMLElement;
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* @public
|
|
1974
|
+
*/
|
|
1975
|
+
declare const /**
|
|
1976
|
+
@public
|
|
1977
|
+
* when a new player is inserted into the HTML
|
|
1978
|
+
*/ /**
|
|
1979
|
+
* @public
|
|
1980
|
+
*/
|
|
1981
|
+
RESIZE = "resize";
|
|
1982
|
+
|
|
1983
|
+
/**
|
|
1984
|
+
* @public
|
|
1985
|
+
*/
|
|
1986
|
+
declare const /**
|
|
1987
|
+
@public
|
|
1988
|
+
* when a new player is inserted into the HTML
|
|
1989
|
+
*/ /**
|
|
1990
|
+
* @public
|
|
1991
|
+
*/
|
|
1992
|
+
RETRY = "retry";
|
|
1993
|
+
|
|
1994
|
+
/**
|
|
1995
|
+
* @public
|
|
1996
|
+
*/
|
|
1997
|
+
declare type RetryEventDetail = FlowplayerErrorEventDetail;
|
|
1998
|
+
|
|
1999
|
+
declare const RetryMap: {
|
|
2000
|
+
readonly ON: "on";
|
|
2001
|
+
readonly WITHOUT_RECOVERY: "without_recovery";
|
|
2002
|
+
readonly OFF: "off";
|
|
2003
|
+
};
|
|
2004
|
+
|
|
2005
|
+
declare const RTL = "is-rtl";
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* @public
|
|
2009
|
+
* The Real-Time Streaming (RTS) plugin adds the ability to consume Wowza Video Real-Time Streaming at Scale (RTS\@S) streams, Wowza Video WebRTC streams, and Wowza Streaming Engine WebRTC streams.
|
|
2010
|
+
*/
|
|
2011
|
+
declare const RTS: PluginCtor<NoInfer<RTSConfig>, NoInfer<RTSPlayer>> & NoInfer<RTSAPI>;
|
|
2012
|
+
export default RTS;
|
|
2013
|
+
|
|
2014
|
+
/* Excluded from this release type: RTSAdapter */
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* @public
|
|
2018
|
+
*/
|
|
2019
|
+
export declare type RTSAPI = {
|
|
2020
|
+
events: RTSEvents;
|
|
2021
|
+
state: typeof RTSStatus;
|
|
2022
|
+
};
|
|
2023
|
+
|
|
2024
|
+
/**
|
|
2025
|
+
* @public
|
|
2026
|
+
*/
|
|
2027
|
+
export declare type RTSConfig = ConfigWith<{
|
|
2028
|
+
/**
|
|
2029
|
+
* RTS Source
|
|
2030
|
+
*/
|
|
2031
|
+
src: UnsafeSource<RTSSrc>;
|
|
2032
|
+
}>;
|
|
2033
|
+
|
|
2034
|
+
/**
|
|
2035
|
+
* @public
|
|
2036
|
+
*/
|
|
2037
|
+
export declare type RTSEvents = typeof events;
|
|
2038
|
+
|
|
2039
|
+
/**
|
|
2040
|
+
* @public
|
|
2041
|
+
*/
|
|
2042
|
+
export declare type RTSPlayer = PlayerWith<{
|
|
2043
|
+
/**
|
|
2044
|
+
* Emitted when the state of the RTS stream changes, for example to Idle or Receiving. For more, see {@link https://developer.wowza.com/docs/wowza-flowplayer/plugins/rts/#track-rts-event-status| Track RTS status.}
|
|
2045
|
+
*/
|
|
2046
|
+
on(event: RTSEvents["STATUS"], handler: (e: RTSStatusEvent) => void): RTSPlayer;
|
|
2047
|
+
/**
|
|
2048
|
+
* Emitted to capture the number of viewers for the RTS live stream in real time. For more, see {@link https://developer.wowza.com/docs/wowza-flowplayer/plugins/rts/#get-rts-viewer-counts |Get RTS viewer counts.}
|
|
2049
|
+
*/
|
|
2050
|
+
on(event: RTSEvents["VIEWER_COUNT"], handler: (e: RTSViewerCountEvent) => void): RTSPlayer;
|
|
2051
|
+
/**
|
|
2052
|
+
* Emitted every five seconds to capture metrics for active Millicast or RTS streams. For more, see {@link https://developer.wowza.com/docs/wowza-flowplayer/plugins/rts/#get-rts-statistics-beta| Get RTS statistics.}
|
|
2053
|
+
*/
|
|
2054
|
+
on(event: RTSEvents["STATS"], handler: (e: RTSStatsEvent) => void): RTSPlayer;
|
|
2055
|
+
/* Excluded from this release type: on */
|
|
2056
|
+
/* Excluded from this release type: on */
|
|
2057
|
+
/* Excluded from this release type: rtsAdapter */
|
|
2058
|
+
/* Excluded from this release type: emit */
|
|
2059
|
+
/* Excluded from this release type: emit */
|
|
2060
|
+
/* Excluded from this release type: emit */
|
|
2061
|
+
/* Excluded from this release type: emit */
|
|
2062
|
+
/* Excluded from this release type: emit */
|
|
2063
|
+
}>;
|
|
2064
|
+
|
|
2065
|
+
/* Excluded from this release type: RTSRecordDetail */
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* @public
|
|
2069
|
+
*/
|
|
2070
|
+
export declare type RTSSrc = MillicastSrc | WowzaWebRTCSrc;
|
|
2071
|
+
|
|
2072
|
+
/**
|
|
2073
|
+
* @public
|
|
2074
|
+
*/
|
|
2075
|
+
export declare type RTSStatsEvent = FPEvent<RTSStatsEventDetail>;
|
|
2076
|
+
|
|
2077
|
+
/**
|
|
2078
|
+
* @public
|
|
2079
|
+
*/
|
|
2080
|
+
export declare type RTSStatsEventDetail = {
|
|
2081
|
+
/**
|
|
2082
|
+
* The stats property is exposed by the underlying WebRTC protocol and can be used for all Wowza RTS streams. It relies on the web-webrtc-stats library to parse WebRTS statistics.
|
|
2083
|
+
*/
|
|
2084
|
+
stats: OnStats;
|
|
2085
|
+
};
|
|
2086
|
+
|
|
2087
|
+
/* Excluded from this release type: RTSStatsFrequentEvent */
|
|
2088
|
+
|
|
2089
|
+
/* Excluded from this release type: RTSStatsFrequentEventDetail */
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* @public
|
|
2093
|
+
*/
|
|
2094
|
+
export declare enum RTSStatus {
|
|
2095
|
+
/**
|
|
2096
|
+
* Signals the RTS stream has stopped broadcasting, but it's still available.
|
|
2097
|
+
*/
|
|
2098
|
+
Idle = 0,
|
|
2099
|
+
/**
|
|
2100
|
+
* Signals the RTS stream is starting or that it's already broadcasting.
|
|
2101
|
+
*/
|
|
2102
|
+
Receiving = 1,
|
|
2103
|
+
/* Excluded from this release type: Starting */
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* @public
|
|
2108
|
+
*/
|
|
2109
|
+
export declare type RTSStatusEvent = FPEvent<RTSStatusEventDetail>;
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* @public
|
|
2113
|
+
*/
|
|
2114
|
+
export declare type RTSStatusEventDetail = {
|
|
2115
|
+
status: RTSStatus;
|
|
2116
|
+
/* Excluded from this release type: message */
|
|
2117
|
+
/* Excluded from this release type: data */
|
|
2118
|
+
};
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* @public
|
|
2122
|
+
*/
|
|
2123
|
+
export declare type RTSViewerCountEvent = FPEvent<RTSViewerCountEventDetail>;
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* @public
|
|
2127
|
+
*/
|
|
2128
|
+
export declare type RTSViewerCountEventDetail = {
|
|
2129
|
+
viewerCount: number;
|
|
2130
|
+
};
|
|
2131
|
+
|
|
2132
|
+
declare const SampleRate: {
|
|
2133
|
+
/**
|
|
2134
|
+
* for new features with low adoption rates, or features that are likely to not be used frequently, will include every single instance in the sample.
|
|
2135
|
+
*/
|
|
2136
|
+
readonly All: 1;
|
|
2137
|
+
/**
|
|
2138
|
+
* for events we anticipate receive a lot of usage and maybe happen frequently per session
|
|
2139
|
+
*/
|
|
2140
|
+
readonly High: 0.1;
|
|
2141
|
+
/**
|
|
2142
|
+
* for events that can happen quickly, but not in massive amounts
|
|
2143
|
+
*/
|
|
2144
|
+
readonly Medium: 0.01;
|
|
2145
|
+
/**
|
|
2146
|
+
* for very high volume events where you only want to sample a low amount of them (think volumechange | timeupdate)
|
|
2147
|
+
*/
|
|
2148
|
+
readonly Low: 0.001;
|
|
2149
|
+
/**
|
|
2150
|
+
* placeholder for never sampling something, useful in situations where we want to add code to sample, but maybe not turn it on just yet.
|
|
2151
|
+
*/
|
|
2152
|
+
readonly None: 0;
|
|
2153
|
+
};
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* @public
|
|
2157
|
+
*/
|
|
2158
|
+
declare const /**
|
|
2159
|
+
@public
|
|
2160
|
+
* when a new player is inserted into the HTML
|
|
2161
|
+
*/ /**
|
|
2162
|
+
* @public
|
|
2163
|
+
*/
|
|
2164
|
+
SCROLL = "scroll";
|
|
2165
|
+
|
|
2166
|
+
declare const SEAMLESS = "is-seamless";
|
|
2167
|
+
|
|
2168
|
+
/* Excluded from this release type: SEEK_CANCEL */
|
|
2169
|
+
|
|
2170
|
+
/* Excluded from this release type: SEEK_QUEUED */
|
|
2171
|
+
|
|
2172
|
+
declare const SEEKABLE = "is-seekable";
|
|
2173
|
+
|
|
2174
|
+
/* Excluded from this release type: SeekCancelEventDetail */
|
|
2175
|
+
|
|
2176
|
+
/**
|
|
2177
|
+
* @public
|
|
2178
|
+
*/
|
|
2179
|
+
declare const /**
|
|
2180
|
+
@public
|
|
2181
|
+
* when a new player is inserted into the HTML
|
|
2182
|
+
*/ /**
|
|
2183
|
+
* @public
|
|
2184
|
+
*/
|
|
2185
|
+
SEEKED = "seeked";
|
|
2186
|
+
|
|
2187
|
+
declare const SEEKING = "is-seeking";
|
|
2188
|
+
|
|
2189
|
+
/**
|
|
2190
|
+
* @public
|
|
2191
|
+
*/
|
|
2192
|
+
declare const /**
|
|
2193
|
+
@public
|
|
2194
|
+
* when a new player is inserted into the HTML
|
|
2195
|
+
*/ /**
|
|
2196
|
+
* @public
|
|
2197
|
+
*/
|
|
2198
|
+
SEEKING_2 = "seeking";
|
|
2199
|
+
|
|
2200
|
+
/* Excluded from this release type: SeekQueuedEventDetail */
|
|
2201
|
+
|
|
2202
|
+
/**
|
|
2203
|
+
* @public
|
|
2204
|
+
* @deprecated please use Qsel.events.SET_QUALITY
|
|
2205
|
+
*/
|
|
2206
|
+
declare const /**
|
|
2207
|
+
@public
|
|
2208
|
+
* when a new player is inserted into the HTML
|
|
2209
|
+
*/ /**
|
|
2210
|
+
* @public
|
|
2211
|
+
* @deprecated please use Qsel.events.SET_QUALITY
|
|
2212
|
+
*/
|
|
2213
|
+
SET_QUALITY = "quality:set";
|
|
2214
|
+
|
|
2215
|
+
declare const SMALL = "is-small";
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* @public
|
|
2219
|
+
* emitted when a valid source is found prior to mounting
|
|
2220
|
+
*/
|
|
2221
|
+
declare const /**
|
|
2222
|
+
@public
|
|
2223
|
+
* when a new player is inserted into the HTML
|
|
2224
|
+
*/ /**
|
|
2225
|
+
* @public
|
|
2226
|
+
* emitted when a valid source is found prior to mounting
|
|
2227
|
+
*/
|
|
2228
|
+
SOURCE = "src";
|
|
2229
|
+
|
|
2230
|
+
/**
|
|
2231
|
+
* @public
|
|
2232
|
+
*/
|
|
2233
|
+
declare type SourceEventDetail = SourceObj;
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
* @public
|
|
2237
|
+
*/
|
|
2238
|
+
declare type SourceObj<T = unknown> = {
|
|
2239
|
+
src?: SourceStr;
|
|
2240
|
+
/**
|
|
2241
|
+
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
2242
|
+
*/
|
|
2243
|
+
type?: string;
|
|
2244
|
+
} & T;
|
|
2245
|
+
|
|
2246
|
+
/**
|
|
2247
|
+
* @public
|
|
2248
|
+
*/
|
|
2249
|
+
declare type SourceStr = string;
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* @public
|
|
2253
|
+
*/
|
|
2254
|
+
declare type SourceWith<T> = SourceObj & T;
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* @public
|
|
2258
|
+
* emitted to handle playback related errors
|
|
2259
|
+
*/
|
|
2260
|
+
declare const /**
|
|
2261
|
+
@public
|
|
2262
|
+
* when a new player is inserted into the HTML
|
|
2263
|
+
*/ /**
|
|
2264
|
+
* @public
|
|
2265
|
+
* emitted to handle playback related errors
|
|
2266
|
+
*/
|
|
2267
|
+
STANDARD_ERROR = "flowplayer:error";
|
|
2268
|
+
|
|
2269
|
+
declare const STARTING = "is-starting";
|
|
2270
|
+
|
|
2271
|
+
/* Excluded from this release type: STATE */
|
|
2272
|
+
|
|
2273
|
+
/* Excluded from this release type: StateEventDetail */
|
|
2274
|
+
|
|
2275
|
+
declare namespace states {
|
|
2276
|
+
export {
|
|
2277
|
+
PLAYING,
|
|
2278
|
+
FULLSCREEN,
|
|
2279
|
+
PAUSED,
|
|
2280
|
+
MUTED,
|
|
2281
|
+
LOADED,
|
|
2282
|
+
LOADING,
|
|
2283
|
+
STARTING,
|
|
2284
|
+
SEEKING,
|
|
2285
|
+
GRABBING,
|
|
2286
|
+
DISABLED,
|
|
2287
|
+
SMALL,
|
|
2288
|
+
TINY,
|
|
2289
|
+
RTL,
|
|
2290
|
+
TV,
|
|
2291
|
+
ENDED,
|
|
2292
|
+
LIVE_2 as LIVE,
|
|
2293
|
+
ERRORED,
|
|
2294
|
+
WAITING,
|
|
2295
|
+
AUTOPLAY,
|
|
2296
|
+
SEAMLESS,
|
|
2297
|
+
TOGGLING,
|
|
2298
|
+
LIVE_SEEKED,
|
|
2299
|
+
NO_DVR,
|
|
2300
|
+
HAS_POSTER,
|
|
2301
|
+
WILL_PLAY,
|
|
2302
|
+
WILL_PAUSE,
|
|
2303
|
+
MENU_OPENED,
|
|
2304
|
+
TOUCHED,
|
|
2305
|
+
HOVERED,
|
|
2306
|
+
TOUCH_DEVICE,
|
|
2307
|
+
WILL_SEEK,
|
|
2308
|
+
SEEKABLE,
|
|
2309
|
+
IN_VIEWPORT,
|
|
2310
|
+
NO_CONTROLS,
|
|
2311
|
+
DESTROYED,
|
|
2312
|
+
IS_SOURCE_PROCESSING
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
declare const STATS = "rts/stats";
|
|
2317
|
+
|
|
2318
|
+
/* Excluded from this release type: STATS_FREQUENT */
|
|
2319
|
+
|
|
2320
|
+
/**
|
|
2321
|
+
* Represents the base of the statistics object.
|
|
2322
|
+
*/
|
|
2323
|
+
declare interface StatsBase {
|
|
2324
|
+
/** A unique id that is associated with the object that was inspected to produce this {@link StatsBase} object. */
|
|
2325
|
+
id: string;
|
|
2326
|
+
/** The timestamp, associated with this object. The time is relative to the UNIX epoch (Jan 1, 1970, UTC). */
|
|
2327
|
+
timestamp: number;
|
|
2328
|
+
/** Media stream "identification-tag" negotiated and present in the local and remote descriptions. */
|
|
2329
|
+
mid?: string;
|
|
2330
|
+
/** Current bitrate in bytes per second. */
|
|
2331
|
+
bitrate?: number;
|
|
2332
|
+
/** Current packet rate in packets per second. */
|
|
2333
|
+
packetRate?: number;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* Represents the MIME type of the codec.
|
|
2338
|
+
*/
|
|
2339
|
+
declare interface StatsCodec {
|
|
2340
|
+
/** The codec MIME media type/subtype. e.g., video/vp8 or equivalent. */
|
|
2341
|
+
mimeType?: string;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
declare const STATUS = "rts/status";
|
|
2345
|
+
|
|
2346
|
+
/**
|
|
2347
|
+
* @public
|
|
2348
|
+
*/
|
|
2349
|
+
declare const /**
|
|
2350
|
+
@public
|
|
2351
|
+
* when a new player is inserted into the HTML
|
|
2352
|
+
*/ /**
|
|
2353
|
+
* @public
|
|
2354
|
+
*/
|
|
2355
|
+
TIME_UPDATE = "timeupdate";
|
|
2356
|
+
|
|
2357
|
+
declare const TINY = "is-tiny";
|
|
2358
|
+
|
|
2359
|
+
declare const TOGGLING = "is-toggling";
|
|
2360
|
+
|
|
2361
|
+
/**
|
|
2362
|
+
* @public
|
|
2363
|
+
*/
|
|
2364
|
+
declare const /**
|
|
2365
|
+
@public
|
|
2366
|
+
* when a new player is inserted into the HTML
|
|
2367
|
+
*/ /**
|
|
2368
|
+
* @public
|
|
2369
|
+
*/
|
|
2370
|
+
TOUCH_CANCEL = "touchcancel";
|
|
2371
|
+
|
|
2372
|
+
declare const TOUCH_DEVICE = "is-touch-device";
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* @public
|
|
2376
|
+
*/
|
|
2377
|
+
declare const /**
|
|
2378
|
+
@public
|
|
2379
|
+
* when a new player is inserted into the HTML
|
|
2380
|
+
*/ /**
|
|
2381
|
+
* @public
|
|
2382
|
+
*/
|
|
2383
|
+
TOUCH_END = "touchend";
|
|
2384
|
+
|
|
2385
|
+
/**
|
|
2386
|
+
* @public
|
|
2387
|
+
*/
|
|
2388
|
+
declare const /**
|
|
2389
|
+
@public
|
|
2390
|
+
* when a new player is inserted into the HTML
|
|
2391
|
+
*/ /**
|
|
2392
|
+
* @public
|
|
2393
|
+
*/
|
|
2394
|
+
TOUCH_MOVE = "touchmove";
|
|
2395
|
+
|
|
2396
|
+
/**
|
|
2397
|
+
* @public
|
|
2398
|
+
*/
|
|
2399
|
+
declare const /**
|
|
2400
|
+
@public
|
|
2401
|
+
* when a new player is inserted into the HTML
|
|
2402
|
+
*/ /**
|
|
2403
|
+
* @public
|
|
2404
|
+
*/
|
|
2405
|
+
TOUCH_START = "touchstart";
|
|
2406
|
+
|
|
2407
|
+
declare const TOUCHED = "is-touched";
|
|
2408
|
+
|
|
2409
|
+
/**
|
|
2410
|
+
* @public
|
|
2411
|
+
* All possible full paths to each translation, i.e. "core.mute"| "core.play" | "ads.ad" etc.
|
|
2412
|
+
* This type is useful for developers using translation querying based on path, like in lodash's get()
|
|
2413
|
+
*/
|
|
2414
|
+
declare type TranslationKey = Paths<Translation, {
|
|
2415
|
+
leavesOnly: true;
|
|
2416
|
+
}>;
|
|
2417
|
+
|
|
2418
|
+
declare type TSampleRate = typeof SampleRate;
|
|
2419
|
+
|
|
2420
|
+
declare const TV = "is-tv";
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* @public
|
|
2424
|
+
*/
|
|
2425
|
+
declare type UnsafeSource<SrcMixin = unknown> = SourceStr | SourceObj<SrcMixin> | Array<SourceStr | SourceObj<SrcMixin>>;
|
|
2426
|
+
|
|
2427
|
+
declare type ValidSampleRate = TSampleRate[keyof TSampleRate];
|
|
2428
|
+
|
|
2429
|
+
/**
|
|
2430
|
+
* @public
|
|
2431
|
+
* emitted when a video track is selected
|
|
2432
|
+
*/
|
|
2433
|
+
declare const /**
|
|
2434
|
+
@public
|
|
2435
|
+
* when a new player is inserted into the HTML
|
|
2436
|
+
*/ /**
|
|
2437
|
+
* @public
|
|
2438
|
+
* emitted when a video track is selected
|
|
2439
|
+
*/
|
|
2440
|
+
VIDEO_TRACK_SELECT = "tracks:video:select";
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* @public
|
|
2444
|
+
* emitted whenever multiple video tracks are detected
|
|
2445
|
+
*/
|
|
2446
|
+
declare const /**
|
|
2447
|
+
@public
|
|
2448
|
+
* when a new player is inserted into the HTML
|
|
2449
|
+
*/ /**
|
|
2450
|
+
* @public
|
|
2451
|
+
* emitted whenever multiple video tracks are detected
|
|
2452
|
+
*/
|
|
2453
|
+
VIDEO_TRACKS = "videoTracks";
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* @public
|
|
2457
|
+
* when a player enters the viewpoint
|
|
2458
|
+
*/
|
|
2459
|
+
declare const /**
|
|
2460
|
+
@public
|
|
2461
|
+
* when a new player is inserted into the HTML
|
|
2462
|
+
*/ /**
|
|
2463
|
+
* @public
|
|
2464
|
+
* when a player enters the viewpoint
|
|
2465
|
+
*/
|
|
2466
|
+
VIEW_ENTER = "viewenter";
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* @public
|
|
2470
|
+
* when a player leaves the viewport
|
|
2471
|
+
*/
|
|
2472
|
+
declare const /**
|
|
2473
|
+
@public
|
|
2474
|
+
* when a new player is inserted into the HTML
|
|
2475
|
+
*/ /**
|
|
2476
|
+
* @public
|
|
2477
|
+
* when a player leaves the viewport
|
|
2478
|
+
*/
|
|
2479
|
+
VIEW_LEAVE = "viewleave";
|
|
2480
|
+
|
|
2481
|
+
/**
|
|
2482
|
+
* @public
|
|
2483
|
+
*/
|
|
2484
|
+
declare type ViewEnterEventDetail = null;
|
|
2485
|
+
|
|
2486
|
+
declare const VIEWER_COUNT = "rts/viewer-count";
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* @public
|
|
2490
|
+
*/
|
|
2491
|
+
declare type ViewLeaveEventDetail = null;
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* @public
|
|
2495
|
+
*/
|
|
2496
|
+
declare const /**
|
|
2497
|
+
@public
|
|
2498
|
+
* when a new player is inserted into the HTML
|
|
2499
|
+
*/ /**
|
|
2500
|
+
* @public
|
|
2501
|
+
*/
|
|
2502
|
+
VOLUME_CHANGE = "volumechange";
|
|
2503
|
+
|
|
2504
|
+
declare const WAITING = "is-waiting";
|
|
2505
|
+
|
|
2506
|
+
/**
|
|
2507
|
+
* @public
|
|
2508
|
+
*/
|
|
2509
|
+
declare const /**
|
|
2510
|
+
@public
|
|
2511
|
+
* when a new player is inserted into the HTML
|
|
2512
|
+
*/ /**
|
|
2513
|
+
* @public
|
|
2514
|
+
*/
|
|
2515
|
+
WAITING_2 = "waiting";
|
|
2516
|
+
|
|
2517
|
+
/* Excluded from this release type: WEBKIT_NEEDKEY */
|
|
2518
|
+
|
|
2519
|
+
declare const WILL_PAUSE = "will-pause";
|
|
2520
|
+
|
|
2521
|
+
declare const WILL_PLAY = "will-play";
|
|
2522
|
+
|
|
2523
|
+
declare const WILL_SEEK = "will-seek";
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
* @public
|
|
2527
|
+
*/
|
|
2528
|
+
export declare type WowzaWebRTCSrc = {
|
|
2529
|
+
/**
|
|
2530
|
+
* The Signaling URL or SDP URL in Wowza Streaming Engine contains your StreamLock domain. The StreamLock domain can be found as part of your SSL certificate name.
|
|
2531
|
+
*
|
|
2532
|
+
* If using legacy Wowza video: the SDP URL listed on the Overview tab for your WebRTC stream in Wowza Video.
|
|
2533
|
+
*/
|
|
2534
|
+
sdpUrl: string;
|
|
2535
|
+
/**
|
|
2536
|
+
* The name of the application you set up in Wowza Streaming Engine for WebRTC streams.
|
|
2537
|
+
*
|
|
2538
|
+
* If using legacy Wowza video: The value from the Application field on the Overview tab for your WebRTC stream in Wowza Video.
|
|
2539
|
+
*/
|
|
2540
|
+
applicationName: string;
|
|
2541
|
+
/**
|
|
2542
|
+
* The stream name can be found on the Incoming Streams page for the application you created for the stream in Wowza Streaming Engine.
|
|
2543
|
+
*
|
|
2544
|
+
* If using legacy Wowza video: The value from the Stream Name field on the Overview tab for your WebRTC stream in Wowza Video.
|
|
2545
|
+
*/
|
|
2546
|
+
streamName: string;
|
|
2547
|
+
token?: string;
|
|
2548
|
+
type: "wowza/webrtc";
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2551
|
+
export { }
|