@flowplayer/player 3.23.0 → 3.24.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/events.js +148 -74
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/index.d.ts +7 -37
- package/package.json +3 -2
- package/plugins/ads.d.ts +12 -42
- package/plugins/ads.js +2 -2
- package/plugins/airplay.d.ts +7 -42
- package/plugins/analytics.d.ts +7 -42
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +7 -42
- package/plugins/audio.d.ts +7 -42
- package/plugins/chapters.d.ts +7 -42
- package/plugins/chromecast.d.ts +7 -42
- package/plugins/comscore.d.ts +7 -42
- package/plugins/consent.d.ts +7 -42
- package/plugins/context-menu.d.ts +7 -42
- package/plugins/cuepoints.d.ts +7 -42
- package/plugins/dash.d.ts +7 -42
- package/plugins/drm.d.ts +69 -8
- package/plugins/endscreen.d.ts +7 -42
- package/plugins/fas.d.ts +7 -42
- package/plugins/float-on-scroll.d.ts +7 -42
- package/plugins/ga4.d.ts +7 -42
- package/plugins/gemius.d.ts +7 -42
- package/plugins/google-analytics.d.ts +7 -42
- package/plugins/hls.d.ts +7 -42
- package/plugins/id3.d.ts +7 -42
- package/plugins/iframe.d.ts +7 -42
- package/plugins/keyboard.d.ts +7 -42
- package/plugins/media-session.d.ts +7 -42
- package/plugins/message.d.ts +7 -42
- package/plugins/ovp.d.ts +7 -42
- package/plugins/playlist.d.ts +94 -43
- package/plugins/preview.d.ts +7 -42
- package/plugins/qsel.d.ts +7 -42
- package/plugins/qul.d.ts +7 -42
- package/plugins/rts.d.ts +7 -42
- package/plugins/share.d.ts +7 -42
- package/plugins/speed.d.ts +7 -42
- package/plugins/ssai.d.ts +7 -42
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +10 -42
- package/plugins/thumbnails.d.ts +7 -42
- package/plugins/tizen.d.ts +7 -42
- package/plugins/vtsel.d.ts +7 -42
- package/plugins/webos.d.ts +7 -42
- package/util/loader.d.ts +7 -42
- package/util/loader.js +9 -8
package/plugins/vtsel.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
262
260
|
|
|
263
261
|
declare const DISABLED = "is-disabled";
|
|
264
262
|
|
|
265
|
-
/**
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @public
|
|
272
|
-
*/
|
|
273
|
-
declare type DRMConfiguration = {
|
|
274
|
-
license_server: string;
|
|
275
|
-
http_headers?: Record<string, string>;
|
|
276
|
-
certificate?: string;
|
|
277
|
-
vendor?: string | DRMVendorImplementation;
|
|
278
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
279
|
-
query_params?: Record<string, string>;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @public
|
|
284
|
-
*/
|
|
285
|
-
declare type DRMSourceConfiguration = {
|
|
286
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @public
|
|
291
|
-
*/
|
|
292
|
-
declare type DRMVendorImplementation = {
|
|
293
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
294
|
-
fairplay_request_license: (url: string, params: {
|
|
295
|
-
message: any;
|
|
296
|
-
assetId: string;
|
|
297
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
263
|
/**
|
|
301
264
|
* @public
|
|
302
265
|
*/
|
|
@@ -530,13 +493,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
530
493
|
* @param selector - query selector of the HTML element where player will render
|
|
531
494
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
532
495
|
*/
|
|
533
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
496
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
534
497
|
/**
|
|
535
498
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
536
499
|
* @param element - HTML element where player will render
|
|
537
500
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
538
501
|
*/
|
|
539
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
502
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
540
503
|
}
|
|
541
504
|
|
|
542
505
|
/**
|
|
@@ -1155,6 +1118,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1155
1118
|
*/
|
|
1156
1119
|
declare type PlayerWith<T> = T & Player;
|
|
1157
1120
|
|
|
1121
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1122
|
+
opts: PluginConfig;
|
|
1123
|
+
setOpts: (config: PluginConfig) => void;
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1158
1126
|
declare const PLAYING = "is-playing";
|
|
1159
1127
|
|
|
1160
1128
|
/**
|
|
@@ -1483,7 +1451,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1483
1451
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1484
1452
|
*/
|
|
1485
1453
|
type?: string;
|
|
1486
|
-
drm?: DRMSourceConfiguration;
|
|
1487
1454
|
} & T;
|
|
1488
1455
|
|
|
1489
1456
|
/**
|
|
@@ -1803,6 +1770,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1803
1770
|
|
|
1804
1771
|
declare const WILL_SEEK = "will-seek";
|
|
1805
1772
|
|
|
1806
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1807
|
-
|
|
1808
1773
|
export { }
|
package/plugins/webos.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
262
260
|
|
|
263
261
|
declare const DISABLED = "is-disabled";
|
|
264
262
|
|
|
265
|
-
/**
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @public
|
|
272
|
-
*/
|
|
273
|
-
declare type DRMConfiguration = {
|
|
274
|
-
license_server: string;
|
|
275
|
-
http_headers?: Record<string, string>;
|
|
276
|
-
certificate?: string;
|
|
277
|
-
vendor?: string | DRMVendorImplementation;
|
|
278
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
279
|
-
query_params?: Record<string, string>;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @public
|
|
284
|
-
*/
|
|
285
|
-
declare type DRMSourceConfiguration = {
|
|
286
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @public
|
|
291
|
-
*/
|
|
292
|
-
declare type DRMVendorImplementation = {
|
|
293
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
294
|
-
fairplay_request_license: (url: string, params: {
|
|
295
|
-
message: any;
|
|
296
|
-
assetId: string;
|
|
297
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
263
|
/**
|
|
301
264
|
* @public
|
|
302
265
|
*/
|
|
@@ -523,13 +486,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
523
486
|
* @param selector - query selector of the HTML element where player will render
|
|
524
487
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
525
488
|
*/
|
|
526
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
489
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
527
490
|
/**
|
|
528
491
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
529
492
|
* @param element - HTML element where player will render
|
|
530
493
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
531
494
|
*/
|
|
532
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
495
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
533
496
|
}
|
|
534
497
|
|
|
535
498
|
/**
|
|
@@ -1146,6 +1109,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1146
1109
|
*/
|
|
1147
1110
|
declare type PlayerWith<T> = T & Player;
|
|
1148
1111
|
|
|
1112
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1113
|
+
opts: PluginConfig;
|
|
1114
|
+
setOpts: (config: PluginConfig) => void;
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1149
1117
|
declare const PLAYING = "is-playing";
|
|
1150
1118
|
|
|
1151
1119
|
/**
|
|
@@ -1474,7 +1442,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1474
1442
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1475
1443
|
*/
|
|
1476
1444
|
type?: string;
|
|
1477
|
-
drm?: DRMSourceConfiguration;
|
|
1478
1445
|
} & T;
|
|
1479
1446
|
|
|
1480
1447
|
/**
|
|
@@ -1710,6 +1677,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1710
1677
|
|
|
1711
1678
|
declare const WILL_SEEK = "will-seek";
|
|
1712
1679
|
|
|
1713
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1714
|
-
|
|
1715
1680
|
export { }
|
package/util/loader.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -270,41 +268,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
270
268
|
|
|
271
269
|
declare const DISABLED = "is-disabled";
|
|
272
270
|
|
|
273
|
-
/**
|
|
274
|
-
* @public
|
|
275
|
-
*/
|
|
276
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @public
|
|
280
|
-
*/
|
|
281
|
-
declare type DRMConfiguration = {
|
|
282
|
-
license_server: string;
|
|
283
|
-
http_headers?: Record<string, string>;
|
|
284
|
-
certificate?: string;
|
|
285
|
-
vendor?: string | DRMVendorImplementation;
|
|
286
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
287
|
-
query_params?: Record<string, string>;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* @public
|
|
292
|
-
*/
|
|
293
|
-
declare type DRMSourceConfiguration = {
|
|
294
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* @public
|
|
299
|
-
*/
|
|
300
|
-
declare type DRMVendorImplementation = {
|
|
301
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
302
|
-
fairplay_request_license: (url: string, params: {
|
|
303
|
-
message: any;
|
|
304
|
-
assetId: string;
|
|
305
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
306
|
-
};
|
|
307
|
-
|
|
308
271
|
/**
|
|
309
272
|
* @public
|
|
310
273
|
*/
|
|
@@ -531,13 +494,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
531
494
|
* @param selector - query selector of the HTML element where player will render
|
|
532
495
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
533
496
|
*/
|
|
534
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
497
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
535
498
|
/**
|
|
536
499
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
537
500
|
* @param element - HTML element where player will render
|
|
538
501
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
539
502
|
*/
|
|
540
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
503
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
541
504
|
}
|
|
542
505
|
|
|
543
506
|
/**
|
|
@@ -1164,6 +1127,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1164
1127
|
*/
|
|
1165
1128
|
declare type PlayerWith<T> = T & Player;
|
|
1166
1129
|
|
|
1130
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1131
|
+
opts: PluginConfig;
|
|
1132
|
+
setOpts: (config: PluginConfig) => void;
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1167
1135
|
declare const PLAYING = "is-playing";
|
|
1168
1136
|
|
|
1169
1137
|
/**
|
|
@@ -1497,7 +1465,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1497
1465
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1498
1466
|
*/
|
|
1499
1467
|
type?: string;
|
|
1500
|
-
drm?: DRMSourceConfiguration;
|
|
1501
1468
|
} & T;
|
|
1502
1469
|
|
|
1503
1470
|
/**
|
|
@@ -1721,6 +1688,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1721
1688
|
|
|
1722
1689
|
declare const WILL_SEEK = "will-seek";
|
|
1723
1690
|
|
|
1724
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1725
|
-
|
|
1726
1691
|
export { }
|
package/util/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
5
|
/**
|
|
6
6
|
* @public
|
|
7
7
|
* adds support for asynchronous plugin loading
|
|
@@ -18,7 +18,7 @@ plugin // Only expose explicitly stated API with NoInfer
|
|
|
18
18
|
return plugin;
|
|
19
19
|
if (!("flowplayer" in root))
|
|
20
20
|
root.flowplayer = { extensions: [] };
|
|
21
|
-
|
|
21
|
+
const self = root.flowplayer;
|
|
22
22
|
if (typeof self === "function") {
|
|
23
23
|
self(plugin);
|
|
24
24
|
return plugin;
|
|
@@ -29,14 +29,12 @@ plugin // Only expose explicitly stated API with NoInfer
|
|
|
29
29
|
self.extensions.push(plugin);
|
|
30
30
|
return plugin;
|
|
31
31
|
}
|
|
32
|
-
exports.define = define;
|
|
33
32
|
/**
|
|
34
33
|
* @public
|
|
35
34
|
*/
|
|
36
35
|
function isESM() {
|
|
37
36
|
return document.currentScript === null;
|
|
38
37
|
}
|
|
39
|
-
exports.isESM = isESM;
|
|
40
38
|
/**
|
|
41
39
|
* @public
|
|
42
40
|
*/
|
|
@@ -47,16 +45,19 @@ function root() {
|
|
|
47
45
|
return global;
|
|
48
46
|
return {};
|
|
49
47
|
}
|
|
50
|
-
exports.root = root;
|
|
51
48
|
/**
|
|
52
49
|
* @public
|
|
53
50
|
*/
|
|
54
51
|
function modules() {
|
|
55
|
-
|
|
52
|
+
const self = root();
|
|
56
53
|
// naively check for existance of flowplayer umd
|
|
57
|
-
|
|
54
|
+
const mod = self.flowplayer ? self.flowplayer : { extensions: [] };
|
|
58
55
|
if (!Array.isArray(mod.extensions))
|
|
59
56
|
mod.extensions = [];
|
|
60
57
|
return mod;
|
|
61
58
|
}
|
|
59
|
+
|
|
60
|
+
exports.define = define;
|
|
61
|
+
exports.isESM = isESM;
|
|
62
62
|
exports.modules = modules;
|
|
63
|
+
exports.root = root;
|