@moq/watch 0.2.6 → 0.2.8
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/audio/buffer.d.ts +33 -0
- package/audio/buffer.d.ts.map +1 -0
- package/audio/decoder.d.ts.map +1 -1
- package/audio/render.d.ts +20 -11
- package/audio/render.d.ts.map +1 -1
- package/audio/shared-ring-buffer.d.ts +55 -0
- package/audio/shared-ring-buffer.d.ts.map +1 -0
- package/audio/shared-ring-buffer.test.d.ts +2 -0
- package/audio/shared-ring-buffer.test.d.ts.map +1 -0
- package/audio/source.d.ts.map +1 -1
- package/backend.d.ts +2 -1
- package/backend.d.ts.map +1 -1
- package/broadcast-BMWX8K5V.js +4481 -0
- package/broadcast-BMWX8K5V.js.map +1 -0
- package/element.js +1 -1
- package/index.js +2 -2
- package/package.json +4 -4
- package/support/index.d.ts.map +1 -1
- package/support/index.js +11 -9
- package/support/index.js.map +1 -1
- package/sync.d.ts +1 -0
- package/sync.d.ts.map +1 -1
- package/ui/context.d.ts.map +1 -1
- package/ui/index.js +33 -33
- package/ui/index.js.map +1 -1
- package/broadcast-BdsV4u8m.js +0 -6925
- package/broadcast-BdsV4u8m.js.map +0 -1
package/element.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as o from "@moq/lite";
|
|
2
2
|
import { Signal as c, Effect as l } from "@moq/signals";
|
|
3
|
-
import { B as d, h as u } from "./broadcast-
|
|
3
|
+
import { B as d, h as u } from "./broadcast-BMWX8K5V.js";
|
|
4
4
|
const h = ["url", "name", "paused", "volume", "muted", "reload", "latency", "jitter"], b = new FinalizationRegistry((r) => r.close());
|
|
5
5
|
class m extends HTMLElement {
|
|
6
6
|
static observedAttributes = h;
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as E from "@moq/lite";
|
|
2
2
|
import { Signal as i, Effect as h } from "@moq/signals";
|
|
3
3
|
import * as I from "@moq/signals";
|
|
4
|
-
import { o as m, a as c, b as d, s as w, D as y, M as S, R as _, S as f, c as M, E as k, d as P, e as O, P as g, f as j, g as x } from "./broadcast-
|
|
5
|
-
import { B as G, m as H, h as K, i as Q, t as U } from "./broadcast-
|
|
4
|
+
import { o as m, a as c, b as d, s as w, D as y, M as S, R as _, S as f, c as M, E as k, d as P, e as O, P as g, f as j, g as x } from "./broadcast-BMWX8K5V.js";
|
|
5
|
+
import { B as G, m as H, h as K, i as Q, t as U } from "./broadcast-BMWX8K5V.js";
|
|
6
6
|
const T = m({
|
|
7
7
|
name: c(w()),
|
|
8
8
|
// name
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moq/watch",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.8",
|
|
5
5
|
"description": "Watch Media over QUIC broadcasts",
|
|
6
6
|
"license": "(MIT OR Apache-2.0)",
|
|
7
7
|
"repository": "github:moq-dev/moq",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"./support/element.js"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@moq/hang": "^0.2.
|
|
37
|
-
"@moq/lite": "^0.2.
|
|
38
|
-
"@moq/signals": "^0.1.
|
|
36
|
+
"@moq/hang": "^0.2.3",
|
|
37
|
+
"@moq/lite": "^0.2.1",
|
|
38
|
+
"@moq/signals": "^0.1.6",
|
|
39
39
|
"@moq/ui-core": "^0.1.0"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/support/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/support/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAElD,MAAM,MAAM,KAAK,GAAG;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EA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C;IACtB,KAAK,EAAE;QACN,QAAQ,EAAE,KAAK,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KAChB,CAAC;IACF,KAAK,EAAE;QACN,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;QAC5B,MAAM,EAAE,OAAO,CAAC;KAChB,CAAC;CACF,CAAC;AA8CF,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CA0BjD"}
|
package/support/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const d = navigator.userAgent.toLowerCase().includes("firefox"),
|
|
1
|
+
const d = navigator.userAgent.toLowerCase().includes("firefox"), o = {
|
|
2
2
|
aac: "mp4a.40.2",
|
|
3
3
|
opus: "opus",
|
|
4
4
|
av1: "av01.0.08M.08",
|
|
@@ -7,29 +7,31 @@ const d = navigator.userAgent.toLowerCase().includes("firefox"), r = {
|
|
|
7
7
|
vp9: "vp09.00.10.08",
|
|
8
8
|
vp8: "vp8"
|
|
9
9
|
};
|
|
10
|
-
async function t(
|
|
10
|
+
async function t(a) {
|
|
11
11
|
return globalThis.AudioDecoder ? (await AudioDecoder.isConfigSupported({
|
|
12
|
-
codec:
|
|
12
|
+
codec: o[a],
|
|
13
13
|
numberOfChannels: 2,
|
|
14
14
|
sampleRate: 48e3
|
|
15
15
|
})).supported === !0 : !1;
|
|
16
16
|
}
|
|
17
|
-
async function e(
|
|
18
|
-
const
|
|
19
|
-
codec:
|
|
17
|
+
async function e(a) {
|
|
18
|
+
const r = await VideoDecoder.isConfigSupported({
|
|
19
|
+
codec: o[a],
|
|
20
20
|
hardwareAcceleration: "prefer-software"
|
|
21
21
|
}), n = await VideoDecoder.isConfigSupported({
|
|
22
|
-
codec:
|
|
22
|
+
codec: o[a],
|
|
23
23
|
hardwareAcceleration: "prefer-hardware"
|
|
24
24
|
});
|
|
25
25
|
return {
|
|
26
26
|
hardware: d || n.config?.hardwareAcceleration !== "prefer-hardware" ? void 0 : n.supported === !0,
|
|
27
|
-
software:
|
|
27
|
+
software: r.supported === !0
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
async function p() {
|
|
31
31
|
return {
|
|
32
|
-
|
|
32
|
+
// Firefox's WebTransport drops server-initiated bidi streams, so we force the
|
|
33
|
+
// WebSocket fallback. Report "partial" to surface the degraded path in UI.
|
|
34
|
+
webtransport: typeof WebTransport < "u" ? d ? "partial" : "full" : "partial",
|
|
33
35
|
audio: {
|
|
34
36
|
decoding: {
|
|
35
37
|
aac: await t("aac"),
|
package/support/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/support/index.ts"],"sourcesContent":["// https://bugzilla.mozilla.org/show_bug.cgi?id=1967793\nconst isFirefox = navigator.userAgent.toLowerCase().includes(\"firefox\");\n\nexport type Partial = \"full\" | \"partial\" | \"none\";\n\nexport type Codec = {\n\thardware?: boolean; // undefined when we can't detect hardware acceleration\n\tsoftware: boolean;\n};\n\nexport type Audio = {\n\taac: boolean;\n\topus: Partial;\n};\n\nexport type Video = {\n\th264: Codec;\n\th265: Codec;\n\tvp8: Codec;\n\tvp9: Codec;\n\tav1: Codec;\n};\n\nexport type Full = {\n\twebtransport: Partial;\n\taudio: {\n\t\tdecoding: Audio;\n\t\trender: boolean;\n\t};\n\tvideo: {\n\t\tdecoding: Video | undefined;\n\t\trender: boolean;\n\t};\n};\n\n// Pick a codec string for each codec.\n// This is not strictly correct, as browsers may not support every profile or level.\nconst CODECS = {\n\taac: \"mp4a.40.2\",\n\topus: \"opus\",\n\tav1: \"av01.0.08M.08\",\n\th264: \"avc1.640028\",\n\th265: \"hev1.1.6.L93.B0\",\n\tvp9: \"vp09.00.10.08\",\n\tvp8: \"vp8\",\n};\n\nasync function audioDecoderSupported(codec: keyof typeof CODECS): Promise<boolean> {\n\tif (!globalThis.AudioDecoder) return false;\n\n\tconst res = await AudioDecoder.isConfigSupported({\n\t\tcodec: CODECS[codec],\n\t\tnumberOfChannels: 2,\n\t\tsampleRate: 48000,\n\t});\n\n\treturn res.supported === true;\n}\n\nasync function videoDecoderSupported(codec: keyof typeof CODECS): Promise<Codec> {\n\tconst software = await VideoDecoder.isConfigSupported({\n\t\tcodec: CODECS[codec],\n\t\thardwareAcceleration: \"prefer-software\",\n\t});\n\n\tconst hardware = await VideoDecoder.isConfigSupported({\n\t\tcodec: CODECS[codec],\n\t\thardwareAcceleration: \"prefer-hardware\",\n\t});\n\n\t// We can't reliably detect hardware encoding on Firefox: https://github.com/w3c/webcodecs/issues/896\n\tconst unknown = isFirefox || hardware.config?.hardwareAcceleration !== \"prefer-hardware\";\n\n\treturn {\n\t\thardware: unknown ? undefined : hardware.supported === true,\n\t\tsoftware: software.supported === true,\n\t};\n}\n\nexport async function isSupported(): Promise<Full> {\n\treturn {\n\t\twebtransport: typeof WebTransport !== \"undefined\" ? \"full\" : \"partial\",\n\t\taudio: {\n\t\t\tdecoding: {\n\t\t\t\taac: await audioDecoderSupported(\"aac\"),\n\t\t\t\topus: (await audioDecoderSupported(\"opus\")) ? \"full\" : \"partial\",\n\t\t\t},\n\t\t\trender: typeof AudioContext !== \"undefined\" && typeof AudioBufferSourceNode !== \"undefined\",\n\t\t},\n\t\tvideo: {\n\t\t\tdecoding:\n\t\t\t\ttypeof VideoDecoder !== \"undefined\"\n\t\t\t\t\t? {\n\t\t\t\t\t\t\th264: await videoDecoderSupported(\"h264\"),\n\t\t\t\t\t\t\th265: await videoDecoderSupported(\"h265\"),\n\t\t\t\t\t\t\tvp8: await videoDecoderSupported(\"vp8\"),\n\t\t\t\t\t\t\tvp9: await videoDecoderSupported(\"vp9\"),\n\t\t\t\t\t\t\tav1: await videoDecoderSupported(\"av1\"),\n\t\t\t\t\t\t}\n\t\t\t\t\t: undefined,\n\t\t\trender: typeof OffscreenCanvas !== \"undefined\" && typeof CanvasRenderingContext2D !== \"undefined\",\n\t\t},\n\t};\n}\n"],"names":["isFirefox","CODECS","audioDecoderSupported","codec","videoDecoderSupported","software","hardware","isSupported"],"mappings":"AACA,MAAMA,IAAY,UAAU,UAAU,YAAA,EAAc,SAAS,SAAS,GAoChEC,IAAS;AAAA,EACd,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,KAAK;AACN;AAEA,eAAeC,EAAsBC,GAA8C;AAClF,SAAK,WAAW,gBAEJ,MAAM,aAAa,kBAAkB;AAAA,IAChD,OAAOF,EAAOE,CAAK;AAAA,IACnB,kBAAkB;AAAA,IAClB,YAAY;AAAA,EAAA,CACZ,GAEU,cAAc,KARY;AAStC;AAEA,eAAeC,EAAsBD,GAA4C;AAChF,QAAME,IAAW,MAAM,aAAa,kBAAkB;AAAA,IACrD,OAAOJ,EAAOE,CAAK;AAAA,IACnB,sBAAsB;AAAA,EAAA,CACtB,GAEKG,IAAW,MAAM,aAAa,kBAAkB;AAAA,IACrD,OAAOL,EAAOE,CAAK;AAAA,IACnB,sBAAsB;AAAA,EAAA,CACtB;AAKD,SAAO;AAAA,IACN,UAHeH,KAAaM,EAAS,QAAQ,yBAAyB,oBAGlD,SAAYA,EAAS,cAAc;AAAA,IACvD,UAAUD,EAAS,cAAc;AAAA,EAAA;AAEnC;AAEA,eAAsBE,IAA6B;AAClD,SAAO;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/support/index.ts"],"sourcesContent":["// https://bugzilla.mozilla.org/show_bug.cgi?id=1967793\nconst isFirefox = navigator.userAgent.toLowerCase().includes(\"firefox\");\n\nexport type Partial = \"full\" | \"partial\" | \"none\";\n\nexport type Codec = {\n\thardware?: boolean; // undefined when we can't detect hardware acceleration\n\tsoftware: boolean;\n};\n\nexport type Audio = {\n\taac: boolean;\n\topus: Partial;\n};\n\nexport type Video = {\n\th264: Codec;\n\th265: Codec;\n\tvp8: Codec;\n\tvp9: Codec;\n\tav1: Codec;\n};\n\nexport type Full = {\n\twebtransport: Partial;\n\taudio: {\n\t\tdecoding: Audio;\n\t\trender: boolean;\n\t};\n\tvideo: {\n\t\tdecoding: Video | undefined;\n\t\trender: boolean;\n\t};\n};\n\n// Pick a codec string for each codec.\n// This is not strictly correct, as browsers may not support every profile or level.\nconst CODECS = {\n\taac: \"mp4a.40.2\",\n\topus: \"opus\",\n\tav1: \"av01.0.08M.08\",\n\th264: \"avc1.640028\",\n\th265: \"hev1.1.6.L93.B0\",\n\tvp9: \"vp09.00.10.08\",\n\tvp8: \"vp8\",\n};\n\nasync function audioDecoderSupported(codec: keyof typeof CODECS): Promise<boolean> {\n\tif (!globalThis.AudioDecoder) return false;\n\n\tconst res = await AudioDecoder.isConfigSupported({\n\t\tcodec: CODECS[codec],\n\t\tnumberOfChannels: 2,\n\t\tsampleRate: 48000,\n\t});\n\n\treturn res.supported === true;\n}\n\nasync function videoDecoderSupported(codec: keyof typeof CODECS): Promise<Codec> {\n\tconst software = await VideoDecoder.isConfigSupported({\n\t\tcodec: CODECS[codec],\n\t\thardwareAcceleration: \"prefer-software\",\n\t});\n\n\tconst hardware = await VideoDecoder.isConfigSupported({\n\t\tcodec: CODECS[codec],\n\t\thardwareAcceleration: \"prefer-hardware\",\n\t});\n\n\t// We can't reliably detect hardware encoding on Firefox: https://github.com/w3c/webcodecs/issues/896\n\tconst unknown = isFirefox || hardware.config?.hardwareAcceleration !== \"prefer-hardware\";\n\n\treturn {\n\t\thardware: unknown ? undefined : hardware.supported === true,\n\t\tsoftware: software.supported === true,\n\t};\n}\n\nexport async function isSupported(): Promise<Full> {\n\treturn {\n\t\t// Firefox's WebTransport drops server-initiated bidi streams, so we force the\n\t\t// WebSocket fallback. Report \"partial\" to surface the degraded path in UI.\n\t\twebtransport: typeof WebTransport !== \"undefined\" ? (isFirefox ? \"partial\" : \"full\") : \"partial\",\n\t\taudio: {\n\t\t\tdecoding: {\n\t\t\t\taac: await audioDecoderSupported(\"aac\"),\n\t\t\t\topus: (await audioDecoderSupported(\"opus\")) ? \"full\" : \"partial\",\n\t\t\t},\n\t\t\trender: typeof AudioContext !== \"undefined\" && typeof AudioBufferSourceNode !== \"undefined\",\n\t\t},\n\t\tvideo: {\n\t\t\tdecoding:\n\t\t\t\ttypeof VideoDecoder !== \"undefined\"\n\t\t\t\t\t? {\n\t\t\t\t\t\t\th264: await videoDecoderSupported(\"h264\"),\n\t\t\t\t\t\t\th265: await videoDecoderSupported(\"h265\"),\n\t\t\t\t\t\t\tvp8: await videoDecoderSupported(\"vp8\"),\n\t\t\t\t\t\t\tvp9: await videoDecoderSupported(\"vp9\"),\n\t\t\t\t\t\t\tav1: await videoDecoderSupported(\"av1\"),\n\t\t\t\t\t\t}\n\t\t\t\t\t: undefined,\n\t\t\trender: typeof OffscreenCanvas !== \"undefined\" && typeof CanvasRenderingContext2D !== \"undefined\",\n\t\t},\n\t};\n}\n"],"names":["isFirefox","CODECS","audioDecoderSupported","codec","videoDecoderSupported","software","hardware","isSupported"],"mappings":"AACA,MAAMA,IAAY,UAAU,UAAU,YAAA,EAAc,SAAS,SAAS,GAoChEC,IAAS;AAAA,EACd,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,KAAK;AACN;AAEA,eAAeC,EAAsBC,GAA8C;AAClF,SAAK,WAAW,gBAEJ,MAAM,aAAa,kBAAkB;AAAA,IAChD,OAAOF,EAAOE,CAAK;AAAA,IACnB,kBAAkB;AAAA,IAClB,YAAY;AAAA,EAAA,CACZ,GAEU,cAAc,KARY;AAStC;AAEA,eAAeC,EAAsBD,GAA4C;AAChF,QAAME,IAAW,MAAM,aAAa,kBAAkB;AAAA,IACrD,OAAOJ,EAAOE,CAAK;AAAA,IACnB,sBAAsB;AAAA,EAAA,CACtB,GAEKG,IAAW,MAAM,aAAa,kBAAkB;AAAA,IACrD,OAAOL,EAAOE,CAAK;AAAA,IACnB,sBAAsB;AAAA,EAAA,CACtB;AAKD,SAAO;AAAA,IACN,UAHeH,KAAaM,EAA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CAAC,KAAK,EAAE,2BAA2B,eAoIhF"}
|
package/ui/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const Kt = !1, Dt = (t, e) => t === e, Ht = /* @__PURE__ */ Symbol("solid-track"
|
|
|
4
4
|
equals: Dt
|
|
5
5
|
};
|
|
6
6
|
let Mt = Vt;
|
|
7
|
-
const
|
|
7
|
+
const B = 1, at = 2, Rt = {
|
|
8
8
|
owned: null,
|
|
9
9
|
cleanups: null,
|
|
10
10
|
context: null,
|
|
@@ -37,15 +37,15 @@ function E(t, e) {
|
|
|
37
37
|
return [Tt.bind(n), a];
|
|
38
38
|
}
|
|
39
39
|
function T(t, e, n) {
|
|
40
|
-
const a = kt(t, e, !1,
|
|
40
|
+
const a = kt(t, e, !1, B);
|
|
41
41
|
X(a);
|
|
42
42
|
}
|
|
43
43
|
function Lt(t, e, n) {
|
|
44
44
|
Mt = te;
|
|
45
|
-
const a = kt(t, e, !1,
|
|
45
|
+
const a = kt(t, e, !1, B);
|
|
46
46
|
a.user = !0, j ? j.push(a) : X(a);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function O(t, e, n) {
|
|
49
49
|
n = n ? Object.assign({}, rt, n) : rt;
|
|
50
50
|
const a = kt(t, e, !0, 0);
|
|
51
51
|
return a.observers = null, a.observerSlots = null, a.comparator = n.equals || void 0, X(a), Tt.bind(a);
|
|
@@ -82,7 +82,7 @@ function jt(t) {
|
|
|
82
82
|
return p && p.context && (e = p.context[t.id]) !== void 0 ? e : t.defaultValue;
|
|
83
83
|
}
|
|
84
84
|
function Jt(t) {
|
|
85
|
-
const e =
|
|
85
|
+
const e = O(t), n = O(() => wt(e()));
|
|
86
86
|
return n.toArray = () => {
|
|
87
87
|
const a = n();
|
|
88
88
|
return Array.isArray(a) ? a : a != null ? [a] : [];
|
|
@@ -90,7 +90,7 @@ function Jt(t) {
|
|
|
90
90
|
}
|
|
91
91
|
function Tt() {
|
|
92
92
|
if (this.sources && this.state)
|
|
93
|
-
if (this.state ===
|
|
93
|
+
if (this.state === B) X(this);
|
|
94
94
|
else {
|
|
95
95
|
const t = C;
|
|
96
96
|
C = null, J(() => it(this), !1), C = t;
|
|
@@ -106,7 +106,7 @@ function It(t, e, n) {
|
|
|
106
106
|
return (!t.comparator || !t.comparator(a, e)) && (t.value = e, t.observers && t.observers.length && J(() => {
|
|
107
107
|
for (let r = 0; r < t.observers.length; r += 1) {
|
|
108
108
|
const o = t.observers[r], s = gt && gt.running;
|
|
109
|
-
s && gt.disposed.has(o), (s ? !o.tState : !o.state) && (o.pure ? C.push(o) : j.push(o), o.observers && zt(o)), s || (o.state =
|
|
109
|
+
s && gt.disposed.has(o), (s ? !o.tState : !o.state) && (o.pure ? C.push(o) : j.push(o), o.observers && zt(o)), s || (o.state = B);
|
|
110
110
|
}
|
|
111
111
|
if (C.length > 1e6)
|
|
112
112
|
throw C = [], new Error();
|
|
@@ -125,13 +125,13 @@ function Zt(t, e, n) {
|
|
|
125
125
|
try {
|
|
126
126
|
a = t.fn(e);
|
|
127
127
|
} catch (s) {
|
|
128
|
-
return t.pure && (t.state =
|
|
128
|
+
return t.pure && (t.state = B, t.owned && t.owned.forEach(Q), t.owned = null), t.updatedAt = n + 1, Ot(s);
|
|
129
129
|
} finally {
|
|
130
130
|
v = o, p = r;
|
|
131
131
|
}
|
|
132
132
|
(!t.updatedAt || t.updatedAt <= n) && (t.updatedAt != null && "observers" in t ? It(t, a) : t.value = a, t.updatedAt = n);
|
|
133
133
|
}
|
|
134
|
-
function kt(t, e, n, a =
|
|
134
|
+
function kt(t, e, n, a = B, r) {
|
|
135
135
|
const o = {
|
|
136
136
|
fn: t,
|
|
137
137
|
state: a,
|
|
@@ -155,7 +155,7 @@ function ot(t) {
|
|
|
155
155
|
for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < ut); )
|
|
156
156
|
t.state && e.push(t);
|
|
157
157
|
for (let n = e.length - 1; n >= 0; n--)
|
|
158
|
-
if (t = e[n], t.state ===
|
|
158
|
+
if (t = e[n], t.state === B)
|
|
159
159
|
X(t);
|
|
160
160
|
else if (t.state === at) {
|
|
161
161
|
const a = C;
|
|
@@ -195,7 +195,7 @@ function it(t, e) {
|
|
|
195
195
|
const a = t.sources[n];
|
|
196
196
|
if (a.sources) {
|
|
197
197
|
const r = a.state;
|
|
198
|
-
r ===
|
|
198
|
+
r === B ? a !== e && (!a.updatedAt || a.updatedAt < ut) && ot(a) : r === at && it(a, e);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -305,13 +305,13 @@ function ie(t) {
|
|
|
305
305
|
const e = "fallback" in t && {
|
|
306
306
|
fallback: () => t.fallback
|
|
307
307
|
};
|
|
308
|
-
return
|
|
308
|
+
return O(ae(() => t.each, t.children, e || void 0));
|
|
309
309
|
}
|
|
310
310
|
function Z(t) {
|
|
311
|
-
const e = t.keyed, n =
|
|
311
|
+
const e = t.keyed, n = O(() => t.when, void 0, void 0), a = e ? n : O(n, void 0, {
|
|
312
312
|
equals: (r, o) => !r == !o
|
|
313
313
|
});
|
|
314
|
-
return
|
|
314
|
+
return O(() => {
|
|
315
315
|
const r = a();
|
|
316
316
|
if (r) {
|
|
317
317
|
const o = t.children;
|
|
@@ -323,7 +323,7 @@ function Z(t) {
|
|
|
323
323
|
return t.fallback;
|
|
324
324
|
}, void 0, void 0);
|
|
325
325
|
}
|
|
326
|
-
const mt = (t) =>
|
|
326
|
+
const mt = (t) => O(() => t());
|
|
327
327
|
function se(t, e, n) {
|
|
328
328
|
let a = n.length, r = e.length, o = a, s = 0, i = 0, c = e[r - 1].nextSibling, u = null;
|
|
329
329
|
for (; s < r || i < o; ) {
|
|
@@ -671,13 +671,13 @@ function xe(t) {
|
|
|
671
671
|
function ke(t, e, n) {
|
|
672
672
|
return arguments.length === 2 && (n = e, e = {}), we(t, e)(xe(n));
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function U(t) {
|
|
675
675
|
const [e, n] = E(t.peek(), { equals: !1 }), a = t.subscribe((r) => n(() => r));
|
|
676
676
|
return ft(() => a()), e;
|
|
677
677
|
}
|
|
678
678
|
const lt = Xt();
|
|
679
679
|
function Ce(t) {
|
|
680
|
-
const [e, n] = E("no-url"), [a, r] = E(!1), o =
|
|
680
|
+
const [e, n] = E("no-url"), [a, r] = E(!1), o = U(t.moqWatch.backend.audio.muted), [s, i] = E(0), c = U(t.moqWatch.backend.video.stalled), u = U(t.moqWatch.backend.latency), f = U(t.moqWatch.backend.jitter), [l, S] = E([]), x = U(t.moqWatch.backend.video.source.track), [A, y] = E(!1), [P, $] = E(!!document.fullscreenElement), m = () => {
|
|
681
681
|
t.moqWatch.paused = !t.moqWatch.paused;
|
|
682
682
|
}, h = () => {
|
|
683
683
|
document.fullscreenElement ? document.exitFullscreen() : t.moqWatch.requestFullscreen();
|
|
@@ -687,12 +687,12 @@ function Ce(t) {
|
|
|
687
687
|
t.moqWatch.backend.audio.muted.update((b) => !b);
|
|
688
688
|
}, q = (b) => {
|
|
689
689
|
t.moqWatch.latency = b;
|
|
690
|
-
},
|
|
690
|
+
}, N = (b) => {
|
|
691
691
|
t.moqWatch.backend.video.source.target.update((M) => ({
|
|
692
692
|
...M,
|
|
693
693
|
name: b
|
|
694
694
|
}));
|
|
695
|
-
}, K =
|
|
695
|
+
}, K = () => t.moqWatch.backend.sync.now(), D = U(t.moqWatch.backend.video.buffered), dt = U(t.moqWatch.backend.audio.buffered), Y = {
|
|
696
696
|
moqWatch: t.moqWatch,
|
|
697
697
|
watchStatus: e,
|
|
698
698
|
togglePlayback: m,
|
|
@@ -707,7 +707,7 @@ function Ce(t) {
|
|
|
707
707
|
setLatency: q,
|
|
708
708
|
availableRenditions: l,
|
|
709
709
|
activeRendition: x,
|
|
710
|
-
setActiveRendition:
|
|
710
|
+
setActiveRendition: N,
|
|
711
711
|
isStatsPanelVisible: A,
|
|
712
712
|
setIsStatsPanelVisible: y,
|
|
713
713
|
isFullscreen: P,
|
|
@@ -744,7 +744,7 @@ function Ce(t) {
|
|
|
744
744
|
}
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function F() {
|
|
748
748
|
const t = jt(lt);
|
|
749
749
|
if (!t)
|
|
750
750
|
throw new Error("useWatchUIContext must be used within a WatchUIContextProvider");
|
|
@@ -752,7 +752,7 @@ function N() {
|
|
|
752
752
|
}
|
|
753
753
|
var Se = /* @__PURE__ */ R('<div class="watch-ui__buffering flex--center"><div class=watch-ui__buffering-spinner>');
|
|
754
754
|
function Ae() {
|
|
755
|
-
const t =
|
|
755
|
+
const t = F();
|
|
756
756
|
return g(Z, {
|
|
757
757
|
get when() {
|
|
758
758
|
return t.buffering();
|
|
@@ -775,17 +775,17 @@ function qt(t, e, n, a, r) {
|
|
|
775
775
|
if (d <= h) continue;
|
|
776
776
|
const _ = h / a * c, q = Math.max(2, (d - h) / a * c);
|
|
777
777
|
if (o.globalAlpha = 0.85, o.fillStyle = r ? "#f87171" : y > 0 ? "#facc15" : "#4ade80", typeof o.roundRect == "function" ? (o.beginPath(), o.roundRect(_, S, q, x, A), o.fill()) : o.fillRect(_, S, q, x), m > a) {
|
|
778
|
-
const
|
|
779
|
-
o.globalAlpha = 0.7, o.fillStyle = "black", o.font = "500 9px system-ui, sans-serif", o.textAlign = "right", o.textBaseline = "middle", o.fillText(`+${
|
|
778
|
+
const N = ((m - a) / 1e3).toFixed(1);
|
|
779
|
+
o.globalAlpha = 0.7, o.fillStyle = "black", o.font = "500 9px system-ui, sans-serif", o.textAlign = "right", o.textBaseline = "middle", o.fillText(`+${N}s`, _ + q - 4, u / 2);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
function Pe(t) {
|
|
784
|
-
const e =
|
|
784
|
+
const e = F(), n = () => t.max ?? 4e3, [a, r] = E(!1), [o, s] = E(!1), i = O(() => e.jitter() / n() * 100);
|
|
785
785
|
let c, u, f;
|
|
786
786
|
const l = 48, S = (h) => {
|
|
787
787
|
if (!c) return;
|
|
788
|
-
const d = c.getBoundingClientRect(), _ = d.width - l,
|
|
788
|
+
const d = c.getBoundingClientRect(), _ = d.width - l, N = Math.max(0, Math.min(h - d.left - l, _)) / _ * n(), K = Math.round(N / et) * et, D = Math.max(vt, Math.min(n(), K));
|
|
789
789
|
e.setLatency(D);
|
|
790
790
|
}, x = (h) => {
|
|
791
791
|
r(!0), s(!0), S(h.clientX), document.addEventListener("mousemove", A), document.addEventListener("mouseup", y);
|
|
@@ -815,7 +815,7 @@ function Pe(t) {
|
|
|
815
815
|
}), ft(() => {
|
|
816
816
|
$ !== void 0 && cancelAnimationFrame($), document.removeEventListener("mousemove", A), document.removeEventListener("mouseup", y);
|
|
817
817
|
}), (() => {
|
|
818
|
-
var h = $e(), d = h.firstChild, _ = d.firstChild, q = _.nextSibling,
|
|
818
|
+
var h = $e(), d = h.firstChild, _ = d.firstChild, q = _.nextSibling, N = q.firstChild, K = N.nextSibling, D = q.nextSibling, dt = D.firstChild, Y = dt.nextSibling, V = D.nextSibling, L = V.firstChild, ht = L.firstChild;
|
|
819
819
|
d.$$keydown = P, d.$$mousedown = x;
|
|
820
820
|
var b = c;
|
|
821
821
|
typeof b == "function" ? _t(b, d) : c = d, pt(d, "aria-valuemin", vt);
|
|
@@ -838,7 +838,7 @@ function Pe(t) {
|
|
|
838
838
|
}
|
|
839
839
|
le(["mousedown", "keydown"]);
|
|
840
840
|
function qe() {
|
|
841
|
-
const t =
|
|
841
|
+
const t = F();
|
|
842
842
|
return g(ct, {
|
|
843
843
|
title: "Fullscreen",
|
|
844
844
|
onClick: () => {
|
|
@@ -860,7 +860,7 @@ function qe() {
|
|
|
860
860
|
});
|
|
861
861
|
}
|
|
862
862
|
function Me() {
|
|
863
|
-
const t =
|
|
863
|
+
const t = F();
|
|
864
864
|
return g(ct, {
|
|
865
865
|
get title() {
|
|
866
866
|
return t.isPlaying() ? "Pause" : "Play";
|
|
@@ -889,7 +889,7 @@ function We(t) {
|
|
|
889
889
|
return t >= 1e6 ? `${(t / 1e6).toFixed(1)} Mbps` : t >= 1e3 ? `${(t / 1e3).toFixed(0)} kbps` : `${t} bps`;
|
|
890
890
|
}
|
|
891
891
|
function je() {
|
|
892
|
-
const t =
|
|
892
|
+
const t = F(), e = (n) => {
|
|
893
893
|
const a = n.currentTarget.value || void 0;
|
|
894
894
|
t.setActiveRendition(a);
|
|
895
895
|
};
|
|
@@ -913,7 +913,7 @@ function je() {
|
|
|
913
913
|
})();
|
|
914
914
|
}
|
|
915
915
|
function Te() {
|
|
916
|
-
const t =
|
|
916
|
+
const t = F();
|
|
917
917
|
return g(ct, {
|
|
918
918
|
get title() {
|
|
919
919
|
return t.isStatsPanelVisible() ? "Hide stats" : "Show stats";
|
|
@@ -929,7 +929,7 @@ function Te() {
|
|
|
929
929
|
var Ie = /* @__PURE__ */ R('<div class="watch-ui__volume-slider flex--center"><input type=range min=0 max=100><span class=watch-ui__volume-label>');
|
|
930
930
|
const Ve = (t, e) => e || t === 0 ? g(W.Mute, {}) : t > 0 && t <= 33 ? g(W.VolumeLow, {}) : t > 33 && t <= 66 ? g(W.VolumeMedium, {}) : g(W.VolumeHigh, {});
|
|
931
931
|
function ze() {
|
|
932
|
-
const [t, e] = E(0), n =
|
|
932
|
+
const [t, e] = E(0), n = F(), a = (r) => {
|
|
933
933
|
const o = r.currentTarget, s = parseFloat(o.value);
|
|
934
934
|
n.setVolume(s);
|
|
935
935
|
};
|
|
@@ -984,7 +984,7 @@ const Be = {
|
|
|
984
984
|
text: "Unknown"
|
|
985
985
|
};
|
|
986
986
|
function Ne() {
|
|
987
|
-
const t =
|
|
987
|
+
const t = F(), e = () => {
|
|
988
988
|
const n = t.watchStatus();
|
|
989
989
|
return Be[n] || Fe;
|
|
990
990
|
};
|