@vindral/web-sdk 3.3.1 → 3.3.2
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/index.d.ts +9 -7
- package/index.js +213 -214
- package/index.umd.cjs +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1870,14 +1870,10 @@ class QI {
|
|
|
1870
1870
|
return (s = this.overrides.get(e)) == null ? void 0 : s[A];
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
|
-
const rI =
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
return;
|
|
1878
|
-
const s = window;
|
|
1879
|
-
s[e] = i;
|
|
1880
|
-
}, hI = {
|
|
1873
|
+
const rI = (i) => {
|
|
1874
|
+
const A = window;
|
|
1875
|
+
A.vindralInstances = A.vindralInstances || {}, A.vindralInstances[i.getStatistics().clientId.substring(0, 8)] = i;
|
|
1876
|
+
}, EI = {
|
|
1881
1877
|
sizeBasedResolutionCapEnabled: !0,
|
|
1882
1878
|
pictureInPictureEnabled: !0,
|
|
1883
1879
|
abrEnabled: !0,
|
|
@@ -1908,7 +1904,7 @@ const rI = "__vindral_debug_name__", EI = (i) => {
|
|
|
1908
1904
|
}
|
|
1909
1905
|
},
|
|
1910
1906
|
videoCodecs: ["av1", "h264"]
|
|
1911
|
-
},
|
|
1907
|
+
}, hI = (i) => {
|
|
1912
1908
|
if (!navigator.mediaCapabilities)
|
|
1913
1909
|
return Promise.resolve({ smooth: !0, supported: !0, powerEfficient: !0, failedToQuery: !0 });
|
|
1914
1910
|
let A;
|
|
@@ -1930,7 +1926,7 @@ const rI = "__vindral_debug_name__", EI = (i) => {
|
|
|
1930
1926
|
framerate: i.frameRate[0] / i.frameRate[1]
|
|
1931
1927
|
}
|
|
1932
1928
|
}, navigator.mediaCapabilities.decodingInfo(A);
|
|
1933
|
-
},
|
|
1929
|
+
}, cI = 0.15, dI = 0.2, Zt = 0.4, lI = 0.5, uI = 0.6, He = 15, mI = {
|
|
1934
1930
|
cooldownTime: 3e3,
|
|
1935
1931
|
maxBufferingEvents: {
|
|
1936
1932
|
last10Seconds: 0
|
|
@@ -2002,7 +1998,7 @@ const rI = "__vindral_debug_name__", EI = (i) => {
|
|
|
2002
1998
|
const { bufferFullness: e, general: s } = this.qualityOfServiceSource.getMetrics(), g = this.qualityOfServiceSource.getBufferFullnessRegression();
|
|
2003
1999
|
if (!g)
|
|
2004
2000
|
return;
|
|
2005
|
-
const I = 10 * 1e3, { slope: n } = g, o = g.predict(He), B = n < 0, C = g.predict(He) < Zt && g.slope < 0, a = g.predict(He) >
|
|
2001
|
+
const I = 10 * 1e3, { slope: n } = g, o = g.predict(He), B = n < 0, C = g.predict(He) < Zt && g.slope < 0, a = g.predict(He) > uI, Q = this.qualityOfServiceSource.timeSpentBufferingLast(30 * 1e3), r = this.qualityOfServiceSource.timeSpentActiveLast(30 * 1e3), c = Q / r;
|
|
2006
2002
|
if (e < 0.15 && c > 0.8) {
|
|
2007
2003
|
this.adaptLevel("reconnect");
|
|
2008
2004
|
return;
|
|
@@ -2011,13 +2007,13 @@ const rI = "__vindral_debug_name__", EI = (i) => {
|
|
|
2011
2007
|
this.adaptLevel("downgrade");
|
|
2012
2008
|
return;
|
|
2013
2009
|
}
|
|
2014
|
-
C || e <
|
|
2010
|
+
C || e < cI ? B && e < Zt && o < dI && this.adaptLevel(A.playbackState === "buffering" ? "double downgrade" : "downgrade") : e > lI && a && !this.tooMuchTimeBuffering(I) && !this.tooManyBufferingEvents(I) && this.adaptLevel("upgrade");
|
|
2015
2011
|
});
|
|
2016
2012
|
t(this, "onAdaptedLevel", () => {
|
|
2017
2013
|
this.reset();
|
|
2018
2014
|
});
|
|
2019
2015
|
t(this, "adaptLevel", (A) => this.emitter.emit("adapt level", A));
|
|
2020
|
-
this.qualityOfServiceSource = s, this.config = h(h({},
|
|
2016
|
+
this.qualityOfServiceSource = s, this.config = h(h({}, mI), g), this.emitter = A, this.logger = e;
|
|
2021
2017
|
}
|
|
2022
2018
|
tooMuchTimeBuffering(A) {
|
|
2023
2019
|
return this.qualityOfServiceSource.timeSpentBufferingLast(A) / this.qualityOfServiceSource.timeSpentActiveLast(A) > this.config.maxBufferingRatio.last10Seconds;
|
|
@@ -2028,7 +2024,7 @@ const rI = "__vindral_debug_name__", EI = (i) => {
|
|
|
2028
2024
|
};
|
|
2029
2025
|
t(Ie, "create", (A, e, s, g = {}) => new Ie(A, e, s, g));
|
|
2030
2026
|
let je = Ie;
|
|
2031
|
-
const
|
|
2027
|
+
const wI = {
|
|
2032
2028
|
minBufferTime: 1500,
|
|
2033
2029
|
maxBufferTime: 1500,
|
|
2034
2030
|
cooldownTime: 3e4,
|
|
@@ -2081,7 +2077,7 @@ const SI = {
|
|
|
2081
2077
|
this.targetBufferTimeTarget.targetBufferTime + C
|
|
2082
2078
|
), this.bufferTimeAdjustmentCount++, this.reset());
|
|
2083
2079
|
});
|
|
2084
|
-
this.qualityOfServiceSource = s, this.targetBufferTimeTarget = g, this.config = h(h({},
|
|
2080
|
+
this.qualityOfServiceSource = s, this.targetBufferTimeTarget = g, this.config = h(h({}, wI), I), this.emitter = A, this.logger = e;
|
|
2085
2081
|
}
|
|
2086
2082
|
updateConfig(A) {
|
|
2087
2083
|
this.config = h(h({}, this.config), A);
|
|
@@ -2089,7 +2085,7 @@ const SI = {
|
|
|
2089
2085
|
};
|
|
2090
2086
|
t(CA, "BUFFER_TIME_STEP_SIZE", 500), t(CA, "BUFFER_TIME_MAX_STEPS", 3), t(CA, "create", (A, e, s, g, I = {}) => new CA(A, e, s, g, I));
|
|
2091
2087
|
let _e = CA;
|
|
2092
|
-
class
|
|
2088
|
+
class SI extends $ {
|
|
2093
2089
|
constructor(e, s) {
|
|
2094
2090
|
super();
|
|
2095
2091
|
t(this, "options");
|
|
@@ -2222,7 +2218,7 @@ class fI extends $ {
|
|
|
2222
2218
|
return this._connectTime;
|
|
2223
2219
|
}
|
|
2224
2220
|
}
|
|
2225
|
-
const
|
|
2221
|
+
const fI = 65536 * 8, DI = 0.9, $e = (i) => fI * DI * 1e3 / i, IA = class IA {
|
|
2226
2222
|
constructor(A, e, s) {
|
|
2227
2223
|
t(this, "timers", W.create());
|
|
2228
2224
|
t(this, "emitter");
|
|
@@ -2322,7 +2318,7 @@ const DI = 65536 * 8, pI = 0.9, $e = (i) => DI * pI * 1e3 / i, IA = class IA {
|
|
|
2322
2318
|
}
|
|
2323
2319
|
});
|
|
2324
2320
|
t(this, "connect", (A) => {
|
|
2325
|
-
this.disconnect("user connected"), this._connectionsCount = A, this.transport = new
|
|
2321
|
+
this.disconnect("user connected"), this._connectionsCount = A, this.transport = new SI(
|
|
2326
2322
|
{
|
|
2327
2323
|
reconnectDelay: 1e3,
|
|
2328
2324
|
connectionsCount: this._connectionsCount,
|
|
@@ -2415,7 +2411,7 @@ const Pe = () => ({
|
|
|
2415
2411
|
audio: {
|
|
2416
2412
|
bitRate: QA()
|
|
2417
2413
|
}
|
|
2418
|
-
}),
|
|
2414
|
+
}), pI = () => ({
|
|
2419
2415
|
width: window.innerWidth,
|
|
2420
2416
|
height: window.innerHeight,
|
|
2421
2417
|
bitRate: QA()
|
|
@@ -2473,7 +2469,7 @@ const Pe = () => ({
|
|
|
2473
2469
|
});
|
|
2474
2470
|
t(this, "evaluateConstraintCap", () => {
|
|
2475
2471
|
var n, o, B, C, a;
|
|
2476
|
-
const A = this.sizeBasedResolutionCapEnabled ? J(h({}, Pe()), { video:
|
|
2472
|
+
const A = this.sizeBasedResolutionCapEnabled ? J(h({}, Pe()), { video: pI() }) : Pe();
|
|
2477
2473
|
if (!this.resizeObserver) {
|
|
2478
2474
|
const Q = this.element.getBoundingClientRect();
|
|
2479
2475
|
this.elementSize = { width: Q.width, height: Q.height };
|
|
@@ -2526,7 +2522,7 @@ const PA = class PA {
|
|
|
2526
2522
|
this.decoder.postMessage({ type: "unload" }), this.decoder.removeEventListener("message", this.onDecoderEvent), this.decoder.terminate();
|
|
2527
2523
|
});
|
|
2528
2524
|
t(this, "enqueue", (A) => {
|
|
2529
|
-
if (this.codedSamples.push(A), this.
|
|
2525
|
+
if (this.codedSamples.push(A), this.samplesInDecoder() === 0 || this.codedSamples.length >= this.targetSamplesInBatch) {
|
|
2530
2526
|
const e = this.codedSamples.slice(0, this.targetSamplesInBatch);
|
|
2531
2527
|
this.codedSamples = this.codedSamples.slice(this.targetSamplesInBatch), e.forEach((s) => {
|
|
2532
2528
|
const g = Math.ceil(s.width / 16) * 16, I = Math.ceil(s.height / 16) * 16, n = g * I * 3 / 2;
|
|
@@ -2593,7 +2589,7 @@ t(PA, "create", (A) => u(PA, null, function* () {
|
|
|
2593
2589
|
}), new PA(e, A);
|
|
2594
2590
|
}));
|
|
2595
2591
|
let tt = PA;
|
|
2596
|
-
var
|
|
2592
|
+
var yI = function() {
|
|
2597
2593
|
var i = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0;
|
|
2598
2594
|
return function(A) {
|
|
2599
2595
|
A = A || {};
|
|
@@ -2851,7 +2847,7 @@ const eA = class eA {
|
|
|
2851
2847
|
}
|
|
2852
2848
|
};
|
|
2853
2849
|
t(eA, "MAX_OPUS_BUFFER", 1e3 * 1e3), t(eA, "MAX_SAMPLES", 6 * 960), t(eA, "create", (A, e) => u(eA, null, function* () {
|
|
2854
|
-
return new eA(yield
|
|
2850
|
+
return new eA(yield yI(), A, e);
|
|
2855
2851
|
}));
|
|
2856
2852
|
let it = eA;
|
|
2857
2853
|
const qA = class qA {
|
|
@@ -3074,12 +3070,12 @@ const ne = class ne {
|
|
|
3074
3070
|
};
|
|
3075
3071
|
t(ne, "create", (A) => new ne(A));
|
|
3076
3072
|
let It = ne;
|
|
3077
|
-
const
|
|
3073
|
+
const FI = (i) => (A, e, s) => A.timestamp <= e || A.timestampAdded <= s - i, aA = class aA {
|
|
3078
3074
|
constructor(A, e, s) {
|
|
3079
3075
|
t(this, "logger");
|
|
3080
3076
|
t(this, "emitter");
|
|
3081
3077
|
t(this, "waitingEvents", []);
|
|
3082
|
-
t(this, "isTriggered",
|
|
3078
|
+
t(this, "isTriggered", FI(aA.EVENT_TIMEOUT));
|
|
3083
3079
|
t(this, "timeSource");
|
|
3084
3080
|
t(this, "timers", new W());
|
|
3085
3081
|
t(this, "load", () => {
|
|
@@ -3174,11 +3170,11 @@ const iA = class iA {
|
|
|
3174
3170
|
};
|
|
3175
3171
|
t(iA, "NO_DATA_ERROR_TIMEOUT", 20 * 1e3), t(iA, "NO_DATA_TIMEOUT", 5 * 1e3), t(iA, "UPDATE_RECEIVED_BYTES_INTERVAL", 1e3), t(iA, "create", (A) => new iA(A));
|
|
3176
3172
|
let ot = iA;
|
|
3177
|
-
const
|
|
3173
|
+
const RI = () => window.AudioContext || window.webkitAudioContext, oe = class oe extends $ {
|
|
3178
3174
|
constructor() {
|
|
3179
3175
|
super();
|
|
3180
3176
|
// TODO: Checkout what happens when limit is reached
|
|
3181
|
-
t(this, "context", new (
|
|
3177
|
+
t(this, "context", new (RI())());
|
|
3182
3178
|
t(this, "timers", W.create());
|
|
3183
3179
|
t(this, "previousCurrentTime", 0);
|
|
3184
3180
|
t(this, "_isStuck", !1);
|
|
@@ -3391,7 +3387,7 @@ const hA = (i, A) => {
|
|
|
3391
3387
|
e += A;
|
|
3392
3388
|
return e;
|
|
3393
3389
|
};
|
|
3394
|
-
class
|
|
3390
|
+
class kI {
|
|
3395
3391
|
constructor() {
|
|
3396
3392
|
t(this, "audio");
|
|
3397
3393
|
t(this, "unmute", () => this.audio.play().catch(sA));
|
|
@@ -3693,7 +3689,7 @@ const ae = class ae {
|
|
|
3693
3689
|
t(this, "audioPlayer");
|
|
3694
3690
|
t(this, "videoPlayer");
|
|
3695
3691
|
t(this, "pool");
|
|
3696
|
-
t(this, "unmuter", new
|
|
3692
|
+
t(this, "unmuter", new kI());
|
|
3697
3693
|
t(this, "_isPaused", !1);
|
|
3698
3694
|
t(this, "isDisconnected", !1);
|
|
3699
3695
|
t(this, "reset", () => {
|
|
@@ -3966,8 +3962,8 @@ const re = class re {
|
|
|
3966
3962
|
};
|
|
3967
3963
|
t(re, "create", (A, e, s, g, I) => new re(A, e, s, g, I));
|
|
3968
3964
|
let rt = re;
|
|
3969
|
-
const
|
|
3970
|
-
class
|
|
3965
|
+
const GI = () => (i) => Ri(i.buffered.start(0), i.buffered.end(i.buffered.length - 1)), Ri = (i, A) => (e) => e.remove(Math.max(0, i), Math.min(Number.POSITIVE_INFINITY, A)), UI = (i) => (A) => A.appendBuffer(i), bI = (i) => (A) => A.changeType(i), vI = (i) => (A) => i(A);
|
|
3966
|
+
class JI {
|
|
3971
3967
|
constructor(A) {
|
|
3972
3968
|
t(this, "commandQueue", []);
|
|
3973
3969
|
t(this, "sourceBuffer");
|
|
@@ -3976,11 +3972,11 @@ class LI {
|
|
|
3976
3972
|
this.sourceBuffer.updating || (A = this.commandQueue.shift()) == null || A.execute(this.sourceBuffer);
|
|
3977
3973
|
});
|
|
3978
3974
|
t(this, "appendBuffer", (A) => new Promise((e, s) => {
|
|
3979
|
-
const g = new JA(
|
|
3975
|
+
const g = new JA(UI(A), e, s);
|
|
3980
3976
|
this.commandQueue.push(g), this.handleQueue();
|
|
3981
3977
|
}));
|
|
3982
3978
|
t(this, "execute", (A) => new Promise((e, s) => {
|
|
3983
|
-
const g = new JA(
|
|
3979
|
+
const g = new JA(vI(A), e, s);
|
|
3984
3980
|
this.commandQueue.push(g), this.handleQueue();
|
|
3985
3981
|
}));
|
|
3986
3982
|
t(this, "buffered", () => this.sourceBuffer.buffered);
|
|
@@ -3988,7 +3984,7 @@ class LI {
|
|
|
3988
3984
|
A.removeSourceBuffer(this.sourceBuffer);
|
|
3989
3985
|
});
|
|
3990
3986
|
t(this, "changeType", (A) => new Promise((e, s) => {
|
|
3991
|
-
const g = new JA(
|
|
3987
|
+
const g = new JA(bI(A), e, s);
|
|
3992
3988
|
this.commandQueue.push(g), this.handleQueue();
|
|
3993
3989
|
}));
|
|
3994
3990
|
t(this, "removeBuffer", (A, e) => new Promise((s, g) => {
|
|
@@ -3996,7 +3992,7 @@ class LI {
|
|
|
3996
3992
|
this.commandQueue.push(I), this.handleQueue();
|
|
3997
3993
|
}));
|
|
3998
3994
|
t(this, "flush", () => new Promise((A, e) => {
|
|
3999
|
-
const s = new JA(
|
|
3995
|
+
const s = new JA(GI, A, e);
|
|
4000
3996
|
this.commandQueue.push(s), this.handleQueue();
|
|
4001
3997
|
}));
|
|
4002
3998
|
this.sourceBuffer = A, this.sourceBuffer.addEventListener("updateend", this.handleQueue);
|
|
@@ -4029,7 +4025,7 @@ class ki extends $ {
|
|
|
4029
4025
|
});
|
|
4030
4026
|
t(this, "addSourceBuffer", (e) => {
|
|
4031
4027
|
const s = this.mediaSource.addSourceBuffer(e);
|
|
4032
|
-
return new
|
|
4028
|
+
return new JI(s);
|
|
4033
4029
|
});
|
|
4034
4030
|
t(this, "removeSourceBuffer", (e) => {
|
|
4035
4031
|
e.removeFromMediaSource(this.mediaSource);
|
|
@@ -4073,7 +4069,7 @@ class Gi {
|
|
|
4073
4069
|
});
|
|
4074
4070
|
}
|
|
4075
4071
|
}
|
|
4076
|
-
function
|
|
4072
|
+
function LI(i, { mediaSource: A, mimeType: e }) {
|
|
4077
4073
|
return J(h({}, i), {
|
|
4078
4074
|
state: "initialized",
|
|
4079
4075
|
mimeType: e,
|
|
@@ -4171,7 +4167,7 @@ const Ee = class Ee {
|
|
|
4171
4167
|
let g = this.trackContexts.get(s.type);
|
|
4172
4168
|
g || (g = ti({ pendingSamples: [], initSegments: new Gi() }), this.trackContexts.set(s.type, g)), g.state === "initialized" ? s.mimeType !== g.mimeType && (yield g.sourceBuffer.changeType(s.mimeType)) : this.trackContexts.set(
|
|
4173
4169
|
s.type,
|
|
4174
|
-
|
|
4170
|
+
LI(g, { mimeType: s.mimeType, mediaSource: this.mediaSource })
|
|
4175
4171
|
);
|
|
4176
4172
|
}
|
|
4177
4173
|
}));
|
|
@@ -4228,7 +4224,7 @@ const Ee = class Ee {
|
|
|
4228
4224
|
}
|
|
4229
4225
|
try {
|
|
4230
4226
|
let o = g.sequenceNumber;
|
|
4231
|
-
const B =
|
|
4227
|
+
const B = NI(A.map((C) => eI(C, o++)));
|
|
4232
4228
|
yield g.sourceBuffer.appendBuffer(B), g.sequenceNumber = o, g.consecutiveQuotaExceededErrorCount = 0, g.successfulAppendCalls++;
|
|
4233
4229
|
} catch (o) {
|
|
4234
4230
|
throw o instanceof DOMException && (o.code === DOMException.QUOTA_EXCEEDED_ERR ? (this.quotaErrorCount++, g.consecutiveQuotaExceededErrorCount++, this.logger.error("quota exceeded error", { error: o }), g.pendingSamples.unshift(...A)) : this.mediaElement.error && g.pendingSamples.unshift(...A)), o;
|
|
@@ -4247,7 +4243,7 @@ const Ee = class Ee {
|
|
|
4247
4243
|
const s = h({}, A);
|
|
4248
4244
|
s.timestamp = 0, e.pendingSamples.push(s);
|
|
4249
4245
|
}
|
|
4250
|
-
e.hasFirstSync = !0, e.pendingSamples.push(A), e.state !== "uninitialized" && (e.isWorkingOnPendingSamples ||
|
|
4246
|
+
e.hasFirstSync = !0, e.pendingSamples.push(A), e.state !== "uninitialized" && (e.isWorkingOnPendingSamples || HI(e, this.append, this.maxChunkSize).catch((s) => {
|
|
4251
4247
|
if (e.isWorkingOnPendingSamples = !1, s instanceof Error) {
|
|
4252
4248
|
if (this.logger.error("append failed", { message: s.message, name: s.name }), s instanceof DOMException && s.code === DOMException.QUOTA_EXCEEDED_ERR) {
|
|
4253
4249
|
if (e.consecutiveQuotaExceededErrorCount >= this.minConsecutiveErrorsBeforeEmit) {
|
|
@@ -4293,13 +4289,13 @@ const ii = (i, A) => {
|
|
|
4293
4289
|
const e = i.renditionId !== A.renditionId, s = i.channelId !== A.channelId, g = ((n = i.timestamp) != null ? n : 0) > A.timestamp;
|
|
4294
4290
|
let I = !1;
|
|
4295
4291
|
return i.type === "video" && A.type === "video" && (I = A.width !== i.width || A.height !== i.height), s || e || g || I;
|
|
4296
|
-
},
|
|
4292
|
+
}, NI = function(i) {
|
|
4297
4293
|
const A = i.reduce((g, I) => g + I.byteLength, 0), e = new Uint8Array(A);
|
|
4298
4294
|
let s = 0;
|
|
4299
4295
|
return i.forEach((g) => {
|
|
4300
4296
|
e.set(new Uint8Array(g), s), s += g.byteLength;
|
|
4301
4297
|
}), e.buffer;
|
|
4302
|
-
},
|
|
4298
|
+
}, HI = (i, A, e) => u(void 0, null, function* () {
|
|
4303
4299
|
for (i.isWorkingOnPendingSamples = !0; i.pendingSamples.length > 0; ) {
|
|
4304
4300
|
const s = [];
|
|
4305
4301
|
let g = 0;
|
|
@@ -4405,7 +4401,7 @@ const dt = () => ({
|
|
|
4405
4401
|
bufferingRanges: [],
|
|
4406
4402
|
activeRanges: [],
|
|
4407
4403
|
decodeRate: Number.MAX_SAFE_INTEGER
|
|
4408
|
-
}),
|
|
4404
|
+
}), MI = () => ({
|
|
4409
4405
|
levels: {},
|
|
4410
4406
|
levelDowngrades: [],
|
|
4411
4407
|
levelUpgrades: [],
|
|
@@ -4417,7 +4413,7 @@ const dt = () => ({
|
|
|
4417
4413
|
t(this, "logger");
|
|
4418
4414
|
t(this, "emitter");
|
|
4419
4415
|
t(this, "timers", W.create());
|
|
4420
|
-
t(this, "metrics",
|
|
4416
|
+
t(this, "metrics", MI());
|
|
4421
4417
|
t(this, "bufferFullness", new x(30));
|
|
4422
4418
|
t(this, "bufferFullnessRegression");
|
|
4423
4419
|
t(this, "currentLevel");
|
|
@@ -4755,7 +4751,7 @@ const si = (i) => JSON.parse(JSON.stringify(i)), ue = class ue {
|
|
|
4755
4751
|
};
|
|
4756
4752
|
t(ue, "create", (A, e, s) => new ue(A, s, e));
|
|
4757
4753
|
let mt = ue;
|
|
4758
|
-
const
|
|
4754
|
+
const PI = 5e3, qI = () => hi() || fe() || zi(), gi = () => qI() ? 100 : 0, Ii = (i) => (A) => A > i, me = class me {
|
|
4759
4755
|
constructor(A, e, s, g, I) {
|
|
4760
4756
|
t(this, "emitter");
|
|
4761
4757
|
t(this, "logger");
|
|
@@ -4884,7 +4880,7 @@ const qI = 5e3, TI = () => hi() || fe() || zi(), gi = () => TI() ? 100 : 0, Ii =
|
|
|
4884
4880
|
var g;
|
|
4885
4881
|
if (!A.channelId)
|
|
4886
4882
|
throw new Error("Sample must be assigned to a channel");
|
|
4887
|
-
this.currentChannelId || (this.currentChannelId = A.channelId), this.timestampOffset || (this.timestampOffset = A.timestamp / A.timescale * 1e3 -
|
|
4883
|
+
this.currentChannelId || (this.currentChannelId = A.channelId), this.timestampOffset || (this.timestampOffset = A.timestamp / A.timescale * 1e3 - PI);
|
|
4888
4884
|
const e = A.type === "video" && A.isSync;
|
|
4889
4885
|
if (this.currentChannelId !== A.channelId) {
|
|
4890
4886
|
let I = Number.MAX_SAFE_INTEGER;
|
|
@@ -5047,7 +5043,7 @@ const qI = 5e3, TI = () => hi() || fe() || zi(), gi = () => TI() ? 100 : 0, Ii =
|
|
|
5047
5043
|
};
|
|
5048
5044
|
t(me, "create", (A, e, s, g, I) => new me(A, e, s, g, I));
|
|
5049
5045
|
let wt = me;
|
|
5050
|
-
const
|
|
5046
|
+
const TI = {
|
|
5051
5047
|
enabled: !0,
|
|
5052
5048
|
interval: 3e4,
|
|
5053
5049
|
includeErrors: !0,
|
|
@@ -5137,7 +5133,7 @@ const KI = {
|
|
|
5137
5133
|
);
|
|
5138
5134
|
}
|
|
5139
5135
|
});
|
|
5140
|
-
this.logger = A, this.emitter = e, this.options = h(h({},
|
|
5136
|
+
this.logger = A, this.emitter = e, this.options = h(h({}, TI), s), this.parentContext = g;
|
|
5141
5137
|
}
|
|
5142
5138
|
};
|
|
5143
5139
|
t(we, "create", (A, e, s, g) => new we(A, e, s, g));
|
|
@@ -5159,7 +5155,7 @@ const Se = class Se {
|
|
|
5159
5155
|
};
|
|
5160
5156
|
t(Se, "create", (A, e, s) => new Se(A, e, s));
|
|
5161
5157
|
let se = Se;
|
|
5162
|
-
const
|
|
5158
|
+
const KI = 6, YI = (i) => {
|
|
5163
5159
|
let A = [i], e = 0, s = 0, g = !1;
|
|
5164
5160
|
const I = (o, B) => {
|
|
5165
5161
|
var p, R, w;
|
|
@@ -5174,7 +5170,7 @@ const YI = 6, xI = (i) => {
|
|
|
5174
5170
|
});
|
|
5175
5171
|
};
|
|
5176
5172
|
return (o, B = !1) => {
|
|
5177
|
-
if (o.flags && HA(o.flags) && B && (g = !g), !(B && A.length <
|
|
5173
|
+
if (o.flags && HA(o.flags) && B && (g = !g), !(B && A.length < KI && g) && A.length > 0) {
|
|
5178
5174
|
g = !1;
|
|
5179
5175
|
let a = o;
|
|
5180
5176
|
for (let r = A.length - 1; r > 0; r--) {
|
|
@@ -5190,12 +5186,12 @@ const YI = 6, xI = (i) => {
|
|
|
5190
5186
|
}
|
|
5191
5187
|
return A.push(o), [];
|
|
5192
5188
|
};
|
|
5193
|
-
},
|
|
5189
|
+
}, xI = (i, A) => {
|
|
5194
5190
|
if (!i)
|
|
5195
5191
|
return;
|
|
5196
5192
|
const e = new URL("/subscribe", i);
|
|
5197
5193
|
return e.searchParams.append("channelId", A.channelId), e.searchParams.append("sessionId", A.sessionId), e.searchParams.append("clientId", A.clientId), A.audio && A.audio.codec && (e.searchParams.append("audio.bitRate", Math.round(A.audio.bitRate).toString()), e.searchParams.append("audio.codec", A.audio.codec), A.audio.language && e.searchParams.append("audio.language", A.audio.language)), A.video && A.video.codec && (e.searchParams.append("video.width", A.video.width.toString()), e.searchParams.append("video.height", A.video.height.toString()), e.searchParams.append("video.bitRate", Math.round(A.video.bitRate).toString()), e.searchParams.append("video.codec", A.video.codec)), A.expectAdditionalConnection && e.searchParams.append("expectAdditionalConnection", A.expectAdditionalConnection.toString()), A.burstMs && e.searchParams.append("burstMs", A.burstMs.toString()), A.channelGroupId && e.searchParams.append("channelGroupId", A.channelGroupId), A.authToken && (e.searchParams.append("auth.token", A.authToken), e.searchParams.append("auth.type", "jwt")), e.toString();
|
|
5198
|
-
},
|
|
5194
|
+
}, WI = (i, A, e) => GA(A) ? h(J(h({}, i), {
|
|
5199
5195
|
type: "video",
|
|
5200
5196
|
codec: A.codec,
|
|
5201
5197
|
isSync: HA(i.flags),
|
|
@@ -5213,7 +5209,7 @@ const YI = 6, xI = (i) => {
|
|
|
5213
5209
|
data: i.payload,
|
|
5214
5210
|
duration: 0
|
|
5215
5211
|
});
|
|
5216
|
-
class
|
|
5212
|
+
class VI {
|
|
5217
5213
|
constructor() {
|
|
5218
5214
|
t(this, "highEntropyValues");
|
|
5219
5215
|
var A;
|
|
@@ -5222,15 +5218,21 @@ class ZI {
|
|
|
5222
5218
|
});
|
|
5223
5219
|
}
|
|
5224
5220
|
getUserAgentInformation() {
|
|
5225
|
-
var
|
|
5226
|
-
const A = window.location.origin, s = !A || A == "null" ? "" : `${window.location.pathname}${window.location.search}`.substring(0, 1e3)
|
|
5221
|
+
var I, n, o, B, C, a;
|
|
5222
|
+
const A = window.location.origin, s = !A || A == "null" ? "" : `${window.location.pathname}${window.location.search}`.substring(0, 1e3), g = {
|
|
5223
|
+
locationOrigin: window.location.origin,
|
|
5224
|
+
locationPath: s,
|
|
5225
|
+
ancestorOrigins: ((I = window.location.ancestorOrigins) == null ? void 0 : I.length) > 0 ? Array.from(window.location.ancestorOrigins) : void 0,
|
|
5226
|
+
hardwareConcurrency: navigator.hardwareConcurrency,
|
|
5227
|
+
deviceMemory: navigator.deviceMemory
|
|
5228
|
+
};
|
|
5227
5229
|
if (self.navigator.userAgentData && this.highEntropyValues) {
|
|
5228
|
-
const Q = "1", r = [...(
|
|
5230
|
+
const Q = "1", r = [...(n = this.highEntropyValues.brands) != null ? n : []];
|
|
5229
5231
|
r.sort((w, k) => w.brand.localeCompare(k.brand));
|
|
5230
|
-
const c = [...(
|
|
5232
|
+
const c = [...(o = this.highEntropyValues.fullVersionList) != null ? o : []];
|
|
5231
5233
|
c.sort((w, k) => w.brand.localeCompare(k.brand));
|
|
5232
|
-
const l = c.map((w) => w.version), f = r.map((w) => w.brand), p = r.map((w) => w.version), R = parseInt((
|
|
5233
|
-
return {
|
|
5234
|
+
const l = c.map((w) => w.version), f = r.map((w) => w.brand), p = r.map((w) => w.version), R = parseInt((C = (B = this.highEntropyValues.platformVersion) == null ? void 0 : B.split(".")[0]) != null ? C : Q);
|
|
5235
|
+
return h({
|
|
5234
5236
|
userAgentLegacy: window.navigator.userAgent,
|
|
5235
5237
|
ua: {
|
|
5236
5238
|
browser: {
|
|
@@ -5241,24 +5243,18 @@ class ZI {
|
|
|
5241
5243
|
device: this.highEntropyValues.model || "Other",
|
|
5242
5244
|
os: {
|
|
5243
5245
|
family: this.highEntropyValues.platform || "Other",
|
|
5244
|
-
version: (
|
|
5246
|
+
version: (a = this.highEntropyValues.platformVersion) != null ? a : Q,
|
|
5245
5247
|
major_version: Number.isFinite(R) ? R : 0
|
|
5246
5248
|
}
|
|
5247
|
-
}
|
|
5248
|
-
|
|
5249
|
-
locationPath: s,
|
|
5250
|
-
ancestorOrigins: ((C = window.location.ancestorOrigins) == null ? void 0 : C.length) > 0 ? Array.from(window.location.ancestorOrigins) : void 0
|
|
5251
|
-
};
|
|
5249
|
+
}
|
|
5250
|
+
}, g);
|
|
5252
5251
|
} else
|
|
5253
|
-
return {
|
|
5254
|
-
userAgent: window.navigator.userAgent
|
|
5255
|
-
|
|
5256
|
-
locationPath: s,
|
|
5257
|
-
ancestorOrigins: ((a = window.location.ancestorOrigins) == null ? void 0 : a.length) > 0 ? Array.from(window.location.ancestorOrigins) : void 0
|
|
5258
|
-
};
|
|
5252
|
+
return h({
|
|
5253
|
+
userAgent: window.navigator.userAgent
|
|
5254
|
+
}, g);
|
|
5259
5255
|
}
|
|
5260
5256
|
}
|
|
5261
|
-
const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i != "object" || !ni(i, "channelId") || typeof i.channelId != "string" || !ni(i, "url") || typeof i.url != "string" || i.channelId.length === 0 || i.url.length === 0),
|
|
5257
|
+
const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i != "object" || !ni(i, "channelId") || typeof i.channelId != "string" || !ni(i, "url") || typeof i.url != "string" || i.channelId.length === 0 || i.url.length === 0), ZI = (i) => {
|
|
5262
5258
|
if (!Ui(i))
|
|
5263
5259
|
throw new F("Invalid options", { isFatal: !0, code: "invalid_options" });
|
|
5264
5260
|
const A = h({}, i);
|
|
@@ -5266,7 +5262,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5266
5262
|
const s = A;
|
|
5267
5263
|
typeof s[e] == "undefined" && delete s[e];
|
|
5268
5264
|
}), A;
|
|
5269
|
-
},
|
|
5265
|
+
}, OI = (i) => {
|
|
5270
5266
|
if (typeof i != "object" || i === null)
|
|
5271
5267
|
throw new Error("not an object");
|
|
5272
5268
|
if (!("video" in i))
|
|
@@ -5302,7 +5298,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5302
5298
|
t(this, "cachedEdges", []);
|
|
5303
5299
|
t(this, "shiftedEdges", []);
|
|
5304
5300
|
t(this, "pool", new Ut(j.MAX_POOL_SIZE));
|
|
5305
|
-
t(this, "userAgentInformation", new
|
|
5301
|
+
t(this, "userAgentInformation", new VI());
|
|
5306
5302
|
t(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map());
|
|
5307
5303
|
t(this, "sizes", /* @__PURE__ */ new Map());
|
|
5308
5304
|
t(this, "isSuspended", !0);
|
|
@@ -5419,7 +5415,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5419
5415
|
}), this.targetBufferTime = this.options.get("minBufferTime", this.channelId)), this.options.get("burstEnabled", this.channelId) && this.modules.subscription.enableBurst(this.targetBufferTime), this.emit("is live", o.isLive), !o.isLive)
|
|
5420
5416
|
throw new Error("Waiting for channel to go live");
|
|
5421
5417
|
this.patchSubscription(o, n), yield this.initializeDecodingModule(), this.resetModules(), this.emit("rendition levels", this.modules.renditions.getRenditionLevels()), this.emit("channels", this.channels), this.emitLanguagesIfChanged(), this.sampleProcessingSesssions.clear(), this.cachedEdges = this.cachedEdges.length === 0 ? s.edges : this.cachedEdges;
|
|
5422
|
-
const c = (this.options.get("edgeUrl") ? [this.options.get("edgeUrl")] : [this.cachedEdges.shift()])[0], l = this.options.get("burstEnabled", this.channelId), f =
|
|
5418
|
+
const c = (this.options.get("edgeUrl") ? [this.options.get("edgeUrl")] : [this.cachedEdges.shift()])[0], l = this.options.get("burstEnabled", this.channelId), f = xI(c, {
|
|
5423
5419
|
video: this.targetSubscription.video,
|
|
5424
5420
|
audio: this.targetSubscription.audio,
|
|
5425
5421
|
burstMs: l ? this.targetBufferTime : void 0,
|
|
@@ -5451,7 +5447,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5451
5447
|
const c = this.options.get("advanced"), l = (a = c.wasmDecodingConstraint.bitRate) != null ? a : Number.MAX_SAFE_INTEGER, f = (Q = c.wasmDecodingConstraint.width) != null ? Q : Number.MAX_SAFE_INTEGER, p = (r = c.wasmDecodingConstraint.height) != null ? r : Number.MAX_SAFE_INTEGER;
|
|
5452
5448
|
return o.bitRate <= l && o.width <= f && o.height <= p;
|
|
5453
5449
|
}
|
|
5454
|
-
const B = yield
|
|
5450
|
+
const B = yield hI(o);
|
|
5455
5451
|
if (!B.supported || o.codec == "av1" && !B.smooth && !B.powerEfficient)
|
|
5456
5452
|
return !1;
|
|
5457
5453
|
const C = this.options.getOverride("maxVideoBitRate", this.channelId);
|
|
@@ -5459,7 +5455,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5459
5455
|
}))
|
|
5460
5456
|
);
|
|
5461
5457
|
let g = e.filter((o, B) => s[B]);
|
|
5462
|
-
const I = g.
|
|
5458
|
+
const I = g.filter((o) => o.codec === "h264").reverse()[0], n = g.filter((o) => o.codec === "av1").reverse()[0];
|
|
5463
5459
|
return I && n && I.width > n.width && I.height > n.height && (g = g.filter((o) => o.codec !== "av1")), g;
|
|
5464
5460
|
}));
|
|
5465
5461
|
/**
|
|
@@ -5570,6 +5566,9 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5570
5566
|
t(this, "pause", () => {
|
|
5571
5567
|
this.options.get("pauseSupportEnabled") && (this.playbackSource.pause(), this.hasCalledConnect && this.suspend());
|
|
5572
5568
|
});
|
|
5569
|
+
t(this, "registerDebugInstance", () => {
|
|
5570
|
+
rI(this);
|
|
5571
|
+
});
|
|
5573
5572
|
/**
|
|
5574
5573
|
*
|
|
5575
5574
|
* Start playing the stream.
|
|
@@ -5588,7 +5587,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5588
5587
|
*/
|
|
5589
5588
|
t(this, "play", () => u(this, null, function* () {
|
|
5590
5589
|
var e;
|
|
5591
|
-
this.hasCalledConnect ? this.unsuspend() : this._connect(), (e = this.wakeLock) == null || e.enable(), this.playbackState === "paused" && (this.resetModules(), this.emitter.emit("flush buffers"));
|
|
5590
|
+
this.hasCalledConnect ? this.unsuspend() : (this._connect(), self.addEventListener("__vindral_register_debug__", this.registerDebugInstance)), (e = this.wakeLock) == null || e.enable(), this.playbackState === "paused" && (this.resetModules(), this.emitter.emit("flush buffers"));
|
|
5592
5591
|
try {
|
|
5593
5592
|
yield this.playbackSource.play();
|
|
5594
5593
|
} catch (s) {
|
|
@@ -5614,7 +5613,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5614
5613
|
const e = this.modules.canvasModule ? this.options.get("iosMediaElementEnabled") : void 0;
|
|
5615
5614
|
return h({
|
|
5616
5615
|
uptime: Date.now() - this.createdAt,
|
|
5617
|
-
version: "3.3.
|
|
5616
|
+
version: "3.3.2",
|
|
5618
5617
|
clientId: this.clientId,
|
|
5619
5618
|
sessionId: this.sessionId,
|
|
5620
5619
|
channelId: this.channelId,
|
|
@@ -5647,7 +5646,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5647
5646
|
if (s && e)
|
|
5648
5647
|
return e - s;
|
|
5649
5648
|
});
|
|
5650
|
-
this.options = new QI(h(h({},
|
|
5649
|
+
this.options = new QI(h(h({}, EI), ZI(e)));
|
|
5651
5650
|
const s = ["localhost", "127.0.0.1"];
|
|
5652
5651
|
e.telemetryEnabled === void 0 && s.includes(location.hostname) && this.options.set("telemetryEnabled", !1);
|
|
5653
5652
|
const g = {
|
|
@@ -5876,7 +5875,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5876
5875
|
break;
|
|
5877
5876
|
case "subscription changed":
|
|
5878
5877
|
try {
|
|
5879
|
-
|
|
5878
|
+
OI(S.subscription);
|
|
5880
5879
|
} catch (L) {
|
|
5881
5880
|
this.emitter.emit(
|
|
5882
5881
|
"error",
|
|
@@ -5930,10 +5929,10 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5930
5929
|
const Y = FA({ codec: U.codec, codecString: U.codecString });
|
|
5931
5930
|
this.emitter.emit("init segment", { initSegment: T, mimeType: Y }), this.emit("initialized media");
|
|
5932
5931
|
} else {
|
|
5933
|
-
const T =
|
|
5932
|
+
const T = WI(E, U, this.sizes.get(E.renditionId));
|
|
5934
5933
|
let H = this.sampleProcessingSesssions.get(L);
|
|
5935
5934
|
if (!H)
|
|
5936
|
-
H =
|
|
5935
|
+
H = YI(
|
|
5937
5936
|
this.modules.sync.processSample(T)
|
|
5938
5937
|
), this.sampleProcessingSesssions.set(L, H);
|
|
5939
5938
|
else {
|
|
@@ -5950,7 +5949,7 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
5950
5949
|
}
|
|
5951
5950
|
}
|
|
5952
5951
|
};
|
|
5953
|
-
this.options.get("maxVideoBitRate") !== Number.MAX_SAFE_INTEGER && (this.maxVideoBitRate = this.options.get("maxVideoBitRate")), this.options.get("maxAudioBitRate") !== Number.MAX_SAFE_INTEGER && (this.maxAudioBitRate = this.options.get("maxAudioBitRate")), uA(this.options.get("maxSize"), $A()) || (this.maxSize = this.options.get("maxSize")), this.options.get("burstEnabled") && C.enableBurst(this.targetBufferTime)
|
|
5952
|
+
this.options.get("maxVideoBitRate") !== Number.MAX_SAFE_INTEGER && (this.maxVideoBitRate = this.options.get("maxVideoBitRate")), this.options.get("maxAudioBitRate") !== Number.MAX_SAFE_INTEGER && (this.maxAudioBitRate = this.options.get("maxAudioBitRate")), uA(this.options.get("maxSize"), $A()) || (this.maxSize = this.options.get("maxSize")), this.options.get("burstEnabled") && C.enableBurst(this.targetBufferTime);
|
|
5954
5953
|
}
|
|
5955
5954
|
// TODO: volym blir nog fuckad när vi startar och mutear - måste testa om volume ändras när muted ändras
|
|
5956
5955
|
/**
|
|
@@ -6313,77 +6312,77 @@ const ni = (i, A) => i && typeof i == "object" && A in i, Ui = (i) => !(typeof i
|
|
|
6313
6312
|
};
|
|
6314
6313
|
t(j, "MAX_POOL_SIZE", 10), t(j, "INITIAL_MAX_BIT_RATE", 2.5 * 1e3 * 1e3), t(j, "PING_TIMEOUT", 1e3), t(j, "DISCONNECT_TIMEOUT", 15 * 1e3);
|
|
6315
6314
|
let St = j;
|
|
6316
|
-
const
|
|
6317
|
-
bar:
|
|
6318
|
-
hidden:
|
|
6319
|
-
},
|
|
6315
|
+
const XI = "_bar_16xpe_1", zI = "_hidden_16xpe_46", bi = {
|
|
6316
|
+
bar: XI,
|
|
6317
|
+
hidden: zI
|
|
6318
|
+
}, jI = "_withThumbnails_suenn_19", WA = {
|
|
6320
6319
|
"channel-selection-item": "_channel-selection-item_suenn_1",
|
|
6321
6320
|
"channel-selection-item-selected": "_channel-selection-item-selected_suenn_8",
|
|
6322
6321
|
"channel-selection-item-image": "_channel-selection-item-image_suenn_13",
|
|
6323
|
-
withThumbnails:
|
|
6322
|
+
withThumbnails: jI,
|
|
6324
6323
|
"hide-on-small": "_hide-on-small_suenn_27"
|
|
6325
|
-
},
|
|
6324
|
+
}, _I = {
|
|
6326
6325
|
"icon-button": "_icon-button_5fg7v_1"
|
|
6327
|
-
},
|
|
6326
|
+
}, $I = {
|
|
6328
6327
|
viewBox: "-10 -10 44 44",
|
|
6329
6328
|
content: `<g fill="none" stroke="white">
|
|
6330
6329
|
<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" />
|
|
6331
6330
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
|
|
6332
6331
|
</g>`
|
|
6333
|
-
},
|
|
6332
|
+
}, An = {
|
|
6334
6333
|
viewBox: "-160 -160 832 832",
|
|
6335
6334
|
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"/>'
|
|
6336
|
-
},
|
|
6335
|
+
}, en = {
|
|
6337
6336
|
viewBox: "-6 -6 36 36",
|
|
6338
6337
|
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"/>'
|
|
6339
|
-
},
|
|
6338
|
+
}, tn = {
|
|
6340
6339
|
viewBox: "-10 -10 44 44",
|
|
6341
6340
|
content: `<g fill="none" stroke="white">
|
|
6342
6341
|
<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" />
|
|
6343
6342
|
</svg>`
|
|
6344
|
-
},
|
|
6343
|
+
}, sn = {
|
|
6345
6344
|
viewBox: "-10 -10 44 44",
|
|
6346
6345
|
content: `
|
|
6347
6346
|
<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" />`
|
|
6348
|
-
},
|
|
6347
|
+
}, gn = {
|
|
6349
6348
|
viewBox: "-12 -12 38 38",
|
|
6350
6349
|
content: `<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-5.000000, -5.000000)">
|
|
6351
6350
|
<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>
|
|
6352
6351
|
</g>`
|
|
6353
|
-
},
|
|
6352
|
+
}, In = {
|
|
6354
6353
|
viewBox: "-12 -12 38 38",
|
|
6355
6354
|
content: `<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-5.000000, -5.000000)">
|
|
6356
6355
|
<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>
|
|
6357
6356
|
</g>`
|
|
6358
|
-
},
|
|
6357
|
+
}, nn = {
|
|
6359
6358
|
viewBox: "-10 -10 44 44",
|
|
6360
6359
|
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"/>'
|
|
6361
|
-
},
|
|
6360
|
+
}, on = {
|
|
6362
6361
|
viewBox: "-10 -10 45 45",
|
|
6363
6362
|
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"/>'
|
|
6364
|
-
},
|
|
6363
|
+
}, Bn = {
|
|
6365
6364
|
viewBox: "-8 -8 40 40",
|
|
6366
6365
|
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"/>'
|
|
6367
|
-
},
|
|
6366
|
+
}, Cn = {
|
|
6368
6367
|
viewBox: "-8 -8 40 40",
|
|
6369
6368
|
content: '<path fill="white" d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/>'
|
|
6370
|
-
},
|
|
6369
|
+
}, an = {
|
|
6371
6370
|
viewBox: "-8 -8 40 40",
|
|
6372
6371
|
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"/>'
|
|
6373
6372
|
}, oi = {
|
|
6374
|
-
enter:
|
|
6375
|
-
exit:
|
|
6376
|
-
pip:
|
|
6377
|
-
channels:
|
|
6378
|
-
languages:
|
|
6379
|
-
levels:
|
|
6380
|
-
oneToOne:
|
|
6381
|
-
mute:
|
|
6382
|
-
unmute:
|
|
6383
|
-
pause:
|
|
6384
|
-
play:
|
|
6385
|
-
airPlay:
|
|
6386
|
-
},
|
|
6373
|
+
enter: gn,
|
|
6374
|
+
exit: In,
|
|
6375
|
+
pip: nn,
|
|
6376
|
+
channels: on,
|
|
6377
|
+
languages: Cn,
|
|
6378
|
+
levels: Bn,
|
|
6379
|
+
oneToOne: sn,
|
|
6380
|
+
mute: $I,
|
|
6381
|
+
unmute: tn,
|
|
6382
|
+
pause: An,
|
|
6383
|
+
play: en,
|
|
6384
|
+
airPlay: an
|
|
6385
|
+
}, Qn = _I["icon-button"];
|
|
6387
6386
|
class dA extends AA {
|
|
6388
6387
|
constructor(e, s, g) {
|
|
6389
6388
|
super(document.createElement("div"));
|
|
@@ -6395,16 +6394,16 @@ class dA extends AA {
|
|
|
6395
6394
|
t(this, "setHidden", (e) => e ? this.hide() : this.show());
|
|
6396
6395
|
t(this, "show", () => void (this.element.style.display = "block"));
|
|
6397
6396
|
t(this, "hide", () => void (this.element.style.display = "none"));
|
|
6398
|
-
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",
|
|
6397
|
+
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", Qn), this.setIcon(s), this.element.addEventListener("click", g), this.element.appendChild(this.iconElement);
|
|
6399
6398
|
}
|
|
6400
6399
|
}
|
|
6401
|
-
const
|
|
6402
|
-
list:
|
|
6400
|
+
const rn = "_list_oecdq_1", En = "_hidden_oecdq_19", Fe = {
|
|
6401
|
+
list: rn,
|
|
6403
6402
|
"list-item": "_list-item_oecdq_11",
|
|
6404
6403
|
"list-item-disabled": "_list-item-disabled_oecdq_15",
|
|
6405
|
-
hidden:
|
|
6406
|
-
}, Bi = Fe.hidden,
|
|
6407
|
-
class
|
|
6404
|
+
hidden: En
|
|
6405
|
+
}, Bi = Fe.hidden, hn = Fe.list, cn = Fe["list-item"], dn = Fe["list-item-disabled"];
|
|
6406
|
+
class ln extends AA {
|
|
6408
6407
|
constructor({ items: e, onItemClick: s, classNames: g = [], maxHeight: I }) {
|
|
6409
6408
|
super(document.createElement("div"));
|
|
6410
6409
|
t(this, "onItemClick");
|
|
@@ -6414,19 +6413,19 @@ class un extends AA {
|
|
|
6414
6413
|
(s = this.element.lastChild) == null || s.remove();
|
|
6415
6414
|
e.forEach((g) => {
|
|
6416
6415
|
const I = document.createElement("div");
|
|
6417
|
-
g.disabled || I.addEventListener("click", () => this.onItemClick(g)), I.className = [
|
|
6416
|
+
g.disabled || I.addEventListener("click", () => this.onItemClick(g)), I.className = [cn, g.disabled ? dn : ""].join(" "), I.appendChild(g.element()), this.element.appendChild(I);
|
|
6418
6417
|
});
|
|
6419
6418
|
});
|
|
6420
6419
|
t(this, "hide", () => this.element.classList.add(Bi));
|
|
6421
6420
|
t(this, "show", () => this.element.classList.remove(Bi));
|
|
6422
|
-
this.element.className = [
|
|
6421
|
+
this.element.className = [hn, ...g].join(" "), this.onItemClick = s, this.updateItems(e), I && (this.element.style.maxHeight = I);
|
|
6423
6422
|
}
|
|
6424
6423
|
}
|
|
6425
|
-
const
|
|
6426
|
-
container:
|
|
6427
|
-
hidden:
|
|
6428
|
-
list:
|
|
6429
|
-
},
|
|
6424
|
+
const un = "_container_13xnz_1", mn = "_hidden_13xnz_6", wn = "_list_13xnz_10", pt = {
|
|
6425
|
+
container: un,
|
|
6426
|
+
hidden: mn,
|
|
6427
|
+
list: wn
|
|
6428
|
+
}, Sn = pt.list, Ci = pt.hidden, fn = pt.container;
|
|
6430
6429
|
class yt extends AA {
|
|
6431
6430
|
constructor({ label: e, items: s, onItemClick: g, iconButtonType: I, onToggle: n }) {
|
|
6432
6431
|
super(document.createElement("div"));
|
|
@@ -6446,10 +6445,10 @@ class yt extends AA {
|
|
|
6446
6445
|
this.toggleShowChannels(), this.onItemClick(e);
|
|
6447
6446
|
});
|
|
6448
6447
|
t(this, "showList", () => {
|
|
6449
|
-
this.list = new
|
|
6448
|
+
this.list = new ln({
|
|
6450
6449
|
items: this.items,
|
|
6451
6450
|
onItemClick: this.handleItemClick,
|
|
6452
|
-
classNames: [
|
|
6451
|
+
classNames: [Sn],
|
|
6453
6452
|
maxHeight: this.maxHeight
|
|
6454
6453
|
}), this.list.attach(this.element);
|
|
6455
6454
|
});
|
|
@@ -6468,11 +6467,11 @@ class yt extends AA {
|
|
|
6468
6467
|
t(this, "show", () => {
|
|
6469
6468
|
this.element.classList.remove(Ci);
|
|
6470
6469
|
});
|
|
6471
|
-
this.element.className =
|
|
6470
|
+
this.element.className = fn, this.onItemClick = g, this.onToggle = n, this.items = s, this.iconButton = new dA(e, I, this.onButtonClick), this.iconButton.attach(this.element);
|
|
6472
6471
|
}
|
|
6473
6472
|
}
|
|
6474
|
-
const
|
|
6475
|
-
class
|
|
6473
|
+
const Dn = WA["hide-on-small"], pn = WA["channel-selection-item"], yn = WA["channel-selection-item-selected"], Fn = WA["channel-selection-item-image"], Rn = WA.withThumbnails;
|
|
6474
|
+
class kn extends yt {
|
|
6476
6475
|
constructor({ vindral: A, enabled: e, thumbnailsEnabled: s, thumbnailModule: g }) {
|
|
6477
6476
|
const I = () => {
|
|
6478
6477
|
const o = A.channels.map((B) => ({
|
|
@@ -6481,14 +6480,14 @@ class Gn extends yt {
|
|
|
6481
6480
|
element: () => {
|
|
6482
6481
|
const C = document.createElement("div");
|
|
6483
6482
|
if (C.className = [
|
|
6484
|
-
|
|
6485
|
-
B.channelId === A.channelId ?
|
|
6483
|
+
pn,
|
|
6484
|
+
B.channelId === A.channelId ? yn : ""
|
|
6486
6485
|
].join(" "), g && s) {
|
|
6487
|
-
C.classList.add(
|
|
6486
|
+
C.classList.add(Rn);
|
|
6488
6487
|
const a = document.createElement("p");
|
|
6489
6488
|
a.innerHTML = B.name, C.appendChild(a);
|
|
6490
6489
|
const Q = g.getImageUrl(B), r = document.createElement("img");
|
|
6491
|
-
Q && (r.className =
|
|
6490
|
+
Q && (r.className = Fn, r.src = Q, C.style.backgroundImage = `url(${Q})`);
|
|
6492
6491
|
} else
|
|
6493
6492
|
C.innerHTML = B.name;
|
|
6494
6493
|
return C;
|
|
@@ -6498,14 +6497,14 @@ class Gn extends yt {
|
|
|
6498
6497
|
};
|
|
6499
6498
|
A.on("channels", I);
|
|
6500
6499
|
const n = (o) => A.channelId = o.channel.channelId;
|
|
6501
|
-
super({ label: "Channel List", items: [], onItemClick: n, onToggle: sA, iconButtonType: "channels" }), this.element.classList.add(
|
|
6500
|
+
super({ label: "Channel List", items: [], onItemClick: n, onToggle: sA, iconButtonType: "channels" }), this.element.classList.add(Dn), this.hide();
|
|
6502
6501
|
}
|
|
6503
6502
|
}
|
|
6504
6503
|
const vi = {
|
|
6505
6504
|
"language-button-item": "_language-button-item_1dov5_1",
|
|
6506
6505
|
"language-button-item-selected": "_language-button-item-selected_1dov5_6"
|
|
6507
|
-
},
|
|
6508
|
-
class
|
|
6506
|
+
}, Gn = vi["language-button-item"], Un = vi["language-button-item-selected"];
|
|
6507
|
+
class bn extends yt {
|
|
6509
6508
|
constructor({ vindral: A }) {
|
|
6510
6509
|
const e = () => {
|
|
6511
6510
|
const g = A.languages.map((I) => ({
|
|
@@ -6514,8 +6513,8 @@ class vn extends yt {
|
|
|
6514
6513
|
element: () => {
|
|
6515
6514
|
const n = document.createElement("div");
|
|
6516
6515
|
return n.className = [
|
|
6517
|
-
|
|
6518
|
-
I === A.language ?
|
|
6516
|
+
Gn,
|
|
6517
|
+
I === A.language ? Un : ""
|
|
6519
6518
|
].join(" "), n.innerHTML = I, n;
|
|
6520
6519
|
}
|
|
6521
6520
|
}));
|
|
@@ -6526,7 +6525,7 @@ class vn extends yt {
|
|
|
6526
6525
|
super({ label: "Language", items: [], onItemClick: s, onToggle: sA, iconButtonType: "languages" }), this.hide();
|
|
6527
6526
|
}
|
|
6528
6527
|
}
|
|
6529
|
-
class
|
|
6528
|
+
class vn extends AA {
|
|
6530
6529
|
constructor({ vindral: e }) {
|
|
6531
6530
|
super(document.createElement("div"));
|
|
6532
6531
|
t(this, "vindral");
|
|
@@ -6541,14 +6540,14 @@ class Jn extends AA {
|
|
|
6541
6540
|
this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new dA("Play", this.playIcon(), this.onPlayClick), this.playButton.attach(this.element);
|
|
6542
6541
|
}
|
|
6543
6542
|
}
|
|
6544
|
-
const
|
|
6545
|
-
item:
|
|
6543
|
+
const Jn = "_item_5vhyo_1", Ln = "_title_5vhyo_10", VA = {
|
|
6544
|
+
item: Jn,
|
|
6546
6545
|
"item-selected": "_item-selected_5vhyo_6",
|
|
6547
|
-
title:
|
|
6546
|
+
title: Ln,
|
|
6548
6547
|
"sub-title": "_sub-title_5vhyo_14",
|
|
6549
6548
|
"hide-on-small": "_hide-on-small_5vhyo_21"
|
|
6550
|
-
},
|
|
6551
|
-
class
|
|
6549
|
+
}, Nn = VA["hide-on-small"], Hn = VA.item, Mn = VA["item-selected"], Pn = VA.title, qn = VA["sub-title"];
|
|
6550
|
+
class Tn extends yt {
|
|
6552
6551
|
constructor({ vindral: A }) {
|
|
6553
6552
|
const e = () => {
|
|
6554
6553
|
const g = A.renditionLevels.map((I) => ({
|
|
@@ -6557,14 +6556,14 @@ class Kn extends yt {
|
|
|
6557
6556
|
element: () => {
|
|
6558
6557
|
var l, f, p;
|
|
6559
6558
|
const n = document.createElement("div");
|
|
6560
|
-
n.className = [
|
|
6559
|
+
n.className = [Hn, I === A.currentRenditionLevel ? Mn : ""].join(" ");
|
|
6561
6560
|
const o = document.createElement("span"), B = document.createElement("span"), { audio: C, video: a } = I, Q = a ? es(a) : void 0, r = C ? ts(C.sampleRate) : void 0;
|
|
6562
6561
|
let c = As(((l = a == null ? void 0 : a.bitRate) != null ? l : 0) + ((f = C == null ? void 0 : C.bitRate) != null ? f : 0));
|
|
6563
6562
|
if (a) {
|
|
6564
6563
|
const R = a.frameRate[0] / a.frameRate[1], w = a.frameRate[0] % a.frameRate[1] === 0 ? `${R}p` : `${R.toFixed(2)}p`;
|
|
6565
6564
|
c += `, ${w}`;
|
|
6566
6565
|
}
|
|
6567
|
-
return o.innerHTML = (p = Q != null ? Q : r) != null ? p : "", o.className =
|
|
6566
|
+
return o.innerHTML = (p = Q != null ? Q : r) != null ? p : "", o.className = Pn, B.innerHTML = c, B.className = qn, n.appendChild(o), n.appendChild(B), n;
|
|
6568
6567
|
}
|
|
6569
6568
|
}));
|
|
6570
6569
|
this.maxHeight = `calc(${Math.max(110, A.mediaElement.clientHeight)}px - 46px)`, this.updateItems(g);
|
|
@@ -6573,15 +6572,15 @@ class Kn extends yt {
|
|
|
6573
6572
|
const s = ({ rendition: g }) => {
|
|
6574
6573
|
g.audio && (A.maxAudioBitRate = g.audio.bitRate), g.video && (A.maxVideoBitRate = g.video.bitRate, A.maxSize = g.video);
|
|
6575
6574
|
};
|
|
6576
|
-
super({ label: "Rendition Levels", items: [], onItemClick: s, onToggle: sA, iconButtonType: "levels" }), this.element.classList.add(
|
|
6575
|
+
super({ label: "Rendition Levels", items: [], onItemClick: s, onToggle: sA, iconButtonType: "levels" }), this.element.classList.add(Nn);
|
|
6577
6576
|
}
|
|
6578
6577
|
}
|
|
6579
|
-
class
|
|
6578
|
+
class Kn extends AA {
|
|
6580
6579
|
constructor() {
|
|
6581
6580
|
super(document.createElement("div")), this.element.style.flexGrow = "1";
|
|
6582
6581
|
}
|
|
6583
6582
|
}
|
|
6584
|
-
class
|
|
6583
|
+
class Yn extends AA {
|
|
6585
6584
|
constructor({ vindral: e }) {
|
|
6586
6585
|
super(document.createElement("div"));
|
|
6587
6586
|
t(this, "vindral");
|
|
@@ -6596,8 +6595,8 @@ class xn extends AA {
|
|
|
6596
6595
|
this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new dA("Mute", this.muteIcon(), this.onMuteClick), this.muteButton.attach(this.element);
|
|
6597
6596
|
}
|
|
6598
6597
|
}
|
|
6599
|
-
const jA = bi.hidden,
|
|
6600
|
-
class
|
|
6598
|
+
const jA = bi.hidden, xn = bi.bar;
|
|
6599
|
+
class Wn extends AA {
|
|
6601
6600
|
constructor({
|
|
6602
6601
|
vindral: e,
|
|
6603
6602
|
onFullscreenClicked: s,
|
|
@@ -6644,16 +6643,16 @@ class Vn extends AA {
|
|
|
6644
6643
|
t(this, "onToggle", (e) => {
|
|
6645
6644
|
this.listButtons().filter((s) => e !== s).forEach((s) => "hideList" in s && s.hideList());
|
|
6646
6645
|
});
|
|
6647
|
-
this.element.className = [
|
|
6648
|
-
const p = new
|
|
6646
|
+
this.element.className = [xn, jA].join(" ");
|
|
6647
|
+
const p = new Kn();
|
|
6649
6648
|
this.oneToOneButton = new dA("One to One", "oneToOne", g), this.fullscreenButton = new dA("Fullscreen", "enter", s), this.airPlayButton = new dA("AirPlay", "airPlay", n);
|
|
6650
|
-
const R = new dA("Picture in Picture", "pip", I), w = new
|
|
6649
|
+
const R = new dA("Picture in Picture", "pip", I), w = new kn({
|
|
6651
6650
|
vindral: e,
|
|
6652
6651
|
enabled: a,
|
|
6653
6652
|
thumbnailsEnabled: Q,
|
|
6654
6653
|
thumbnailModule: Q ? f : void 0
|
|
6655
|
-
}), k = new
|
|
6656
|
-
this.volumeControls = new
|
|
6654
|
+
}), k = new Tn({ vindral: e }), P = new bn({ vindral: e });
|
|
6655
|
+
this.volumeControls = new Yn({ vindral: e }), this.playControls = new vn({ vindral: e }), o && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), p.attach(this.element), P.attach(this.element), k.attach(this.element), w.attach(this.element), R.attach(this.element), this.oneToOneButton.attach(this.element), this.fullscreenButton.attach(this.element), this.items.push(
|
|
6657
6656
|
p,
|
|
6658
6657
|
P,
|
|
6659
6658
|
k,
|
|
@@ -6663,11 +6662,11 @@ class Vn extends AA {
|
|
|
6663
6662
|
), this.items.forEach((N) => "onToggle" in N && (N.onToggle = this.onToggle)), l || this.oneToOneButton.hide(), B || this.fullscreenButton.hide(), C || R.hide(), a || w.hide(), r || k.hide(), c || P.hide(), navigator.maxTouchPoints < 1 && (this.element.addEventListener("mouseenter", () => this.isMouseInElement = !0), this.element.addEventListener("mouseleave", () => this.isMouseInElement = !1));
|
|
6664
6663
|
}
|
|
6665
6664
|
}
|
|
6666
|
-
const
|
|
6667
|
-
castoverlay:
|
|
6668
|
-
hidden:
|
|
6669
|
-
}, Te = Ji.hidden,
|
|
6670
|
-
class
|
|
6665
|
+
const Vn = "_castoverlay_1n91l_1", Zn = "_hidden_1n91l_20", Ji = {
|
|
6666
|
+
castoverlay: Vn,
|
|
6667
|
+
hidden: Zn
|
|
6668
|
+
}, Te = Ji.hidden, On = Ji.castoverlay;
|
|
6669
|
+
class Xn extends AA {
|
|
6671
6670
|
constructor() {
|
|
6672
6671
|
super(document.createElement("div"));
|
|
6673
6672
|
t(this, "onClick");
|
|
@@ -6676,19 +6675,19 @@ class zn extends AA {
|
|
|
6676
6675
|
});
|
|
6677
6676
|
t(this, "hide", () => this.element.classList.add(Te));
|
|
6678
6677
|
t(this, "show", () => this.element.classList.remove(Te));
|
|
6679
|
-
this.element.classList.add(
|
|
6678
|
+
this.element.classList.add(On), this.element.classList.add(Te), this.element.innerText = "device";
|
|
6680
6679
|
}
|
|
6681
6680
|
}
|
|
6682
|
-
const
|
|
6683
|
-
button:
|
|
6681
|
+
const zn = "_button_137xm_21", jn = "_image_137xm_96", _n = "_overlay_137xm_116", $n = "_selected_137xm_134", Ao = "_hidden_137xm_139", eo = "_disabled_137xm_143", ZA = {
|
|
6682
|
+
button: zn,
|
|
6684
6683
|
"show-and-scaleup": "_show-and-scaleup_137xm_1",
|
|
6685
|
-
image:
|
|
6686
|
-
overlay:
|
|
6687
|
-
selected:
|
|
6688
|
-
hidden:
|
|
6689
|
-
disabled:
|
|
6690
|
-
},
|
|
6691
|
-
class
|
|
6684
|
+
image: jn,
|
|
6685
|
+
overlay: _n,
|
|
6686
|
+
selected: $n,
|
|
6687
|
+
hidden: Ao,
|
|
6688
|
+
disabled: eo
|
|
6689
|
+
}, to = ZA.button, Ke = ZA.hidden, io = ZA.overlay, ai = ZA.image, Qi = ZA.selected;
|
|
6690
|
+
class so extends AA {
|
|
6692
6691
|
constructor({ title: e, onClick: s, imageUrl: g, selected: I }) {
|
|
6693
6692
|
super(document.createElement("button"));
|
|
6694
6693
|
t(this, "overlay");
|
|
@@ -6712,9 +6711,9 @@ class go extends AA {
|
|
|
6712
6711
|
t(this, "setHidden", (e) => e ? this.hide() : this.show());
|
|
6713
6712
|
t(this, "hide", () => this.element.classList.add(Ke));
|
|
6714
6713
|
t(this, "show", () => this.element.classList.remove(Ke));
|
|
6715
|
-
this.element.className =
|
|
6714
|
+
this.element.className = to, I && this.setSelected(I), this.element.onclick = () => {
|
|
6716
6715
|
this.loadingOverlay.show(), s();
|
|
6717
|
-
}, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = ai, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = ai, this.imageHolder2.style.animationFillMode = "forwards", g && (this.imageHolder1.style.backgroundImage = `url(${g})`, this.isImageHolder1Active = !0), this.loadingOverlay = new wi(), 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 =
|
|
6716
|
+
}, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = ai, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = ai, this.imageHolder2.style.animationFillMode = "forwards", g && (this.imageHolder1.style.backgroundImage = `url(${g})`, this.isImageHolder1Active = !0), this.loadingOverlay = new wi(), 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 = io, this.element.appendChild(this.overlay);
|
|
6718
6717
|
const n = document.createElement("span");
|
|
6719
6718
|
n.innerHTML = e, this.element.appendChild(n), this.show();
|
|
6720
6719
|
}
|
|
@@ -6728,13 +6727,13 @@ class go extends AA {
|
|
|
6728
6727
|
}
|
|
6729
6728
|
}
|
|
6730
6729
|
}
|
|
6731
|
-
const
|
|
6730
|
+
const go = "_container_btpgd_13", Io = "_hidden_btpgd_37", no = "_disabled_btpgd_41", Li = {
|
|
6732
6731
|
"channel-selection-overlay": "_channel-selection-overlay_btpgd_1",
|
|
6733
|
-
container:
|
|
6734
|
-
hidden:
|
|
6735
|
-
disabled:
|
|
6736
|
-
}, Ye = Li.hidden,
|
|
6737
|
-
class
|
|
6732
|
+
container: go,
|
|
6733
|
+
hidden: Io,
|
|
6734
|
+
disabled: no
|
|
6735
|
+
}, Ye = Li.hidden, oo = Li.container;
|
|
6736
|
+
class Bo extends AA {
|
|
6738
6737
|
constructor({ vindral: e, thumbnailModule: s }) {
|
|
6739
6738
|
var g;
|
|
6740
6739
|
super(document.createElement("div"));
|
|
@@ -6766,7 +6765,7 @@ class Co extends AA {
|
|
|
6766
6765
|
var C;
|
|
6767
6766
|
if (!n.isLive)
|
|
6768
6767
|
return;
|
|
6769
|
-
const B = new
|
|
6768
|
+
const B = new so({
|
|
6770
6769
|
title: n.name,
|
|
6771
6770
|
onClick: () => {
|
|
6772
6771
|
this.setSelected(n);
|
|
@@ -6781,12 +6780,12 @@ class Co extends AA {
|
|
|
6781
6780
|
var o;
|
|
6782
6781
|
I.setImageUrl((o = this.thumbnailModule) == null ? void 0 : o.getImageUrl(n));
|
|
6783
6782
|
});
|
|
6784
|
-
}), this.element.className =
|
|
6783
|
+
}), this.element.className = oo, this.show();
|
|
6785
6784
|
}
|
|
6786
6785
|
}
|
|
6787
|
-
const
|
|
6788
|
-
fullscreen:
|
|
6789
|
-
}, xe =
|
|
6786
|
+
const Co = "_fullscreen_1v9d8_1", ao = {
|
|
6787
|
+
fullscreen: Co
|
|
6788
|
+
}, xe = ao.fullscreen, kA = class kA extends $ {
|
|
6790
6789
|
constructor(e) {
|
|
6791
6790
|
super();
|
|
6792
6791
|
t(this, "container");
|
|
@@ -6821,16 +6820,16 @@ const ao = "_fullscreen_1v9d8_1", Qo = {
|
|
|
6821
6820
|
};
|
|
6822
6821
|
t(kA, "isFullscreenApiSupported", (e) => (e.requestFullscreen || e.webkitRequestFullscreen || e.webkitEnterFullscreen || e.mozRequestFullScreen) !== void 0);
|
|
6823
6822
|
let MA = kA;
|
|
6824
|
-
const
|
|
6825
|
-
player:
|
|
6823
|
+
const Qo = "_player_1jt4y_1", Ft = {
|
|
6824
|
+
player: Qo,
|
|
6826
6825
|
"one-to-one": "_one-to-one_1jt4y_19",
|
|
6827
6826
|
"audio-only": "_audio-only_1jt4y_28"
|
|
6828
|
-
},
|
|
6829
|
-
playoverlay:
|
|
6830
|
-
hidden:
|
|
6827
|
+
}, ro = "_playoverlay_1niji_1", Eo = "_hidden_1niji_17", Rt = {
|
|
6828
|
+
playoverlay: ro,
|
|
6829
|
+
hidden: Eo,
|
|
6831
6830
|
"playoverlay-indicator": "_playoverlay-indicator_1niji_23"
|
|
6832
|
-
}, _A = Rt.hidden,
|
|
6833
|
-
class
|
|
6831
|
+
}, _A = Rt.hidden, ho = Rt.playoverlay, co = Rt["playoverlay-indicator"];
|
|
6832
|
+
class lo extends AA {
|
|
6834
6833
|
constructor() {
|
|
6835
6834
|
super(document.createElement("div"));
|
|
6836
6835
|
t(this, "onClick");
|
|
@@ -6839,12 +6838,12 @@ class uo extends AA {
|
|
|
6839
6838
|
t(this, "setHidden", (e) => e ? this.hide() : this.show());
|
|
6840
6839
|
t(this, "hide", () => this.element.classList.add(_A));
|
|
6841
6840
|
t(this, "show", () => this.element.classList.remove(_A));
|
|
6842
|
-
this.element.classList.add(
|
|
6841
|
+
this.element.classList.add(ho), this.element.classList.add(_A), this.indicator.className = co, this.element.appendChild(this.indicator), this.element.onclick = () => {
|
|
6843
6842
|
this.onClick && this.onClick();
|
|
6844
6843
|
};
|
|
6845
6844
|
}
|
|
6846
6845
|
}
|
|
6847
|
-
class
|
|
6846
|
+
class uo extends $ {
|
|
6848
6847
|
constructor({ vindral: e, refreshEveryMs: s }) {
|
|
6849
6848
|
super();
|
|
6850
6849
|
t(this, "thumbnails", /* @__PURE__ */ new Map());
|
|
@@ -6892,10 +6891,10 @@ class mo extends $ {
|
|
|
6892
6891
|
});
|
|
6893
6892
|
}
|
|
6894
6893
|
}
|
|
6895
|
-
const
|
|
6896
|
-
video:
|
|
6897
|
-
hidden:
|
|
6898
|
-
}, We = Ni.hidden,
|
|
6894
|
+
const mo = "_video_161ec_1", wo = "_hidden_161ec_7", Ni = {
|
|
6895
|
+
video: mo,
|
|
6896
|
+
hidden: wo
|
|
6897
|
+
}, We = Ni.hidden, So = Ni.video;
|
|
6899
6898
|
class ri extends $ {
|
|
6900
6899
|
constructor(e) {
|
|
6901
6900
|
super();
|
|
@@ -6926,7 +6925,7 @@ class ri extends $ {
|
|
|
6926
6925
|
t(this, "onAirPlayPlaybackChanged", () => {
|
|
6927
6926
|
window.clearTimeout(this.connectingTimeout), this.element.webkitCurrentPlaybackTargetIsWireless ? (this.emit("connected"), this.element.classList.remove(We), this.element.paused && this.element.play()) : (this.emit("disconnected"), this.element.pause(), this.element.classList.add(We));
|
|
6928
6927
|
});
|
|
6929
|
-
this.hlsUrl = new URL(`/api/hls?channelId=${e.channelId}`, e.url).toString(), this.config = e, this.element = document.createElement("video"), this.element.classList.add(
|
|
6928
|
+
this.hlsUrl = new URL(`/api/hls?channelId=${e.channelId}`, e.url).toString(), this.config = e, this.element = document.createElement("video"), this.element.classList.add(So), this.element.classList.add(We), this.element.playsInline = !0, this.element.controls = !0, this.element.addEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailable), this.element.addEventListener("webkitcurrentplaybacktargetiswirelesschanged", this.onAirPlayPlaybackChanged), this.config.container.appendChild(this.element);
|
|
6930
6929
|
}
|
|
6931
6930
|
/**
|
|
6932
6931
|
* True if the instance is casting right now.
|
|
@@ -6956,7 +6955,7 @@ class ri extends $ {
|
|
|
6956
6955
|
}
|
|
6957
6956
|
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-call */
|
|
6958
6957
|
}
|
|
6959
|
-
const
|
|
6958
|
+
const fo = Ft.player, Ve = Ft["one-to-one"], Do = Ft["audio-only"], po = {
|
|
6960
6959
|
controlsEnabled: !0,
|
|
6961
6960
|
castEnabled: !0,
|
|
6962
6961
|
channelSelectionEnabled: !0,
|
|
@@ -6967,8 +6966,8 @@ const Do = Ft.player, Ve = Ft["one-to-one"], po = Ft["audio-only"], yo = {
|
|
|
6967
6966
|
hideTimeout: 2e3,
|
|
6968
6967
|
pauseButtonEnabled: !0,
|
|
6969
6968
|
airPlayButtonEnabled: !1
|
|
6970
|
-
},
|
|
6971
|
-
class
|
|
6969
|
+
}, yo = (i) => !Ui(i);
|
|
6970
|
+
class Ro {
|
|
6972
6971
|
constructor(A, e) {
|
|
6973
6972
|
/**
|
|
6974
6973
|
* The Vindral instance
|
|
@@ -6986,8 +6985,8 @@ class ko {
|
|
|
6986
6985
|
t(this, "state");
|
|
6987
6986
|
t(this, "playerElement", document.createElement("div"));
|
|
6988
6987
|
t(this, "bufferingOverlay", new wi());
|
|
6989
|
-
t(this, "playOverlay", new
|
|
6990
|
-
t(this, "castOverlay", new
|
|
6988
|
+
t(this, "playOverlay", new lo());
|
|
6989
|
+
t(this, "castOverlay", new Xn());
|
|
6991
6990
|
t(this, "channelSelectionList");
|
|
6992
6991
|
t(this, "bar");
|
|
6993
6992
|
t(this, "stateInterval");
|
|
@@ -7098,22 +7097,22 @@ class ko {
|
|
|
7098
7097
|
});
|
|
7099
7098
|
t(this, "bumpInteractTime", () => void (this.state.lastInteractionTime = Date.now()));
|
|
7100
7099
|
var B, C, a, Q, r, c;
|
|
7101
|
-
const s = h(h({},
|
|
7102
|
-
this.options = s, this.playerElement.className =
|
|
7100
|
+
const s = h(h({}, po), e);
|
|
7101
|
+
this.options = s, this.playerElement.className = fo, yo(A) ? this.core = A : this.core = new St(A);
|
|
7103
7102
|
const g = !MA.isFullscreenApiSupported(this.playerElement) && MA.isFullscreenApiSupported(this.core.mediaElement) ? this.core.mediaElement : this.playerElement;
|
|
7104
7103
|
this.state = {
|
|
7105
7104
|
isBuffering: !1,
|
|
7106
7105
|
fullscreen: new MA(g),
|
|
7107
7106
|
lastInteractionTime: 0
|
|
7108
|
-
}, this.needsThumbnails() && (this.thumbnailModule = new
|
|
7107
|
+
}, this.needsThumbnails() && (this.thumbnailModule = new uo({
|
|
7109
7108
|
vindral: this.core,
|
|
7110
7109
|
refreshEveryMs: e == null ? void 0 : e.thumbnailUpdateInterval
|
|
7111
|
-
}), this.thumbnailModule.start()), (C = (B = this.options.channelSelectionOptions) == null ? void 0 : B.list) != null && C.enabled && (this.channelSelectionList = new
|
|
7110
|
+
}), this.thumbnailModule.start()), (C = (B = this.options.channelSelectionOptions) == null ? void 0 : B.list) != null && C.enabled && (this.channelSelectionList = new Bo({
|
|
7112
7111
|
vindral: this.core,
|
|
7113
7112
|
thumbnailModule: this.thumbnailModule
|
|
7114
7113
|
}));
|
|
7115
7114
|
const I = (e == null ? void 0 : e.channelSelectionEnabled) || ((Q = (a = e == null ? void 0 : e.channelSelectionOptions) == null ? void 0 : a.barButton) == null ? void 0 : Q.enabled), n = (c = (r = e == null ? void 0 : e.channelSelectionOptions) == null ? void 0 : r.barButton) == null ? void 0 : c.thumbnails;
|
|
7116
|
-
this.bar = new
|
|
7115
|
+
this.bar = new Wn(J(h({
|
|
7117
7116
|
vindral: this.core,
|
|
7118
7117
|
thumbnailModule: this.thumbnailModule
|
|
7119
7118
|
}, s), {
|
|
@@ -7126,7 +7125,7 @@ class ko {
|
|
|
7126
7125
|
onOneToOneClicked: () => this.toggleOneToOne(),
|
|
7127
7126
|
onPipClicked: () => void this.togglePip(),
|
|
7128
7127
|
onAirPlayClicked: () => this.showAirPlayPicker()
|
|
7129
|
-
})), this.core.media === "audio" && (this.playerElement.classList.add(
|
|
7128
|
+
})), this.core.media === "audio" && (this.playerElement.classList.add(Do), this.options.controlsEnabled && this.bar.show());
|
|
7130
7129
|
const o = this.core.getCastOptions();
|
|
7131
7130
|
this.castSender = new as({
|
|
7132
7131
|
background: this.options.castBackground,
|
|
@@ -7182,7 +7181,7 @@ export {
|
|
|
7182
7181
|
us as INACTIVITY_CODE,
|
|
7183
7182
|
BA as Level,
|
|
7184
7183
|
ls as NO_INCOMING_DATA,
|
|
7185
|
-
|
|
7184
|
+
Ro as Player,
|
|
7186
7185
|
St as Vindral,
|
|
7187
7186
|
F as VindralError
|
|
7188
7187
|
};
|