@vindral/web-sdk 4.8.2-7-g32fc5acc → 4.8.2-9-gec246501
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/{wqfvKsPC.js → BeUVgVO0.js} +816 -820
- package/{B7og9eeP.js → C1ebXKEm.js} +32 -32
- package/CG3eQNjj.js +196 -0
- package/core.d.ts +8 -0
- package/core.js +1 -1
- package/legacy.d.ts +8 -0
- package/legacy.es.js +164 -164
- package/legacy.umd.js +106 -106
- package/package.json +1 -1
- package/player.d.ts +8 -0
- package/player.js +2 -2
- package/react.d.ts +8 -0
- package/vindral-player-component.js +2 -2
- package/gwIcUlXg.js +0 -196
|
@@ -737,7 +737,7 @@ var qt, Jt, Yt = class {
|
|
|
737
737
|
}), this.worker = t, this.workerUrl = n, this.onFailure = i, this.worker.addEventListener("message", this.onMessage), this.worker.addEventListener("error", this.onFailure), this.messageHandler = r;
|
|
738
738
|
}
|
|
739
739
|
};
|
|
740
|
-
qt = Yt, e(Yt, "source", "\n const timeouts = new Map();\n const intervals = new Map();\n\n const clearStoredHandle = (store, id, clearFn) => {\n const handle = store.get(id);\n if (handle !== undefined) {\n clearFn(handle);\n store.delete(id);\n }\n };\n\n self.onmessage = (event) => {\n const message = event.data;\n switch (message.type) {\n case \"set-timeout\":\n clearStoredHandle(timeouts, message.id, clearTimeout);\n timeouts.set(\n message.id,\n setTimeout(() => {\n timeouts.delete(message.id);\n self.postMessage({ type: \"timeout\", id: message.id });\n }, message.delay)
|
|
740
|
+
qt = Yt, e(Yt, "source", "\n const timeouts = new Map();\n const intervals = new Map();\n\n const clearStoredHandle = (store, id, clearFn) => {\n const handle = store.get(id);\n if (handle !== undefined) {\n clearFn(handle);\n store.delete(id);\n }\n };\n\n self.onmessage = (event) => {\n const message = event.data;\n switch (message.type) {\n case \"set-timeout\":\n clearStoredHandle(timeouts, message.id, clearTimeout);\n timeouts.set(\n message.id,\n setTimeout(() => {\n timeouts.delete(message.id);\n self.postMessage({ type: \"timeout\", id: message.id });\n }, message.delay)\n );\n break;\n case \"clear-timeout\":\n clearStoredHandle(timeouts, message.id, clearTimeout);\n break;\n case \"set-interval\":\n clearStoredHandle(intervals, message.id, clearInterval);\n intervals.set(\n message.id,\n setInterval(() => {\n self.postMessage({ type: \"interval\", id: message.id });\n }, message.delay)\n );\n break;\n case \"clear-interval\":\n clearStoredHandle(intervals, message.id, clearInterval);\n break;\n case \"unload\":\n timeouts.forEach((handle) => clearTimeout(handle));\n intervals.forEach((handle) => clearInterval(handle));\n timeouts.clear();\n intervals.clear();\n self.close();\n break;\n }\n };\n "), e(Yt, "create", (e, t) => {
|
|
741
741
|
if (typeof Worker > "u" || typeof Blob > "u" || typeof URL > "u" || typeof URL.createObjectURL != "function") return;
|
|
742
742
|
let n;
|
|
743
743
|
try {
|
|
@@ -8192,7 +8192,7 @@ var dv = class {
|
|
|
8192
8192
|
});
|
|
8193
8193
|
let r = yield N_.start(o(fv, n), e), i = o(pv, n).wallclock() - t, a = o(gv, n).current(), s = a.timestampWallclockOffset(), c = yield r.waitForWallclockTime(i);
|
|
8194
8194
|
o(bv, n).update(r), yield o(gv, n).current().close();
|
|
8195
|
-
let l = c.
|
|
8195
|
+
let l = [...c].reverse().find((e) => e.wallclock <= i), u = l != null && l.mediaPts ? l.mediaPts - a.timestampOffsetMs() : void 0, d = r.timestampWallclockOffset() - s + a.timestampOffsetMs();
|
|
8196
8196
|
r.setTimestampOffsetMs(d);
|
|
8197
8197
|
let f = (l == null ? void 0 : l.groupId) !== void 0 && !Number.isNaN(l.groupId) ? D(l.groupId) : void 0;
|
|
8198
8198
|
if (u) {
|
|
@@ -8390,7 +8390,7 @@ Av = Fv, e(Fv, "create", (e, t, n) => new Av(e, n, t));
|
|
|
8390
8390
|
var Iv = (e, t) => {
|
|
8391
8391
|
var n, r;
|
|
8392
8392
|
let i = new URL("/subscribe", e);
|
|
8393
|
-
return i.searchParams.append("channelId", t.channelId), i.searchParams.append("sessionId", t.sessionId), i.searchParams.append("clientId", t.clientId), (n = t.audio) != null && n.codec && (i.searchParams.append("audio.bitRate", Math.round(t.audio.bitRate).toString()), i.searchParams.append("audio.codec", t.audio.codec), t.audio.language && i.searchParams.append("audio.language", t.audio.language)), (r = t.video) != null && r.codec && (i.searchParams.append("video.width", t.video.width.toString()), i.searchParams.append("video.height", t.video.height.toString()), i.searchParams.append("video.bitRate", Math.round(t.video.bitRate).toString()), i.searchParams.append("video.codec", t.video.codec)), t.burstMs && i.searchParams.append("burstMs", t.burstMs.toString()), t.channelGroupId && i.searchParams.append("channelGroupId", t.channelGroupId), t.authToken && (i.searchParams.append("auth.token", t.authToken), i.searchParams.append("auth.type", "jwt")), i.toString();
|
|
8393
|
+
return i.searchParams.append("channelId", t.channelId), i.searchParams.append("sessionId", t.sessionId), i.searchParams.append("clientId", t.clientId), (n = t.audio) != null && n.codec && (i.searchParams.append("audio.bitRate", Math.round(t.audio.bitRate).toString()), i.searchParams.append("audio.codec", t.audio.codec), t.audio.language && i.searchParams.append("audio.language", t.audio.language)), (r = t.video) != null && r.codec && (i.searchParams.append("video.width", t.video.width.toString()), i.searchParams.append("video.height", t.video.height.toString()), i.searchParams.append("video.bitRate", Math.round(t.video.bitRate).toString()), i.searchParams.append("video.codec", t.video.codec)), t.burstMs !== void 0 && i.searchParams.append("burstMs", t.burstMs.toString()), t.channelGroupId && i.searchParams.append("channelGroupId", t.channelGroupId), t.authToken && (i.searchParams.append("auth.token", t.authToken), i.searchParams.append("auth.type", "jwt")), i.toString();
|
|
8394
8394
|
}, Lv = (e) => {
|
|
8395
8395
|
try {
|
|
8396
8396
|
return e ? new URL(e).origin : void 0;
|
|
@@ -9768,7 +9768,7 @@ var ux = (e, t) => `${e}\u0000${t == null ? "" : t}`, dx = (e, t, n, r) => e ===
|
|
|
9768
9768
|
break;
|
|
9769
9769
|
}
|
|
9770
9770
|
case "video": {
|
|
9771
|
-
let { VideoDecoderWorkerContext: t } = yield import("./
|
|
9771
|
+
let { VideoDecoderWorkerContext: t } = yield import("./CG3eQNjj.js"), a = yield t.create(r.createContext("VideoDecoderWorker"), i, c, l, u, d, () => o.currentTime, f, p);
|
|
9772
9772
|
h = a.isWebCodecs, _ = a.usingOffscreenCanvas, s.set(e.type, {
|
|
9773
9773
|
buffer: [],
|
|
9774
9774
|
decoderContext: a,
|
|
@@ -12428,7 +12428,7 @@ var QS = class {
|
|
|
12428
12428
|
return this.inFlight.set(e, o), o;
|
|
12429
12429
|
}), this.logger = t;
|
|
12430
12430
|
}
|
|
12431
|
-
}, gC = 1e4, _C = 300, vC = 3e3, yC = 1e4, bC = 1280 * 720,
|
|
12431
|
+
}, gC = 1e4, _C = 300, vC = 3e3, yC = 1e4, bC = 250, xC = 1280 * 720, SC = /* @__PURE__ */ new WeakMap(), CC = /* @__PURE__ */ new WeakMap(), wC = /* @__PURE__ */ new WeakMap(), TC = class t extends te {
|
|
12432
12432
|
handleListenerError(e, t) {
|
|
12433
12433
|
let n = Object.assign(/* @__PURE__ */ Error(`Listener for "${String(t)}" threw`), { cause: e });
|
|
12434
12434
|
setTimeout(() => {
|
|
@@ -12437,7 +12437,7 @@ var QS = class {
|
|
|
12437
12437
|
}
|
|
12438
12438
|
constructor(n) {
|
|
12439
12439
|
var a, c, u;
|
|
12440
|
-
super(), a = this, e(this, "pictureInPicture", void 0), e(this, "drm", void 0), e(this, "browser", We()), e(this, "options", void 0), e(this, "element", void 0), e(this, "playbackSource", void 0), e(this, "emitter", new te()), e(this, "logger", void 0), e(this, "modules", void 0), e(this, "clientIp", void 0), e(this, "sessionId", void 0), e(this, "clientId", sn()), e(this, "_channels", []), e(this, "createdAt", performance.now()), e(this, "offscreenCanvasElement", void 0), e(this, "webCodecsRenditionSupport", void 0), e(this, "hasCalledConnect", !1), e(this, "upgradeHeld", !1), e(this, "hasRequestedAudioSession", !1), e(this, "isUserPaused", !1), e(this, "isMediaElementPaused", !1), e(this, "latestEmittedLanguages", []), e(this, "wakeLock", void 0), e(this, "pool", new re(t.MAX_POOL_SIZE)), e(this, "userAgentInformation", new on()), e(this, "encryptedMediaExtensions", void 0), r(this,
|
|
12440
|
+
super(), a = this, e(this, "pictureInPicture", void 0), e(this, "drm", void 0), e(this, "browser", We()), e(this, "options", void 0), e(this, "element", void 0), e(this, "playbackSource", void 0), e(this, "emitter", new te()), e(this, "logger", void 0), e(this, "modules", void 0), e(this, "clientIp", void 0), e(this, "sessionId", void 0), e(this, "clientId", sn()), e(this, "_channels", []), e(this, "createdAt", performance.now()), e(this, "offscreenCanvasElement", void 0), e(this, "webCodecsRenditionSupport", void 0), e(this, "hasCalledConnect", !1), e(this, "shortBurstRejoin", !1), e(this, "upgradeHeld", !1), e(this, "hasRequestedAudioSession", !1), e(this, "isUserPaused", !1), e(this, "isMediaElementPaused", !1), e(this, "latestEmittedLanguages", []), e(this, "wakeLock", void 0), e(this, "pool", new re(t.MAX_POOL_SIZE)), e(this, "userAgentInformation", new on()), e(this, "encryptedMediaExtensions", void 0), r(this, SC, 0), r(this, CC, []), e(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map()), e(this, "unbackedSamplesWarned", new fx()), e(this, "unextractableSamplesWarned", new fx()), e(this, "sizes", /* @__PURE__ */ new Map()), e(this, "isSuspended", !0), e(this, "inactivityDisconnectInterval", void 0), e(this, "visiblePauseTimeout", void 0), e(this, "offscreenSubtitleInterval", void 0), r(this, wC, void 0), e(this, "attach", (e) => {
|
|
12441
12441
|
var t;
|
|
12442
12442
|
(t = this.wakeLock) == null || t.attach(e), e.appendChild(this.element);
|
|
12443
12443
|
}), e(this, "setElement", (e) => {
|
|
@@ -12502,11 +12502,11 @@ var QS = class {
|
|
|
12502
12502
|
}), a.modules.adaptivity.updateConfig({ cooldownTime: Math.max(a.options.get("minBufferTime", a.channelId), 2e3) }), a.targetBufferTime = a.options.get("minBufferTime", a.channelId)), a.applyBurstEnabled(a.channelId), a.emit("is live", r.isLive), !r.isLive) throw Xn();
|
|
12503
12503
|
let l = a.modules.connection.estimatedBandwidth, u = a.modules.subscription.getCurrentSubscription().channelId !== a.channelId;
|
|
12504
12504
|
a.patchSubscription(r, l), yield a.initializeDecodingModule(), a.resetModules(), a.emit("rendition levels", a.modules.renditions.getRenditionLevels()), a.emit("channels", a.channels), a.emitLanguagesIfChanged(), u && a.emit("channel switch", { channelId: a.channelId }), a.sampleProcessingSesssions.clear();
|
|
12505
|
-
let d = a.
|
|
12505
|
+
let d = a.joinBurstMs(l);
|
|
12506
12506
|
return {
|
|
12507
12507
|
video: a.targetSubscription.video,
|
|
12508
12508
|
audio: a.targetSubscription.audio,
|
|
12509
|
-
burstMs: d
|
|
12509
|
+
burstMs: d,
|
|
12510
12510
|
sessionId: a.sessionId,
|
|
12511
12511
|
clientId: a.clientId,
|
|
12512
12512
|
channelId: a.channelId,
|
|
@@ -12529,28 +12529,28 @@ var QS = class {
|
|
|
12529
12529
|
video: S(S({}, t.video), n.video),
|
|
12530
12530
|
audio: S(S({}, t.audio), n.audio)
|
|
12531
12531
|
})), n.audio && this.modules.subscription.setAudioBitRate(n.audio.bitRate), !0);
|
|
12532
|
-
}), e(this, "onPingTimeout", () => {
|
|
12533
|
-
this.lowerTargetForRejoin() && this.emitter.emit("adapted level");
|
|
12532
|
+
}), e(this, "joinBurstMs", (e) => this.options.get("burstEnabled", this.channelId) ? !this.shortBurstRejoin && this.burstFits(e) ? this.targetBufferTime : Math.min(bC, this.targetBufferTime) : 0), e(this, "onPingTimeout", () => {
|
|
12533
|
+
this.shortBurstRejoin = !0, this.lowerTargetForRejoin() && this.emitter.emit("adapted level");
|
|
12534
12534
|
}), e(this, "emitLanguagesIfChanged", () => {
|
|
12535
12535
|
let e = this.modules.renditions.getLanguages(), t = this.latestEmittedLanguages;
|
|
12536
12536
|
e.length === t.length && e.every((e) => t.includes(e)) || (this.logger.debug("Emitting new languages", { currentLanguages: e }), this.latestEmittedLanguages = e, this.emit("languages", this.latestEmittedLanguages));
|
|
12537
12537
|
}), e(this, "updateTextTracks", (e) => {
|
|
12538
12538
|
let t = e.filter((e) => e.codec === "webvtt");
|
|
12539
12539
|
t.forEach((e) => {
|
|
12540
|
-
if (!o(
|
|
12540
|
+
if (!o(CC, this).find((t) => t.language === e.language)) {
|
|
12541
12541
|
if (this.modules.canvasModule) {
|
|
12542
12542
|
let t = this.modules.canvasModule.textTracks.addTextTrack(e.kind, e.label || e.language || "", e.language || "");
|
|
12543
|
-
o(
|
|
12543
|
+
o(CC, this).push(t);
|
|
12544
12544
|
} else if (this.mediaElement instanceof HTMLVideoElement) {
|
|
12545
12545
|
let t = this.mediaElement.addTextTrack(e.kind, e.label || e.language, e.language);
|
|
12546
|
-
o(
|
|
12546
|
+
o(CC, this).push(t);
|
|
12547
12547
|
}
|
|
12548
12548
|
}
|
|
12549
12549
|
});
|
|
12550
|
-
for (let e of o(
|
|
12550
|
+
for (let e of o(CC, this)) t.find((t) => t.language === e.language) ? e.mode === "disabled" && (e.mode = "hidden") : e.mode = "disabled";
|
|
12551
12551
|
this.emit("text tracks", this.textTracks);
|
|
12552
12552
|
}), e(this, "cleanupTextTracks", (e = this.currentTime - 2e4) => {
|
|
12553
|
-
o(
|
|
12553
|
+
o(CC, this).forEach((t) => {
|
|
12554
12554
|
if (t.cues) for (let n of Array.from(t.cues)) n.endTime * 1e3 < e - 2e3 && t.removeCue(n);
|
|
12555
12555
|
});
|
|
12556
12556
|
}), e(this, "filterRenditions", function() {
|
|
@@ -12618,7 +12618,7 @@ var QS = class {
|
|
|
12618
12618
|
}), e(this, "burstFits", (e) => {
|
|
12619
12619
|
var t, n;
|
|
12620
12620
|
let { video: r, audio: i, channelId: a } = this.modules.subscription.getTargetSubscription(), o = cc(((t = this.modules.renditions.getVideoRenditions(a)) == null ? [] : t).filter((e) => e.codec === r.codec).map((e) => e.bitRate), r.bitRate), s = cc(((n = this.modules.renditions.getAudioRenditions(a)) == null ? [] : n).filter((e) => e.codec === i.codec).filter((e) => !i.language || e.language === i.language).map((e) => e.bitRate), i.bitRate), c = lc(e, o + s);
|
|
12621
|
-
return c || this.logger.info("
|
|
12621
|
+
return c || this.logger.info("Shortening the join burst: the starting rendition needs more than half the bandwidth", {
|
|
12622
12622
|
estimatedBandwidth: e,
|
|
12623
12623
|
videoBitRate: o,
|
|
12624
12624
|
audioBitRate: s
|
|
@@ -12732,7 +12732,7 @@ var QS = class {
|
|
|
12732
12732
|
(e = a.modules.decoder) == null || e.unload(), a.modules.decoder = p, a.isHiddenWithBackgroundPlayback() && a.modules.decoder.enableBackgroundTimers(), a.modules.decoder.setVideoRenderingEnabled(a.isVideoOnScreen()), a.modules.decoder.load(), a.setupOffscreenSubtitleRouting();
|
|
12733
12733
|
})), e(this, "capturesCanvasOnWebKit", (e) => !!e && this.browser.platform.isWebKit && this.modules.canvasModule instanceof $x), e(this, "connectWebKitVideoOutput", (e, t) => {
|
|
12734
12734
|
let n = () => {
|
|
12735
|
-
t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(
|
|
12735
|
+
t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(xC);
|
|
12736
12736
|
};
|
|
12737
12737
|
e.onVideoTrackLost((e) => {
|
|
12738
12738
|
this.logger.warn("Worker video track lost, falling back to canvas capture", { error: e }), n();
|
|
@@ -12825,7 +12825,7 @@ var QS = class {
|
|
|
12825
12825
|
let e = this.modules.canvasModule instanceof $x ? !0 : void 0;
|
|
12826
12826
|
return S({
|
|
12827
12827
|
uptime: this.uptime,
|
|
12828
|
-
version: "4.8.2-
|
|
12828
|
+
version: "4.8.2-9-gec246501",
|
|
12829
12829
|
clientId: this.clientId,
|
|
12830
12830
|
sessionId: this.sessionId,
|
|
12831
12831
|
channelId: this.channelId,
|
|
@@ -13039,7 +13039,7 @@ var QS = class {
|
|
|
13039
13039
|
}), this.emitter.on("buffer state event", this.onBufferEvent), this.emitter.on("playback state", (e) => this.emit("playback state", e)), this.emitter.on("rendition level changed", ({ to: e }) => {
|
|
13040
13040
|
e && this.emit("rendition level", e);
|
|
13041
13041
|
}), this.emitter.on("connection state", (e) => {
|
|
13042
|
-
this.emit("connection state", e);
|
|
13042
|
+
e === "connected" && (this.shortBurstRejoin = !1), this.emit("connection state", e);
|
|
13043
13043
|
}), this.emitter.on("recovered from media error", () => {
|
|
13044
13044
|
this.modules.adaptivity.reset(this.targetBufferTime * 2), this.modules.qualityOfService.restartStallClock(), !this.isUserPaused && this.visiblePauseTimeout === void 0 && this.playbackSource.play();
|
|
13045
13045
|
}), this.emitter.once("connect info", (e) => {
|
|
@@ -13070,7 +13070,7 @@ var QS = class {
|
|
|
13070
13070
|
var d;
|
|
13071
13071
|
let e = this.modules.connection.lastConnectionTime;
|
|
13072
13072
|
if (e !== void 0 && performance.now() - e >= this.modules.qualityOfService.fatalQosGraceTime() && this.modules.connection.getState() === "connected" && (r === 0 || this.modules.qualityOfService.timeSpentBufferingLast(6e3) > 5e3)) {
|
|
13073
|
-
this.modules.qualityOfService.incrementFatalQosCount(), this.logger.info("Reconnecting due to poor qos"), this.lowerTargetForRejoin(), this.modules.connection.reconnect("Fatal QOS"), this.emitter.emit("adapted level");
|
|
13073
|
+
this.modules.qualityOfService.incrementFatalQosCount(), this.logger.info("Reconnecting due to poor qos"), this.lowerTargetForRejoin(), this.shortBurstRejoin = !0, this.modules.connection.reconnect("Fatal QOS"), this.emitter.emit("adapted level");
|
|
13074
13074
|
return;
|
|
13075
13075
|
}
|
|
13076
13076
|
if (this.modules.subscription.getTargetSubscription().channelId !== ((d = this.modules.subscription.getCurrentSubscription()) == null ? void 0 : d.channelId)) return;
|
|
@@ -13090,8 +13090,8 @@ var QS = class {
|
|
|
13090
13090
|
audio: S(S({}, this.targetSubscription.audio), f == null ? void 0 : f.audio)
|
|
13091
13091
|
})), this.emitter.emit("adapted level");
|
|
13092
13092
|
}), this.emitter.on("ping timeout", this.onPingTimeout), this.emitter.on("text track data", (e) => {
|
|
13093
|
-
let t = o(
|
|
13094
|
-
if (i(
|
|
13093
|
+
let t = o(CC, this).find((t) => t.language === e.language), n = this.modules.sync.getTimeshiftOffset() / 1e3, r = n - o(SC, this);
|
|
13094
|
+
if (i(SC, this, n), t) {
|
|
13095
13095
|
if (t.cues) for (let e of t.cues) e.startTime -= r, e.endTime -= r;
|
|
13096
13096
|
for (let r of e.cues) {
|
|
13097
13097
|
let e = new VTTCue(r.startTime - n, r.endTime - n, r.text);
|
|
@@ -13107,13 +13107,13 @@ var QS = class {
|
|
|
13107
13107
|
this.clientIp = t.ip;
|
|
13108
13108
|
break;
|
|
13109
13109
|
case "renditions":
|
|
13110
|
-
this.updateTextTracks(t.renditions), i(
|
|
13110
|
+
this.updateTextTracks(t.renditions), i(wC, this, this.filterRenditions(t.renditions, n.channelId).then((e) => {
|
|
13111
13111
|
r === this.sessionId && (this.emitter.emit("renditions", {
|
|
13112
13112
|
renditions: e,
|
|
13113
13113
|
channelId: n.channelId
|
|
13114
13114
|
}), this.emit("rendition levels", this.modules.renditions.getRenditionLevels()), this.emitLanguagesIfChanged());
|
|
13115
13115
|
}).finally(() => {
|
|
13116
|
-
i(
|
|
13116
|
+
i(wC, this, void 0);
|
|
13117
13117
|
}));
|
|
13118
13118
|
break;
|
|
13119
13119
|
case "subscription changed":
|
|
@@ -13250,7 +13250,7 @@ var QS = class {
|
|
|
13250
13250
|
let ve = function() {
|
|
13251
13251
|
var e = s(function* (e) {
|
|
13252
13252
|
let t = e.channelId;
|
|
13253
|
-
o(
|
|
13253
|
+
o(wC, a) && (yield o(wC, a));
|
|
13254
13254
|
let n = a.modules.renditions.getRendition(e.renditionId, t);
|
|
13255
13255
|
if (!zs(e.flags)) {
|
|
13256
13256
|
if (Bs(e.flags)) {
|
|
@@ -13264,8 +13264,8 @@ var QS = class {
|
|
|
13264
13264
|
} catch (e) {
|
|
13265
13265
|
a.logger.warn("failed to parse WebVTT segment, dropping it", e);
|
|
13266
13266
|
}
|
|
13267
|
-
let s = n / 1e3, c = o(
|
|
13268
|
-
if (i(
|
|
13267
|
+
let s = n / 1e3, c = o(CC, a).find((t) => t.language === e.language), l = s - o(SC, a);
|
|
13268
|
+
if (i(SC, a, s), c) {
|
|
13269
13269
|
if (c.cues) for (let e of c.cues) e.startTime -= l, e.endTime -= l;
|
|
13270
13270
|
for (let e of r) {
|
|
13271
13271
|
let t = new VTTCue(e.startTime - s, e.endTime - s, e.text);
|
|
@@ -13411,7 +13411,7 @@ var QS = class {
|
|
|
13411
13411
|
this.modules.subscription.setLanguage(e), this.modules.qualityOfService.restartStallClock(), this.alignSizeAndBitRate(this.targetSubscription);
|
|
13412
13412
|
}
|
|
13413
13413
|
set textTrack(e) {
|
|
13414
|
-
e !== this.textTrack && (o(
|
|
13414
|
+
e !== this.textTrack && (o(CC, this).forEach((t) => {
|
|
13415
13415
|
if (t.label === e) t.mode = "showing";
|
|
13416
13416
|
else {
|
|
13417
13417
|
if (t.mode === "showing" && t.cues) for (let e of [...t.cues]) t.removeCue(e);
|
|
@@ -13420,11 +13420,11 @@ var QS = class {
|
|
|
13420
13420
|
}), this.emitter.emit("text track", e));
|
|
13421
13421
|
}
|
|
13422
13422
|
get textTracks() {
|
|
13423
|
-
return o(
|
|
13423
|
+
return o(CC, this).filter((e) => e.mode !== "disabled").map((e) => e.label);
|
|
13424
13424
|
}
|
|
13425
13425
|
get textTrack() {
|
|
13426
13426
|
var e;
|
|
13427
|
-
return (e = o(
|
|
13427
|
+
return (e = o(CC, this).find((e) => e.mode === "showing")) == null ? void 0 : e.label;
|
|
13428
13428
|
}
|
|
13429
13429
|
get channelId() {
|
|
13430
13430
|
var e, t;
|
|
@@ -13602,6 +13602,6 @@ var QS = class {
|
|
|
13602
13602
|
return this.hasCalledConnect && this.isBackgroundPlayEnabled(e) && !this.isUserPaused;
|
|
13603
13603
|
}
|
|
13604
13604
|
};
|
|
13605
|
-
e(
|
|
13605
|
+
e(TC, "MAX_POOL_SIZE", 10), e(TC, "REMOVE_CUE_THRESHOLD", 1e3 * 10), e(TC, "BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT", 1e3 * 15), e(TC, "VISIBLE_PAUSE_DISCONNECT_DELAY", 1e3);
|
|
13606
13606
|
//#endregion
|
|
13607
|
-
export { lt as C, ft as D, ct as E, Re as O, dt as S, it as T, et as _, bn as a, $e as b, gn as c, Sn as d, j as f, Ze as g, tt as h, vn as i, Le as k, Dn as l, Qe as m, Nn as n, xn as o, Kt as p, yn as r, _n as s,
|
|
13607
|
+
export { lt as C, ft as D, ct as E, Re as O, dt as S, it as T, et as _, bn as a, $e as b, gn as c, Sn as d, j as f, Ze as g, tt as h, vn as i, Le as k, Dn as l, Qe as m, Nn as n, xn as o, Kt as p, yn as r, _n as s, TC as t, Cn as u, ot as v, st as w, rt as x, Xe as y };
|