@eluvio/elv-player-js 2.1.25 → 2.1.28
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-C2TzESo8.js → dash.all.min-BHmz2Um3.js} +1 -1
- package/dist/{dash.all.min-DiKkCxTo.mjs → dash.all.min-b5eK40ke.mjs} +1 -1
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/{index-De5RSRMm.mjs → index-6QSSUbYO.mjs} +59 -56
- package/dist/{index-bl4NgMQP.mjs → index-7ELuCGgQ.mjs} +1 -1
- package/dist/{index-CpOffoCC.js → index-BKYBnFp2.js} +1 -1
- package/dist/{index-Bog78gB2.js → index-DKdbjGDa.js} +2 -2
- package/lib/player/Player.js +6 -1
- package/lib/ui/PlayerUI.jsx +3 -3
- package/lib/ui/WebControls.jsx +1 -1
- package/package.json +1 -1
|
@@ -50039,7 +50039,7 @@ function VP() {
|
|
|
50039
50039
|
ElvCrypto: async () => {
|
|
50040
50040
|
try {
|
|
50041
50041
|
if (!a.elvCrypto) {
|
|
50042
|
-
const s = (await import("./index-
|
|
50042
|
+
const s = (await import("./index-7ELuCGgQ.mjs")).default;
|
|
50043
50043
|
a.elvCrypto = await new s().init();
|
|
50044
50044
|
}
|
|
50045
50045
|
return a.elvCrypto;
|
|
@@ -67058,8 +67058,8 @@ class Kw {
|
|
|
67058
67058
|
async __PlayoutOptions() {
|
|
67059
67059
|
const e = await this.__Client(), t = this.sourceOptions.playoutParameters || {};
|
|
67060
67060
|
if (this.collectionInfo) {
|
|
67061
|
-
const
|
|
67062
|
-
t.objectId = e.utils.DecodeVersionHash(
|
|
67061
|
+
const R = this.collectionInfo.content[this.collectionInfo.mediaIndex];
|
|
67062
|
+
t.objectId = e.utils.DecodeVersionHash(R.mediaHash).objectId, t.versionHash = R.mediaHash, this.sourceOptions.playoutOptions = void 0;
|
|
67063
67063
|
}
|
|
67064
67064
|
let a, s, u = {
|
|
67065
67065
|
ignore_trimming: t.ignoreTrimming,
|
|
@@ -67069,7 +67069,7 @@ class Kw {
|
|
|
67069
67069
|
clip_end: (t.options || {}).clip_end || t.clipEnd
|
|
67070
67070
|
}, o, c;
|
|
67071
67071
|
if ((u.clip_start || u.clip_end) && (o = parseFloat(u.clip_start || 0), c = parseFloat(u.clip_end || 0), delete u.clip_start, delete u.clip_end), !t.channel) {
|
|
67072
|
-
let
|
|
67072
|
+
let R = await e.AvailableOfferings({
|
|
67073
67073
|
objectId: t.objectId,
|
|
67074
67074
|
versionHash: t.versionHash,
|
|
67075
67075
|
writeToken: t.writeToken,
|
|
@@ -67078,53 +67078,53 @@ class Kw {
|
|
|
67078
67078
|
resolveIncludeSource: !0,
|
|
67079
67079
|
authorizationToken: t.authorizationToken
|
|
67080
67080
|
}) || {};
|
|
67081
|
-
if (a =
|
|
67081
|
+
if (a = R.default ? "default" : Object.keys(R)[0], t.offering ? a = R[t.offering] ? t.offering : void 0 : (t.offerings || []).length > 0 ? a = t.offerings.find((W) => R[W]) : t.offerings && t.offerings.length > 0 && (a = t.offerings.find((W) => R[W])), !a)
|
|
67082
67082
|
throw new Error(`Unable to find offering from '${t.offering || t.offerings}'`);
|
|
67083
|
-
const
|
|
67084
|
-
s =
|
|
67083
|
+
const O = R[a] && R[a].properties || {};
|
|
67084
|
+
s = R[a].uri, this.sourceOptions.contentInfo.liveDVR === $t.liveDVR.ON && O.dvr_available ? (u.dvr = 1, this.dvrAvailable = !0) : this.dvrAvailable = !1, this.isLive = O.live;
|
|
67085
67085
|
}
|
|
67086
|
-
const p = async (
|
|
67086
|
+
const p = async (R) => t.directLink ? await e.PlayoutOptions({
|
|
67087
67087
|
offeringURI: s,
|
|
67088
|
-
options:
|
|
67088
|
+
options: R
|
|
67089
67089
|
}) : await e.PlayoutOptions({
|
|
67090
67090
|
...t,
|
|
67091
67091
|
handler: t.channel ? "channel" : "playout",
|
|
67092
67092
|
offering: t.channel || a,
|
|
67093
|
-
options:
|
|
67093
|
+
options: R
|
|
67094
67094
|
});
|
|
67095
67095
|
if (!this.sourceOptions.playoutOptions) {
|
|
67096
|
-
let
|
|
67096
|
+
let R;
|
|
67097
67097
|
if (!o && !c)
|
|
67098
|
-
|
|
67098
|
+
R = await p(u);
|
|
67099
67099
|
else if (!t.clipRelativeToUntrimmed)
|
|
67100
|
-
|
|
67100
|
+
R = await p({
|
|
67101
67101
|
...u,
|
|
67102
67102
|
clip_start: o,
|
|
67103
67103
|
clip_end: c
|
|
67104
67104
|
});
|
|
67105
67105
|
else {
|
|
67106
|
-
|
|
67107
|
-
let
|
|
67106
|
+
R = await p(u);
|
|
67107
|
+
let O;
|
|
67108
67108
|
try {
|
|
67109
|
-
for (const
|
|
67110
|
-
for (const
|
|
67111
|
-
if (typeof (
|
|
67112
|
-
|
|
67109
|
+
for (const W of Object.keys(R || {})) {
|
|
67110
|
+
for (const Z of Object.keys(R[W].playoutMethods || {}))
|
|
67111
|
+
if (typeof (R[W].playoutMethods[Z].properties || {}).start_offset_float < "u") {
|
|
67112
|
+
O = parseFloat(R[W].playoutMethods[Z].properties.start_offset_float);
|
|
67113
67113
|
break;
|
|
67114
67114
|
}
|
|
67115
|
-
if (typeof
|
|
67115
|
+
if (typeof O < "u")
|
|
67116
67116
|
break;
|
|
67117
67117
|
}
|
|
67118
|
-
} catch (
|
|
67119
|
-
this.Log("Failed to load content offset for clip adjustment:"), this.Log(
|
|
67118
|
+
} catch (W) {
|
|
67119
|
+
this.Log("Failed to load content offset for clip adjustment:"), this.Log(W, !0);
|
|
67120
67120
|
}
|
|
67121
|
-
|
|
67121
|
+
R = await p({
|
|
67122
67122
|
...u,
|
|
67123
|
-
clip_start: (o || 0) - (
|
|
67124
|
-
clip_end: (c || 0) - (
|
|
67123
|
+
clip_start: (o || 0) - (O || 0),
|
|
67124
|
+
clip_end: (c || 0) - (O || 0) || 9999999
|
|
67125
67125
|
});
|
|
67126
67126
|
}
|
|
67127
|
-
this.sourceOptions.playoutOptions =
|
|
67127
|
+
this.sourceOptions.playoutOptions = R;
|
|
67128
67128
|
}
|
|
67129
67129
|
t.directLink ? this.sourceOptions.playoutOptions || (this.sourceOptions.playoutOptions = await e.PlayoutOptions({
|
|
67130
67130
|
offeringURI: s,
|
|
@@ -67135,14 +67135,14 @@ class Kw {
|
|
|
67135
67135
|
offering: t.channel || a,
|
|
67136
67136
|
options: u
|
|
67137
67137
|
}));
|
|
67138
|
-
let d = (await e.AvailableDRMs()).filter((
|
|
67138
|
+
let d = (await e.AvailableDRMs()).filter((R) => (this.sourceOptions.drms || []).includes(R)), y = this.sourceOptions.protocols, m, v;
|
|
67139
67139
|
for (; !(m && v); ) {
|
|
67140
|
-
m = y.find((
|
|
67141
|
-
const
|
|
67142
|
-
if (v = (this.sourceOptions.drms || []).length === 0 ?
|
|
67140
|
+
m = y.find((O) => this.sourceOptions.playoutOptions[O]);
|
|
67141
|
+
const R = Object.keys(this.sourceOptions.playoutOptions[m].playoutMethods);
|
|
67142
|
+
if (v = (this.sourceOptions.drms || []).length === 0 ? R.find((O) => O !== "clear") || R[0] : this.sourceOptions.drms.sort().reverse().find((O) => d.includes(O) && this.sourceOptions.playoutOptions[m].playoutMethods[O]), !v && (y = y.filter((O) => O !== m), y.length === 0))
|
|
67143
67143
|
throw Error("No valid protocol / DRM combination available");
|
|
67144
67144
|
}
|
|
67145
|
-
const { playoutUrl: b, drms: x, thumbnailTrack: E, properties: C } = this.sourceOptions.playoutOptions[m].playoutMethods[v], T = b.split("/").find((
|
|
67145
|
+
const { playoutUrl: b, drms: x, thumbnailTrack: E, properties: C } = this.sourceOptions.playoutOptions[m].playoutMethods[v], T = b.split("/").find((R) => R.startsWith("hq__")), k = (C || {}).start_offset_float || 0, M = (o || 0) + (k || 0);
|
|
67146
67146
|
return {
|
|
67147
67147
|
playoutParameters: {
|
|
67148
67148
|
...t,
|
|
@@ -67162,6 +67162,7 @@ class Kw {
|
|
|
67162
67162
|
clipStart: u.clip_start,
|
|
67163
67163
|
clipEnd: u.clip_end,
|
|
67164
67164
|
trimOffset: k,
|
|
67165
|
+
thumbnailOffset: M,
|
|
67165
67166
|
sessionId: this.sourceOptions.playoutOptions.sessionId,
|
|
67166
67167
|
multiviewOptions: {
|
|
67167
67168
|
enabled: this.sourceOptions.playoutOptions.multiview,
|
|
@@ -67231,8 +67232,8 @@ class Kw {
|
|
|
67231
67232
|
onUpdate: () => {
|
|
67232
67233
|
this.__SettingsUpdate();
|
|
67233
67234
|
}
|
|
67234
|
-
})), this.__RegisterVideoEventListener("webkitplaybacktargetavailabilitychanged", (
|
|
67235
|
-
this.airplayAvailable =
|
|
67235
|
+
})), this.__RegisterVideoEventListener("webkitplaybacktargetavailabilitychanged", (R) => {
|
|
67236
|
+
this.airplayAvailable = R.availability === "available", this.__SettingsUpdate();
|
|
67236
67237
|
});
|
|
67237
67238
|
const a = this.__RegisterVideoEventListener("timeupdate", () => {
|
|
67238
67239
|
this.reloads = 0, this.playbackStarted = !0, this.__SettingsUpdate(), a();
|
|
@@ -67242,8 +67243,8 @@ class Kw {
|
|
|
67242
67243
|
}), this.__RegisterVideoEventListener("seeking", () => {
|
|
67243
67244
|
if (!this.isLive || !this.dvrAvailable)
|
|
67244
67245
|
return;
|
|
67245
|
-
const
|
|
67246
|
-
this.behindLiveEdge =
|
|
67246
|
+
const R = this.video.duration - this.video.currentTime;
|
|
67247
|
+
this.behindLiveEdge = R > 15, this.__SettingsUpdate();
|
|
67247
67248
|
}), await this.__LoadCollection(), this.collectionInfo && this.collectionInfo.isPlaylist && this.collectionInfo.mediaIndex < this.collectionInfo.mediaLength - 1 && this.__RegisterVideoEventListener("ended", () => this.controls && this.controls.CollectionPlayNext({ autoplay: !0 }));
|
|
67248
67249
|
let {
|
|
67249
67250
|
objectId: s,
|
|
@@ -67256,42 +67257,44 @@ class Kw {
|
|
|
67256
67257
|
multiviewOptions: m,
|
|
67257
67258
|
playoutParameters: v,
|
|
67258
67259
|
trimOffset: b,
|
|
67259
|
-
|
|
67260
|
-
|
|
67261
|
-
|
|
67262
|
-
|
|
67260
|
+
thumbnailOffset: x,
|
|
67261
|
+
offering: E,
|
|
67262
|
+
compositionKey: C,
|
|
67263
|
+
clipStart: T,
|
|
67264
|
+
clipEnd: k
|
|
67263
67265
|
} = await this.__PlayoutOptions();
|
|
67264
67266
|
this.playoutInfo = {
|
|
67265
67267
|
objectId: s,
|
|
67266
67268
|
versionHash: u,
|
|
67267
|
-
offering:
|
|
67268
|
-
compositionKey:
|
|
67269
|
+
offering: E,
|
|
67270
|
+
compositionKey: C,
|
|
67269
67271
|
trimOffset: b,
|
|
67270
|
-
|
|
67271
|
-
|
|
67272
|
+
thumbnailOffset: x,
|
|
67273
|
+
clipStart: T,
|
|
67274
|
+
clipEnd: k
|
|
67272
67275
|
}, this.contentHash = u, o = new URL(o);
|
|
67273
|
-
const
|
|
67274
|
-
if (this.authorizationToken =
|
|
67276
|
+
const M = this.sourceOptions.playoutParameters.authorizationToken || o.searchParams.get("authorization");
|
|
67277
|
+
if (this.authorizationToken = M, this.playoutUrl = o.toString(), this.thumbnailTrackUrl = c, this.castHandler && this.castHandler.SetMedia({
|
|
67275
67278
|
playoutOptions: this.sourceOptions.playoutOptions,
|
|
67276
67279
|
playoutParameters: v
|
|
67277
67280
|
}), this.__destroyed)
|
|
67278
67281
|
return;
|
|
67279
|
-
p === "hls" ? await this.__InitializeHLS({ playoutUrl: o, authorizationToken:
|
|
67282
|
+
p === "hls" ? await this.__InitializeHLS({ playoutUrl: o, authorizationToken: M, drm: d, drms: y, multiviewOptions: m }) : await this.__InitializeDash({ playoutUrl: o, authorizationToken: M, drm: d, drms: y, multiviewOptions: m }), this.playerOptions.collectVideoAnalytics && import("./Analytics-Cia_WeMD.mjs").then(({ InitializeMuxMonitoring: R }) => R({
|
|
67280
67283
|
appName: this.playerOptions.appName || "elv-player-js",
|
|
67281
67284
|
elvPlayer: this,
|
|
67282
67285
|
playoutUrl: o,
|
|
67283
|
-
authorizationToken:
|
|
67286
|
+
authorizationToken: M,
|
|
67284
67287
|
disableCookies: this.playerOptions.collectVideoAnalytics === $t.collectVideoAnalytics.DISABLE_COOKIES
|
|
67285
67288
|
})), this.playerOptions.verifyContent && setTimeout(() => {
|
|
67286
67289
|
this.__VerifyContent();
|
|
67287
|
-
}, 1e3), this.playerOptions.loadChapters && this.__LoadChapters({ ...this.playoutInfo || {} }).then((
|
|
67290
|
+
}, 1e3), this.playerOptions.loadChapters && this.__LoadChapters({ ...this.playoutInfo || {} }).then((R) => this.__chapterTags = R).catch((R) => this.Log(R, !0)), this.playerOptions.playerCallback && this.playerOptions.playerCallback({
|
|
67288
67291
|
player: this,
|
|
67289
67292
|
videoElement: this.video,
|
|
67290
67293
|
hlsPlayer: this.hlsPlayer,
|
|
67291
67294
|
dashPlayer: this.dashPlayer
|
|
67292
67295
|
}), this.__destroyed && this.__DestroyPlayer(), this.initialized = !0, this.restartParameters = void 0, this.thumbnailTrackUrl && (this.thumbnailHandler = new Cee(
|
|
67293
67296
|
this.thumbnailTrackUrl,
|
|
67294
|
-
b || 0
|
|
67297
|
+
x || b || 0
|
|
67295
67298
|
), this.thumbnailHandler.LoadThumbnails().then(() => {
|
|
67296
67299
|
this.thumbnailsLoaded = !0, this.__SettingsUpdate();
|
|
67297
67300
|
}));
|
|
@@ -67426,7 +67429,7 @@ class Kw {
|
|
|
67426
67429
|
}
|
|
67427
67430
|
}
|
|
67428
67431
|
async __InitializeDash({ playoutUrl: e, authorizationToken: t, drm: a, drms: s }) {
|
|
67429
|
-
this.Dash = (await import("./dash.all.min-
|
|
67432
|
+
this.Dash = (await import("./dash.all.min-b5eK40ke.mjs").then((c) => c.d)).default;
|
|
67430
67433
|
const u = this.Dash.MediaPlayer().create(), o = this.playerOptions.dashjsOptions || {};
|
|
67431
67434
|
if (u.updateSettings({
|
|
67432
67435
|
...o,
|
|
@@ -69152,7 +69155,7 @@ const pD = ({ player: r, videoState: e, setRecentUserAction: t, className: a = "
|
|
|
69152
69155
|
onClick: () => {
|
|
69153
69156
|
r.controls.Play(), r.target.firstChild.focus();
|
|
69154
69157
|
},
|
|
69155
|
-
className: `${Bn["center-play-button"]} ${t && !e && !(r && r.casting) ? "" : Bn["center-play-button--hidden"]}`
|
|
69158
|
+
className: `${Bn["center-play-button"]} ${t && !e && !(r && r.casting) && !(r && r.controls && r.controls.IsPlaying() && !r.casting) ? "" : Bn["center-play-button--hidden"]}`
|
|
69156
69159
|
}
|
|
69157
69160
|
),
|
|
69158
69161
|
/* @__PURE__ */ Ue.jsxs("div", { className: `${Bn["bottom-controls-container"]} ${x ? Bn["bottom-controls-container--autohide"] : ""}`, children: [
|
|
@@ -69768,14 +69771,14 @@ const hne = ({
|
|
|
69768
69771
|
parameters: e,
|
|
69769
69772
|
SetErrorMessage: k,
|
|
69770
69773
|
Reload: u,
|
|
69771
|
-
UpdateParameters: (
|
|
69772
|
-
o(
|
|
69774
|
+
UpdateParameters: (xe) => {
|
|
69775
|
+
o(xe);
|
|
69773
69776
|
}
|
|
69774
69777
|
});
|
|
69775
69778
|
window.__elvPlayer = Oe;
|
|
69776
69779
|
const Se = Oe.controls.RegisterSettingsListener(
|
|
69777
69780
|
() => {
|
|
69778
|
-
$(Oe.controls.AllowRotation()), se(Oe.playbackStarted), R(!Oe.loading), _(Oe.__showPlayerProfileForm), N(Oe && Oe.casting);
|
|
69781
|
+
$(Oe.controls.AllowRotation()), se(Oe.playbackStarted || Oe.controls && Oe.controls.IsPlaying()), R(!Oe.loading), _(Oe.__showPlayerProfileForm), N(Oe && Oe.casting);
|
|
69779
69782
|
}
|
|
69780
69783
|
);
|
|
69781
69784
|
Oe.Destroy = () => {
|
|
@@ -69793,9 +69796,9 @@ const hne = ({
|
|
|
69793
69796
|
setRecentUserAction: V
|
|
69794
69797
|
}), be = Yee({ player: Oe });
|
|
69795
69798
|
t(Oe), p(Oe);
|
|
69796
|
-
const me = Oe.controls.RegisterVideoEventListener("canplay", () => he(!0));
|
|
69799
|
+
const me = Oe.controls.RegisterVideoEventListener("canplay", () => he(!0)), fe = Oe.controls.RegisterVideoEventListener("play", () => se(!0));
|
|
69797
69800
|
return () => {
|
|
69798
|
-
|
|
69801
|
+
Se && Se(), Te && Te(), oe && oe(), ce && ce(), be && be(), me && me(), fe && fe(), Oe && Oe.__DestroyPlayer();
|
|
69799
69802
|
};
|
|
69800
69803
|
} catch (Oe) {
|
|
69801
69804
|
a(Oe), s();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as DI, r as tI, a as TA, b as rI, d as oA, e as uA, f as PA, g as cI } from "./index-
|
|
1
|
+
import { c as DI, r as tI, a as TA, b as rI, d as oA, e as uA, f as PA, g as cI } from "./index-6QSSUbYO.mjs";
|
|
2
2
|
class BA {
|
|
3
3
|
constructor(B) {
|
|
4
4
|
this.wasm = B;
|