@eluvio/elv-player-js 2.0.49 → 2.0.50
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/dist/.vite/manifest.json +15 -15
- package/dist/{dash.all.min-BeiZatYH.mjs → dash.all.min-BYIiRwuH.mjs} +1 -1
- package/dist/{dash.all.min-C6KmDBup.js → dash.all.min-BmN834Y_.js} +1 -1
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/{index-CCsOge31.js → index-BzRC8b7B.js} +1 -1
- package/dist/{index-D2DLsakf.mjs → index-CiWJ7kFm.mjs} +1 -1
- package/dist/{index-CZGstMoE.js → index-Df2RItfZ.js} +3 -3
- package/dist/{index-DeV-6N-Y.mjs → index-Inr3N_z2.mjs} +19 -17
- package/lib/player/Player.js +12 -9
- package/lib/player/PlayerParameters.js +2 -1
- package/package.json +1 -1
|
@@ -158,7 +158,8 @@ const Ft = {
|
|
|
158
158
|
authorizationToken: void 0,
|
|
159
159
|
clipStart: void 0,
|
|
160
160
|
clipEnd: void 0,
|
|
161
|
-
audioTrackLabel: void 0
|
|
161
|
+
audioTrackLabel: void 0,
|
|
162
|
+
options: void 0
|
|
162
163
|
}
|
|
163
164
|
},
|
|
164
165
|
playerOptions: {
|
|
@@ -49714,7 +49715,7 @@ const ii = {
|
|
|
49714
49715
|
ElvCrypto: async () => {
|
|
49715
49716
|
try {
|
|
49716
49717
|
if (!ii.elvCrypto) {
|
|
49717
|
-
const n = (await import("./index-
|
|
49718
|
+
const n = (await import("./index-CiWJ7kFm.mjs")).default;
|
|
49718
49719
|
ii.elvCrypto = await new n().init();
|
|
49719
49720
|
}
|
|
49720
49721
|
return ii.elvCrypto;
|
|
@@ -65870,7 +65871,8 @@ class o2 {
|
|
|
65870
65871
|
}
|
|
65871
65872
|
let r, i, o = {
|
|
65872
65873
|
ignore_trimming: t.ignoreTrimming,
|
|
65873
|
-
resolve: t.resolve
|
|
65874
|
+
resolve: t.resolve,
|
|
65875
|
+
...t.options || {}
|
|
65874
65876
|
};
|
|
65875
65877
|
if ((t.clipStart || t.clipEnd) && (o.clip_start = parseFloat(t.clipStart || 0), t.clipEnd && (o.clip_end = parseFloat(t.clipEnd))), !t.channel) {
|
|
65876
65878
|
let g = await e.AvailableOfferings({
|
|
@@ -66138,7 +66140,7 @@ class o2 {
|
|
|
66138
66140
|
let g = this.video && this.video.currentTime;
|
|
66139
66141
|
setTimeout(() => {
|
|
66140
66142
|
this.video && this.video.currentTime > g || (this.Log("Buffer Stalled. Attempting to recover using hlsPlayer.recoverMediaError", !0), m.recoverMediaError(), this.stallTimeout = setTimeout(() => {
|
|
66141
|
-
this.Log("Buffer Stalled. Reloading player...", !0), this.__HardReload(b, 0);
|
|
66143
|
+
this.Log("Buffer Stalled. Reloading player...", !0), this.__HardReload(b, 0, g);
|
|
66142
66144
|
}, 5e3));
|
|
66143
66145
|
}, 2e3);
|
|
66144
66146
|
}
|
|
@@ -66151,7 +66153,7 @@ class o2 {
|
|
|
66151
66153
|
}
|
|
66152
66154
|
}
|
|
66153
66155
|
async __InitializeDash({ playoutUrl: e, authorizationToken: t, drm: r, drms: i }) {
|
|
66154
|
-
this.Dash = (await import("./dash.all.min-
|
|
66156
|
+
this.Dash = (await import("./dash.all.min-BYIiRwuH.mjs").then((c) => c.d)).default;
|
|
66155
66157
|
const o = this.Dash.MediaPlayer().create(), l = this.playerOptions.dashjsOptions || {};
|
|
66156
66158
|
if (o.updateSettings({
|
|
66157
66159
|
...l,
|
|
@@ -66360,7 +66362,7 @@ class o2 {
|
|
|
66360
66362
|
this.contentHash = void 0, this.nativeHLS = !1, this.hlsPlayer = void 0, this.dashPlayer = void 0, this.player = void 0, this.initTimeLogged = !1, this.canPlay = !1, this.isLive = !1, this.behindLiveEdge = !1, this.dvrAvailable = !1, this.dvrEnabled = !1, this.publicMetadataUrl = void 0, this.airplayAvailable = !1, this.chromecastAvailable = VP && this.playerOptions.allowCasting, this.casting = !1, this.__error = void 0;
|
|
66361
66363
|
}
|
|
66362
66364
|
}
|
|
66363
|
-
async __HardReload(e, t = 6e3) {
|
|
66365
|
+
async __HardReload(e, t = 6e3, r) {
|
|
66364
66366
|
if (!this.reloading) {
|
|
66365
66367
|
if (this.reloading = !0, this.reloads += 1, this.reloads > 10) {
|
|
66366
66368
|
this.SetErrorMessage(e && e.displayMessage || "Unable to play content", e);
|
|
@@ -66370,32 +66372,32 @@ class o2 {
|
|
|
66370
66372
|
try {
|
|
66371
66373
|
if (e && this.playerOptions.restartCallback)
|
|
66372
66374
|
try {
|
|
66373
|
-
const
|
|
66374
|
-
if (
|
|
66375
|
+
const i = await this.playerOptions.restartCallback(e);
|
|
66376
|
+
if (i && typeof i == "boolean") {
|
|
66375
66377
|
this.Destroy();
|
|
66376
66378
|
return;
|
|
66377
66379
|
}
|
|
66378
|
-
} catch (
|
|
66379
|
-
this.Log("Restart callback failed:"), this.Log(
|
|
66380
|
+
} catch (i) {
|
|
66381
|
+
this.Log("Restart callback failed:"), this.Log(i);
|
|
66380
66382
|
}
|
|
66381
|
-
if (this.SetErrorMessage(
|
|
66383
|
+
if (t > 0 && (this.SetErrorMessage(
|
|
66382
66384
|
e && e.displayMessage || "Something went wrong, reloading player...",
|
|
66383
66385
|
e
|
|
66384
|
-
), await new Promise((
|
|
66386
|
+
), await new Promise((i) => setTimeout(i, t))), this.__destroyed)
|
|
66385
66387
|
return;
|
|
66386
66388
|
this.Log("Reloading stream");
|
|
66387
66389
|
try {
|
|
66388
|
-
const
|
|
66389
|
-
|
|
66390
|
-
} catch (
|
|
66391
|
-
this.Log("Client region reset failed:"), this.Log(
|
|
66390
|
+
const i = await this.__Client();
|
|
66391
|
+
i.region ? await i.UseRegion({ region: i.region }) : i.Nodes().fabricURIs.length > 1 && await i.ResetRegion();
|
|
66392
|
+
} catch (i) {
|
|
66393
|
+
this.Log("Client region reset failed:"), this.Log(i);
|
|
66392
66394
|
}
|
|
66393
66395
|
this.restarted = !0, this.SetErrorMessage(void 0), this.__Initialize(
|
|
66394
66396
|
this.originalParameters,
|
|
66395
66397
|
!this.video || !this.initialized ? this.restartParameters : {
|
|
66396
66398
|
muted: this.video.muted,
|
|
66397
66399
|
volume: this.video.volume,
|
|
66398
|
-
currentTime: this.video.currentTime,
|
|
66400
|
+
currentTime: r || this.video.currentTime,
|
|
66399
66401
|
playing: !this.video.paused
|
|
66400
66402
|
}
|
|
66401
66403
|
);
|
package/lib/player/Player.js
CHANGED
|
@@ -151,7 +151,8 @@ export class EluvioPlayer {
|
|
|
151
151
|
let offeringId, offeringURI;
|
|
152
152
|
let options = {
|
|
153
153
|
ignore_trimming: playoutParameters.ignoreTrimming,
|
|
154
|
-
resolve: playoutParameters.resolve
|
|
154
|
+
resolve: playoutParameters.resolve,
|
|
155
|
+
...(playoutParameters.options || {})
|
|
155
156
|
};
|
|
156
157
|
|
|
157
158
|
if(playoutParameters.clipStart || playoutParameters.clipEnd) {
|
|
@@ -812,7 +813,7 @@ export class EluvioPlayer {
|
|
|
812
813
|
|
|
813
814
|
this.stallTimeout = setTimeout(() => {
|
|
814
815
|
this.Log("Buffer Stalled. Reloading player...", true);
|
|
815
|
-
this.__HardReload(error, 0);
|
|
816
|
+
this.__HardReload(error, 0, stalledTime);
|
|
816
817
|
}, 5000);
|
|
817
818
|
}, 2000);
|
|
818
819
|
}
|
|
@@ -1221,7 +1222,7 @@ export class EluvioPlayer {
|
|
|
1221
1222
|
this.__error = undefined;
|
|
1222
1223
|
}
|
|
1223
1224
|
|
|
1224
|
-
async __HardReload(error, delay=6000) {
|
|
1225
|
+
async __HardReload(error, delay=6000, time) {
|
|
1225
1226
|
if(this.reloading) { return; }
|
|
1226
1227
|
|
|
1227
1228
|
this.reloading = true;
|
|
@@ -1252,11 +1253,13 @@ export class EluvioPlayer {
|
|
|
1252
1253
|
}
|
|
1253
1254
|
}
|
|
1254
1255
|
|
|
1255
|
-
|
|
1256
|
-
(
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1256
|
+
if(delay > 0) {
|
|
1257
|
+
this.SetErrorMessage(
|
|
1258
|
+
(error && error.displayMessage) || "Something went wrong, reloading player...",
|
|
1259
|
+
error
|
|
1260
|
+
);
|
|
1261
|
+
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1262
|
+
}
|
|
1260
1263
|
|
|
1261
1264
|
if(this.__destroyed) { return; }
|
|
1262
1265
|
|
|
@@ -1283,7 +1286,7 @@ export class EluvioPlayer {
|
|
|
1283
1286
|
{
|
|
1284
1287
|
muted: this.video.muted,
|
|
1285
1288
|
volume: this.video.volume,
|
|
1286
|
-
currentTime: this.video.currentTime,
|
|
1289
|
+
currentTime: time || this.video.currentTime,
|
|
1287
1290
|
playing: !this.video.paused
|
|
1288
1291
|
}
|
|
1289
1292
|
);
|