@eluvio/elv-player-js 2.0.7 → 2.0.8
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/README.md +1 -0
- package/dist/.vite/manifest.json +18 -18
- package/dist/{Analytics-DSscOw1L.js → Analytics-D-ksy4rQ.js} +1 -1
- package/dist/{Analytics-B84nIsJX.mjs → Analytics-DH0EVHD9.mjs} +1 -1
- package/dist/{dash.all.min-B90T_UZz.mjs → dash.all.min-3Kp7t41R.mjs} +1 -1
- package/dist/{dash.all.min-SWFWgsyT.js → dash.all.min-CvudIPJ7.js} +1 -1
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/hls-DHFAkcd1.mjs +16848 -0
- package/dist/hls-VH5py-kh.js +26 -0
- package/dist/{index-CvpJ3Be3.mjs → index-3xP7b7vd.mjs} +1 -1
- package/dist/{index-BrPAkRZj.js → index-C1A0BH3J.js} +1 -1
- package/dist/index-CKPZjV1T.js +375 -0
- package/dist/{index-CS8bweI1.mjs → index-CQ7iPH2P.mjs} +19047 -18990
- package/lib/player/Player.js +25 -12
- package/lib/player/PlayerParameters.js +5 -2
- package/package.json +4 -3
- package/dist/hls-B8WS8h-m.mjs +0 -15423
- package/dist/hls-agwebW2Y.js +0 -26
- package/dist/index-D7OJm9wP.js +0 -366
package/lib/player/Player.js
CHANGED
|
@@ -463,14 +463,14 @@ export class EluvioPlayer {
|
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
async __InitializeHLS({playoutUrl, authorizationToken, drm, multiviewOptions}) {
|
|
466
|
+
async __InitializeHLS({playoutUrl, authorizationToken, drm, drms, multiviewOptions}) {
|
|
467
467
|
this.HLS = (await import("hls.js")).default;
|
|
468
468
|
|
|
469
|
-
if([
|
|
469
|
+
if([EluvioPlayerParameters.drms.FAIRPLAY, EluvioPlayerParameters.drms.SAMPLE_AES].includes(drm) || !this.HLS.isSupported()) {
|
|
470
470
|
// HLS JS NOT SUPPORTED - Handle native player
|
|
471
471
|
this.nativeHLS = true;
|
|
472
472
|
|
|
473
|
-
if(drm ===
|
|
473
|
+
if(drm === EluvioPlayerParameters.drms.FAIRPLAY) {
|
|
474
474
|
InitializeFairPlayStream({playoutOptions: this.sourceOptions.playoutOptions, video: this.video});
|
|
475
475
|
} else {
|
|
476
476
|
this.video.src = playoutUrl.toString();
|
|
@@ -494,27 +494,40 @@ export class EluvioPlayer {
|
|
|
494
494
|
// HLS JS
|
|
495
495
|
playoutUrl.searchParams.delete("authorization");
|
|
496
496
|
|
|
497
|
+
let drmSettings = {};
|
|
498
|
+
if (drm === EluvioPlayerParameters.drms.PLAYREADY) {
|
|
499
|
+
drmSettings = {
|
|
500
|
+
drmSystems: {
|
|
501
|
+
"com.microsoft.playready": {
|
|
502
|
+
licenseUrl: drms[drm].licenseServers[0]
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
emeEnabled: true,
|
|
506
|
+
licenseXhrSetup: (xhr, url) => {
|
|
507
|
+
xhr.open("POST", url, true);
|
|
508
|
+
xhr.setRequestHeader("Authorization", `Bearer ${authorizationToken}`);
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
|
|
497
513
|
const profileSettings = (PlayerProfiles[this.playerOptions.playerProfile] || {}).hlsSettings || {};
|
|
498
514
|
const customProfileSettings = this.playerOptions.playerProfile === EluvioPlayerParameters.playerProfile.CUSTOM ? this.customHLSOptions : {};
|
|
499
515
|
|
|
500
516
|
this.hlsOptions = {
|
|
501
517
|
capLevelToPlayerSize: this.playerOptions.capLevelToPlayerSize,
|
|
502
|
-
...profileSettings,
|
|
503
|
-
...customProfileSettings
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
const hlsPlayer = new this.HLS({
|
|
507
518
|
xhrSetup: xhr => {
|
|
508
519
|
xhr.setRequestHeader("Authorization", `Bearer ${authorizationToken}`);
|
|
509
|
-
|
|
510
520
|
if((this.playerOptions.hlsjsOptions || {}).xhrSetup) {
|
|
511
521
|
this.playerOptions.hlsjsOptions.xhrSetup(xhr);
|
|
512
522
|
}
|
|
513
|
-
|
|
514
523
|
return xhr;
|
|
515
524
|
},
|
|
516
|
-
...
|
|
517
|
-
|
|
525
|
+
...drmSettings,
|
|
526
|
+
...profileSettings,
|
|
527
|
+
...customProfileSettings
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
const hlsPlayer = new this.HLS(this.hlsOptions);
|
|
518
531
|
|
|
519
532
|
// Limit playback to maximum bitrate, if specified
|
|
520
533
|
if(this.playerOptions.maxBitrate) {
|
|
@@ -6,6 +6,7 @@ export const PlayerParameters = {
|
|
|
6
6
|
networks: {
|
|
7
7
|
MAIN: "https://main.net955305.contentfabric.io/config",
|
|
8
8
|
DEMO: "https://demov3.net955210.contentfabric.io/config",
|
|
9
|
+
DEMO_LOCAL: "http://localhost:8008/config?qspace=demov3&self",
|
|
9
10
|
TEST: "https://test.net955203.contentfabric.io/config",
|
|
10
11
|
TESTV4: "https://test.net955205.contentfabric.io/config"
|
|
11
12
|
},
|
|
@@ -20,7 +21,8 @@ export const PlayerParameters = {
|
|
|
20
21
|
SAMPLE_AES: "sample-aes",
|
|
21
22
|
AES128: "aes-128",
|
|
22
23
|
WIDEVINE: "widevine",
|
|
23
|
-
CLEAR: "clear"
|
|
24
|
+
CLEAR: "clear",
|
|
25
|
+
PLAYREADY: "playready"
|
|
24
26
|
},
|
|
25
27
|
protocols: {
|
|
26
28
|
HLS: "hls",
|
|
@@ -108,7 +110,8 @@ export const DefaultParameters = {
|
|
|
108
110
|
PlayerParameters.drms.SAMPLE_AES,
|
|
109
111
|
PlayerParameters.drms.AES128,
|
|
110
112
|
PlayerParameters.drms.WIDEVINE,
|
|
111
|
-
PlayerParameters.drms.CLEAR
|
|
113
|
+
PlayerParameters.drms.CLEAR,
|
|
114
|
+
PlayerParameters.drms.PLAYREADY
|
|
112
115
|
],
|
|
113
116
|
contentInfo: {
|
|
114
117
|
title: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluvio/elv-player-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"package-lock.json"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@eluvio/elv-client-js": "^4.0.
|
|
39
|
+
"@eluvio/elv-client-js": "^4.0.89",
|
|
40
40
|
"dashjs": "~4.7.0",
|
|
41
41
|
"focus-visible": "^5.2.0",
|
|
42
|
-
"hls.js": "~1.
|
|
42
|
+
"hls.js": "~1.5.12",
|
|
43
43
|
"mux-embed": "^4.30.0",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
45
|
"react-dom": "^18.2.0",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
57
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
58
58
|
"jsdoc": "^4.0.0",
|
|
59
|
+
"sass": "^1.77.6",
|
|
59
60
|
"stylelint": "^16.2.0",
|
|
60
61
|
"stylelint-config-standard": "^36.0.0",
|
|
61
62
|
"stylelint-order": "^6.0.4",
|