@vindral/web-sdk 4.7.2-4-gc6377efe → 4.7.2-5-g4c14d0e4
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/{Dbmtk9Ob.js → BtyF1idj.js} +2293 -2276
- package/{BkZiy7hE.js → CF0p9xm8.js} +1 -1
- package/core.js +1 -1
- package/legacy.es.js +268 -251
- package/legacy.umd.js +7 -7
- package/package.json +1 -1
- package/player.js +2 -2
- package/vindral-player-component.js +2 -2
package/legacy.es.js
CHANGED
|
@@ -12266,7 +12266,10 @@ var FC = class {
|
|
|
12266
12266
|
s > 0 && performance.now() - i.lastBufferCleanupTime > 1e4 && (i.lastBufferCleanupTime = performance.now(), yield i.sourceBuffer.removeBuffer(0, s + 10));
|
|
12267
12267
|
try {
|
|
12268
12268
|
let t = i.sequenceNumber;
|
|
12269
|
-
if ("fragmented" in n) for (let t of e)
|
|
12269
|
+
if ("fragmented" in n) for (let t of BC(e)) {
|
|
12270
|
+
var c;
|
|
12271
|
+
yield i.sourceBuffer.appendBuffer(VC(t.map((e) => e.data)), (c = t[0]) == null ? void 0 : c.initData);
|
|
12272
|
+
}
|
|
12270
12273
|
else {
|
|
12271
12274
|
let n = Cl(e, t++);
|
|
12272
12275
|
yield i.sourceBuffer.appendBuffer(n);
|
|
@@ -12323,7 +12326,7 @@ var FC = class {
|
|
|
12323
12326
|
let t = (e.timestamp + ((n = e.compositionTimeOffset) == null ? 0 : n)) / e.timescale * 1e3, r = this.videoKeyframeTimestamps[this.videoKeyframeTimestamps.length - 1];
|
|
12324
12327
|
r !== void 0 && t < r && (this.videoKeyframeTimestamps = []), this.videoKeyframeTimestamps.push(t), this.videoKeyframeTimestamps.length > 20 && (this.videoKeyframeTimestamps = this.videoKeyframeTimestamps.slice(-20));
|
|
12325
12328
|
}
|
|
12326
|
-
t.state !== "uninitialized" && (t.isWorkingOnPendingSamples ||
|
|
12329
|
+
t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || UC(t, this.append, this.maxChunkSize).catch((n) => {
|
|
12327
12330
|
if (t.isWorkingOnPendingSamples = !1, !this.isReopening) {
|
|
12328
12331
|
if (!this.isCurrentTrackContext(e.type, t)) {
|
|
12329
12332
|
this.logger.debug("Suppressing append error from stale track context", { type: e.type });
|
|
@@ -12477,6 +12480,20 @@ var IC = (e, t) => {
|
|
|
12477
12480
|
}
|
|
12478
12481
|
return n;
|
|
12479
12482
|
}, BC = (e) => {
|
|
12483
|
+
let t = [];
|
|
12484
|
+
for (let r of e) {
|
|
12485
|
+
var n;
|
|
12486
|
+
if (!("fragmented" in r)) continue;
|
|
12487
|
+
let e = t.at(-1);
|
|
12488
|
+
(e == null || (n = e[0]) == null ? void 0 : n.initData) === r.initData ? e.push(r) : t.push([r]);
|
|
12489
|
+
}
|
|
12490
|
+
return t;
|
|
12491
|
+
}, VC = (e) => {
|
|
12492
|
+
if (e.length === 1 && e[0]) return e[0];
|
|
12493
|
+
let t = new Uint8Array(e.reduce((e, t) => e + t.byteLength, 0)), n = 0;
|
|
12494
|
+
for (let r of e) t.set(r, n), n += r.byteLength;
|
|
12495
|
+
return t;
|
|
12496
|
+
}, HC = (e) => {
|
|
12480
12497
|
let t = e.pendingSamplesOffset;
|
|
12481
12498
|
if (t !== 0) {
|
|
12482
12499
|
if (t >= e.pendingSamples.length) {
|
|
@@ -12485,7 +12502,7 @@ var IC = (e, t) => {
|
|
|
12485
12502
|
}
|
|
12486
12503
|
t < RC || t * 2 < e.pendingSamples.length || (e.pendingSamples = e.pendingSamples.slice(t), e.pendingSamplesOffset = 0);
|
|
12487
12504
|
}
|
|
12488
|
-
},
|
|
12505
|
+
}, UC = function() {
|
|
12489
12506
|
var e = N(function* (e, t, n) {
|
|
12490
12507
|
for (e.isWorkingOnPendingSamples = !0; e.pendingSamplesOffset < e.pendingSamples.length;) {
|
|
12491
12508
|
let r = [], i = e.pendingSamplesOffset;
|
|
@@ -12501,7 +12518,7 @@ var IC = (e, t) => {
|
|
|
12501
12518
|
}
|
|
12502
12519
|
let a = r[0];
|
|
12503
12520
|
if (!a) break;
|
|
12504
|
-
yield t(r, e.previousSample ? LC(e.previousSample, a) : !0), e.pendingSamplesOffset = i + 1, e.previousSample = r[r.length - 1],
|
|
12521
|
+
yield t(r, e.previousSample ? LC(e.previousSample, a) : !0), e.pendingSamplesOffset = i + 1, e.previousSample = r[r.length - 1], HC(e);
|
|
12505
12522
|
}
|
|
12506
12523
|
e.isWorkingOnPendingSamples = !1;
|
|
12507
12524
|
});
|
|
@@ -12510,7 +12527,7 @@ var IC = (e, t) => {
|
|
|
12510
12527
|
};
|
|
12511
12528
|
}();
|
|
12512
12529
|
H(), m(), P();
|
|
12513
|
-
var
|
|
12530
|
+
var WC, GC = class {
|
|
12514
12531
|
constructor(e, t) {
|
|
12515
12532
|
var n = this;
|
|
12516
12533
|
p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "element", void 0), p(this, "pictureInPictureWindow", void 0), p(this, "unload", () => {
|
|
@@ -12542,8 +12559,8 @@ var HC, UC = class {
|
|
|
12542
12559
|
}()), p(this, "isWebkitPresentationModeSupported", () => !!this.element && Mt(this.element)), this.emitter = e, this.logger = t, this.emitter.on("add picture in picture listener", this.onEnablePictureInPicture);
|
|
12543
12560
|
}
|
|
12544
12561
|
};
|
|
12545
|
-
|
|
12546
|
-
var
|
|
12562
|
+
WC = GC, p(GC, "create", (e, t) => new WC(e, t)), H(), m();
|
|
12563
|
+
var KC, qC = class {
|
|
12547
12564
|
constructor(e, t, n, r) {
|
|
12548
12565
|
p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "clockSource", void 0), p(this, "state", "buffering"), p(this, "bufferFullness", 0), p(this, "targetBufferTime", void 0), p(this, "lastBufferStateEvent", "drained"), p(this, "firstFrameTime", void 0), p(this, "currentTimeIsInRange", !1), p(this, "needsInputForAudioCount", 0), p(this, "needsInputForVideoCount", 0), p(this, "unload", () => {
|
|
12549
12566
|
this.emitter.off("buffer state", this.onBufferedStateChanged), this.emitter.off("needs user input", this.onNeedsUserInput);
|
|
@@ -12561,22 +12578,22 @@ var WC, GC = class {
|
|
|
12561
12578
|
}), this.emitter = e, this.logger = t, this.clockSource = n, this.targetBufferTime = r, this.emitter.on("buffer state", this.onBufferedStateChanged), this.emitter.on("needs user input", this.onNeedsUserInput), this.emitter.emit("target buffer time", r);
|
|
12562
12579
|
}
|
|
12563
12580
|
};
|
|
12564
|
-
|
|
12565
|
-
var
|
|
12581
|
+
KC = qC, p(qC, "create", (e, t, n, r) => new KC(e, t, n, r)), H(), m();
|
|
12582
|
+
var JC, YC = () => ({
|
|
12566
12583
|
upgradesFromLevel: [],
|
|
12567
12584
|
downgradesFromLevel: [],
|
|
12568
12585
|
bufferingRanges: [],
|
|
12569
12586
|
activeRanges: [],
|
|
12570
12587
|
decodeRate: 2 ** 53 - 1
|
|
12571
|
-
}),
|
|
12588
|
+
}), XC = () => ({
|
|
12572
12589
|
levels: {},
|
|
12573
12590
|
levelDowngrades: [],
|
|
12574
12591
|
levelUpgrades: [],
|
|
12575
12592
|
bufferFullness: 0,
|
|
12576
|
-
general:
|
|
12577
|
-
}),
|
|
12593
|
+
general: YC()
|
|
12594
|
+
}), ZC = 100, QC = 3600, $C = 1e3, ew = class {
|
|
12578
12595
|
constructor(e, t, n, r) {
|
|
12579
|
-
p(this, "minBufferFullnessLengthForRegression", 6), p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "timers", lr.create()), p(this, "metrics",
|
|
12596
|
+
p(this, "minBufferFullnessLengthForRegression", 6), p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "timers", lr.create()), p(this, "metrics", XC()), p(this, "bufferFullness", new w(Infinity)), p(this, "bufferFullnessRegression", void 0), p(this, "lastDeliveryResumeTime", -Infinity), p(this, "currentLevel", void 0), p(this, "isSuspended", !1), p(this, "_fatalQosCount", 0), p(this, "renditionLevelSource", void 0), p(this, "targetBufferTimeSource", void 0), p(this, "qualityIndexOrder", []), p(this, "hasPlayedInSession", !1), p(this, "hasAsserted", !1), p(this, "load", () => {
|
|
12580
12597
|
this.emitter.on("playback state", this.onPlaybackState), this.emitter.on("buffer fullness", this.onBufferFullness), this.emitter.on("media delivery resumed", this.onMediaDeliveryResumed), this.emitter.on("rendition level changed", this.onRenditionLevelChanged), this.emitter.on("video decode rate", this.onVideoDecodeRate), this.emitter.on("connection state", this.onConnectionState);
|
|
12581
12598
|
}), p(this, "unload", () => {
|
|
12582
12599
|
this.emitter.off("playback state", this.onPlaybackState), this.emitter.off("buffer fullness", this.onBufferFullness), this.emitter.off("media delivery resumed", this.onMediaDeliveryResumed), this.emitter.off("rendition level changed", this.onRenditionLevelChanged), this.emitter.off("video decode rate", this.onVideoDecodeRate), this.emitter.off("connection state", this.onConnectionState), this.suspend();
|
|
@@ -12592,7 +12609,7 @@ var KC, qC = () => ({
|
|
|
12592
12609
|
return this.metrics.levels[a];
|
|
12593
12610
|
}), p(this, "getBufferFullnessRegression", (e = !1) => {
|
|
12594
12611
|
if (!e) return this.bufferFullnessRegression;
|
|
12595
|
-
if (performance.now() - this.lastDeliveryResumeTime <
|
|
12612
|
+
if (performance.now() - this.lastDeliveryResumeTime < $C) return;
|
|
12596
12613
|
let t = this.bufferFullness.items().filter(({ time: e }) => e >= this.lastDeliveryResumeTime);
|
|
12597
12614
|
return t.length >= this.minBufferFullnessLengthForRegression ? this.calculateLinearRegression(t) : void 0;
|
|
12598
12615
|
}), p(this, "getTargetBufferTime", () => {
|
|
@@ -12652,21 +12669,21 @@ var KC, qC = () => ({
|
|
|
12652
12669
|
let d = !1;
|
|
12653
12670
|
if (e.from) {
|
|
12654
12671
|
var f;
|
|
12655
|
-
let e = (f = this.metrics.levels[l]) == null ?
|
|
12672
|
+
let e = (f = this.metrics.levels[l]) == null ? YC() : f;
|
|
12656
12673
|
l < u ? e.upgradesFromLevel.push(performance.now()) : e.downgradesFromLevel.push(performance.now()), dr(e.activeRanges);
|
|
12657
12674
|
let t = e.bufferingRanges[e.bufferingRanges.length - 1];
|
|
12658
12675
|
d = !!t && !t.end, dr(e.bufferingRanges), this.metrics.levels[l] = e;
|
|
12659
12676
|
}
|
|
12660
12677
|
if (e.to) {
|
|
12661
12678
|
var p;
|
|
12662
|
-
let e = (p = this.metrics.levels[u]) == null ?
|
|
12679
|
+
let e = (p = this.metrics.levels[u]) == null ? YC() : p;
|
|
12663
12680
|
fr(e.activeRanges), d && fr(e.bufferingRanges), this.metrics.levels[u] = e, this.currentLevel = u;
|
|
12664
12681
|
}
|
|
12665
12682
|
}), p(this, "onMediaDeliveryResumed", () => {
|
|
12666
12683
|
this.lastDeliveryResumeTime = performance.now();
|
|
12667
12684
|
}), p(this, "onBufferFullness", (e) => {
|
|
12668
12685
|
if (this.metrics.bufferFullness = e, this.isSuspended) return;
|
|
12669
|
-
let t = performance.now(), n = this.bufferFullness.peekLast(), r = (e) => Math.floor(e /
|
|
12686
|
+
let t = performance.now(), n = this.bufferFullness.peekLast(), r = (e) => Math.floor(e / ZC);
|
|
12670
12687
|
if (n && r(n.time) === r(t)) n.time = t, n.value = e;
|
|
12671
12688
|
else {
|
|
12672
12689
|
var i, a;
|
|
@@ -12674,7 +12691,7 @@ var KC, qC = () => ({
|
|
|
12674
12691
|
time: t,
|
|
12675
12692
|
value: e
|
|
12676
12693
|
});
|
|
12677
|
-
let n = this.bufferFullness.items(), r = (i = (a = n[n.length - this.minBufferFullnessLengthForRegression]) == null ? void 0 : a.time) == null ? -Infinity : i, o = Math.min(t -
|
|
12694
|
+
let n = this.bufferFullness.items(), r = (i = (a = n[n.length - this.minBufferFullnessLengthForRegression]) == null ? void 0 : a.time) == null ? -Infinity : i, o = Math.min(t - QC, r);
|
|
12678
12695
|
this.bufferFullness.filterPop(({ time: e }) => e >= o);
|
|
12679
12696
|
}
|
|
12680
12697
|
this.bufferFullnessRegression = this.bufferFullness.items().length >= this.minBufferFullnessLengthForRegression ? this.calculateLinearRegression() : void 0;
|
|
@@ -12746,8 +12763,8 @@ var KC, qC = () => ({
|
|
|
12746
12763
|
fr(this.metrics.general.activeRanges);
|
|
12747
12764
|
}
|
|
12748
12765
|
};
|
|
12749
|
-
|
|
12750
|
-
var
|
|
12766
|
+
JC = ew, p(ew, "create", (e, t, n, r) => new JC(e, t, n, r)), H(), m();
|
|
12767
|
+
var tw, nw = class {
|
|
12751
12768
|
constructor(e, t) {
|
|
12752
12769
|
p(this, "renditions", /* @__PURE__ */ new Map()), p(this, "renditionLevels", []), p(this, "languages", []), p(this, "emitter", void 0), p(this, "subscriptionSource", void 0), p(this, "renditionLevelChangeCount", 0), p(this, "unload", () => {
|
|
12753
12770
|
this.emitter.off("renditions", this.onRenditions), this.emitter.off("subscription changed", this.onSubscriptionChanged);
|
|
@@ -12822,8 +12839,8 @@ var $C, ew = class {
|
|
|
12822
12839
|
}), p(this, "getCurrentSubscription", () => this.subscriptionSource.getCurrentSubscription()), this.subscriptionSource = t, this.emitter = e, this.emitter.on("renditions", this.onRenditions), this.emitter.on("subscription changed", this.onSubscriptionChanged);
|
|
12823
12840
|
}
|
|
12824
12841
|
};
|
|
12825
|
-
|
|
12826
|
-
var
|
|
12842
|
+
tw = nw, p(nw, "create", (e, t) => new tw(e, t)), H(), m();
|
|
12843
|
+
var rw, iw = (e) => JSON.parse(JSON.stringify(e)), aw = 1e4, ow = class {
|
|
12827
12844
|
constructor(e, t, n) {
|
|
12828
12845
|
p(this, "logger", void 0), p(this, "timers", new lr()), p(this, "emitter", void 0), p(this, "targetSubscription", void 0), p(this, "currentSubscription", void 0), p(this, "_isSwitchingSubscription", !1), p(this, "pendingSubscriptionTimeoutId", void 0), p(this, "burstMs", 0), p(this, "unload", () => {
|
|
12829
12846
|
this.logger.debug("Unloading module..."), this.timers.unload(), this.emitter.off("subscription changed", this.onSubscriptionChanged), this.logger.debug("Unloaded module");
|
|
@@ -12861,21 +12878,21 @@ var tw, nw = (e) => JSON.parse(JSON.stringify(e)), rw = 1e4, iw = class {
|
|
|
12861
12878
|
this.logger.debug("onSubscriptionChanged", {
|
|
12862
12879
|
to: e,
|
|
12863
12880
|
reset: t
|
|
12864
|
-
}), t ? this.targetSubscription =
|
|
12881
|
+
}), t ? this.targetSubscription = iw(this.currentSubscription) : this.currentSubscription = iw(e), this._isSwitchingSubscription = this.isNewSubscription();
|
|
12865
12882
|
}), p(this, "scheduleSubscriptionChange", () => {
|
|
12866
|
-
this.targetSubscription =
|
|
12883
|
+
this.targetSubscription = iw(this.targetSubscription), this._isSwitchingSubscription = this.isNewSubscription();
|
|
12867
12884
|
let e = this.currentSubscription.channelId, t = this.targetSubscription.channelId, n = e !== t;
|
|
12868
12885
|
this._isSwitchingSubscription && (n && this.burstMs ? this.setBurst(this.burstMs) : this.setBurst(0), this.pendingSubscriptionTimeoutId && (this.timers.clearTimeout(this.pendingSubscriptionTimeoutId), this.pendingSubscriptionTimeoutId = void 0), n && this.timers.setTimeout(() => {
|
|
12869
|
-
this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription =
|
|
12870
|
-
},
|
|
12886
|
+
this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription = iw(this.currentSubscription), this.emitter.emit("channel switch timeout", t));
|
|
12887
|
+
}, aw), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(() => this.emitter.emit("send signal", {
|
|
12871
12888
|
type: "subscribe",
|
|
12872
12889
|
subscription: this.getTargetSubscription()
|
|
12873
12890
|
}), 0));
|
|
12874
|
-
}), this.logger = e, this.targetSubscription = t, this.currentSubscription =
|
|
12891
|
+
}), this.logger = e, this.targetSubscription = t, this.currentSubscription = iw(t), this.emitter = n, this.emitter.on("subscription changed", this.onSubscriptionChanged);
|
|
12875
12892
|
}
|
|
12876
12893
|
};
|
|
12877
|
-
|
|
12878
|
-
var
|
|
12894
|
+
rw = ow, p(ow, "create", (e, t, n) => new rw(e, n, t)), H(), m();
|
|
12895
|
+
var sw = class e {
|
|
12879
12896
|
constructor() {
|
|
12880
12897
|
p(this, "channelId", void 0), p(this, "renditionId", void 0), p(this, "anchorCts", void 0), p(this, "hasBFramesValue", !1), p(this, "isAwaitingAssessment", !1), p(this, "zeroOffsetSamples", 0), p(this, "omittedBoundaryCrossings", 0), p(this, "hasSeenKeyframe", !1), p(this, "hasObservedReordering", !1), p(this, "rememberedRenditions", new an(e.MAX_REMEMBERED_RENDITIONS));
|
|
12881
12898
|
}
|
|
@@ -12931,8 +12948,8 @@ var aw = class e {
|
|
|
12931
12948
|
}
|
|
12932
12949
|
}
|
|
12933
12950
|
};
|
|
12934
|
-
p(
|
|
12935
|
-
var
|
|
12951
|
+
p(sw, "MAX_REMEMBERED_RENDITIONS", 32), H(), m(), R();
|
|
12952
|
+
var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw = (e) => (t) => t > e, pw = 100, mw = 1e3, hw = 1e3, gw = 1e3, _w = 100, vw = 50, yw = {
|
|
12936
12953
|
seek: {
|
|
12937
12954
|
toleranceMs: 200,
|
|
12938
12955
|
toleranceMaxMs: 2500,
|
|
@@ -12964,7 +12981,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
12964
12981
|
decayCooldownMultiplier: 3,
|
|
12965
12982
|
decayCheckInterval: 15e3
|
|
12966
12983
|
}
|
|
12967
|
-
},
|
|
12984
|
+
}, bw = class {
|
|
12968
12985
|
get driftSamplesToCollect() {
|
|
12969
12986
|
return this._driftSamplesToCollect;
|
|
12970
12987
|
}
|
|
@@ -12972,8 +12989,8 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
12972
12989
|
this._driftSamplesToCollect = e, this.driftSamples = new w(e);
|
|
12973
12990
|
}
|
|
12974
12991
|
constructor(e, t, n, r, i, a = !0) {
|
|
12975
|
-
p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "playbackSource", void 0), p(this, "bufferSource", void 0), p(this, "keyframeTimestamps", new w(10)), p(this, "lastSeekTime", void 0), p(this, "needsMediaSourceRecovery", !1), p(this, "lastAdjustmentTime", performance.now()), p(this, "lastDecayCheckTime", performance.now()), p(this, "syncInterval", void 0), p(this, "currentSyncIntervalMs",
|
|
12976
|
-
this.emitter.on("page active", this.onPageActive), this.emitter.on("pageshow", this.onPageShow), this.setSyncInterval(document.visibilityState === "hidden" ?
|
|
12992
|
+
p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "playbackSource", void 0), p(this, "bufferSource", void 0), p(this, "keyframeTimestamps", new w(10)), p(this, "lastSeekTime", void 0), p(this, "needsMediaSourceRecovery", !1), p(this, "lastAdjustmentTime", performance.now()), p(this, "lastDecayCheckTime", performance.now()), p(this, "syncInterval", void 0), p(this, "currentSyncIntervalMs", pw), p(this, "config", void 0), p(this, "state", void 0), p(this, "allowTimeshiftOnAudio", !1), p(this, "syncInfoToleranceMaxMs", 150), p(this, "syncInfoToleranceStep", 20), p(this, "seekOvershoot", void 0), p(this, "timers", lr.create()), p(this, "rtt", 0), p(this, "channelSyncInfo", /* @__PURE__ */ new Map()), p(this, "seekAdjustmentCount", 0), p(this, "timeshiftAdjustmentCount", 0), p(this, "syncInfoCorrectionCount", 0), p(this, "playbackRateAdjustmentCount", 0), p(this, "lastPlaybackRateChangeTime", 0), p(this, "seekAdjustmentTimestamps", []), p(this, "timeshiftAdjustmentTimestamps", []), p(this, "_driftSamplesToCollect", 5), p(this, "driftSamples", new w(this._driftSamplesToCollect)), p(this, "timestampOffset", void 0), p(this, "hasObservedBFrames", !1), p(this, "bFrameDetector", new sw()), p(this, "currentChannelId", void 0), p(this, "highestSeenTimestamps", /* @__PURE__ */ new Map()), p(this, "isSuspended", !1), p(this, "isSyncAdjustmentActivated", !1), p(this, "queuedTimeshift", !1), p(this, "playbackState", void 0), p(this, "hasPerformedRecoverySeekInCurrentRecoveryState", !1), p(this, "shouldSeekAfterBuffering", !1), p(this, "shouldSeekWhileStuck", !1), p(this, "hasPerformedStuckSeekInCurrentStillness", !1), p(this, "positionSetBySeek", void 0), p(this, "lastPlayheadPosition", void 0), p(this, "lastPlayheadProgressAt", performance.now()), p(this, "usesMse", void 0), p(this, "load", () => {
|
|
12993
|
+
this.emitter.on("page active", this.onPageActive), this.emitter.on("pageshow", this.onPageShow), this.setSyncInterval(document.visibilityState === "hidden" ? mw : pw);
|
|
12977
12994
|
}), p(this, "unload", () => {
|
|
12978
12995
|
this.logger.debug("Unloading module..."), this.emitter.off("rtt", this.updateRtt), this.emitter.off("playback state", this.onPlaybackState), this.emitter.off("page active", this.onPageActive), this.emitter.off("pageshow", this.onPageShow), this.emitter.off("buffers flushed", this.clearBFrameLatch), this.emitter.off("recovered from media error", this.onMediaSourceRecovered), this.clearSyncInterval(), this.timers.unload(), this.logger.debug("Unloaded module");
|
|
12979
12996
|
}), p(this, "suspend", () => {
|
|
@@ -13015,7 +13032,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13015
13032
|
}), p(this, "processSample", (e) => {
|
|
13016
13033
|
var t;
|
|
13017
13034
|
if (!e.channelId) throw Error("Sample must be assigned to a channel");
|
|
13018
|
-
this.currentChannelId || (this.currentChannelId = e.channelId), this.timestampOffset || (this.timestampOffset = e.timestamp / e.timescale * 1e3 -
|
|
13035
|
+
this.currentChannelId || (this.currentChannelId = e.channelId), this.timestampOffset || (this.timestampOffset = e.timestamp / e.timescale * 1e3 - lw);
|
|
13019
13036
|
let n = e.type === "video" && e.isSync;
|
|
13020
13037
|
if (this.bFrameDetector.update(e), this.latchBFramesIfDetected(), this.currentChannelId !== e.channelId) {
|
|
13021
13038
|
let t = 2 ** 53 - 1;
|
|
@@ -13032,7 +13049,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13032
13049
|
this.currentChannelId || (this.currentChannelId = e);
|
|
13033
13050
|
let i = t.mediaType();
|
|
13034
13051
|
if (!i) throw Error("Fragment must have a media type");
|
|
13035
|
-
this.timestampOffset || (this.timestampOffset = t.baseMediaDecodeTime() / t.timescale() * 1e3 -
|
|
13052
|
+
this.timestampOffset || (this.timestampOffset = t.baseMediaDecodeTime() / t.timescale() * 1e3 - lw);
|
|
13036
13053
|
let a = i === "video" && t.startsWithKeyframe();
|
|
13037
13054
|
if (i === "video" && (this.bFrameDetector.updateFromFragment({
|
|
13038
13055
|
type: i,
|
|
@@ -13153,7 +13170,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13153
13170
|
return;
|
|
13154
13171
|
}
|
|
13155
13172
|
if (n >= this.getEffectiveSeekToleranceMs() || n < this.currentTimeshiftToleranceMs()) return;
|
|
13156
|
-
let r = performance.now() - this.config.seek.timeoutMs * this.state.timeshiftToleranceMultiplier, i = this.timeshiftAdjustmentTimestamps.filter(
|
|
13173
|
+
let r = performance.now() - this.config.seek.timeoutMs * this.state.timeshiftToleranceMultiplier, i = this.timeshiftAdjustmentTimestamps.filter(fw(r)).length;
|
|
13157
13174
|
if (i && this.state.timeshiftToleranceMultiplier > 2) {
|
|
13158
13175
|
this.logger.debug("Too many timeshifts within sliding window", {
|
|
13159
13176
|
timeshiftCooldownThreshold: r,
|
|
@@ -13177,20 +13194,20 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13177
13194
|
let n = (e = (t = this.bufferSource).getNextBufferedRangeStart) == null ? void 0 : e.call(t, this.playbackSource.currentTime);
|
|
13178
13195
|
return this.shouldSeekAfterBuffering = n !== void 0, n;
|
|
13179
13196
|
}), p(this, "observePlayheadProgress", () => {
|
|
13180
|
-
let e = this.playbackSource.currentTime, t = e !== this.lastPlayheadPosition, n = t && (this.positionSetBySeek === void 0 || e - this.positionSetBySeek >
|
|
13197
|
+
let e = this.playbackSource.currentTime, t = e !== this.lastPlayheadPosition, n = t && (this.positionSetBySeek === void 0 || e - this.positionSetBySeek > vw);
|
|
13181
13198
|
this.positionSetBySeek = void 0, (n || this.playbackSource.isPaused) && (this.hasPerformedStuckSeekInCurrentStillness = !1), (t || this.playbackSource.isPaused || this.isSeeking()) && (this.lastPlayheadPosition = e, this.lastPlayheadProgressAt = performance.now());
|
|
13182
13199
|
}), p(this, "isPlayheadStuckInBuffer", () => {
|
|
13183
13200
|
var e, t;
|
|
13184
|
-
if (performance.now() - this.lastPlayheadProgressAt <
|
|
13201
|
+
if (performance.now() - this.lastPlayheadProgressAt < hw) return !1;
|
|
13185
13202
|
let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n);
|
|
13186
|
-
return r !== void 0 && r - n >=
|
|
13203
|
+
return r !== void 0 && r - n >= gw;
|
|
13187
13204
|
}), p(this, "getRecoverySeekReason", () => {
|
|
13188
13205
|
if (this.needsMediaSourceRecovery) return "media source reopen";
|
|
13189
13206
|
if (this.shouldSeekWhileStuck) return "stuck in buffer";
|
|
13190
13207
|
if (this.shouldSeekAfterBuffering) return "buffering";
|
|
13191
13208
|
}), p(this, "shouldSkipNormalSeek", (e) => e < 0 && -e < this.currentAheadToleranceMs() || e > 0 && e < this.currentSeekToleranceMs() || Math.abs(e) < 1 ? !0 : !this.isAllowedToSync()), p(this, "shouldDeferRecoverySeek", (e, t) => t !== void 0 && t > e), p(this, "buildStuckInBufferSeekPlan", () => {
|
|
13192
13209
|
var e, t;
|
|
13193
|
-
let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n), i = n + Math.max(this.seekOvershoot,
|
|
13210
|
+
let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n), i = n + Math.max(this.seekOvershoot, _w);
|
|
13194
13211
|
if (r === void 0 || i >= r) return;
|
|
13195
13212
|
let a = this.findKeyframeCloseToTimestamp(i);
|
|
13196
13213
|
return {
|
|
@@ -13267,7 +13284,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13267
13284
|
if (!r && !this.isAllowedToSyncIgnoringCooldown() || r && (this.isSeeking() || !this.currentChannelId || this.isSuspended || this.playbackSource.isPaused) || (this.driftSamples.push(t), !this.isSeekCooldownExpired()) || !r && this.driftSamples.items().length < this.driftSamplesToCollect && Math.abs(t) < 2e3) return;
|
|
13268
13285
|
let i = r ? t : Ut(this.driftSamples.items());
|
|
13269
13286
|
if (!r && this.tryPlaybackRateSync(i) || !r && this.shouldSkipNormalSeek(i)) return;
|
|
13270
|
-
let a = performance.now() - this.config.seek.timeoutMs * this.state.seekToleranceMultiplier, o = this.seekAdjustmentTimestamps.filter(
|
|
13287
|
+
let a = performance.now() - this.config.seek.timeoutMs * this.state.seekToleranceMultiplier, o = this.seekAdjustmentTimestamps.filter(fw(a)).length, s = this.currentEmergencySeekToleranceMs(), c = i > 0 && i >= s;
|
|
13271
13288
|
if (o && this.state.seekToleranceMultiplier > 2 && !r && !c) {
|
|
13272
13289
|
this.logger.debug("Too many seek adjustments within sliding window", {
|
|
13273
13290
|
seekCooldownThreshold: a,
|
|
@@ -13296,9 +13313,9 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13296
13313
|
return;
|
|
13297
13314
|
}
|
|
13298
13315
|
}), p(this, "onPageActive", (e) => {
|
|
13299
|
-
this.setSyncInterval(e ?
|
|
13316
|
+
this.setSyncInterval(e ? pw : mw), e && this.onSync();
|
|
13300
13317
|
}), p(this, "onPageShow", (e) => {
|
|
13301
|
-
e.persisted && (this.setSyncInterval(document.visibilityState === "hidden" ?
|
|
13318
|
+
e.persisted && (this.setSyncInterval(document.visibilityState === "hidden" ? mw : pw), this.onSync());
|
|
13302
13319
|
}), p(this, "setSyncInterval", (e) => {
|
|
13303
13320
|
this.syncInterval !== void 0 && this.currentSyncIntervalMs === e || (this.clearSyncInterval(), this.currentSyncIntervalMs = e, this.syncInterval = this.timers.setInterval(this.onSync, e));
|
|
13304
13321
|
}), p(this, "clearSyncInterval", () => {
|
|
@@ -13309,11 +13326,11 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13309
13326
|
let t = n >= e - this.config.seek.keyframeSearchBeforeMs, r = n <= e + this.config.seek.keyframeSearchAfterMs;
|
|
13310
13327
|
if (t && r) return n;
|
|
13311
13328
|
}
|
|
13312
|
-
}), this.logger = t, this.emitter = e, this.playbackSource = n, this.bufferSource = r, this.usesMse = a, this.seekOvershoot =
|
|
13313
|
-
seek: L({},
|
|
13314
|
-
timeshift: L({},
|
|
13315
|
-
playbackRate: L({},
|
|
13316
|
-
backoff: L({},
|
|
13329
|
+
}), this.logger = t, this.emitter = e, this.playbackSource = n, this.bufferSource = r, this.usesMse = a, this.seekOvershoot = dw(a), this.config = {
|
|
13330
|
+
seek: L({}, yw.seek),
|
|
13331
|
+
timeshift: L({}, yw.timeshift),
|
|
13332
|
+
playbackRate: L({}, yw.playbackRate),
|
|
13333
|
+
backoff: L({}, yw.backoff)
|
|
13317
13334
|
}, this.config.timeshift.enabled = i, a || (this.config.seek.toleranceMs = 50, this.config.timeshift.toleranceMs = 20, this.config.seek.aheadToleranceMs = 40), this.state = {
|
|
13318
13335
|
seekToleranceMultiplier: 1,
|
|
13319
13336
|
timeshiftToleranceMultiplier: 1
|
|
@@ -13375,8 +13392,8 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
|
|
|
13375
13392
|
return this.serverCurrentTime - this.playbackSource.currentTime;
|
|
13376
13393
|
}
|
|
13377
13394
|
};
|
|
13378
|
-
|
|
13379
|
-
var
|
|
13395
|
+
cw = bw, p(bw, "create", (e, t, n, r, i, a = !0) => new cw(e, t, n, r, i, a)), H(), R(), m(), P();
|
|
13396
|
+
var xw, Sw = {
|
|
13380
13397
|
enabled: !0,
|
|
13381
13398
|
interval: 3e4,
|
|
13382
13399
|
includeErrors: !0,
|
|
@@ -13385,11 +13402,11 @@ var yw, bw = {
|
|
|
13385
13402
|
maxRetries: 10,
|
|
13386
13403
|
maxErrorReports: 50,
|
|
13387
13404
|
maxEvents: 50
|
|
13388
|
-
},
|
|
13405
|
+
}, Cw = (e, t) => L(L({}, t), {}, {
|
|
13389
13406
|
type: e,
|
|
13390
13407
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
13391
13408
|
discriminator: "web"
|
|
13392
|
-
}),
|
|
13409
|
+
}), ww = class {
|
|
13393
13410
|
constructor(e, t, n, r) {
|
|
13394
13411
|
var i = this;
|
|
13395
13412
|
p(this, "logger", void 0), p(this, "timers", new lr()), p(this, "emitter", void 0), p(this, "options", void 0), p(this, "parentContext", void 0), p(this, "unsentLines", new w(100)), p(this, "retries", 0), p(this, "errorCount", 0), p(this, "eventCount", 0), p(this, "statsCount", 0), p(this, "unload", () => {
|
|
@@ -13406,7 +13423,7 @@ var yw, bw = {
|
|
|
13406
13423
|
initiator: "interval"
|
|
13407
13424
|
}, n = {}) => {
|
|
13408
13425
|
if (!this.options.includeStats) return;
|
|
13409
|
-
let r = this.parentContext.getStatistics(), i =
|
|
13426
|
+
let r = this.parentContext.getStatistics(), i = Cw("stats", L(L(L({}, n), r), {}, {
|
|
13410
13427
|
isFinal: e,
|
|
13411
13428
|
initiator: t,
|
|
13412
13429
|
count: this.statsCount++
|
|
@@ -13414,7 +13431,7 @@ var yw, bw = {
|
|
|
13414
13431
|
this.unsentLines.push(i);
|
|
13415
13432
|
}), p(this, "addEvent", (e) => {
|
|
13416
13433
|
if (!this.options.includeEvents || this.eventCount > this.options.maxEvents) return;
|
|
13417
|
-
let t =
|
|
13434
|
+
let t = Cw("event", L(L({}, this.parentContext.getStatistics()), e));
|
|
13418
13435
|
this.eventCount++, this.unsentLines.push(t);
|
|
13419
13436
|
}), p(this, "getStatistics", () => ({ errorCount: this.errorCount })), p(this, "send", function() {
|
|
13420
13437
|
var e = N(function* (e) {
|
|
@@ -13459,12 +13476,12 @@ var yw, bw = {
|
|
|
13459
13476
|
let { includeErrors: t, maxErrorReports: n } = this.options;
|
|
13460
13477
|
if (!(e instanceof U) || e.code() === "channel_not_live" || !t || (this.errorCount++, this.errorCount > n)) return;
|
|
13461
13478
|
let r = this.parentContext.getStatistics();
|
|
13462
|
-
this.unsentLines.push(
|
|
13463
|
-
}), this.logger = e, this.emitter = t, this.options = L(L({},
|
|
13479
|
+
this.unsentLines.push(Cw("error", L(L({}, r), e.toStringifiable())));
|
|
13480
|
+
}), this.logger = e, this.emitter = t, this.options = L(L({}, Sw), n), this.parentContext = r;
|
|
13464
13481
|
}
|
|
13465
13482
|
};
|
|
13466
|
-
|
|
13467
|
-
var
|
|
13483
|
+
xw = ww, p(ww, "create", (e, t, n, r) => new xw(e, t, n, r)), H(), m();
|
|
13484
|
+
var Tw, Ew = class {
|
|
13468
13485
|
constructor(e, t, n) {
|
|
13469
13486
|
p(this, "logger", void 0), p(this, "elements", void 0), p(this, "documentState", void 0), p(this, "timers", new lr()), p(this, "unload", () => {
|
|
13470
13487
|
this.timers.unload();
|
|
@@ -13475,8 +13492,8 @@ var Cw, ww = class {
|
|
|
13475
13492
|
};
|
|
13476
13493
|
//#endregion
|
|
13477
13494
|
//#region ../../libs/web-sdk/src/OptionsProvider.ts
|
|
13478
|
-
|
|
13479
|
-
var
|
|
13495
|
+
Tw = Ew, p(Ew, "create", (e, t, n) => new Tw(e, t, n)), m();
|
|
13496
|
+
var Dw = [
|
|
13480
13497
|
"minBufferTime",
|
|
13481
13498
|
"maxBufferTime",
|
|
13482
13499
|
"burstEnabled",
|
|
@@ -13485,10 +13502,10 @@ var Tw = [
|
|
|
13485
13502
|
"offscreenCanvasEnabled",
|
|
13486
13503
|
"videoCodecs"
|
|
13487
13504
|
];
|
|
13488
|
-
function
|
|
13489
|
-
return
|
|
13505
|
+
function Ow(e) {
|
|
13506
|
+
return Dw.includes(e);
|
|
13490
13507
|
}
|
|
13491
|
-
var
|
|
13508
|
+
var kw = class {
|
|
13492
13509
|
constructor(e) {
|
|
13493
13510
|
p(this, "options", void 0), p(this, "overrides", /* @__PURE__ */ new Map()), this.options = e;
|
|
13494
13511
|
}
|
|
@@ -13502,7 +13519,7 @@ var Dw = class {
|
|
|
13502
13519
|
this.options[e] = t;
|
|
13503
13520
|
}
|
|
13504
13521
|
get(e, t) {
|
|
13505
|
-
if (t &&
|
|
13522
|
+
if (t && Ow(e)) {
|
|
13506
13523
|
var n;
|
|
13507
13524
|
let r = (n = this.overrides.get(t)) == null ? void 0 : n[e];
|
|
13508
13525
|
if (r !== void 0) return r;
|
|
@@ -13517,7 +13534,7 @@ var Dw = class {
|
|
|
13517
13534
|
//#endregion
|
|
13518
13535
|
//#region ../../libs/web-sdk/src/processSampleTimestamps.ts
|
|
13519
13536
|
R();
|
|
13520
|
-
var
|
|
13537
|
+
var Aw = 6, jw = (e) => {
|
|
13521
13538
|
let t = [e], n = 0, r = 0, i = !1, a = (e, t) => {
|
|
13522
13539
|
var i, a;
|
|
13523
13540
|
if (e.flags && kl(e.flags)) {
|
|
@@ -13529,7 +13546,7 @@ var Ow = 6, kw = (e) => {
|
|
|
13529
13546
|
return u > 0 && (r = u), L(L({}, e), {}, { duration: u > 0 ? u : r });
|
|
13530
13547
|
};
|
|
13531
13548
|
return (e, n = !1) => {
|
|
13532
|
-
if (e.flags && kl(e.flags) && n && (i = !i), !(n && t.length <
|
|
13549
|
+
if (e.flags && kl(e.flags) && n && (i = !i), !(n && t.length < Aw && i) && t.length > 0) {
|
|
13533
13550
|
i = !1;
|
|
13534
13551
|
let n = e;
|
|
13535
13552
|
for (let e = t.length - 1; e > 0; e--) {
|
|
@@ -13542,13 +13559,13 @@ var Ow = 6, kw = (e) => {
|
|
|
13542
13559
|
}
|
|
13543
13560
|
return t.push(e), [];
|
|
13544
13561
|
};
|
|
13545
|
-
},
|
|
13562
|
+
}, Mw = ["mse", "wasm"], Nw = (e) => e == null ? Mw : e, Pw = (e) => {
|
|
13546
13563
|
if (!e) return !1;
|
|
13547
13564
|
let t = e.headers && Object.keys(e.headers).length > 0, n = e.queryParams && Object.keys(e.queryParams).length > 0;
|
|
13548
13565
|
return !!(t || n);
|
|
13549
|
-
},
|
|
13550
|
-
if (
|
|
13551
|
-
let r =
|
|
13566
|
+
}, Fw = (e, t, n) => {
|
|
13567
|
+
if (Pw(n)) return "mse";
|
|
13568
|
+
let r = Nw(e);
|
|
13552
13569
|
for (let e of r) switch (e) {
|
|
13553
13570
|
case "mse":
|
|
13554
13571
|
if (t) return "mse";
|
|
@@ -13563,7 +13580,7 @@ var Ow = 6, kw = (e) => {
|
|
|
13563
13580
|
//#endregion
|
|
13564
13581
|
//#region ../../libs/web-sdk/src/sampleFromMessage.ts
|
|
13565
13582
|
R();
|
|
13566
|
-
var
|
|
13583
|
+
var Iw = (e, t, n) => {
|
|
13567
13584
|
if (zr(t)) return L(L({}, e), {}, {
|
|
13568
13585
|
type: "video",
|
|
13569
13586
|
codec: t.codec,
|
|
@@ -13588,12 +13605,12 @@ var Pw = (e, t, n) => {
|
|
|
13588
13605
|
//#endregion
|
|
13589
13606
|
//#region ../../libs/web-sdk/src/statisticsRounding.ts
|
|
13590
13607
|
R();
|
|
13591
|
-
var
|
|
13608
|
+
var Lw = ({ average: e, last: t, max: n, min: r }) => ({
|
|
13592
13609
|
average: Math.round(e),
|
|
13593
13610
|
last: Math.round(t),
|
|
13594
13611
|
max: Math.round(n),
|
|
13595
13612
|
min: Math.round(r)
|
|
13596
|
-
}),
|
|
13613
|
+
}), Rw = [
|
|
13597
13614
|
"timeSpentBuffering",
|
|
13598
13615
|
"timePerBufferingEvent",
|
|
13599
13616
|
"drift",
|
|
@@ -13605,28 +13622,28 @@ var Fw = ({ average: e, last: t, max: n, min: r }) => ({
|
|
|
13605
13622
|
"videoKeyframeIntervalMs",
|
|
13606
13623
|
"timeToConnected",
|
|
13607
13624
|
"mediaSourceOpenTime"
|
|
13608
|
-
],
|
|
13625
|
+
], zw = [
|
|
13609
13626
|
"videoDecodeTime",
|
|
13610
13627
|
"audioDecodeTime",
|
|
13611
13628
|
"videoTransportTime",
|
|
13612
13629
|
"rtt"
|
|
13613
|
-
],
|
|
13630
|
+
], Bw = (e) => typeof e == "object" && !!e && "min" in e && "max" in e && "average" in e && "last" in e, Vw = (e) => {
|
|
13614
13631
|
let t = L({}, e);
|
|
13615
|
-
for (let e of
|
|
13632
|
+
for (let e of Rw) {
|
|
13616
13633
|
let n = t[e];
|
|
13617
13634
|
typeof n == "number" && (t[e] = Math.round(n));
|
|
13618
13635
|
}
|
|
13619
|
-
for (let e of
|
|
13636
|
+
for (let e of zw) {
|
|
13620
13637
|
let n = t[e];
|
|
13621
|
-
|
|
13638
|
+
Bw(n) && (t[e] = Lw(n));
|
|
13622
13639
|
}
|
|
13623
13640
|
return t;
|
|
13624
13641
|
};
|
|
13625
13642
|
//#endregion
|
|
13626
13643
|
//#region ../../libs/web-sdk/src/validateOptions.ts
|
|
13627
13644
|
R();
|
|
13628
|
-
var
|
|
13629
|
-
if (!
|
|
13645
|
+
var Hw = (e, t) => e && typeof e == "object" && t in e, Uw = (e) => !(typeof e != "object" || !Hw(e, "channelId") || typeof e.channelId != "string" || !Hw(e, "url") || typeof e.url != "string" || e.channelId.length === 0 || e.url.length === 0), Ww = (e) => {
|
|
13646
|
+
if (!Uw(e)) throw new U("Invalid options", {
|
|
13630
13647
|
isFatal: !0,
|
|
13631
13648
|
code: "invalid_options"
|
|
13632
13649
|
});
|
|
@@ -13635,7 +13652,7 @@ var Bw = (e, t) => e && typeof e == "object" && t in e, Vw = (e) => !(typeof e !
|
|
|
13635
13652
|
let n = t;
|
|
13636
13653
|
n[e] === void 0 && delete n[e];
|
|
13637
13654
|
}), t;
|
|
13638
|
-
},
|
|
13655
|
+
}, Gw = (e) => {
|
|
13639
13656
|
if (typeof e != "object" || !e) throw Error("not an object");
|
|
13640
13657
|
if (!("video" in e)) throw Error("missing video in subscription");
|
|
13641
13658
|
if (!("audio" in e)) throw Error("missing audio in subscription");
|
|
@@ -13643,7 +13660,7 @@ var Bw = (e, t) => e && typeof e == "object" && t in e, Vw = (e) => !(typeof e !
|
|
|
13643
13660
|
return !0;
|
|
13644
13661
|
};
|
|
13645
13662
|
vo(), Dl(), vS(), m(), P();
|
|
13646
|
-
var
|
|
13663
|
+
var Kw = class {
|
|
13647
13664
|
constructor(e) {
|
|
13648
13665
|
var t = this;
|
|
13649
13666
|
p(this, "cache", /* @__PURE__ */ new Map()), p(this, "inFlight", /* @__PURE__ */ new Map()), p(this, "checkVideoSupport", function() {
|
|
@@ -13706,10 +13723,10 @@ var Ww = class {
|
|
|
13706
13723
|
}
|
|
13707
13724
|
};
|
|
13708
13725
|
H(), m(), E(), R(), P(), M(), A();
|
|
13709
|
-
var
|
|
13726
|
+
var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PURE__ */ new WeakMap(), Zw = /* @__PURE__ */ new WeakMap(), Qw = class e extends nn {
|
|
13710
13727
|
constructor(t) {
|
|
13711
13728
|
var n, r, i;
|
|
13712
|
-
super(), n = this, p(this, "pictureInPicture", void 0), p(this, "drm", void 0), p(this, "browser", pt()), p(this, "options", void 0), p(this, "element", void 0), p(this, "playbackSource", void 0), p(this, "emitter", new nn()), p(this, "logger", void 0), p(this, "modules", void 0), p(this, "clientIp", void 0), p(this, "sessionId", void 0), p(this, "clientId", Er()), p(this, "_channels", []), p(this, "createdAt", performance.now()), p(this, "offscreenCanvasElement", void 0), p(this, "webCodecsRenditionSupport", void 0), p(this, "hasCalledConnect", !1), p(this, "hasRequestedAudioSession", !1), p(this, "isUserPaused", !1), p(this, "isMediaElementPaused", !1), p(this, "latestEmittedLanguages", []), p(this, "wakeLock", void 0), p(this, "pool", new re(e.MAX_POOL_SIZE)), p(this, "userAgentInformation", new wr()), p(this, "encryptedMediaExtensions", void 0), T(this,
|
|
13729
|
+
super(), n = this, p(this, "pictureInPicture", void 0), p(this, "drm", void 0), p(this, "browser", pt()), p(this, "options", void 0), p(this, "element", void 0), p(this, "playbackSource", void 0), p(this, "emitter", new nn()), p(this, "logger", void 0), p(this, "modules", void 0), p(this, "clientIp", void 0), p(this, "sessionId", void 0), p(this, "clientId", Er()), p(this, "_channels", []), p(this, "createdAt", performance.now()), p(this, "offscreenCanvasElement", void 0), p(this, "webCodecsRenditionSupport", void 0), p(this, "hasCalledConnect", !1), p(this, "hasRequestedAudioSession", !1), p(this, "isUserPaused", !1), p(this, "isMediaElementPaused", !1), p(this, "latestEmittedLanguages", []), p(this, "wakeLock", void 0), p(this, "pool", new re(e.MAX_POOL_SIZE)), p(this, "userAgentInformation", new wr()), p(this, "encryptedMediaExtensions", void 0), T(this, Yw, 0), T(this, Xw, []), p(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map()), p(this, "unbackedSamplesWarned", new gS()), p(this, "unextractableSamplesWarned", new gS()), p(this, "sizes", /* @__PURE__ */ new Map()), p(this, "isSuspended", !0), p(this, "inactivityDisconnectInterval", void 0), p(this, "visiblePauseTimeout", void 0), p(this, "offscreenSubtitleInterval", void 0), T(this, Zw, void 0), p(this, "attach", (e) => {
|
|
13713
13730
|
var t;
|
|
13714
13731
|
(t = this.wakeLock) == null || t.attach(e), e.appendChild(this.element);
|
|
13715
13732
|
}), p(this, "setElement", (e) => {
|
|
@@ -13796,20 +13813,20 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
13796
13813
|
}), p(this, "updateTextTracks", (e) => {
|
|
13797
13814
|
let t = e.filter((e) => e.codec === "webvtt");
|
|
13798
13815
|
t.forEach((e) => {
|
|
13799
|
-
if (!j(
|
|
13816
|
+
if (!j(Xw, this).find((t) => t.language === e.language)) {
|
|
13800
13817
|
if (this.modules.canvasModule) {
|
|
13801
13818
|
let t = this.modules.canvasModule.textTracks.addTextTrack(e.kind, e.label || e.language || "", e.language || "");
|
|
13802
|
-
j(
|
|
13819
|
+
j(Xw, this).push(t);
|
|
13803
13820
|
} else if (this.mediaElement instanceof HTMLVideoElement) {
|
|
13804
13821
|
let t = this.mediaElement.addTextTrack(e.kind, e.label || e.language, e.language);
|
|
13805
|
-
j(
|
|
13822
|
+
j(Xw, this).push(t);
|
|
13806
13823
|
}
|
|
13807
13824
|
}
|
|
13808
13825
|
});
|
|
13809
|
-
for (let e of j(
|
|
13826
|
+
for (let e of j(Xw, this)) t.find((t) => t.language === e.language) ? e.mode === "disabled" && (e.mode = "hidden") : e.mode = "disabled";
|
|
13810
13827
|
this.emit("text tracks", this.textTracks);
|
|
13811
13828
|
}), p(this, "cleanupTextTracks", (e = this.currentTime - 2e4) => {
|
|
13812
|
-
j(
|
|
13829
|
+
j(Xw, this).forEach((t) => {
|
|
13813
13830
|
if (t.cues) for (let n of Array.from(t.cues)) n.endTime * 1e3 < e - 2e3 && t.removeCue(n);
|
|
13814
13831
|
});
|
|
13815
13832
|
}), p(this, "filterRenditions", function() {
|
|
@@ -13985,7 +14002,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
13985
14002
|
(e = n.modules.decoder) == null || e.unload(), n.modules.decoder = p, n.isHiddenWithBackgroundPlayback() && n.modules.decoder.enableBackgroundTimers(), n.modules.decoder.setVideoRenderingEnabled(n.isVideoOnScreen()), n.modules.decoder.load(), n.setupOffscreenSubtitleRouting();
|
|
13986
14003
|
})), p(this, "capturesCanvasOnWebKit", (e) => !!e && this.browser.platform.isWebKit && this.modules.canvasModule instanceof AC), p(this, "connectWebKitVideoOutput", (e, t) => {
|
|
13987
14004
|
let n = () => {
|
|
13988
|
-
t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(
|
|
14005
|
+
t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(Jw);
|
|
13989
14006
|
};
|
|
13990
14007
|
e.onVideoTrackLost((e) => {
|
|
13991
14008
|
this.logger.warn("Worker video track lost, falling back to canvas capture", { error: e }), n();
|
|
@@ -14035,7 +14052,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14035
14052
|
this.clearVisiblePauseDisconnect(), this.isUserPaused = !1, this.requestAudioSessionOnce(), this.hasCalledConnect ? this.unsuspend() : this.playbackState !== "playing" && (this._connect(), self.addEventListener("__vindral_register_debug__", this.registerDebugInstance), this.modules.timer.setInterval(() => this.cleanupTextTracks(), e.REMOVE_CUE_THRESHOLD)), (t = this.wakeLock) == null || t.enable(), this.playbackState === "paused" && this.playbackSource.isActivated && (this.resetModules(), this.emitter.emit("flush buffers"), this.cleanupTextTracks(2 ** 53 - 1)), this.playbackSource.play(), this.isHiddenWithBackgroundPlayback() && this.scheduleInactivityDisconnect();
|
|
14036
14053
|
}), p(this, "getStatistics", () => {
|
|
14037
14054
|
let e = Object.values(this.modules).reduce((e, t) => t && "getStatistics" in t ? L(L({}, e), t.getStatistics()) : e, this.getRuntimeInfo()), t = Math.round(this.timeActive > 0 ? (e.bytesReceived || 0) * 8 / (this.timeActive / 1e3) : 0), n = this.uptime / 36e5, r = Math.max(0, (e.connectCount || 0) - 1), i = n > 0 ? r / n : 0, a = this.timeActive / 6e4, o = Math.max(a, 1), s = a > 0 ? (e.seekAdjustmentCount || 0) / o : 0, c = a > 0 ? (e.timeshiftAdjustmentCount || 0) / o : 0;
|
|
14038
|
-
return
|
|
14055
|
+
return Vw(L(L({}, e), {}, {
|
|
14039
14056
|
averageBitRate: t,
|
|
14040
14057
|
reconnectsPerHour: i,
|
|
14041
14058
|
seekAdjustmentsPerMinute: s,
|
|
@@ -14044,7 +14061,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14044
14061
|
}), p(this, "resetModules", () => {
|
|
14045
14062
|
Object.values(this.modules).forEach((e) => {
|
|
14046
14063
|
e && "reset" in e && e.reset();
|
|
14047
|
-
}), this.playbackSource instanceof ru && this.modules.adaptivity.reset(
|
|
14064
|
+
}), this.playbackSource instanceof ru && this.modules.adaptivity.reset(qw), this.sampleProcessingSesssions.clear(), this.cleanupTextTracks(Infinity), this.playbackSource.currentTime = 0, this.playbackSource.isActivated = !1;
|
|
14048
14065
|
}), p(this, "disconnectForInactivePage", (e) => {
|
|
14049
14066
|
if (this.clearInactivityDisconnect(), this.emitter.emit("flush buffers"), !this.isBackgroundPlayEnabled(this.channelId)) {
|
|
14050
14067
|
var t;
|
|
@@ -14078,7 +14095,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14078
14095
|
let e = this.modules.canvasModule instanceof AC ? !0 : void 0;
|
|
14079
14096
|
return L({
|
|
14080
14097
|
uptime: this.uptime,
|
|
14081
|
-
version: "4.7.2-
|
|
14098
|
+
version: "4.7.2-5-g4c14d0e4",
|
|
14082
14099
|
clientId: this.clientId,
|
|
14083
14100
|
sessionId: this.sessionId,
|
|
14084
14101
|
channelId: this.channelId,
|
|
@@ -14123,7 +14140,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14123
14140
|
if (this.browser.platform.isWebKit || !this.browser.isMobile) return !1;
|
|
14124
14141
|
let t = (e = this.modules) == null ? void 0 : e.decoder;
|
|
14125
14142
|
return t ? t.audioWebCodecsInUse : this.isWebCodecsAudioAvailable(this.channelId);
|
|
14126
|
-
}), this.options = new
|
|
14143
|
+
}), this.options = new kw(L(L({}, Gr), Ww(t))), t.telemetryEnabled === void 0 && ["localhost", "127.0.0.1"].includes(location.hostname) && this.options.set("telemetryEnabled", !1);
|
|
14127
14144
|
let a = {
|
|
14128
14145
|
channelId: this.options.get("channelId"),
|
|
14129
14146
|
audio: {
|
|
@@ -14136,14 +14153,14 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14136
14153
|
height: this.options.get("maxSize").height
|
|
14137
14154
|
}
|
|
14138
14155
|
}, o = Sn.get();
|
|
14139
|
-
o.setLevel(this.options.get("logLevel")), o.setDebug(!1), this.logger = o, this.webCodecsRenditionSupport = new
|
|
14156
|
+
o.setLevel(this.options.get("logLevel")), o.setDebug(!1), this.logger = o, this.webCodecsRenditionSupport = new Kw(o), t.iosMediaElementEnabled !== void 0 && this.logger.warn("Option iosMediaElementEnabled is deprecated and will be removed in a future release. Use streamToMediaElementEnabled instead.");
|
|
14140
14157
|
let s = (r = t.streamToMediaElementEnabled) == null ? t.iosMediaElementEnabled : r;
|
|
14141
14158
|
s !== void 0 && (this.options.set("streamToMediaElementEnabled", s), this.options.set("iosMediaElementEnabled", s)), t.iosBackgroundPlayEnabled !== void 0 && this.logger.warn("Option iosBackgroundPlayEnabled is deprecated and will be removed in a future release. Use backgroundPlayEnabled instead.");
|
|
14142
14159
|
let c = (i = t.backgroundPlayEnabled) == null ? t.iosBackgroundPlayEnabled : i;
|
|
14143
14160
|
c !== void 0 && (this.options.set("backgroundPlayEnabled", c), this.options.set("iosBackgroundPlayEnabled", c));
|
|
14144
14161
|
let l = t.mseEnabled !== void 0, u = t.decoders !== void 0;
|
|
14145
14162
|
l && this.logger.warn("Option mseEnabled is deprecated and will be removed in a future release. Use decoders instead (e.g. decoders: [\"wasm\"])."), l && !u && t.mseEnabled === !1 && this.options.set("decoders", ["wasm"]);
|
|
14146
|
-
let d =
|
|
14163
|
+
let d = GC.create(this.emitter, this.logger.createContext("PictureInPictureModule")), f = this.options.get("mediaSessionEnabled") ? OC.create(this.emitter, this.logger.createContext("MediaSessionModule"), {
|
|
14147
14164
|
metadata: this.options.get("mediaSessionMetadata"),
|
|
14148
14165
|
decoy: this.willUseMediaSource() || this.usesSplitCanvasAudio() ? void 0 : Su.create(this.logger.createContext("AudioFocusDecoy"), this.yieldToInterruption),
|
|
14149
14166
|
isMuted: () => this.playbackSource.userMuted,
|
|
@@ -14158,7 +14175,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14158
14175
|
reconnectHandler: this.options.get("reconnectHandler"),
|
|
14159
14176
|
options: this.options,
|
|
14160
14177
|
onConnectInfo: this.onConnectInfo
|
|
14161
|
-
}), g =
|
|
14178
|
+
}), g = ow.create(this.logger.createContext("SubscriptionModule"), this.emitter, a), _ = nw.create(this.emitter, g), v = qC.create(this.emitter, this.logger.createContext("PlaybackModule"), this, this.options.get("minBufferTime")), y = ew.create(this.emitter, this.logger.createContext("QualityOfServiceModule"), _, v);
|
|
14162
14179
|
this.encryptedMediaExtensions = new $a(this.emitter, this.logger.createContext("EncryptedMediaExtensions"), t.drm), this.drm = {
|
|
14163
14180
|
setHeaders: (e) => {
|
|
14164
14181
|
this.encryptedMediaExtensions.headers = e;
|
|
@@ -14177,7 +14194,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14177
14194
|
logger: this.logger.createContext("MediaElement"),
|
|
14178
14195
|
poster: x
|
|
14179
14196
|
});
|
|
14180
|
-
e.on("buffer state", (e) => this.onMediaElementBufferState(e, te)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emitter.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, $a.isSupported() && this.encryptedMediaExtensions.attach(e.element), te = FC.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (ne =
|
|
14197
|
+
e.on("buffer state", (e) => this.onMediaElementBufferState(e, te)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emitter.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, $a.isSupported() && this.encryptedMediaExtensions.attach(e.element), te = FC.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (ne = Ew.create(this.logger.createContext("UnpauseModule"), [e], b)), this.options.get("pictureInPictureEnabled") && this.emitter.emit("add picture in picture listener", { element: e.element });
|
|
14181
14198
|
} else if (this.streamsToMediaElement()) {
|
|
14182
14199
|
let e = AC.create(this.emitter, this.logger.createContext("ModernCanvasModule"), this.pool, this, {
|
|
14183
14200
|
type: this.options.get("media") === "audio" ? "audio" : "video",
|
|
@@ -14191,7 +14208,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14191
14208
|
});
|
|
14192
14209
|
this.element = e.element().element, this.playbackSource = e, ie = e;
|
|
14193
14210
|
let t = this.browser.platform.isIOS && this.browser.platform.iosVersion <= 15;
|
|
14194
|
-
this.options.get("pictureInPictureEnabled") && !t && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (ne =
|
|
14211
|
+
this.options.get("pictureInPictureEnabled") && !t && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (ne = Ew.create(this.logger.createContext("UnpauseModule"), e.elements(), b));
|
|
14195
14212
|
} else {
|
|
14196
14213
|
let e;
|
|
14197
14214
|
e = CC.create(this.emitter, this.logger.createContext("LegacyCanvasModule"), this.pool, this, this.options.get("muted") || this.options.get("media") === "video", this.options.get("volume"), () => {
|
|
@@ -14212,9 +14229,9 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14212
14229
|
getTargetBufferTime: () => v.getTargetBufferTime(),
|
|
14213
14230
|
getNextBufferedRangeStart: te ? (e) => te.getNextBufferedRangeStart(e) : void 0,
|
|
14214
14231
|
getBufferedEndAt: te ? (e) => te.getBufferedEndAt(e) : void 0
|
|
14215
|
-
}, oe =
|
|
14232
|
+
}, oe = bw.create(this.emitter, this.logger.createContext("SyncModule"), this.playbackSource, C, ae, S), w = cC.create(this.logger.createContext("JitterModule")), se = ou.create(this.emitter), ce = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), le = new URL("/telemetry", ce).toString();
|
|
14216
14233
|
this.modules = {
|
|
14217
|
-
telemetry:
|
|
14234
|
+
telemetry: ww.create(this.logger.createContext("TelemetryModule"), this.emitter, {
|
|
14218
14235
|
url: le,
|
|
14219
14236
|
enabled: this.options.get("telemetryEnabled"),
|
|
14220
14237
|
includeStats: !1,
|
|
@@ -14299,7 +14316,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14299
14316
|
let r = ((t = (n = e.telemetry) == null ? void 0 : n.probability) == null ? 1 : t) >= Math.random();
|
|
14300
14317
|
if (e.telemetry) {
|
|
14301
14318
|
var i;
|
|
14302
|
-
(i = this.modules.telemetry) == null || i.unload(), this.modules.telemetry =
|
|
14319
|
+
(i = this.modules.telemetry) == null || i.unload(), this.modules.telemetry = ww.create(this.logger.createContext("TelemetryModule"), this.emitter, L(L({}, e.telemetry), {}, { enabled: this.options.get("telemetryEnabled") && r }), this), this.modules.telemetry.load();
|
|
14303
14320
|
}
|
|
14304
14321
|
}), this.emitter.on("adapt level", (e) => {
|
|
14305
14322
|
let t = this.modules.renditions.getRenditionLevels(), n = this.modules.renditions.getRenditionLevel(), r = t.findIndex((e) => e === n), i = t.length - 1, a = r;
|
|
@@ -14330,8 +14347,8 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14330
14347
|
audio: L(L({}, this.targetSubscription.audio), d == null ? void 0 : d.audio)
|
|
14331
14348
|
})), this.emitter.emit("adapted level");
|
|
14332
14349
|
}), this.emitter.on("text track data", (e) => {
|
|
14333
|
-
let t = j(
|
|
14334
|
-
if (k(
|
|
14350
|
+
let t = j(Xw, this).find((t) => t.language === e.language), n = this.modules.sync.getTimeshiftOffset() / 1e3, r = n - j(Yw, this);
|
|
14351
|
+
if (k(Yw, this, n), t) {
|
|
14335
14352
|
if (t.cues) for (let e of t.cues) e.startTime -= r, e.endTime -= r;
|
|
14336
14353
|
for (let r of e.cues) {
|
|
14337
14354
|
let e = new VTTCue(r.startTime - n, r.endTime - n, r.text);
|
|
@@ -14347,19 +14364,19 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14347
14364
|
this.clientIp = t.ip;
|
|
14348
14365
|
break;
|
|
14349
14366
|
case "renditions":
|
|
14350
|
-
this.updateTextTracks(t.renditions), k(
|
|
14367
|
+
this.updateTextTracks(t.renditions), k(Zw, this, this.filterRenditions(t.renditions).then((e) => {
|
|
14351
14368
|
this.emitter.emit("renditions", {
|
|
14352
14369
|
renditions: e,
|
|
14353
14370
|
channelId: this.currentSubscription.channelId
|
|
14354
14371
|
}), this.emit("rendition levels", this.modules.renditions.getRenditionLevels()), this.emitLanguagesIfChanged();
|
|
14355
14372
|
}).finally(() => {
|
|
14356
|
-
k(
|
|
14373
|
+
k(Zw, this, void 0);
|
|
14357
14374
|
}));
|
|
14358
14375
|
break;
|
|
14359
14376
|
case "subscription changed":
|
|
14360
14377
|
var r;
|
|
14361
14378
|
try {
|
|
14362
|
-
|
|
14379
|
+
Gw(t.subscription);
|
|
14363
14380
|
} catch (e) {
|
|
14364
14381
|
this.emitter.emit("error", new U("Subscription failed validation", {
|
|
14365
14382
|
source: e instanceof Error ? e : void 0,
|
|
@@ -14490,7 +14507,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14490
14507
|
let O = function() {
|
|
14491
14508
|
var e = N(function* (e) {
|
|
14492
14509
|
let t = e.channelId;
|
|
14493
|
-
j(
|
|
14510
|
+
j(Zw, n) && (yield j(Zw, n));
|
|
14494
14511
|
let r = n.modules.renditions.getRendition(e.renditionId, t);
|
|
14495
14512
|
if (!jl(e.flags)) {
|
|
14496
14513
|
if (Ml(e.flags)) {
|
|
@@ -14504,8 +14521,8 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14504
14521
|
} catch (e) {
|
|
14505
14522
|
n.logger.warn("failed to parse WebVTT segment, dropping it", e);
|
|
14506
14523
|
}
|
|
14507
|
-
let a = r / 1e3, o = j(
|
|
14508
|
-
if (k(
|
|
14524
|
+
let a = r / 1e3, o = j(Xw, n).find((t) => t.language === e.language), s = a - j(Yw, n);
|
|
14525
|
+
if (k(Yw, n, a), o) {
|
|
14509
14526
|
if (o.cues) for (let e of o.cues) e.startTime -= s, e.endTime -= s;
|
|
14510
14527
|
for (let e of i) {
|
|
14511
14528
|
let t = new VTTCue(e.startTime - a, e.endTime - a, e.text);
|
|
@@ -14541,10 +14558,10 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14541
14558
|
mimeType: s
|
|
14542
14559
|
}), n.emit("initialized media");
|
|
14543
14560
|
} else {
|
|
14544
|
-
let t =
|
|
14561
|
+
let t = Iw(e, r, n.sizes.get(e.renditionId));
|
|
14545
14562
|
n.modules.jitter.recordSample(t);
|
|
14546
14563
|
let a = n.sampleProcessingSesssions.get(i);
|
|
14547
|
-
if (!a) a =
|
|
14564
|
+
if (!a) a = jw(n.modules.sync.processSample(t)), n.sampleProcessingSesssions.set(i, a);
|
|
14548
14565
|
else {
|
|
14549
14566
|
let e = n.willUseMediaSource() && n.isSwitchingRenditionLevel && t.type === "video", r = a(n.modules.sync.processSample(t), e), i = t;
|
|
14550
14567
|
r.forEach((e) => {
|
|
@@ -14651,7 +14668,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14651
14668
|
this.modules.subscription.setLanguage(e), this.alignSizeAndBitRate(this.targetSubscription);
|
|
14652
14669
|
}
|
|
14653
14670
|
set textTrack(e) {
|
|
14654
|
-
e !== this.textTrack && (j(
|
|
14671
|
+
e !== this.textTrack && (j(Xw, this).forEach((t) => {
|
|
14655
14672
|
if (t.label === e) t.mode = "showing";
|
|
14656
14673
|
else {
|
|
14657
14674
|
if (t.mode === "showing" && t.cues) for (let e of [...t.cues]) t.removeCue(e);
|
|
@@ -14660,11 +14677,11 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14660
14677
|
}), this.emitter.emit("text track", e));
|
|
14661
14678
|
}
|
|
14662
14679
|
get textTracks() {
|
|
14663
|
-
return j(
|
|
14680
|
+
return j(Xw, this).filter((e) => e.mode !== "disabled").map((e) => e.label);
|
|
14664
14681
|
}
|
|
14665
14682
|
get textTrack() {
|
|
14666
14683
|
var e;
|
|
14667
|
-
return (e = j(
|
|
14684
|
+
return (e = j(Xw, this).find((e) => e.mode === "showing")) == null ? void 0 : e.label;
|
|
14668
14685
|
}
|
|
14669
14686
|
get channelId() {
|
|
14670
14687
|
var e, t;
|
|
@@ -14802,7 +14819,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14802
14819
|
return this.modules.subscription.getTargetSubscription();
|
|
14803
14820
|
}
|
|
14804
14821
|
resolvedDecoder(e) {
|
|
14805
|
-
return
|
|
14822
|
+
return Fw(this.options.get("decoders", e), this.browser.supportsMediaSource, this.options.get("drm"));
|
|
14806
14823
|
}
|
|
14807
14824
|
usesSplitCanvasAudio() {
|
|
14808
14825
|
return !this.willUseMediaSource() && this.options.get("streamToMediaElementEnabled") && Lt(this.browser) && this.options.get("media") !== "audio" && this.options.get("media") !== "video" && this.browser.platform.isIOS;
|
|
@@ -14842,89 +14859,89 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
|
|
|
14842
14859
|
return this.hasCalledConnect && this.isBackgroundPlayEnabled(e) && !this.isUserPaused;
|
|
14843
14860
|
}
|
|
14844
14861
|
};
|
|
14845
|
-
p(
|
|
14846
|
-
var
|
|
14862
|
+
p(Qw, "MAX_POOL_SIZE", 10), p(Qw, "REMOVE_CUE_THRESHOLD", 1e3 * 10), p(Qw, "BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT", 1e3 * 15), p(Qw, "VISIBLE_PAUSE_DISCONNECT_DELAY", 1e3);
|
|
14863
|
+
var $w = {
|
|
14847
14864
|
bar: "_bar_qm7bl_1",
|
|
14848
14865
|
hidden: "_hidden_qm7bl_47"
|
|
14849
|
-
},
|
|
14866
|
+
}, eT = "_withThumbnails_suenn_19", tT = {
|
|
14850
14867
|
"channel-selection-item": "_channel-selection-item_suenn_1",
|
|
14851
14868
|
"channel-selection-item-selected": "_channel-selection-item-selected_suenn_8",
|
|
14852
14869
|
"channel-selection-item-image": "_channel-selection-item-image_suenn_13",
|
|
14853
|
-
withThumbnails:
|
|
14870
|
+
withThumbnails: eT,
|
|
14854
14871
|
"hide-on-small": "_hide-on-small_suenn_27"
|
|
14855
|
-
},
|
|
14872
|
+
}, nT = { "icon-button": "_icon-button_5fg7v_1" }, rT = {
|
|
14856
14873
|
viewBox: "-10 -10 44 44",
|
|
14857
14874
|
content: "<g fill=\"none\" stroke=\"white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" clip-rule=\"evenodd\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2\" />\n </g>"
|
|
14858
|
-
},
|
|
14875
|
+
}, iT = {
|
|
14859
14876
|
viewBox: "-160 -160 832 832",
|
|
14860
14877
|
content: "<path fill=\"white\" d=\"M208,432H160a16,16,0,0,1-16-16V96a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V416A16,16,0,0,1,208,432Z\"/><path fill=\"white\" d=\"M352,432H304a16,16,0,0,1-16-16V96a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V416A16,16,0,0,1,352,432Z\"/>"
|
|
14861
|
-
},
|
|
14878
|
+
}, aT = {
|
|
14862
14879
|
viewBox: "-6 -6 36 36",
|
|
14863
14880
|
content: "<path d=\"M7 17.259V6.74104C7 5.96925 7.83721 5.48837 8.50387 5.87726L18.2596 11.5681C18.5904 11.761 18.5904 12.2389 18.2596 12.4319L8.50387 18.1227C7.83721 18.5116 7 18.0308 7 17.259Z\" fill=\"none\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
|
|
14864
|
-
},
|
|
14881
|
+
}, oT = {
|
|
14865
14882
|
viewBox: "-10 -10 44 44",
|
|
14866
14883
|
content: "<g fill=\"none\" stroke=\"white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" />\n </svg>"
|
|
14867
|
-
},
|
|
14884
|
+
}, sT = {
|
|
14868
14885
|
viewBox: "-10 -10 44 44",
|
|
14869
14886
|
content: "\n <path stroke=\"white\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\" />"
|
|
14870
|
-
},
|
|
14887
|
+
}, cT = {
|
|
14871
14888
|
viewBox: "-12 -12 38 38",
|
|
14872
14889
|
content: "<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-5.000000, -5.000000)\">\n <path d=\"M6,14 C5.45,14 5,14.45 5,15 L5,18 C5,18.55 5.45,19 6,19 L9,19 C9.55,19 10,18.55 10,18 C10,17.45 9.55,17 9,17 L7,17 L7,15 C7,14.45 6.55,14 6,14 Z M6,10 C6.55,10 7,9.55 7,9 L7,7 L9,7 C9.55,7 10,6.55 10,6 C10,5.45 9.55,5 9,5 L6,5 C5.45,5 5,5.45 5,6 L5,9 C5,9.55 5.45,10 6,10 Z M17,17 L15,17 C14.45,17 14,17.45 14,18 C14,18.55 14.45,19 15,19 L18,19 C18.55,19 19,18.55 19,18 L19,15 C19,14.45 18.55,14 18,14 C17.45,14 17,14.45 17,15 L17,17 Z M14,6 C14,6.55 14.45,7 15,7 L17,7 L17,9 C17,9.55 17.45,10 18,10 C18.55,10 19,9.55 19,9 L19,6 C19,5.45 18.55,5 18,5 L15,5 C14.45,5 14,5.45 14,6 Z\" fill=\"white\"></path>\n</g>"
|
|
14873
|
-
},
|
|
14890
|
+
}, lT = {
|
|
14874
14891
|
viewBox: "-12 -12 38 38",
|
|
14875
14892
|
content: "<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-5.000000, -5.000000)\">\n <path d=\"M6,16 L8,16 L8,18 C8,18.55 8.45,19 9,19 C9.55,19 10,18.55 10,18 L10,15 C10,14.45 9.55,14 9,14 L6,14 C5.45,14 5,14.45 5,15 C5,15.55 5.45,16 6,16 Z M8,8 L6,8 C5.45,8 5,8.45 5,9 C5,9.55 5.45,10 6,10 L9,10 C9.55,10 10,9.55 10,9 L10,6 C10,5.45 9.55,5 9,5 C8.45,5 8,5.45 8,6 L8,8 Z M15,19 C15.55,19 16,18.55 16,18 L16,16 L18,16 C18.55,16 19,15.55 19,15 C19,14.45 18.55,14 18,14 L15,14 C14.45,14 14,14.45 14,15 L14,18 C14,18.55 14.45,19 15,19 Z M16,8 L16,6 C16,5.45 15.55,5 15,5 C14.45,5 14,5.45 14,6 L14,9 C14,9.55 14.45,10 15,10 L18,10 C18.55,10 19,9.55 19,9 C19,8.45 18.55,8 18,8 L16,8 Z\" fill=\"white\"></path>\n</g>"
|
|
14876
|
-
},
|
|
14893
|
+
}, uT = {
|
|
14877
14894
|
viewBox: "-10 -10 44 44",
|
|
14878
14895
|
content: "<path fill=\"white\" d=\"M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z\"/>"
|
|
14879
|
-
},
|
|
14896
|
+
}, dT = {
|
|
14880
14897
|
viewBox: "-10 -10 45 45",
|
|
14881
14898
|
content: "<path fill=\"white\" d=\"M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z\"/>"
|
|
14882
|
-
},
|
|
14899
|
+
}, fT = {
|
|
14883
14900
|
viewBox: "-8 -8 40 40",
|
|
14884
14901
|
content: "<path fill=\"white\" d=\"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z\"/>"
|
|
14885
|
-
},
|
|
14902
|
+
}, pT = {
|
|
14886
14903
|
viewBox: "-8 -8 40 40",
|
|
14887
14904
|
content: "<path fill=\"white\" d=\"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z\"/>"
|
|
14888
|
-
},
|
|
14905
|
+
}, mT = {
|
|
14889
14906
|
viewBox: "-8 -8 40 40",
|
|
14890
14907
|
content: "<path fill=\"white\" d=\"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z\"></path>"
|
|
14891
|
-
},
|
|
14908
|
+
}, hT = {
|
|
14892
14909
|
viewBox: "-8 -8 40 40",
|
|
14893
14910
|
content: "<path fill=\"white\" d=\"M12.8 13.4c-.1-.1-.1-.2-.2-.2c-.5-.3-1.1-.2-1.5.2l-4 6c0 .2-.1.4-.1.6c0 .6.4 1 1 1h8c.2 0 .4-.1.6-.2c.5-.3.6-.9.3-1.4zM19 3H5C3.3 3 2 4.3 2 6v9c0 1.7 1.3 3 3 3h.8c.6 0 1-.4 1-1s-.4-1-1-1H5c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v9c0 .6-.4 1-1 1h-.8c-.6 0-1 .4-1 1s.4 1 1 1h.8c1.7 0 3-1.3 3-3V6c0-1.7-1.3-3-3-3\"/>"
|
|
14894
14911
|
};
|
|
14895
14912
|
//#endregion
|
|
14896
14913
|
//#region ../../libs/player/src/IconButton.ts
|
|
14897
14914
|
m();
|
|
14898
|
-
var
|
|
14899
|
-
enter:
|
|
14900
|
-
exit:
|
|
14901
|
-
pip:
|
|
14902
|
-
channels:
|
|
14903
|
-
languages:
|
|
14904
|
-
textTracks:
|
|
14905
|
-
levels:
|
|
14906
|
-
oneToOne:
|
|
14907
|
-
mute:
|
|
14908
|
-
unmute:
|
|
14909
|
-
pause:
|
|
14910
|
-
play:
|
|
14911
|
-
airPlay:
|
|
14912
|
-
},
|
|
14915
|
+
var gT, _T = {
|
|
14916
|
+
enter: cT,
|
|
14917
|
+
exit: lT,
|
|
14918
|
+
pip: uT,
|
|
14919
|
+
channels: dT,
|
|
14920
|
+
languages: pT,
|
|
14921
|
+
textTracks: mT,
|
|
14922
|
+
levels: fT,
|
|
14923
|
+
oneToOne: sT,
|
|
14924
|
+
mute: rT,
|
|
14925
|
+
unmute: oT,
|
|
14926
|
+
pause: iT,
|
|
14927
|
+
play: aT,
|
|
14928
|
+
airPlay: hT
|
|
14929
|
+
}, vT = (gT = nT["icon-button"]) == null ? "" : gT, yT = class extends h {
|
|
14913
14930
|
constructor(e, t, n) {
|
|
14914
14931
|
super(document.createElement("div")), p(this, "iconElement", void 0), p(this, "setIcon", (e) => {
|
|
14915
|
-
this.iconElement.setAttribute("viewBox",
|
|
14916
|
-
}), p(this, "isHidden", () => this.element.style.display === "none"), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "show", () => void (this.element.style.display = "block")), p(this, "hide", () => void (this.element.style.display = "none")), this.element.style.cursor = "pointer", this.element.setAttribute("role", "button"), this.element.setAttribute("aria-label", e), this.iconElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.iconElement.setAttribute("width", "40px"), this.iconElement.setAttribute("height", "40px"), this.iconElement.setAttribute("class",
|
|
14932
|
+
this.iconElement.setAttribute("viewBox", _T[e].viewBox), this.iconElement.innerHTML = _T[e].content;
|
|
14933
|
+
}), p(this, "isHidden", () => this.element.style.display === "none"), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "show", () => void (this.element.style.display = "block")), p(this, "hide", () => void (this.element.style.display = "none")), this.element.style.cursor = "pointer", this.element.setAttribute("role", "button"), this.element.setAttribute("aria-label", e), this.iconElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.iconElement.setAttribute("width", "40px"), this.iconElement.setAttribute("height", "40px"), this.iconElement.setAttribute("class", vT), this.setIcon(t), this.element.addEventListener("click", n), this.element.appendChild(this.iconElement);
|
|
14917
14934
|
}
|
|
14918
|
-
},
|
|
14919
|
-
list:
|
|
14935
|
+
}, bT = "_list_1vkum_1", xT = "_hidden_1vkum_20", ST = {
|
|
14936
|
+
list: bT,
|
|
14920
14937
|
"list-item": "_list-item_1vkum_12",
|
|
14921
14938
|
"list-item-disabled": "_list-item-disabled_1vkum_16",
|
|
14922
|
-
hidden:
|
|
14939
|
+
hidden: xT
|
|
14923
14940
|
};
|
|
14924
14941
|
//#endregion
|
|
14925
14942
|
//#region ../../libs/player/src/List.ts
|
|
14926
14943
|
m();
|
|
14927
|
-
var
|
|
14944
|
+
var CT, wT, TT, ET, DT = (CT = ST.hidden) == null ? "" : CT, OT = (wT = ST.list) == null ? "" : wT, kT = (TT = ST["list-item"]) == null ? "" : TT, AT = (ET = ST["list-item-disabled"]) == null ? "" : ET, jT = class extends h {
|
|
14928
14945
|
constructor({ items: e, onItemClick: t, classNames: n = [], maxHeight: r }) {
|
|
14929
14946
|
super(document.createElement("div")), p(this, "onItemClick", void 0), p(this, "updateItems", (e) => {
|
|
14930
14947
|
for (; this.element.firstChild;) {
|
|
@@ -14933,11 +14950,11 @@ var xT, ST, CT, wT, TT = (xT = bT.hidden) == null ? "" : xT, ET = (ST = bT.list)
|
|
|
14933
14950
|
}
|
|
14934
14951
|
e.forEach((e) => {
|
|
14935
14952
|
let t = document.createElement("div");
|
|
14936
|
-
e.disabled || t.addEventListener("click", () => this.onItemClick(e)), t.className = [
|
|
14953
|
+
e.disabled || t.addEventListener("click", () => this.onItemClick(e)), t.className = [kT, e.disabled ? AT : ""].join(" "), t.appendChild(e.element()), this.element.appendChild(t);
|
|
14937
14954
|
});
|
|
14938
|
-
}), p(this, "hide", () => this.element.classList.add(
|
|
14955
|
+
}), p(this, "hide", () => this.element.classList.add(DT)), p(this, "show", () => this.element.classList.remove(DT)), this.element.className = [OT, ...n].join(" "), this.onItemClick = t, this.updateItems(e), r && (this.element.style.maxHeight = r);
|
|
14939
14956
|
}
|
|
14940
|
-
},
|
|
14957
|
+
}, MT = {
|
|
14941
14958
|
container: "_container_13xnz_1",
|
|
14942
14959
|
hidden: "_hidden_13xnz_6",
|
|
14943
14960
|
list: "_list_13xnz_10"
|
|
@@ -14945,7 +14962,7 @@ var xT, ST, CT, wT, TT = (xT = bT.hidden) == null ? "" : xT, ET = (ST = bT.list)
|
|
|
14945
14962
|
//#endregion
|
|
14946
14963
|
//#region ../../libs/player/src/ToggleListButton.ts
|
|
14947
14964
|
m();
|
|
14948
|
-
var
|
|
14965
|
+
var NT, PT, FT, IT = (NT = MT.list) == null ? "" : NT, LT = (PT = MT.hidden) == null ? "" : PT, RT = (FT = MT.container) == null ? "" : FT, zT = class extends h {
|
|
14949
14966
|
constructor({ label: e, items: t, onItemClick: n, iconButtonType: r, onToggle: i }) {
|
|
14950
14967
|
super(document.createElement("div")), p(this, "iconButton", void 0), p(this, "onItemClick", void 0), p(this, "onToggle", void 0), p(this, "maxHeight", void 0), p(this, "items", void 0), p(this, "list", void 0), p(this, "onButtonClick", () => {
|
|
14951
14968
|
this.toggleShowChannels(), this.onToggle(this);
|
|
@@ -14954,10 +14971,10 @@ var jT, MT, NT, PT = (jT = AT.list) == null ? "" : jT, FT = (MT = AT.hidden) ==
|
|
|
14954
14971
|
}), p(this, "handleItemClick", (e) => {
|
|
14955
14972
|
this.toggleShowChannels(), this.onItemClick(e);
|
|
14956
14973
|
}), p(this, "showList", () => {
|
|
14957
|
-
this.list = new
|
|
14974
|
+
this.list = new jT({
|
|
14958
14975
|
items: this.items,
|
|
14959
14976
|
onItemClick: this.handleItemClick,
|
|
14960
|
-
classNames: [
|
|
14977
|
+
classNames: [IT],
|
|
14961
14978
|
maxHeight: this.maxHeight
|
|
14962
14979
|
}), this.list.attach(this.element);
|
|
14963
14980
|
}), p(this, "hideList", () => {
|
|
@@ -14967,16 +14984,16 @@ var jT, MT, NT, PT = (jT = AT.list) == null ? "" : jT, FT = (MT = AT.hidden) ==
|
|
|
14967
14984
|
var t;
|
|
14968
14985
|
this.items = e, (t = this.list) == null || t.updateItems(e);
|
|
14969
14986
|
}), p(this, "isListVisible", () => this.list !== void 0), p(this, "hide", () => {
|
|
14970
|
-
|
|
14987
|
+
LT && this.element.classList.add(LT);
|
|
14971
14988
|
}), p(this, "show", () => {
|
|
14972
|
-
|
|
14973
|
-
}), this.element.className =
|
|
14989
|
+
LT && this.element.classList.remove(LT);
|
|
14990
|
+
}), this.element.className = RT, this.onItemClick = n, this.onToggle = i, this.items = t, this.iconButton = new yT(e, r, this.onButtonClick), this.iconButton.attach(this.element);
|
|
14974
14991
|
}
|
|
14975
14992
|
};
|
|
14976
14993
|
//#endregion
|
|
14977
14994
|
//#region ../../libs/player/src/ChannelSelectionButton.ts
|
|
14978
14995
|
H();
|
|
14979
|
-
var
|
|
14996
|
+
var BT, VT, HT, UT, WT, GT = (BT = tT["hide-on-small"]) == null ? "" : BT, KT = (VT = tT["channel-selection-item"]) == null ? "" : VT, qT = (HT = tT["channel-selection-item-selected"]) == null ? "" : HT, JT = (UT = tT["channel-selection-item-image"]) == null ? "" : UT, YT = (WT = tT.withThumbnails) == null ? "" : WT, XT = class extends zT {
|
|
14980
14997
|
constructor({ vindral: e, enabled: t, thumbnailsEnabled: n, thumbnailModule: r }) {
|
|
14981
14998
|
e.on("channels", () => {
|
|
14982
14999
|
let i = e.channels.map((t) => ({
|
|
@@ -14984,12 +15001,12 @@ var RT, zT, BT, VT, HT, UT = (RT = $w["hide-on-small"]) == null ? "" : RT, WT =
|
|
|
14984
15001
|
disabled: !t.isLive,
|
|
14985
15002
|
element: () => {
|
|
14986
15003
|
let i = document.createElement("div");
|
|
14987
|
-
if (i.className = [
|
|
14988
|
-
i.classList.add(
|
|
15004
|
+
if (i.className = [KT, t.channelId === e.channelId ? qT : ""].join(" "), r && n) {
|
|
15005
|
+
i.classList.add(YT);
|
|
14989
15006
|
let e = document.createElement("p");
|
|
14990
15007
|
e.innerHTML = t.name, i.appendChild(e);
|
|
14991
15008
|
let n = r.getImageUrl(t), a = document.createElement("img");
|
|
14992
|
-
n && (a.className =
|
|
15009
|
+
n && (a.className = JT, a.src = n, i.style.backgroundImage = `url(${n})`);
|
|
14993
15010
|
} else i.innerHTML = t.name;
|
|
14994
15011
|
return i;
|
|
14995
15012
|
}
|
|
@@ -15001,16 +15018,16 @@ var RT, zT, BT, VT, HT, UT = (RT = $w["hide-on-small"]) == null ? "" : RT, WT =
|
|
|
15001
15018
|
onItemClick: (t) => e.channelId = t.channel.channelId,
|
|
15002
15019
|
onToggle: S,
|
|
15003
15020
|
iconButtonType: "channels"
|
|
15004
|
-
}), this.element.classList.add(
|
|
15021
|
+
}), this.element.classList.add(GT), this.hide();
|
|
15005
15022
|
}
|
|
15006
|
-
},
|
|
15023
|
+
}, ZT = {
|
|
15007
15024
|
"language-button-item": "_language-button-item_1dov5_1",
|
|
15008
15025
|
"language-button-item-selected": "_language-button-item-selected_1dov5_6"
|
|
15009
15026
|
};
|
|
15010
15027
|
//#endregion
|
|
15011
15028
|
//#region ../../libs/player/src/LanguageButton.ts
|
|
15012
15029
|
H();
|
|
15013
|
-
var
|
|
15030
|
+
var QT, $T, eE = (QT = ZT["language-button-item"]) == null ? "" : QT, tE = ($T = ZT["language-button-item-selected"]) == null ? "" : $T, nE = class extends zT {
|
|
15014
15031
|
constructor({ vindral: e }) {
|
|
15015
15032
|
e.on("languages", () => {
|
|
15016
15033
|
let t = e.languages.map((t) => ({
|
|
@@ -15018,7 +15035,7 @@ var XT, ZT, QT = (XT = YT["language-button-item"]) == null ? "" : XT, $T = (ZT =
|
|
|
15018
15035
|
disabled: !1,
|
|
15019
15036
|
element: () => {
|
|
15020
15037
|
let n = document.createElement("div");
|
|
15021
|
-
return n.className = [
|
|
15038
|
+
return n.className = [eE, t === e.language ? tE : ""].join(" "), n.innerHTML = t, n;
|
|
15022
15039
|
}
|
|
15023
15040
|
}));
|
|
15024
15041
|
this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t), t.length > 0 ? this.show() : this.hide();
|
|
@@ -15034,25 +15051,25 @@ var XT, ZT, QT = (XT = YT["language-button-item"]) == null ? "" : XT, $T = (ZT =
|
|
|
15034
15051
|
//#endregion
|
|
15035
15052
|
//#region ../../libs/player/src/PlayControls.ts
|
|
15036
15053
|
m();
|
|
15037
|
-
var
|
|
15054
|
+
var rE = class extends h {
|
|
15038
15055
|
constructor({ vindral: e }) {
|
|
15039
15056
|
super(document.createElement("div")), p(this, "vindral", void 0), p(this, "playButton", void 0), p(this, "updateState", () => {
|
|
15040
15057
|
this.playButton.setIcon(this.playIcon());
|
|
15041
15058
|
}), p(this, "onPlayClick", () => {
|
|
15042
15059
|
this.vindral.playbackState === "paused" ? this.vindral.play() : this.vindral.pause(), this.playButton.setIcon(this.playIcon());
|
|
15043
|
-
}), p(this, "playIcon", () => this.vindral.playbackState === "paused" ? "play" : "pause"), this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new
|
|
15060
|
+
}), p(this, "playIcon", () => this.vindral.playbackState === "paused" ? "play" : "pause"), this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new yT("Play", this.playIcon(), this.onPlayClick), this.playButton.attach(this.element);
|
|
15044
15061
|
}
|
|
15045
|
-
},
|
|
15046
|
-
item:
|
|
15062
|
+
}, iE = "_item_5vhyo_1", aE = "_title_5vhyo_10", oE = {
|
|
15063
|
+
item: iE,
|
|
15047
15064
|
"item-selected": "_item-selected_5vhyo_6",
|
|
15048
|
-
title:
|
|
15065
|
+
title: aE,
|
|
15049
15066
|
"sub-title": "_sub-title_5vhyo_14",
|
|
15050
15067
|
"hide-on-small": "_hide-on-small_5vhyo_21"
|
|
15051
15068
|
};
|
|
15052
15069
|
//#endregion
|
|
15053
15070
|
//#region ../../libs/player/src/RenditionLevelButton.ts
|
|
15054
15071
|
H();
|
|
15055
|
-
var
|
|
15072
|
+
var sE, cE, lE, uE, dE, fE = (sE = oE["hide-on-small"]) == null ? "" : sE, pE = (cE = oE.item) == null ? "" : cE, mE = (lE = oE["item-selected"]) == null ? "" : lE, hE = (uE = oE.title) == null ? "" : uE, gE = (dE = oE["sub-title"]) == null ? "" : dE, _E = class extends zT {
|
|
15056
15073
|
constructor({ vindral: e }) {
|
|
15057
15074
|
let t = () => {
|
|
15058
15075
|
let t = e.renditionLevels.map((t) => ({
|
|
@@ -15061,13 +15078,13 @@ var aE, oE, sE, cE, lE, uE = (aE = iE["hide-on-small"]) == null ? "" : aE, dE =
|
|
|
15061
15078
|
element: () => {
|
|
15062
15079
|
var n, r, i;
|
|
15063
15080
|
let a = document.createElement("div");
|
|
15064
|
-
a.className = [
|
|
15081
|
+
a.className = [pE, t === e.currentRenditionLevel ? mE : ""].join(" ");
|
|
15065
15082
|
let o = document.createElement("span"), s = document.createElement("span"), { audio: c, video: l } = t, u = l ? fn(l) : void 0, d = c ? pn(c.sampleRate) : void 0, f = dn(((n = l == null ? void 0 : l.bitRate) == null ? 0 : n) + ((r = c == null ? void 0 : c.bitRate) == null ? 0 : r));
|
|
15066
15083
|
if (l) {
|
|
15067
15084
|
let e = l.frameRate[0] / l.frameRate[1], t = l.frameRate[0] % l.frameRate[1] === 0 ? `${e}p` : `${e.toFixed(2)}p`;
|
|
15068
15085
|
f += `, ${t}`;
|
|
15069
15086
|
}
|
|
15070
|
-
return o.innerHTML = (i = u == null ? d : u) == null ? "" : i, o.className =
|
|
15087
|
+
return o.innerHTML = (i = u == null ? d : u) == null ? "" : i, o.className = hE, s.innerHTML = f, s.className = gE, a.appendChild(o), a.appendChild(s), a;
|
|
15071
15088
|
}
|
|
15072
15089
|
}));
|
|
15073
15090
|
this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t);
|
|
@@ -15080,20 +15097,20 @@ var aE, oE, sE, cE, lE, uE = (aE = iE["hide-on-small"]) == null ? "" : aE, dE =
|
|
|
15080
15097
|
},
|
|
15081
15098
|
onToggle: S,
|
|
15082
15099
|
iconButtonType: "levels"
|
|
15083
|
-
}), this.element.classList.add(
|
|
15100
|
+
}), this.element.classList.add(fE);
|
|
15084
15101
|
}
|
|
15085
|
-
},
|
|
15102
|
+
}, vE = class extends h {
|
|
15086
15103
|
constructor() {
|
|
15087
15104
|
super(document.createElement("div")), this.element.style.flexGrow = "1";
|
|
15088
15105
|
}
|
|
15089
|
-
},
|
|
15106
|
+
}, yE = {
|
|
15090
15107
|
"text-track-button-item": "_text-track-button-item_1ry10_1",
|
|
15091
15108
|
"text-track-button-item-selected": "_text-track-button-item-selected_1ry10_6"
|
|
15092
15109
|
};
|
|
15093
15110
|
//#endregion
|
|
15094
15111
|
//#region ../../libs/player/src/TextTrackButton.ts
|
|
15095
15112
|
H();
|
|
15096
|
-
var
|
|
15113
|
+
var bE, xE, SE = (bE = yE["text-track-button-item"]) == null ? "" : bE, CE = (xE = yE["text-track-button-item-selected"]) == null ? "" : xE, wE = class extends zT {
|
|
15097
15114
|
constructor({ vindral: e }) {
|
|
15098
15115
|
e.on("text tracks", () => {
|
|
15099
15116
|
let t = e.textTracks.map((t) => ({
|
|
@@ -15101,7 +15118,7 @@ var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE
|
|
|
15101
15118
|
disabled: !1,
|
|
15102
15119
|
element: () => {
|
|
15103
15120
|
let n = document.createElement("div");
|
|
15104
|
-
return n.className = [
|
|
15121
|
+
return n.className = [SE, t === e.textTrack ? CE : ""].join(" "), n.innerHTML = t, n;
|
|
15105
15122
|
}
|
|
15106
15123
|
}));
|
|
15107
15124
|
t.length > 0 ? (t.push({
|
|
@@ -15109,7 +15126,7 @@ var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE
|
|
|
15109
15126
|
disabled: !1,
|
|
15110
15127
|
element: () => {
|
|
15111
15128
|
let t = document.createElement("div");
|
|
15112
|
-
return t.className = [
|
|
15129
|
+
return t.className = [SE, e.textTrack === void 0 ? CE : ""].join(" "), t.innerHTML = "Off", t;
|
|
15113
15130
|
}
|
|
15114
15131
|
}), this.show()) : this.hide(), this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t);
|
|
15115
15132
|
}), super({
|
|
@@ -15124,26 +15141,26 @@ var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE
|
|
|
15124
15141
|
//#endregion
|
|
15125
15142
|
//#region ../../libs/player/src/VolumeControls.ts
|
|
15126
15143
|
m();
|
|
15127
|
-
var
|
|
15144
|
+
var TE = class extends h {
|
|
15128
15145
|
constructor({ vindral: e }) {
|
|
15129
15146
|
super(document.createElement("div")), p(this, "vindral", void 0), p(this, "muteButton", void 0), p(this, "updateState", () => {
|
|
15130
15147
|
this.muteButton.setIcon(this.muteIcon());
|
|
15131
15148
|
}), p(this, "onMuteClick", () => {
|
|
15132
15149
|
this.vindral.muted = !this.vindral.muted, this.muteButton.setIcon(this.muteIcon());
|
|
15133
|
-
}), p(this, "muteIcon", () => this.vindral.muted ? "mute" : "unmute"), this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new
|
|
15150
|
+
}), p(this, "muteIcon", () => this.vindral.muted ? "mute" : "unmute"), this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new yT("Mute", this.muteIcon(), this.onMuteClick), this.muteButton.attach(this.element);
|
|
15134
15151
|
}
|
|
15135
15152
|
};
|
|
15136
15153
|
//#endregion
|
|
15137
15154
|
//#region ../../libs/player/src/Bar.ts
|
|
15138
15155
|
m();
|
|
15139
|
-
var
|
|
15156
|
+
var EE, DE, OE = (EE = $w.hidden) == null ? "" : EE, kE = (DE = $w.bar) == null ? "" : DE, AE = class extends h {
|
|
15140
15157
|
constructor({ vindral: e, onFullscreenClicked: t, onOneToOneClicked: n, onPipClicked: r, onAirPlayClicked: i, pauseButtonEnabled: a, fullscreenButtonEnabled: o, pipButtonEnabled: s, channelSelectionEnabled: c, channelSelectionThumbnails: l, renditionLevelsEnabled: u, languagesButtonEnabled: d, textTracksButtonEnabled: f, oneToOneButtonEnabled: m, thumbnailModule: h }) {
|
|
15141
15158
|
super(document.createElement("div")), p(this, "items", []), p(this, "isMouseInElement", !1), p(this, "volumeControls", void 0), p(this, "playControls", void 0), p(this, "oneToOneButton", void 0), p(this, "fullscreenButton", void 0), p(this, "airPlayButton", void 0), p(this, "containerElement", void 0), p(this, "hideLists", () => {
|
|
15142
15159
|
this.items.forEach((e) => "hideList" in e && e.hideList());
|
|
15143
|
-
}), p(this, "listButtons", () => this.items), p(this, "isAnyListOpen", () => this.items.filter((e) => "isListVisible" in e && e.isListVisible()).length > 0), p(this, "hasFocus", () => this.isMouseInElement || this.isAnyListOpen()), p(this, "isHidden", () => this.element.classList.contains(
|
|
15144
|
-
this.containerElement.style.setProperty("--vindral-control-bar-offset", "0px"), this.element.classList.add(
|
|
15160
|
+
}), p(this, "listButtons", () => this.items), p(this, "isAnyListOpen", () => this.items.filter((e) => "isListVisible" in e && e.isListVisible()).length > 0), p(this, "hasFocus", () => this.isMouseInElement || this.isAnyListOpen()), p(this, "isHidden", () => this.element.classList.contains(OE)), p(this, "hide", () => {
|
|
15161
|
+
this.containerElement.style.setProperty("--vindral-control-bar-offset", "0px"), this.element.classList.add(OE);
|
|
15145
15162
|
}), p(this, "show", () => {
|
|
15146
|
-
this.containerElement.style.setProperty("--vindral-control-bar-offset", "-96px"), this.element.classList.remove(
|
|
15163
|
+
this.containerElement.style.setProperty("--vindral-control-bar-offset", "-96px"), this.element.classList.remove(OE);
|
|
15147
15164
|
}), p(this, "addCastButton", () => {
|
|
15148
15165
|
let e = document.createElement("google-cast-launcher");
|
|
15149
15166
|
this.element.insertBefore(e, this.element.lastChild);
|
|
@@ -15153,65 +15170,65 @@ var wE, TE, EE = (wE = Zw.hidden) == null ? "" : wE, DE = (TE = Zw.bar) == null
|
|
|
15153
15170
|
this.playControls.updateState(), this.volumeControls.updateState();
|
|
15154
15171
|
}), p(this, "onToggle", (e) => {
|
|
15155
15172
|
this.listButtons().filter((t) => e !== t).forEach((e) => "hideList" in e && e.hideList());
|
|
15156
|
-
}), this.element.className = [
|
|
15157
|
-
let g = new
|
|
15158
|
-
this.oneToOneButton = new
|
|
15159
|
-
let _ = new
|
|
15173
|
+
}), this.element.className = [kE, OE].join(" ");
|
|
15174
|
+
let g = new vE();
|
|
15175
|
+
this.oneToOneButton = new yT("One to One", "oneToOne", n), this.fullscreenButton = new yT("Fullscreen", "enter", t), this.airPlayButton = new yT("AirPlay", "airPlay", i);
|
|
15176
|
+
let _ = new yT("Picture in Picture", "pip", r), v = new XT({
|
|
15160
15177
|
vindral: e,
|
|
15161
15178
|
enabled: c,
|
|
15162
15179
|
thumbnailsEnabled: l,
|
|
15163
15180
|
thumbnailModule: l ? h : void 0
|
|
15164
|
-
}), y = new
|
|
15165
|
-
this.volumeControls = new
|
|
15181
|
+
}), y = new _E({ vindral: e });
|
|
15182
|
+
this.volumeControls = new TE({ vindral: e }), this.playControls = new rE({ vindral: e }), this.containerElement = e.mediaElement, a && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), g.attach(this.element);
|
|
15166
15183
|
let b = [];
|
|
15167
15184
|
if (d) {
|
|
15168
|
-
let t = new
|
|
15185
|
+
let t = new nE({ vindral: e });
|
|
15169
15186
|
t.attach(this.element), b.push(t);
|
|
15170
15187
|
}
|
|
15171
15188
|
if (f) {
|
|
15172
|
-
let t = new
|
|
15189
|
+
let t = new wE({ vindral: e });
|
|
15173
15190
|
t.attach(this.element), b.push(t);
|
|
15174
15191
|
}
|
|
15175
15192
|
y.attach(this.element), v.attach(this.element), _.attach(this.element), this.oneToOneButton.attach(this.element), this.fullscreenButton.attach(this.element), this.items.push(g, ...b, y, v, _, this.fullscreenButton), this.items.forEach((e) => "onToggle" in e && (e.onToggle = this.onToggle)), m || this.oneToOneButton.hide(), o || this.fullscreenButton.hide(), s || _.hide(), c || v.hide(), u || y.hide(), navigator.maxTouchPoints < 1 && (this.element.addEventListener("mouseenter", () => this.isMouseInElement = !0), this.element.addEventListener("mouseleave", () => this.isMouseInElement = !1));
|
|
15176
15193
|
}
|
|
15177
|
-
},
|
|
15194
|
+
}, jE = {
|
|
15178
15195
|
castoverlay: "_castoverlay_1n91l_1",
|
|
15179
15196
|
hidden: "_hidden_1n91l_20"
|
|
15180
15197
|
};
|
|
15181
15198
|
//#endregion
|
|
15182
15199
|
//#region ../../libs/player/src/CastOverlay.ts
|
|
15183
15200
|
m();
|
|
15184
|
-
var
|
|
15201
|
+
var ME, NE, PE = (ME = jE.hidden) == null ? "" : ME, FE = (NE = jE.castoverlay) == null ? "" : NE, IE = class extends h {
|
|
15185
15202
|
constructor() {
|
|
15186
15203
|
super(document.createElement("div")), p(this, "onClick", void 0), p(this, "setText", (e) => {
|
|
15187
15204
|
this.element.innerText = e;
|
|
15188
|
-
}), p(this, "hide", () => this.element.classList.add(
|
|
15205
|
+
}), p(this, "hide", () => this.element.classList.add(PE)), p(this, "show", () => this.element.classList.remove(PE)), this.element.classList.add(FE), this.element.classList.add(PE), this.element.innerText = "device";
|
|
15189
15206
|
}
|
|
15190
|
-
},
|
|
15191
|
-
button:
|
|
15207
|
+
}, LE = "_button_4ybkq_21", RE = "_image_4ybkq_98", zE = "_overlay_4ybkq_118", BE = "_selected_4ybkq_136", VE = "_hidden_4ybkq_141", HE = "_disabled_4ybkq_145", UE = {
|
|
15208
|
+
button: LE,
|
|
15192
15209
|
"show-and-scaleup": "_show-and-scaleup_4ybkq_1",
|
|
15193
|
-
image:
|
|
15194
|
-
overlay:
|
|
15195
|
-
selected:
|
|
15196
|
-
hidden:
|
|
15197
|
-
disabled:
|
|
15210
|
+
image: RE,
|
|
15211
|
+
overlay: zE,
|
|
15212
|
+
selected: BE,
|
|
15213
|
+
hidden: VE,
|
|
15214
|
+
disabled: HE
|
|
15198
15215
|
};
|
|
15199
15216
|
//#endregion
|
|
15200
15217
|
//#region ../../libs/player/src/ChannelSelectionImageButton.ts
|
|
15201
15218
|
m();
|
|
15202
|
-
var
|
|
15219
|
+
var WE, GE, KE, qE, JE, YE = (WE = UE.button) == null ? "" : WE, XE = (GE = UE.hidden) == null ? "" : GE, ZE = (KE = UE.overlay) == null ? "" : KE, QE = (qE = UE.image) == null ? "" : qE, $E = (JE = UE.selected) == null ? "" : JE, eD = class extends h {
|
|
15203
15220
|
constructor({ title: e, onClick: t, imageUrl: n, selected: r }) {
|
|
15204
15221
|
super(document.createElement("button")), p(this, "overlay", void 0), p(this, "imageHolder1", void 0), p(this, "imageHolder2", void 0), p(this, "isImageHolder1Active", !1), p(this, "loadingOverlay", void 0), p(this, "transition", (e, t, n) => {
|
|
15205
15222
|
t.style.backgroundImage = `url(${n})`, t.style.opacity = "1", e.style.opacity = "0";
|
|
15206
15223
|
}), p(this, "setSelected", (e) => {
|
|
15207
|
-
e ? this.element.classList.add(
|
|
15224
|
+
e ? this.element.classList.add($E) : this.element.classList.remove($E);
|
|
15208
15225
|
}), p(this, "setAnimationDelay", (e) => {
|
|
15209
15226
|
this.element.style.animationDelay = e;
|
|
15210
15227
|
}), p(this, "hideLoading", () => {
|
|
15211
15228
|
this.loadingOverlay.hide();
|
|
15212
|
-
}), p(this, "isHidden", () => this.element.classList.contains(
|
|
15229
|
+
}), p(this, "isHidden", () => this.element.classList.contains(XE)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(XE)), p(this, "show", () => this.element.classList.remove(XE)), this.element.className = YE, r && this.setSelected(r), this.element.onclick = () => {
|
|
15213
15230
|
this.loadingOverlay.show(), t();
|
|
15214
|
-
}, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className =
|
|
15231
|
+
}, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = QE, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = QE, this.imageHolder2.style.animationFillMode = "forwards", n && (this.imageHolder1.style.backgroundImage = `url(${n})`, this.isImageHolder1Active = !0), this.loadingOverlay = new ne(), this.loadingOverlay.attach(this.element), this.loadingOverlay.hide(), this.element.appendChild(this.imageHolder1), this.element.appendChild(this.imageHolder2), this.overlay = document.createElement("div"), this.overlay.className = ZE, this.element.appendChild(this.overlay);
|
|
15215
15232
|
let i = document.createElement("span");
|
|
15216
15233
|
i.innerHTML = e, this.element.appendChild(i), this.show();
|
|
15217
15234
|
}
|
|
@@ -15224,23 +15241,23 @@ var HE, UE, WE, GE, KE, qE = (HE = VE.button) == null ? "" : HE, JE = (UE = VE.h
|
|
|
15224
15241
|
this.isImageHolder1Active ? this.transition(this.imageHolder1, this.imageHolder2, e) : this.transition(this.imageHolder2, this.imageHolder1, e), this.isImageHolder1Active = !this.isImageHolder1Active;
|
|
15225
15242
|
}
|
|
15226
15243
|
}
|
|
15227
|
-
},
|
|
15244
|
+
}, tD = "_container_btpgd_13", nD = "_hidden_btpgd_37", rD = "_disabled_btpgd_41", iD = {
|
|
15228
15245
|
"channel-selection-overlay": "_channel-selection-overlay_btpgd_1",
|
|
15229
|
-
container:
|
|
15230
|
-
hidden:
|
|
15231
|
-
disabled:
|
|
15246
|
+
container: tD,
|
|
15247
|
+
hidden: nD,
|
|
15248
|
+
disabled: rD
|
|
15232
15249
|
};
|
|
15233
15250
|
//#endregion
|
|
15234
15251
|
//#region ../../libs/player/src/ChannelSelectionList.ts
|
|
15235
15252
|
m();
|
|
15236
|
-
var
|
|
15253
|
+
var aD, oD, sD = (aD = iD.hidden) == null ? "" : aD, cD = (oD = iD.container) == null ? "" : oD, lD = class extends h {
|
|
15237
15254
|
constructor({ vindral: e, thumbnailModule: t }) {
|
|
15238
15255
|
var n;
|
|
15239
15256
|
super(document.createElement("div")), p(this, "thumbnailModule", void 0), p(this, "list", void 0), p(this, "vindral", void 0), p(this, "setSelected", (e) => {
|
|
15240
15257
|
this.list.forEach((t, n) => {
|
|
15241
15258
|
t.setSelected(n.channelId === e.channelId);
|
|
15242
15259
|
}), e.channelId !== this.vindral.channelId && (this.vindral.channelId = e.channelId);
|
|
15243
|
-
}), p(this, "isHidden", () => this.element.classList.contains(
|
|
15260
|
+
}), p(this, "isHidden", () => this.element.classList.contains(sD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(sD)), p(this, "show", () => this.element.classList.remove(sD)), this.thumbnailModule = t, this.list = /* @__PURE__ */ new Map(), this.vindral = e, this.vindral.on("context switch", (e) => {
|
|
15244
15261
|
if (e === "completed") {
|
|
15245
15262
|
this.list.forEach((e) => e.hideLoading());
|
|
15246
15263
|
let e = this.vindral.channelId;
|
|
@@ -15255,7 +15272,7 @@ var rD, iD, aD = (rD = nD.hidden) == null ? "" : rD, oD = (iD = nD.container) ==
|
|
|
15255
15272
|
this.vindral.channels.forEach((t, n) => {
|
|
15256
15273
|
var r;
|
|
15257
15274
|
if (!t.isLive) return;
|
|
15258
|
-
let i = new
|
|
15275
|
+
let i = new eD({
|
|
15259
15276
|
title: t.name,
|
|
15260
15277
|
onClick: () => {
|
|
15261
15278
|
this.setSelected(t);
|
|
@@ -15270,35 +15287,35 @@ var rD, iD, aD = (rD = nD.hidden) == null ? "" : rD, oD = (iD = nD.container) ==
|
|
|
15270
15287
|
var n;
|
|
15271
15288
|
e.setImageUrl((n = this.thumbnailModule) == null ? void 0 : n.getImageUrl(t));
|
|
15272
15289
|
});
|
|
15273
|
-
}), this.element.className =
|
|
15290
|
+
}), this.element.className = cD, this.show();
|
|
15274
15291
|
}
|
|
15275
|
-
},
|
|
15292
|
+
}, uD = { fullscreen: "_fullscreen_1v9d8_1" };
|
|
15276
15293
|
H(), B(), m(), O();
|
|
15277
|
-
var
|
|
15294
|
+
var dD, fD = (dD = uD.fullscreen) == null ? "" : dD, pD = /* @__PURE__ */ new WeakSet(), mD = class e extends nn {
|
|
15278
15295
|
constructor(t) {
|
|
15279
|
-
super(), z(this,
|
|
15296
|
+
super(), z(this, pD), p(this, "container", void 0), p(this, "unload", () => {
|
|
15280
15297
|
document.removeEventListener("webkitfullscreenchange", this.onChange), document.removeEventListener("mozfullscreenchange", this.onChange), document.removeEventListener("fullscreenchange", this.onChange), this.container.removeEventListener("webkitendfullscreen", this.onChange);
|
|
15281
|
-
}), p(this, "request", () => D(
|
|
15298
|
+
}), p(this, "request", () => D(pD, this, hD).call(this).catch((e) => {
|
|
15282
15299
|
throw this.onChange(), e;
|
|
15283
|
-
})), p(this, "exit", () => D(
|
|
15300
|
+
})), p(this, "exit", () => D(pD, this, gD).call(this).catch((e) => {
|
|
15284
15301
|
throw this.onChange(), e;
|
|
15285
|
-
})), p(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), p(this, "isFullscreen", () => !!(bt() || this.container.classList.contains(
|
|
15302
|
+
})), p(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), p(this, "isFullscreen", () => !!(bt() || this.container.classList.contains(fD))), p(this, "isSupported", () => e.isFullscreenApiSupported(this.container) || !this.isInIframe()), p(this, "isInIframe", () => window.location !== window.parent.location), this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
|
|
15286
15303
|
}
|
|
15287
15304
|
};
|
|
15288
|
-
function
|
|
15305
|
+
function hD() {
|
|
15289
15306
|
let e = xt(this.container);
|
|
15290
|
-
return e ? e() : (this.container.classList.add(
|
|
15307
|
+
return e ? e() : (this.container.classList.add(fD), Promise.resolve());
|
|
15291
15308
|
}
|
|
15292
|
-
function
|
|
15309
|
+
function gD() {
|
|
15293
15310
|
let e = St(this.container);
|
|
15294
|
-
return e ? e() : (this.container.classList.remove(
|
|
15311
|
+
return e ? e() : (this.container.classList.remove(fD), Promise.resolve());
|
|
15295
15312
|
}
|
|
15296
|
-
p(
|
|
15297
|
-
var
|
|
15313
|
+
p(mD, "isFullscreenApiSupported", (e) => Ct(e));
|
|
15314
|
+
var _D = {
|
|
15298
15315
|
player: "_player_1vdos_1",
|
|
15299
15316
|
"one-to-one": "_one-to-one_1vdos_19",
|
|
15300
15317
|
"audio-only": "_audio-only_1vdos_28"
|
|
15301
|
-
},
|
|
15318
|
+
}, vD = {
|
|
15302
15319
|
playoverlay: "_playoverlay_1niji_1",
|
|
15303
15320
|
hidden: "_hidden_1niji_17",
|
|
15304
15321
|
"playoverlay-indicator": "_playoverlay-indicator_1niji_23"
|
|
@@ -15306,15 +15323,15 @@ var hD = {
|
|
|
15306
15323
|
//#endregion
|
|
15307
15324
|
//#region ../../libs/player/src/PlayOverlay.ts
|
|
15308
15325
|
m();
|
|
15309
|
-
var
|
|
15326
|
+
var yD, bD, xD, SD = (yD = vD.hidden) == null ? "" : yD, CD = (bD = vD.playoverlay) == null ? "" : bD, wD = (xD = vD["playoverlay-indicator"]) == null ? "" : xD, TD = class extends h {
|
|
15310
15327
|
constructor() {
|
|
15311
|
-
super(document.createElement("div")), p(this, "onClick", void 0), p(this, "indicator", document.createElement("div")), p(this, "isHidden", () => this.element.classList.contains(
|
|
15328
|
+
super(document.createElement("div")), p(this, "onClick", void 0), p(this, "indicator", document.createElement("div")), p(this, "isHidden", () => this.element.classList.contains(SD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(SD)), p(this, "show", () => this.element.classList.remove(SD)), this.element.classList.add(CD), this.element.classList.add(SD), this.indicator.className = wD, this.element.appendChild(this.indicator), this.element.onclick = () => {
|
|
15312
15329
|
this.onClick && this.onClick();
|
|
15313
15330
|
};
|
|
15314
15331
|
}
|
|
15315
15332
|
};
|
|
15316
15333
|
H(), m(), P();
|
|
15317
|
-
var
|
|
15334
|
+
var ED = class extends nn {
|
|
15318
15335
|
constructor({ vindral: e, refreshEveryMs: t }) {
|
|
15319
15336
|
super(), p(this, "thumbnails", /* @__PURE__ */ new Map()), p(this, "interval", void 0), p(this, "channels", void 0), p(this, "refreshEveryMs", void 0), p(this, "isFetching", !1), p(this, "hasFetched", !1), this.channels = [...e.channels], this.refreshEveryMs = t || 6e4, e.on("channels", () => {
|
|
15320
15337
|
this.channels = [...e.channels], this.hasFetched || this.refreshThumbnails();
|
|
@@ -15362,7 +15379,7 @@ var wD = class extends nn {
|
|
|
15362
15379
|
}
|
|
15363
15380
|
};
|
|
15364
15381
|
H(), m(), P(), R();
|
|
15365
|
-
var
|
|
15382
|
+
var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-one"]) == null ? "" : OD, MD = (kD = _D["audio-only"]) == null ? "" : kD, ND = {
|
|
15366
15383
|
controlsEnabled: !0,
|
|
15367
15384
|
castEnabled: !0,
|
|
15368
15385
|
channelSelectionEnabled: !0,
|
|
@@ -15376,10 +15393,10 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
|
|
|
15376
15393
|
airPlayButtonEnabled: !1,
|
|
15377
15394
|
playOverlayEnabled: !0,
|
|
15378
15395
|
bufferingOverlayEnabled: !0
|
|
15379
|
-
},
|
|
15396
|
+
}, PD = (e) => !Uw(e), FD = class {
|
|
15380
15397
|
constructor(e, t) {
|
|
15381
15398
|
var n = this, r, i, a, o;
|
|
15382
|
-
p(this, "core", void 0), p(this, "castSender", void 0), p(this, "airPlaySender", void 0), p(this, "options", void 0), p(this, "state", void 0), p(this, "playerElement", document.createElement("div")), p(this, "bufferingOverlay", void 0), p(this, "playOverlay", void 0), p(this, "castOverlay", new
|
|
15399
|
+
p(this, "core", void 0), p(this, "castSender", void 0), p(this, "airPlaySender", void 0), p(this, "options", void 0), p(this, "state", void 0), p(this, "playerElement", document.createElement("div")), p(this, "bufferingOverlay", void 0), p(this, "playOverlay", void 0), p(this, "castOverlay", new IE()), p(this, "channelSelectionList", void 0), p(this, "bar", void 0), p(this, "stateInterval", void 0), p(this, "thumbnailModule", void 0), p(this, "browser", pt()), p(this, "unload", () => {
|
|
15383
15400
|
var e, t;
|
|
15384
15401
|
this.stateInterval && window.clearInterval(this.stateInterval), this.core.unload(), this.playerElement.remove(), (e = this.thumbnailModule) == null || e.stop(), (t = this.airPlaySender) == null || t.unload();
|
|
15385
15402
|
}), p(this, "attach", (e) => {
|
|
@@ -15420,7 +15437,7 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
|
|
|
15420
15437
|
this.core.muted = !e, this.core.muted = e;
|
|
15421
15438
|
}
|
|
15422
15439
|
}), p(this, "toggleOneToOne", () => {
|
|
15423
|
-
this.playerElement.classList.contains(
|
|
15440
|
+
this.playerElement.classList.contains(jD) ? this.playerElement.classList.remove(jD) : this.playerElement.classList.add(jD);
|
|
15424
15441
|
}), p(this, "isInFullscreen", () => this.state.fullscreen.isFullscreen()), p(this, "enterFullscreen", N(function* () {
|
|
15425
15442
|
n.triggerUserInput(), n.iosHackResetSize(), n.bar.fullscreenButton.setIcon("exit"), yield n.state.fullscreen.request(), n.lockOrientation();
|
|
15426
15443
|
})), p(this, "exitFullscreen", () => (this.bar.fullscreenButton.setIcon("enter"), this.unlockOrientation(), this.state.fullscreen.exit())), p(this, "showAirPlayPicker", () => {
|
|
@@ -15439,20 +15456,20 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
|
|
|
15439
15456
|
var e, t, n;
|
|
15440
15457
|
return !((e = this.options.channelSelectionOptions) == null || (e = e.barButton) == null) && e.enabled && !((t = this.options.channelSelectionOptions) == null || (t = t.barButton) == null) && t.thumbnails ? !0 : !!(!((n = this.options.channelSelectionOptions) == null || (n = n.list) == null) && n.enabled);
|
|
15441
15458
|
}), p(this, "bumpInteractTime", () => void (this.state.lastInteractionTime = Date.now()));
|
|
15442
|
-
let s = L(L({},
|
|
15443
|
-
this.options = s, this.playerElement.className =
|
|
15459
|
+
let s = L(L({}, ND), t);
|
|
15460
|
+
this.options = s, this.playerElement.className = AD, PD(e) ? this.core = e : this.core = new Qw(e), this.state = {
|
|
15444
15461
|
isBuffering: !1,
|
|
15445
|
-
fullscreen: new
|
|
15462
|
+
fullscreen: new mD(!mD.isFullscreenApiSupported(this.playerElement) && mD.isFullscreenApiSupported(this.core.mediaElement) ? this.core.mediaElement : this.playerElement),
|
|
15446
15463
|
lastInteractionTime: 0
|
|
15447
|
-
}, this.needsThumbnails() && (this.thumbnailModule = new
|
|
15464
|
+
}, this.needsThumbnails() && (this.thumbnailModule = new ED({
|
|
15448
15465
|
vindral: this.core,
|
|
15449
15466
|
refreshEveryMs: t == null ? void 0 : t.thumbnailUpdateInterval
|
|
15450
|
-
}), this.thumbnailModule.start()), !((r = this.options.channelSelectionOptions) == null || (r = r.list) == null) && r.enabled && (this.channelSelectionList = new
|
|
15467
|
+
}), this.thumbnailModule.start()), !((r = this.options.channelSelectionOptions) == null || (r = r.list) == null) && r.enabled && (this.channelSelectionList = new lD({
|
|
15451
15468
|
vindral: this.core,
|
|
15452
15469
|
thumbnailModule: this.thumbnailModule
|
|
15453
15470
|
}));
|
|
15454
15471
|
let c = (t == null ? void 0 : t.channelSelectionEnabled) || (t == null || (i = t.channelSelectionOptions) == null || (i = i.barButton) == null ? void 0 : i.enabled), l = t == null || (a = t.channelSelectionOptions) == null || (a = a.barButton) == null ? void 0 : a.thumbnails;
|
|
15455
|
-
this.bar = new
|
|
15472
|
+
this.bar = new AE(L(L({
|
|
15456
15473
|
vindral: this.core,
|
|
15457
15474
|
thumbnailModule: this.thumbnailModule
|
|
15458
15475
|
}, s), {}, {
|
|
@@ -15465,7 +15482,7 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
|
|
|
15465
15482
|
onOneToOneClicked: () => this.toggleOneToOne(),
|
|
15466
15483
|
onPipClicked: () => void this.togglePip().catch((e) => console.error("error", e)),
|
|
15467
15484
|
onAirPlayClicked: () => this.showAirPlayPicker()
|
|
15468
|
-
})), this.core.media === "audio" && (this.playerElement.classList.add(
|
|
15485
|
+
})), this.core.media === "audio" && (this.playerElement.classList.add(MD), this.options.controlsEnabled && this.bar.show());
|
|
15469
15486
|
let u = this.core.getCastOptions();
|
|
15470
15487
|
this.castSender = new Pr({
|
|
15471
15488
|
background: this.options.castBackground,
|
|
@@ -15510,7 +15527,7 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
|
|
|
15510
15527
|
break;
|
|
15511
15528
|
}
|
|
15512
15529
|
}
|
|
15513
|
-
}), this.core.attach(this.playerElement), this.castOverlay.attach(this.playerElement), this.options.bufferingOverlayEnabled && (this.bufferingOverlay = new ne(), this.bufferingOverlay.attach(this.playerElement)), this.options.playOverlayEnabled && (this.playOverlay = new
|
|
15530
|
+
}), this.core.attach(this.playerElement), this.castOverlay.attach(this.playerElement), this.options.bufferingOverlayEnabled && (this.bufferingOverlay = new ne(), this.bufferingOverlay.attach(this.playerElement)), this.options.playOverlayEnabled && (this.playOverlay = new TD(), this.playOverlay.attach(this.playerElement), this.playOverlay.onClick = () => {
|
|
15514
15531
|
var e;
|
|
15515
15532
|
this.core.userInput(), (e = this.playOverlay) == null || e.hide();
|
|
15516
15533
|
}), this.channelSelectionList && this.channelSelectionList.attach(this.playerElement), this.bar.attach(this.playerElement), this.playerElement.addEventListener("click", this.onClick), this.playerElement.addEventListener("mousemove", this.onMouseMove), this.state.fullscreen.on("on fullscreen change", (e) => {
|
|
@@ -15522,4 +15539,4 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
|
|
|
15522
15539
|
}
|
|
15523
15540
|
};
|
|
15524
15541
|
//#endregion
|
|
15525
|
-
export { mi as AUTHENTICATION_EXPIRED_CODE, pi as AUTHENTICATION_FAILED_CODE, zu as ApiClient, hi as CHANNEL_NOT_FOUND_CODE, gi as CHANNEL_NOT_LIVE_CODE, fi as CONNECTION_FAILED_AFTER_RETRIES_CODE, di as CONNECTION_FAILED_CODE, Pr as CastSender, Si as DISCONNECTED_BY_EDGE, vi as INACTIVITY_CODE, _i as NO_INCOMING_DATA,
|
|
15542
|
+
export { mi as AUTHENTICATION_EXPIRED_CODE, pi as AUTHENTICATION_FAILED_CODE, zu as ApiClient, hi as CHANNEL_NOT_FOUND_CODE, gi as CHANNEL_NOT_LIVE_CODE, fi as CONNECTION_FAILED_AFTER_RETRIES_CODE, di as CONNECTION_FAILED_CODE, Pr as CastSender, Si as DISCONNECTED_BY_EDGE, vi as INACTIVITY_CODE, _i as NO_INCOMING_DATA, FD as Player, Qw as Vindral, U as VindralError };
|