@stinkycomputing/web-live-player 0.1.9 → 0.1.11

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.
@@ -1,6 +1,6 @@
1
- var Ur = Object.defineProperty;
2
- var cr = (u, o, l) => o in u ? Ur(u, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : u[o] = l;
3
- var c = (u, o, l) => (cr(u, typeof o != "symbol" ? o + "" : o, l), l), ir = (u, o, l) => {
1
+ var cr = Object.defineProperty;
2
+ var Ur = (u, o, l) => o in u ? cr(u, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : u[o] = l;
3
+ var U = (u, o, l) => (Ur(u, typeof o != "symbol" ? o + "" : o, l), l), ir = (u, o, l) => {
4
4
  if (!o.has(u))
5
5
  throw TypeError("Cannot " + l);
6
6
  };
@@ -28,8 +28,8 @@ const consoleLogger = {
28
28
  };
29
29
  class BaseStreamSource {
30
30
  constructor() {
31
- c(this, "handlers", /* @__PURE__ */ new Map());
32
- c(this, "_connected", !1);
31
+ U(this, "handlers", /* @__PURE__ */ new Map());
32
+ U(this, "_connected", !1);
33
33
  }
34
34
  get connected() {
35
35
  return this._connected;
@@ -59,9 +59,9 @@ function createLogger(u) {
59
59
  }
60
60
  class BasePlayer {
61
61
  constructor(o, l = !1) {
62
- c(this, "eventHandlers", /* @__PURE__ */ new Map());
63
- c(this, "logger");
64
- c(this, "_state");
62
+ U(this, "eventHandlers", /* @__PURE__ */ new Map());
63
+ U(this, "logger");
64
+ U(this, "_state");
65
65
  this._state = o, this.logger = createLogger(l);
66
66
  }
67
67
  /**
@@ -141,17 +141,17 @@ function getCodecString(u) {
141
141
  }
142
142
  class WebCodecsDecoder {
143
143
  constructor(o = {}) {
144
- c(this, "decoder", null);
145
- c(this, "config");
146
- c(this, "flushing", !1);
147
- c(this, "logger");
148
- c(this, "maxQueueSize");
149
- c(this, "onFrameDecoded");
150
- c(this, "onError");
151
- c(this, "onQueueOverflow");
144
+ U(this, "decoder", null);
145
+ U(this, "config");
146
+ U(this, "flushing", !1);
147
+ U(this, "logger");
148
+ U(this, "maxQueueSize");
149
+ U(this, "onFrameDecoded");
150
+ U(this, "onError");
151
+ U(this, "onQueueOverflow");
152
152
  // Statistics
153
- c(this, "chunksSentToDecoder", 0);
154
- c(this, "framesDecoded", 0);
153
+ U(this, "chunksSentToDecoder", 0);
154
+ U(this, "framesDecoded", 0);
155
155
  this.logger = o.logger ?? consoleLogger, this.onFrameDecoded = o.onFrameDecoded ?? o.onFrame, this.onError = o.onError, this.onQueueOverflow = o.onQueueOverflow, this.maxQueueSize = o.maxQueueSize ?? 10, this.createDecoder();
156
156
  }
157
157
  get decodeQueueSize() {
@@ -229,7 +229,7 @@ class WebCodecsDecoder {
229
229
  * Decode a binary packet
230
230
  */
231
231
  decodeBinary(o) {
232
- var e, i, a, s, d, U;
232
+ var e, i, a, s, d, c;
233
233
  if (this.flushing) {
234
234
  this.logger.warn("Received packet while flushing");
235
235
  return;
@@ -242,7 +242,7 @@ class WebCodecsDecoder {
242
242
  }
243
243
  const l = (i = (e = o.header.media) == null ? void 0 : e.codecData) != null && i.timebaseDen && ((s = (a = o.header.media) == null ? void 0 : a.codecData) != null && s.timebaseNum) ? { num: o.header.media.codecData.timebaseNum, den: o.header.media.codecData.timebaseDen } : { num: 1, den: 1e6 }, n = { num: 1, den: 1e6 }, r = rescaleTime(((d = o.header.media) == null ? void 0 : d.pts) ?? 0, l, n), t = new EncodedVideoChunk({
244
244
  timestamp: r,
245
- type: (U = o.header.media) != null && U.keyframe ? "key" : "delta",
245
+ type: (c = o.header.media) != null && c.keyframe ? "key" : "delta",
246
246
  data: o.payload ?? new Uint8Array(0)
247
247
  });
248
248
  try {
@@ -324,15 +324,15 @@ function WorkerWrapper() {
324
324
  }
325
325
  class WasmDecoder {
326
326
  constructor(o = {}) {
327
- c(this, "worker");
328
- c(this, "_queueSize", 0);
329
- c(this, "pendingTimestamps", []);
330
- c(this, "pendingFrames", []);
331
- c(this, "onFrameDecoded");
332
- c(this, "onError");
327
+ U(this, "worker");
328
+ U(this, "_queueSize", 0);
329
+ U(this, "pendingTimestamps", []);
330
+ U(this, "pendingFrames", []);
331
+ U(this, "onFrameDecoded");
332
+ U(this, "onError");
333
333
  // @ts-ignore - kept for future use
334
- c(this, "onQueueOverflow");
335
- c(this, "configured", !1);
334
+ U(this, "onQueueOverflow");
335
+ U(this, "configured", !1);
336
336
  this.onFrameDecoded = o.onFrameDecoded, this.onError = o.onError, this.onQueueOverflow = o.onQueueOverflow;
337
337
  }
338
338
  get queueSize() {
@@ -406,10 +406,10 @@ class WasmDecoder {
406
406
  handlePictureReady(o) {
407
407
  var E;
408
408
  this._queueSize--;
409
- const { width: l, height: n, data: r } = o, t = new Uint8Array(r), e = l, i = e * n, a = i >> 2, s = t.subarray(0, i), d = t.subarray(i, i + a), U = t.subarray(i + a, i + 2 * a), F = n >> 1, B = e >> 1, S = this.pendingTimestamps.shift() ?? 0, y = {
409
+ const { width: l, height: n, data: r } = o, t = new Uint8Array(r), e = l, i = e * n, a = i >> 2, s = t.subarray(0, i), d = t.subarray(i, i + a), c = t.subarray(i + a, i + 2 * a), F = n >> 1, B = e >> 1, S = this.pendingTimestamps.shift() ?? 0, y = {
410
410
  y: s,
411
411
  u: d,
412
- v: U,
412
+ v: c,
413
413
  width: l,
414
414
  height: n,
415
415
  chromaStride: B,
@@ -447,38 +447,38 @@ class WasmDecoder {
447
447
  }
448
448
  class FrameScheduler {
449
449
  constructor(o = {}) {
450
- c(this, "buffer", []);
451
- c(this, "bufferDelayMs");
452
- c(this, "maxBufferSize");
450
+ U(this, "buffer", []);
451
+ U(this, "bufferDelayMs");
452
+ U(this, "maxBufferSize");
453
453
  // Timing synchronization
454
- c(this, "startRealTimeUs", null);
455
- c(this, "startStreamTimeUs", null);
456
- c(this, "frameDurationUs", 2e4);
454
+ U(this, "startRealTimeUs", null);
455
+ U(this, "startStreamTimeUs", null);
456
+ U(this, "frameDurationUs", 2e4);
457
457
  // Default 50fps
458
- c(this, "lastFrameTimestamp", null);
458
+ U(this, "lastFrameTimestamp", null);
459
459
  // Drift correction
460
- c(this, "bufferSizeHistory", []);
461
- c(this, "driftCheckInterval");
462
- c(this, "driftThresholdMs");
463
- c(this, "dequeueCount", 0);
460
+ U(this, "bufferSizeHistory", []);
461
+ U(this, "driftCheckInterval");
462
+ U(this, "driftThresholdMs");
463
+ U(this, "dequeueCount", 0);
464
464
  // Latency tracking
465
- c(this, "latencyHistory", []);
466
- c(this, "latencyHistorySize", 60);
465
+ U(this, "latencyHistory", []);
466
+ U(this, "latencyHistorySize", 60);
467
467
  // About 1 second at 60fps
468
468
  // Packet timing history for visualization
469
- c(this, "packetTimingHistory", []);
470
- c(this, "packetTimingHistorySize", 300);
469
+ U(this, "packetTimingHistory", []);
470
+ U(this, "packetTimingHistorySize", 300);
471
471
  // ~5 seconds at 60fps
472
- c(this, "lastPacketArrivalTime", null);
472
+ U(this, "lastPacketArrivalTime", null);
473
473
  // Statistics
474
- c(this, "stats", {
474
+ U(this, "stats", {
475
475
  dropped: 0,
476
476
  enqueued: 0,
477
477
  dequeued: 0,
478
478
  driftCorrections: 0
479
479
  });
480
- c(this, "logger");
481
- c(this, "onFrameDropped");
480
+ U(this, "logger");
481
+ U(this, "onFrameDropped");
482
482
  this.bufferDelayMs = o.bufferDelayMs ?? 100;
483
483
  const l = Math.ceil(this.bufferDelayMs / 1e3 * 60 * 2);
484
484
  this.maxBufferSize = o.maxBufferSize ?? Math.max(30, l), this.driftCheckInterval = o.driftCheckInterval ?? 150, this.driftThresholdMs = o.driftCorrectionThresholdMs ?? 30, this.logger = o.logger ?? (() => {
@@ -655,9 +655,9 @@ function asPromise(u, o) {
655
655
  if (t = !1, d)
656
656
  a(d);
657
657
  else {
658
- for (var U = new Array(arguments.length - 1), F = 0; F < U.length; )
659
- U[F++] = arguments[F];
660
- i.apply(null, U);
658
+ for (var c = new Array(arguments.length - 1), F = 0; F < c.length; )
659
+ c[F++] = arguments[F];
660
+ i.apply(null, c);
661
661
  }
662
662
  };
663
663
  try {
@@ -681,47 +681,47 @@ var base64$1 = {};
681
681
  for (var l = new Array(64), n = new Array(123), r = 0; r < 64; )
682
682
  n[l[r] = r < 26 ? r + 65 : r < 52 ? r + 71 : r < 62 ? r - 4 : r - 59 | 43] = r++;
683
683
  o.encode = function(i, a, s) {
684
- for (var d = null, U = [], F = 0, B = 0, S; a < s; ) {
684
+ for (var d = null, c = [], F = 0, B = 0, S; a < s; ) {
685
685
  var y = i[a++];
686
686
  switch (B) {
687
687
  case 0:
688
- U[F++] = l[y >> 2], S = (y & 3) << 4, B = 1;
688
+ c[F++] = l[y >> 2], S = (y & 3) << 4, B = 1;
689
689
  break;
690
690
  case 1:
691
- U[F++] = l[S | y >> 4], S = (y & 15) << 2, B = 2;
691
+ c[F++] = l[S | y >> 4], S = (y & 15) << 2, B = 2;
692
692
  break;
693
693
  case 2:
694
- U[F++] = l[S | y >> 6], U[F++] = l[y & 63], B = 0;
694
+ c[F++] = l[S | y >> 6], c[F++] = l[y & 63], B = 0;
695
695
  break;
696
696
  }
697
- F > 8191 && ((d || (d = [])).push(String.fromCharCode.apply(String, U)), F = 0);
697
+ F > 8191 && ((d || (d = [])).push(String.fromCharCode.apply(String, c)), F = 0);
698
698
  }
699
- return B && (U[F++] = l[S], U[F++] = 61, B === 1 && (U[F++] = 61)), d ? (F && d.push(String.fromCharCode.apply(String, U.slice(0, F))), d.join("")) : String.fromCharCode.apply(String, U.slice(0, F));
699
+ return B && (c[F++] = l[S], c[F++] = 61, B === 1 && (c[F++] = 61)), d ? (F && d.push(String.fromCharCode.apply(String, c.slice(0, F))), d.join("")) : String.fromCharCode.apply(String, c.slice(0, F));
700
700
  };
701
701
  var t = "invalid encoding";
702
702
  o.decode = function(i, a, s) {
703
- for (var d = s, U = 0, F, B = 0; B < i.length; ) {
703
+ for (var d = s, c = 0, F, B = 0; B < i.length; ) {
704
704
  var S = i.charCodeAt(B++);
705
- if (S === 61 && U > 1)
705
+ if (S === 61 && c > 1)
706
706
  break;
707
707
  if ((S = n[S]) === void 0)
708
708
  throw Error(t);
709
- switch (U) {
709
+ switch (c) {
710
710
  case 0:
711
- F = S, U = 1;
711
+ F = S, c = 1;
712
712
  break;
713
713
  case 1:
714
- a[s++] = F << 2 | (S & 48) >> 4, F = S, U = 2;
714
+ a[s++] = F << 2 | (S & 48) >> 4, F = S, c = 2;
715
715
  break;
716
716
  case 2:
717
- a[s++] = (F & 15) << 4 | (S & 60) >> 2, F = S, U = 3;
717
+ a[s++] = (F & 15) << 4 | (S & 60) >> 2, F = S, c = 3;
718
718
  break;
719
719
  case 3:
720
- a[s++] = (F & 3) << 6 | S, U = 0;
720
+ a[s++] = (F & 3) << 6 | S, c = 0;
721
721
  break;
722
722
  }
723
723
  }
724
- if (U === 1)
724
+ if (c === 1)
725
725
  throw Error(t);
726
726
  return s - d;
727
727
  }, o.test = function(i) {
@@ -840,15 +840,15 @@ function factory(u) {
840
840
  if (e < 22250738585072014e-324)
841
841
  d = e / 5e-324, n(d >>> 0, i, a + r), n((s << 31 | d / 4294967296) >>> 0, i, a + t);
842
842
  else {
843
- var U = Math.floor(Math.log(e) / Math.LN2);
844
- U === 1024 && (U = 1023), d = e * Math.pow(2, -U), n(d * 4503599627370496 >>> 0, i, a + r), n((s << 31 | U + 1023 << 20 | d * 1048576 & 1048575) >>> 0, i, a + t);
843
+ var c = Math.floor(Math.log(e) / Math.LN2);
844
+ c === 1024 && (c = 1023), d = e * Math.pow(2, -c), n(d * 4503599627370496 >>> 0, i, a + r), n((s << 31 | c + 1023 << 20 | d * 1048576 & 1048575) >>> 0, i, a + t);
845
845
  }
846
846
  }
847
847
  }
848
848
  u.writeDoubleLE = o.bind(null, writeUintLE, 0, 4), u.writeDoubleBE = o.bind(null, writeUintBE, 4, 0);
849
849
  function l(n, r, t, e, i) {
850
- var a = n(e, i + r), s = n(e, i + t), d = (s >> 31) * 2 + 1, U = s >>> 20 & 2047, F = 4294967296 * (s & 1048575) + a;
851
- return U === 2047 ? F ? NaN : d * (1 / 0) : U === 0 ? d * 5e-324 * F : d * Math.pow(2, U - 1075) * (F + 4503599627370496);
850
+ var a = n(e, i + r), s = n(e, i + t), d = (s >> 31) * 2 + 1, c = s >>> 20 & 2047, F = 4294967296 * (s & 1048575) + a;
851
+ return c === 2047 ? F ? NaN : d * (1 / 0) : c === 0 ? d * 5e-324 * F : d * Math.pow(2, c - 1075) * (F + 4503599627370496);
852
852
  }
853
853
  u.readDoubleLE = l.bind(null, readUintLE, 0, 4), u.readDoubleBE = l.bind(null, readUintBE, 4, 0);
854
854
  }(), u;
@@ -1610,7 +1610,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
1610
1610
  n(Z[h], this, f);
1611
1611
  return !0;
1612
1612
  };
1613
- function U(Q, p, f, h) {
1613
+ function c(Q, p, f, h) {
1614
1614
  var R, J, V;
1615
1615
  if (s(f), J = Q._events, J === void 0 ? (J = Q._events = /* @__PURE__ */ Object.create(null), Q._eventsCount = 0) : (J.newListener !== void 0 && (Q.emit(
1616
1616
  "newListener",
@@ -1626,9 +1626,9 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
1626
1626
  return Q;
1627
1627
  }
1628
1628
  i.prototype.addListener = function(p, f) {
1629
- return U(this, p, f, !1);
1629
+ return c(this, p, f, !1);
1630
1630
  }, i.prototype.on = i.prototype.addListener, i.prototype.prependListener = function(p, f) {
1631
- return U(this, p, f, !0);
1631
+ return c(this, p, f, !0);
1632
1632
  };
1633
1633
  function F() {
1634
1634
  if (!this.fired)
@@ -2078,8 +2078,8 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
2078
2078
  }
2079
2079
  case 4: {
2080
2080
  if (s.sourceChannels && s.sourceChannels.length || (s.sourceChannels = []), (d & 7) === 2) {
2081
- let U = t.uint32() + t.pos;
2082
- for (; t.pos < U; )
2081
+ let c = t.uint32() + t.pos;
2082
+ for (; t.pos < c; )
2083
2083
  s.sourceChannels.push(t.uint32());
2084
2084
  } else
2085
2085
  s.sourceChannels.push(t.uint32());
@@ -2820,8 +2820,8 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
2820
2820
  }
2821
2821
  case 5: {
2822
2822
  if (s.vu && s.vu.length || (s.vu = []), (d & 7) === 2) {
2823
- let U = t.uint32() + t.pos;
2824
- for (; t.pos < U; )
2823
+ let c = t.uint32() + t.pos;
2824
+ for (; t.pos < c; )
2825
2825
  s.vu.push(t.float());
2826
2826
  } else
2827
2827
  s.vu.push(t.float());
@@ -2998,8 +2998,8 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
2998
2998
  }
2999
2999
  case 3: {
3000
3000
  if (s.vu && s.vu.length || (s.vu = []), (d & 7) === 2) {
3001
- let U = t.uint32() + t.pos;
3002
- for (; t.pos < U; )
3001
+ let c = t.uint32() + t.pos;
3002
+ for (; t.pos < c; )
3003
3003
  s.vu.push(t.float());
3004
3004
  } else
3005
3005
  s.vu.push(t.float());
@@ -3237,10 +3237,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
3237
3237
  e instanceof $Reader || (e = $Reader.create(e));
3238
3238
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.audio.AudioChannelControlRequest();
3239
3239
  for (; e.pos < s; ) {
3240
- let U = e.uint32();
3241
- if (U === a)
3240
+ let c = e.uint32();
3241
+ if (c === a)
3242
3242
  break;
3243
- switch (U >>> 3) {
3243
+ switch (c >>> 3) {
3244
3244
  case 1: {
3245
3245
  d.channelId = e.string();
3246
3246
  break;
@@ -3258,7 +3258,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
3258
3258
  break;
3259
3259
  }
3260
3260
  default:
3261
- e.skipType(U & 7);
3261
+ e.skipType(c & 7);
3262
3262
  break;
3263
3263
  }
3264
3264
  }
@@ -3507,10 +3507,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
3507
3507
  e instanceof $Reader || (e = $Reader.create(e));
3508
3508
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.commands.CommandListItem();
3509
3509
  for (; e.pos < s; ) {
3510
- let U = e.uint32();
3511
- if (U === a)
3510
+ let c = e.uint32();
3511
+ if (c === a)
3512
3512
  break;
3513
- switch (U >>> 3) {
3513
+ switch (c >>> 3) {
3514
3514
  case 1: {
3515
3515
  d.timeOffsetUs = e.int64();
3516
3516
  break;
@@ -3616,7 +3616,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
3616
3616
  break;
3617
3617
  }
3618
3618
  case 26: {
3619
- if (d.transactionDeps && d.transactionDeps.length || (d.transactionDeps = []), (U & 7) === 2) {
3619
+ if (d.transactionDeps && d.transactionDeps.length || (d.transactionDeps = []), (c & 7) === 2) {
3620
3620
  let F = e.uint32() + e.pos;
3621
3621
  for (; e.pos < F; )
3622
3622
  d.transactionDeps.push(e.uint32());
@@ -3625,7 +3625,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
3625
3625
  break;
3626
3626
  }
3627
3627
  default:
3628
- e.skipType(U & 7);
3628
+ e.skipType(c & 7);
3629
3629
  break;
3630
3630
  }
3631
3631
  }
@@ -4541,10 +4541,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
4541
4541
  e instanceof $Reader || (e = $Reader.create(e));
4542
4542
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.common.PropValue();
4543
4543
  for (; e.pos < s; ) {
4544
- let U = e.uint32();
4545
- if (U === a)
4544
+ let c = e.uint32();
4545
+ if (c === a)
4546
4546
  break;
4547
- switch (U >>> 3) {
4547
+ switch (c >>> 3) {
4548
4548
  case 1: {
4549
4549
  d.floatValue = e.float();
4550
4550
  break;
@@ -4566,7 +4566,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
4566
4566
  break;
4567
4567
  }
4568
4568
  default:
4569
- e.skipType(U & 7);
4569
+ e.skipType(c & 7);
4570
4570
  break;
4571
4571
  }
4572
4572
  }
@@ -4660,10 +4660,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
4660
4660
  e instanceof $Reader || (e = $Reader.create(e));
4661
4661
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.common.PropertyDomain();
4662
4662
  for (; e.pos < s; ) {
4663
- let U = e.uint32();
4664
- if (U === a)
4663
+ let c = e.uint32();
4664
+ if (c === a)
4665
4665
  break;
4666
- switch (U >>> 3) {
4666
+ switch (c >>> 3) {
4667
4667
  case 1: {
4668
4668
  d.compositorId = e.string();
4669
4669
  break;
@@ -4681,7 +4681,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
4681
4681
  break;
4682
4682
  }
4683
4683
  default:
4684
- e.skipType(U & 7);
4684
+ e.skipType(c & 7);
4685
4685
  break;
4686
4686
  }
4687
4687
  }
@@ -5779,10 +5779,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
5779
5779
  e instanceof $Reader || (e = $Reader.create(e));
5780
5780
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.sources.DecklinkSourceConfig();
5781
5781
  for (; e.pos < s; ) {
5782
- let U = e.uint32();
5783
- if (U === a)
5782
+ let c = e.uint32();
5783
+ if (c === a)
5784
5784
  break;
5785
- switch (U >>> 3) {
5785
+ switch (c >>> 3) {
5786
5786
  case 1: {
5787
5787
  d.deviceIndex = e.uint32();
5788
5788
  break;
@@ -5796,7 +5796,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
5796
5796
  break;
5797
5797
  }
5798
5798
  default:
5799
- e.skipType(U & 7);
5799
+ e.skipType(c & 7);
5800
5800
  break;
5801
5801
  }
5802
5802
  }
@@ -6268,10 +6268,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
6268
6268
  e instanceof $Reader || (e = $Reader.create(e));
6269
6269
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.sources.SourceConfig();
6270
6270
  for (; e.pos < s; ) {
6271
- let U = e.uint32();
6272
- if (U === a)
6271
+ let c = e.uint32();
6272
+ if (c === a)
6273
6273
  break;
6274
- switch (U >>> 3) {
6274
+ switch (c >>> 3) {
6275
6275
  case 1: {
6276
6276
  d.common = $root.sesame.v1.sources.SourceCommonConfig.decode(e, e.uint32());
6277
6277
  break;
@@ -6317,7 +6317,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
6317
6317
  break;
6318
6318
  }
6319
6319
  default:
6320
- e.skipType(U & 7);
6320
+ e.skipType(c & 7);
6321
6321
  break;
6322
6322
  }
6323
6323
  }
@@ -6783,10 +6783,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
6783
6783
  e instanceof $Reader || (e = $Reader.create(e));
6784
6784
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.sources.SourceStatus();
6785
6785
  for (; e.pos < s; ) {
6786
- let U = e.uint32();
6787
- if (U === a)
6786
+ let c = e.uint32();
6787
+ if (c === a)
6788
6788
  break;
6789
- switch (U >>> 3) {
6789
+ switch (c >>> 3) {
6790
6790
  case 1: {
6791
6791
  d.id = e.string();
6792
6792
  break;
@@ -6872,7 +6872,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
6872
6872
  break;
6873
6873
  }
6874
6874
  default:
6875
- e.skipType(U & 7);
6875
+ e.skipType(c & 7);
6876
6876
  break;
6877
6877
  }
6878
6878
  }
@@ -7489,10 +7489,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
7489
7489
  e instanceof $Reader || (e = $Reader.create(e));
7490
7490
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.sources.LoadPlaylistRequest();
7491
7491
  for (; e.pos < s; ) {
7492
- let U = e.uint32();
7493
- if (U === a)
7492
+ let c = e.uint32();
7493
+ if (c === a)
7494
7494
  break;
7495
- switch (U >>> 3) {
7495
+ switch (c >>> 3) {
7496
7496
  case 1: {
7497
7497
  d.sourceId = e.string();
7498
7498
  break;
@@ -7518,7 +7518,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
7518
7518
  break;
7519
7519
  }
7520
7520
  default:
7521
- e.skipType(U & 7);
7521
+ e.skipType(c & 7);
7522
7522
  break;
7523
7523
  }
7524
7524
  }
@@ -8002,10 +8002,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
8002
8002
  e instanceof $Reader || (e = $Reader.create(e));
8003
8003
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.recorder.PlaylistItem();
8004
8004
  for (; e.pos < s; ) {
8005
- let U = e.uint32();
8006
- if (U === a)
8005
+ let c = e.uint32();
8006
+ if (c === a)
8007
8007
  break;
8008
- switch (U >>> 3) {
8008
+ switch (c >>> 3) {
8009
8009
  case 1: {
8010
8010
  d.recorderId = e.string();
8011
8011
  break;
@@ -8031,7 +8031,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
8031
8031
  break;
8032
8032
  }
8033
8033
  case 7: {
8034
- if (d.audioRouting && d.audioRouting.length || (d.audioRouting = []), (U & 7) === 2) {
8034
+ if (d.audioRouting && d.audioRouting.length || (d.audioRouting = []), (c & 7) === 2) {
8035
8035
  let F = e.uint32() + e.pos;
8036
8036
  for (; e.pos < F; )
8037
8037
  d.audioRouting.push(e.uint32());
@@ -8048,7 +8048,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
8048
8048
  break;
8049
8049
  }
8050
8050
  case 10: {
8051
- if (d.audioLevels && d.audioLevels.length || (d.audioLevels = []), (U & 7) === 2) {
8051
+ if (d.audioLevels && d.audioLevels.length || (d.audioLevels = []), (c & 7) === 2) {
8052
8052
  let F = e.uint32() + e.pos;
8053
8053
  for (; e.pos < F; )
8054
8054
  d.audioLevels.push(e.float());
@@ -8057,7 +8057,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
8057
8057
  break;
8058
8058
  }
8059
8059
  default:
8060
- e.skipType(U & 7);
8060
+ e.skipType(c & 7);
8061
8061
  break;
8062
8062
  }
8063
8063
  }
@@ -9070,10 +9070,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
9070
9070
  e instanceof $Reader || (e = $Reader.create(e));
9071
9071
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.recorder.RecorderRequest();
9072
9072
  for (; e.pos < s; ) {
9073
- let U = e.uint32();
9074
- if (U === a)
9073
+ let c = e.uint32();
9074
+ if (c === a)
9075
9075
  break;
9076
- switch (U >>> 3) {
9076
+ switch (c >>> 3) {
9077
9077
  case 1: {
9078
9078
  d.recorderId = e.string();
9079
9079
  break;
@@ -9115,7 +9115,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
9115
9115
  break;
9116
9116
  }
9117
9117
  default:
9118
- e.skipType(U & 7);
9118
+ e.skipType(c & 7);
9119
9119
  break;
9120
9120
  }
9121
9121
  }
@@ -9306,10 +9306,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
9306
9306
  e instanceof $Reader || (e = $Reader.create(e));
9307
9307
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.recorder.RecorderResponse();
9308
9308
  for (; e.pos < s; ) {
9309
- let U = e.uint32();
9310
- if (U === a)
9309
+ let c = e.uint32();
9310
+ if (c === a)
9311
9311
  break;
9312
- switch (U >>> 3) {
9312
+ switch (c >>> 3) {
9313
9313
  case 1: {
9314
9314
  d.getClipsResponse = $root.sesame.v1.recorder.RecorderClipsGetResponse.decode(e, e.uint32());
9315
9315
  break;
@@ -9323,7 +9323,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
9323
9323
  break;
9324
9324
  }
9325
9325
  default:
9326
- e.skipType(U & 7);
9326
+ e.skipType(c & 7);
9327
9327
  break;
9328
9328
  }
9329
9329
  }
@@ -9473,10 +9473,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
9473
9473
  e instanceof $Reader || (e = $Reader.create(e));
9474
9474
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.recorder.RecorderEvent();
9475
9475
  for (; e.pos < s; ) {
9476
- let U = e.uint32();
9477
- if (U === a)
9476
+ let c = e.uint32();
9477
+ if (c === a)
9478
9478
  break;
9479
- switch (U >>> 3) {
9479
+ switch (c >>> 3) {
9480
9480
  case 1: {
9481
9481
  d.id = e.string();
9482
9482
  break;
@@ -9490,7 +9490,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
9490
9490
  break;
9491
9491
  }
9492
9492
  default:
9493
- e.skipType(U & 7);
9493
+ e.skipType(c & 7);
9494
9494
  break;
9495
9495
  }
9496
9496
  }
@@ -11159,10 +11159,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
11159
11159
  e instanceof $Reader || (e = $Reader.create(e));
11160
11160
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.status.Event();
11161
11161
  for (; e.pos < s; ) {
11162
- let U = e.uint32();
11163
- if (U === a)
11162
+ let c = e.uint32();
11163
+ if (c === a)
11164
11164
  break;
11165
- switch (U >>> 3) {
11165
+ switch (c >>> 3) {
11166
11166
  case 1: {
11167
11167
  d.errorEvent = $root.sesame.v1.status.ErrorEvent.decode(e, e.uint32());
11168
11168
  break;
@@ -11188,7 +11188,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
11188
11188
  break;
11189
11189
  }
11190
11190
  default:
11191
- e.skipType(U & 7);
11191
+ e.skipType(c & 7);
11192
11192
  break;
11193
11193
  }
11194
11194
  }
@@ -11339,8 +11339,8 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
11339
11339
  switch (d >>> 3) {
11340
11340
  case 1: {
11341
11341
  if (s.eventTopics && s.eventTopics.length || (s.eventTopics = []), (d & 7) === 2) {
11342
- let U = t.uint32() + t.pos;
11343
- for (; t.pos < U; )
11342
+ let c = t.uint32() + t.pos;
11343
+ for (; t.pos < c; )
11344
11344
  s.eventTopics.push(t.int32());
11345
11345
  } else
11346
11346
  s.eventTopics.push(t.int32());
@@ -12491,10 +12491,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
12491
12491
  e instanceof $Reader || (e = $Reader.create(e));
12492
12492
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.outputs.OutputAddRequest();
12493
12493
  for (; e.pos < s; ) {
12494
- let U = e.uint32();
12495
- if (U === a)
12494
+ let c = e.uint32();
12495
+ if (c === a)
12496
12496
  break;
12497
- switch (U >>> 3) {
12497
+ switch (c >>> 3) {
12498
12498
  case 1: {
12499
12499
  d.id = e.string();
12500
12500
  break;
@@ -12540,7 +12540,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
12540
12540
  break;
12541
12541
  }
12542
12542
  default:
12543
- e.skipType(U & 7);
12543
+ e.skipType(c & 7);
12544
12544
  break;
12545
12545
  }
12546
12546
  }
@@ -12751,10 +12751,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
12751
12751
  e instanceof $Reader || (e = $Reader.create(e));
12752
12752
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.outputs.OutputUpdateRequest();
12753
12753
  for (; e.pos < s; ) {
12754
- let U = e.uint32();
12755
- if (U === a)
12754
+ let c = e.uint32();
12755
+ if (c === a)
12756
12756
  break;
12757
- switch (U >>> 3) {
12757
+ switch (c >>> 3) {
12758
12758
  case 1: {
12759
12759
  d.id = e.string();
12760
12760
  break;
@@ -12800,7 +12800,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
12800
12800
  break;
12801
12801
  }
12802
12802
  default:
12803
- e.skipType(U & 7);
12803
+ e.skipType(c & 7);
12804
12804
  break;
12805
12805
  }
12806
12806
  }
@@ -13101,10 +13101,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
13101
13101
  e instanceof $Reader || (e = $Reader.create(e));
13102
13102
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.outputs.OutputStatus();
13103
13103
  for (; e.pos < s; ) {
13104
- let U = e.uint32();
13105
- if (U === a)
13104
+ let c = e.uint32();
13105
+ if (c === a)
13106
13106
  break;
13107
- switch (U >>> 3) {
13107
+ switch (c >>> 3) {
13108
13108
  case 1: {
13109
13109
  d.id = e.string();
13110
13110
  break;
@@ -13134,7 +13134,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
13134
13134
  break;
13135
13135
  }
13136
13136
  default:
13137
- e.skipType(U & 7);
13137
+ e.skipType(c & 7);
13138
13138
  break;
13139
13139
  }
13140
13140
  }
@@ -14180,10 +14180,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
14180
14180
  e instanceof $Reader || (e = $Reader.create(e));
14181
14181
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.jobs.Job();
14182
14182
  for (; e.pos < s; ) {
14183
- let U = e.uint32();
14184
- if (U === a)
14183
+ let c = e.uint32();
14184
+ if (c === a)
14185
14185
  break;
14186
- switch (U >>> 3) {
14186
+ switch (c >>> 3) {
14187
14187
  case 1: {
14188
14188
  d.id = e.uint32();
14189
14189
  break;
@@ -14221,7 +14221,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
14221
14221
  break;
14222
14222
  }
14223
14223
  default:
14224
- e.skipType(U & 7);
14224
+ e.skipType(c & 7);
14225
14225
  break;
14226
14226
  }
14227
14227
  }
@@ -14460,10 +14460,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
14460
14460
  e instanceof $Reader || (e = $Reader.create(e));
14461
14461
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.jobs.JobStartRequest();
14462
14462
  for (; e.pos < s; ) {
14463
- let U = e.uint32();
14464
- if (U === a)
14463
+ let c = e.uint32();
14464
+ if (c === a)
14465
14465
  break;
14466
- switch (U >>> 3) {
14466
+ switch (c >>> 3) {
14467
14467
  case 1: {
14468
14468
  d.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.decode(e, e.uint32());
14469
14469
  break;
@@ -14473,7 +14473,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
14473
14473
  break;
14474
14474
  }
14475
14475
  default:
14476
- e.skipType(U & 7);
14476
+ e.skipType(c & 7);
14477
14477
  break;
14478
14478
  }
14479
14479
  }
@@ -14860,8 +14860,8 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
14860
14860
  }
14861
14861
  case 24: {
14862
14862
  if (s.audioRouting && s.audioRouting.length || (s.audioRouting = []), (d & 7) === 2) {
14863
- let U = t.uint32() + t.pos;
14864
- for (; t.pos < U; )
14863
+ let c = t.uint32() + t.pos;
14864
+ for (; t.pos < c; )
14865
14865
  s.audioRouting.push(t.uint32());
14866
14866
  } else
14867
14867
  s.audioRouting.push(t.uint32());
@@ -15318,8 +15318,8 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15318
15318
  }
15319
15319
  case 2: {
15320
15320
  if (s.audioRouting && s.audioRouting.length || (s.audioRouting = []), (d & 7) === 2) {
15321
- let U = t.uint32() + t.pos;
15322
- for (; t.pos < U; )
15321
+ let c = t.uint32() + t.pos;
15322
+ for (; t.pos < c; )
15323
15323
  s.audioRouting.push(t.uint32());
15324
15324
  } else
15325
15325
  s.audioRouting.push(t.uint32());
@@ -15492,10 +15492,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15492
15492
  e instanceof $Reader || (e = $Reader.create(e));
15493
15493
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.rpc.Message();
15494
15494
  for (; e.pos < s; ) {
15495
- let U = e.uint32();
15496
- if (U === a)
15495
+ let c = e.uint32();
15496
+ if (c === a)
15497
15497
  break;
15498
- switch (U >>> 3) {
15498
+ switch (c >>> 3) {
15499
15499
  case 1: {
15500
15500
  d.request = $root.sesame.v1.rpc.Request.decode(e, e.uint32());
15501
15501
  break;
@@ -15509,7 +15509,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15509
15509
  break;
15510
15510
  }
15511
15511
  default:
15512
- e.skipType(U & 7);
15512
+ e.skipType(c & 7);
15513
15513
  break;
15514
15514
  }
15515
15515
  }
@@ -15830,7 +15830,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15830
15830
  for (let t = Object.keys(r), e = 0; e < t.length; ++e)
15831
15831
  r[t[e]] != null && (this[t[e]] = r[t[e]]);
15832
15832
  }
15833
- return n.prototype.nodeId = "", n.prototype.metadataId = "", n.prototype.payload = $util.newBuffer([]), n.create = function(t) {
15833
+ return n.prototype.nodeId = "", n.prototype.metadataId = "", n.prototype.payload = $util.newBuffer([]), n.prototype.dataType = 0, n.create = function(t) {
15834
15834
  return new n(t);
15835
15835
  }, n.encode = function(t, e) {
15836
15836
  return e || (e = $Writer.create()), t.nodeId != null && Object.hasOwnProperty.call(t, "nodeId") && e.uint32(
@@ -15842,7 +15842,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15842
15842
  ).string(t.metadataId), t.payload != null && Object.hasOwnProperty.call(t, "payload") && e.uint32(
15843
15843
  /* id 3, wireType 2 =*/
15844
15844
  26
15845
- ).bytes(t.payload), e;
15845
+ ).bytes(t.payload), t.dataType != null && Object.hasOwnProperty.call(t, "dataType") && e.uint32(
15846
+ /* id 4, wireType 0 =*/
15847
+ 32
15848
+ ).int32(t.dataType), e;
15846
15849
  }, n.encodeDelimited = function(t, e) {
15847
15850
  return this.encode(t, e).ldelim();
15848
15851
  }, n.decode = function(t, e, i) {
@@ -15865,6 +15868,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15865
15868
  s.payload = t.bytes();
15866
15869
  break;
15867
15870
  }
15871
+ case 4: {
15872
+ s.dataType = t.int32();
15873
+ break;
15874
+ }
15868
15875
  default:
15869
15876
  t.skipType(d & 7);
15870
15877
  break;
@@ -15874,16 +15881,73 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
15874
15881
  }, n.decodeDelimited = function(t) {
15875
15882
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
15876
15883
  }, n.verify = function(t) {
15877
- return typeof t != "object" || t === null ? "object expected" : t.nodeId != null && t.hasOwnProperty("nodeId") && !$util.isString(t.nodeId) ? "nodeId: string expected" : t.metadataId != null && t.hasOwnProperty("metadataId") && !$util.isString(t.metadataId) ? "metadataId: string expected" : t.payload != null && t.hasOwnProperty("payload") && !(t.payload && typeof t.payload.length == "number" || $util.isString(t.payload)) ? "payload: buffer expected" : null;
15884
+ if (typeof t != "object" || t === null)
15885
+ return "object expected";
15886
+ if (t.nodeId != null && t.hasOwnProperty("nodeId") && !$util.isString(t.nodeId))
15887
+ return "nodeId: string expected";
15888
+ if (t.metadataId != null && t.hasOwnProperty("metadataId") && !$util.isString(t.metadataId))
15889
+ return "metadataId: string expected";
15890
+ if (t.payload != null && t.hasOwnProperty("payload") && !(t.payload && typeof t.payload.length == "number" || $util.isString(t.payload)))
15891
+ return "payload: buffer expected";
15892
+ if (t.dataType != null && t.hasOwnProperty("dataType"))
15893
+ switch (t.dataType) {
15894
+ default:
15895
+ return "dataType: enum value expected";
15896
+ case 0:
15897
+ case 1:
15898
+ case 2:
15899
+ case 3:
15900
+ case 4:
15901
+ case 5:
15902
+ case 6:
15903
+ break;
15904
+ }
15905
+ return null;
15878
15906
  }, n.fromObject = function(t) {
15879
15907
  if (t instanceof $root.sesame.v1.rpc.PublishMetadataRequest)
15880
15908
  return t;
15881
15909
  let e = new $root.sesame.v1.rpc.PublishMetadataRequest();
15882
- return t.nodeId != null && (e.nodeId = String(t.nodeId)), t.metadataId != null && (e.metadataId = String(t.metadataId)), t.payload != null && (typeof t.payload == "string" ? $util.base64.decode(t.payload, e.payload = $util.newBuffer($util.base64.length(t.payload)), 0) : t.payload.length >= 0 && (e.payload = t.payload)), e;
15910
+ switch (t.nodeId != null && (e.nodeId = String(t.nodeId)), t.metadataId != null && (e.metadataId = String(t.metadataId)), t.payload != null && (typeof t.payload == "string" ? $util.base64.decode(t.payload, e.payload = $util.newBuffer($util.base64.length(t.payload)), 0) : t.payload.length >= 0 && (e.payload = t.payload)), t.dataType) {
15911
+ default:
15912
+ if (typeof t.dataType == "number") {
15913
+ e.dataType = t.dataType;
15914
+ break;
15915
+ }
15916
+ break;
15917
+ case "DATA_TYPE_UNSPECIFIED":
15918
+ case 0:
15919
+ e.dataType = 0;
15920
+ break;
15921
+ case "DATA_TYPE_JSON":
15922
+ case 1:
15923
+ e.dataType = 1;
15924
+ break;
15925
+ case "DATA_TYPE_TRANSPORT_STATUS":
15926
+ case 2:
15927
+ e.dataType = 2;
15928
+ break;
15929
+ case "DATA_TYPE_AUDIO_STATE":
15930
+ case 3:
15931
+ e.dataType = 3;
15932
+ break;
15933
+ case "DATA_TYPE_TRANSPORT_CONTROL":
15934
+ case 4:
15935
+ e.dataType = 4;
15936
+ break;
15937
+ case "DATA_TYPE_AUDIO_CONTROL":
15938
+ case 5:
15939
+ e.dataType = 5;
15940
+ break;
15941
+ case "DATA_TYPE_BINARY":
15942
+ case 6:
15943
+ e.dataType = 6;
15944
+ break;
15945
+ }
15946
+ return e;
15883
15947
  }, n.toObject = function(t, e) {
15884
15948
  e || (e = {});
15885
15949
  let i = {};
15886
- return e.defaults && (i.nodeId = "", i.metadataId = "", e.bytes === String ? i.payload = "" : (i.payload = [], e.bytes !== Array && (i.payload = $util.newBuffer(i.payload)))), t.nodeId != null && t.hasOwnProperty("nodeId") && (i.nodeId = t.nodeId), t.metadataId != null && t.hasOwnProperty("metadataId") && (i.metadataId = t.metadataId), t.payload != null && t.hasOwnProperty("payload") && (i.payload = e.bytes === String ? $util.base64.encode(t.payload, 0, t.payload.length) : e.bytes === Array ? Array.prototype.slice.call(t.payload) : t.payload), i;
15950
+ return e.defaults && (i.nodeId = "", i.metadataId = "", e.bytes === String ? i.payload = "" : (i.payload = [], e.bytes !== Array && (i.payload = $util.newBuffer(i.payload))), i.dataType = e.enums === String ? "DATA_TYPE_UNSPECIFIED" : 0), t.nodeId != null && t.hasOwnProperty("nodeId") && (i.nodeId = t.nodeId), t.metadataId != null && t.hasOwnProperty("metadataId") && (i.metadataId = t.metadataId), t.payload != null && t.hasOwnProperty("payload") && (i.payload = e.bytes === String ? $util.base64.encode(t.payload, 0, t.payload.length) : e.bytes === Array ? Array.prototype.slice.call(t.payload) : t.payload), t.dataType != null && t.hasOwnProperty("dataType") && (i.dataType = e.enums === String ? $root.sesame.v1.wire.DataType[t.dataType] === void 0 ? t.dataType : $root.sesame.v1.wire.DataType[t.dataType] : t.dataType), i;
15887
15951
  }, n.prototype.toJSON = function() {
15888
15952
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
15889
15953
  }, n.getTypeUrl = function(t) {
@@ -16209,7 +16273,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
16209
16273
  }, n;
16210
16274
  }(), l.DataType = function() {
16211
16275
  const n = {}, r = Object.create(n);
16212
- return r[n[0] = "DATA_TYPE_UNSPECIFIED"] = 0, r[n[1] = "DATA_TYPE_JSON"] = 1, r[n[2] = "DATA_TYPE_TRANSPORT_STATUS"] = 2, r[n[3] = "DATA_TYPE_AUDIO_STATE"] = 3, r[n[4] = "DATA_TYPE_TRANSPORT_CONTROL"] = 4, r[n[5] = "DATA_TYPE_AUDIO_CONTROL"] = 5, r;
16276
+ return r[n[0] = "DATA_TYPE_UNSPECIFIED"] = 0, r[n[1] = "DATA_TYPE_JSON"] = 1, r[n[2] = "DATA_TYPE_TRANSPORT_STATUS"] = 2, r[n[3] = "DATA_TYPE_AUDIO_STATE"] = 3, r[n[4] = "DATA_TYPE_TRANSPORT_CONTROL"] = 4, r[n[5] = "DATA_TYPE_AUDIO_CONTROL"] = 5, r[n[6] = "DATA_TYPE_BINARY"] = 6, r;
16213
16277
  }(), l.DataFrameData = function() {
16214
16278
  function n(r) {
16215
16279
  if (r)
@@ -16265,6 +16329,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
16265
16329
  case 3:
16266
16330
  case 4:
16267
16331
  case 5:
16332
+ case 6:
16268
16333
  break;
16269
16334
  }
16270
16335
  return t.trackName != null && t.hasOwnProperty("trackName") && !$util.isString(t.trackName) ? "trackName: string expected" : null;
@@ -16303,6 +16368,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
16303
16368
  case 5:
16304
16369
  e.dataType = 5;
16305
16370
  break;
16371
+ case "DATA_TYPE_BINARY":
16372
+ case 6:
16373
+ e.dataType = 6;
16374
+ break;
16306
16375
  }
16307
16376
  return t.trackName != null && (e.trackName = String(t.trackName)), e;
16308
16377
  }, n.toObject = function(t, e) {
@@ -16347,10 +16416,10 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
16347
16416
  e instanceof $Reader || (e = $Reader.create(e));
16348
16417
  let s = i === void 0 ? e.len : e.pos + i, d = new $root.sesame.v1.wire.FrameHeader();
16349
16418
  for (; e.pos < s; ) {
16350
- let U = e.uint32();
16351
- if (U === a)
16419
+ let c = e.uint32();
16420
+ if (c === a)
16352
16421
  break;
16353
- switch (U >>> 3) {
16422
+ switch (c >>> 3) {
16354
16423
  case 1: {
16355
16424
  d.type = e.int32();
16356
16425
  break;
@@ -16368,7 +16437,7 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
16368
16437
  break;
16369
16438
  }
16370
16439
  default:
16371
- e.skipType(U & 7);
16440
+ e.skipType(c & 7);
16372
16441
  break;
16373
16442
  }
16374
16443
  }
@@ -17081,15 +17150,15 @@ registerProcessor('live-audio-processor', LiveAudioProcessor);
17081
17150
  `;
17082
17151
  class LiveAudioPlayer {
17083
17152
  constructor(o, l = {}) {
17084
- c(this, "ctx");
17085
- c(this, "decoder", null);
17086
- c(this, "workletNode", null);
17087
- c(this, "gainNode");
17088
- c(this, "initialized", !1);
17089
- c(this, "targetSampleRate");
17153
+ U(this, "ctx");
17154
+ U(this, "decoder", null);
17155
+ U(this, "workletNode", null);
17156
+ U(this, "gainNode");
17157
+ U(this, "initialized", !1);
17158
+ U(this, "targetSampleRate");
17090
17159
  // Timing for live streams
17091
- c(this, "startTime", 0);
17092
- c(this, "bufferDelayMs");
17160
+ U(this, "startTime", 0);
17161
+ U(this, "bufferDelayMs");
17093
17162
  this.ctx = o, this.targetSampleRate = o.sampleRate, this.bufferDelayMs = l.bufferDelayMs ?? 100, this.gainNode = this.ctx.createGain(), this.startTime = performance.now() * 1e3;
17094
17163
  }
17095
17164
  /**
@@ -17184,12 +17253,12 @@ class LiveAudioPlayer {
17184
17253
  frameOffset: 0,
17185
17254
  frameCount: o.numberOfFrames
17186
17255
  });
17187
- const U = new Float32Array(d);
17256
+ const c = new Float32Array(d);
17188
17257
  if (o.numberOfChannels === 1)
17189
- r.set(U), t.set(U);
17258
+ r.set(c), t.set(c);
17190
17259
  else
17191
17260
  for (let F = 0; F < l; F++)
17192
- r[F] = U[F * 2], t[F] = U[F * 2 + 1];
17261
+ r[F] = c[F * 2], t[F] = c[F * 2 + 1];
17193
17262
  } else {
17194
17263
  const s = new ArrayBuffer(o.allocationSize({
17195
17264
  planeIndex: 0,
@@ -17227,8 +17296,8 @@ class LiveAudioPlayer {
17227
17296
  return o;
17228
17297
  const r = l / n, t = Math.floor(o.length / r), e = new Float32Array(t);
17229
17298
  for (let i = 0; i < t; i++) {
17230
- const a = i * r, s = Math.floor(a), d = Math.min(s + 1, o.length - 1), U = a - s;
17231
- e[i] = o[s] * (1 - U) + o[d] * U;
17299
+ const a = i * r, s = Math.floor(a), d = Math.min(s + 1, o.length - 1), c = a - s;
17300
+ e[i] = o[s] * (1 - c) + o[d] * c;
17232
17301
  }
17233
17302
  return e;
17234
17303
  }
@@ -17324,53 +17393,53 @@ function createPlayer(u = {}) {
17324
17393
  const Ko = class Ko extends BasePlayer {
17325
17394
  constructor(l = {}) {
17326
17395
  super("idle", l.debugLogging ?? !1);
17327
- c(this, "config");
17396
+ U(this, "config");
17328
17397
  // Stream source
17329
- c(this, "streamSource", null);
17330
- c(this, "trackFilter", null);
17331
- c(this, "boundDataHandler", null);
17398
+ U(this, "streamSource", null);
17399
+ U(this, "trackFilter", null);
17400
+ U(this, "boundDataHandler", null);
17332
17401
  // Decoder
17333
- c(this, "decoder", null);
17334
- c(this, "currentCodecData");
17335
- c(this, "useWasmDecoder", !1);
17336
- c(this, "waitingForKeyframe", !0);
17337
- c(this, "lastWaitingForKeyframeLog", 0);
17338
- c(this, "lastKeyframeRequest", 0);
17339
- c(this, "statusLogCounter", 0);
17340
- c(this, "isConfiguring", !1);
17341
- c(this, "pendingDuringConfig", []);
17402
+ U(this, "decoder", null);
17403
+ U(this, "currentCodecData");
17404
+ U(this, "useWasmDecoder", !1);
17405
+ U(this, "waitingForKeyframe", !0);
17406
+ U(this, "lastWaitingForKeyframeLog", 0);
17407
+ U(this, "lastKeyframeRequest", 0);
17408
+ U(this, "statusLogCounter", 0);
17409
+ U(this, "isConfiguring", !1);
17410
+ U(this, "pendingDuringConfig", []);
17342
17411
  // Queue frames during configuration
17343
17412
  // Frame scheduling
17344
- c(this, "frameScheduler");
17345
- c(this, "lastVideoFrame", null);
17346
- c(this, "consecutiveDrops", 0);
17347
- c(this, "totalDrops", 0);
17348
- c(this, "lastDropLogTime", 0);
17413
+ U(this, "frameScheduler");
17414
+ U(this, "lastVideoFrame", null);
17415
+ U(this, "consecutiveDrops", 0);
17416
+ U(this, "totalDrops", 0);
17417
+ U(this, "lastDropLogTime", 0);
17349
17418
  // Metadata
17350
- c(this, "streamWidth", 0);
17351
- c(this, "streamHeight", 0);
17352
- c(this, "estimatedFrameRate", 30);
17419
+ U(this, "streamWidth", 0);
17420
+ U(this, "streamHeight", 0);
17421
+ U(this, "estimatedFrameRate", 30);
17353
17422
  // Default, will be estimated from timestamps
17354
17423
  // FPS estimation from video timestamps
17355
- c(this, "lastVideoTimestampUs", -1);
17356
- c(this, "fpsEstimateSamples", []);
17424
+ U(this, "lastVideoTimestampUs", -1);
17425
+ U(this, "fpsEstimateSamples", []);
17357
17426
  // Number of samples for averaging
17358
17427
  // Audio
17359
- c(this, "audioContext", null);
17360
- c(this, "audioPlayer", null);
17361
- c(this, "ownsAudioContext", !1);
17362
- c(this, "audioCodecData", null);
17428
+ U(this, "audioContext", null);
17429
+ U(this, "audioPlayer", null);
17430
+ U(this, "ownsAudioContext", !1);
17431
+ U(this, "audioCodecData", null);
17363
17432
  // Timing tracking: maps frame timestamp to arrival time
17364
- c(this, "arrivalTimes", /* @__PURE__ */ new Map());
17433
+ U(this, "arrivalTimes", /* @__PURE__ */ new Map());
17365
17434
  // Track keyframe status per timestamp
17366
- c(this, "keyframeStatus", /* @__PURE__ */ new Map());
17435
+ U(this, "keyframeStatus", /* @__PURE__ */ new Map());
17367
17436
  // Bandwidth tracking
17368
- c(this, "videoBytesReceived", 0);
17369
- c(this, "audioBytesReceived", 0);
17370
- c(this, "lastBandwidthUpdateTime", 0);
17371
- c(this, "lastVideoBytesReceived", 0);
17372
- c(this, "lastAudioBytesReceived", 0);
17373
- c(this, "currentBandwidth", {
17437
+ U(this, "videoBytesReceived", 0);
17438
+ U(this, "audioBytesReceived", 0);
17439
+ U(this, "lastBandwidthUpdateTime", 0);
17440
+ U(this, "lastVideoBytesReceived", 0);
17441
+ U(this, "lastAudioBytesReceived", 0);
17442
+ U(this, "currentBandwidth", {
17374
17443
  videoBytesPerSecond: 0,
17375
17444
  audioBytesPerSecond: 0,
17376
17445
  totalBytesPerSecond: 0
@@ -17570,7 +17639,7 @@ const Ko = class Ko extends BasePlayer {
17570
17639
  * Handle incoming stream data
17571
17640
  */
17572
17641
  async handleStreamData(l) {
17573
- var a, s, d, U, F, B, S, y, E, v, N, T, C, m, Q, p, f;
17642
+ var a, s, d, c, F, B, S, y, E, v, N, T, C, m, Q, p, f;
17574
17643
  const n = l.data;
17575
17644
  if (!n.valid || !n.header)
17576
17645
  return;
@@ -17588,7 +17657,7 @@ const Ko = class Ko extends BasePlayer {
17588
17657
  if (e != null && l.trackName !== e || l.streamType !== "video" || !((s = n.header.media) != null && s.codecData))
17589
17658
  return;
17590
17659
  const i = !!((d = n.header.media) != null && d.keyframe);
17591
- if (codecDataChanged(this.currentCodecData, (U = n.header.media) == null ? void 0 : U.codecData)) {
17660
+ if (codecDataChanged(this.currentCodecData, (c = n.header.media) == null ? void 0 : c.codecData)) {
17592
17661
  if (!i) {
17593
17662
  this.logger.debug("Waiting for keyframe (codec change)");
17594
17663
  return;
@@ -17644,13 +17713,13 @@ const Ko = class Ko extends BasePlayer {
17644
17713
  * Handle incoming audio frame data
17645
17714
  */
17646
17715
  async handleAudioData(l) {
17647
- var r, t, e, i, a, s, d, U, F, B;
17716
+ var r, t, e, i, a, s, d, c, F, B;
17648
17717
  if (!this.config.enableAudio)
17649
17718
  return;
17650
17719
  const n = this.audioCodecData ?? void 0;
17651
17720
  (t = (r = l.header) == null ? void 0 : r.media) != null && t.codecData && codecDataChanged(n, l.header.media.codecData) && (this.audioCodecData = l.header.media.codecData, this.audioPlayer && (this.audioPlayer.dispose(), this.audioPlayer = null), this.audioContext || (this.audioContext = new AudioContext(), this.ownsAudioContext = !0), this.audioPlayer = new LiveAudioPlayer(this.audioContext, {
17652
17721
  bufferDelayMs: this.config.bufferDelayMs ?? 100
17653
- }), await this.audioPlayer.init((e = l.header.media) == null ? void 0 : e.codecData), this.audioPlayer.start(), this.logger.info(`Audio player started: ${(a = (i = l.header.media) == null ? void 0 : i.codecData) == null ? void 0 : a.codecType}, ${(d = (s = l.header.media) == null ? void 0 : s.codecData) == null ? void 0 : d.sampleRate}Hz, ${(F = (U = l.header.media) == null ? void 0 : U.codecData) == null ? void 0 : F.channels}ch`)), this.audioPlayer && l.payload && l.header && this.audioPlayer.decode(l.payload, (B = l.header.media) == null ? void 0 : B.pts);
17722
+ }), await this.audioPlayer.init((e = l.header.media) == null ? void 0 : e.codecData), this.audioPlayer.start(), this.logger.info(`Audio player started: ${(a = (i = l.header.media) == null ? void 0 : i.codecData) == null ? void 0 : a.codecType}, ${(d = (s = l.header.media) == null ? void 0 : s.codecData) == null ? void 0 : d.sampleRate}Hz, ${(F = (c = l.header.media) == null ? void 0 : c.codecData) == null ? void 0 : F.channels}ch`)), this.audioPlayer && l.payload && l.header && this.audioPlayer.decode(l.payload, (B = l.header.media) == null ? void 0 : B.pts);
17654
17723
  }
17655
17724
  /**
17656
17725
  * Configure the decoder for a specific codec
@@ -17725,19 +17794,19 @@ const Ko = class Ko extends BasePlayer {
17725
17794
  */
17726
17795
  convertYUVToVideoFrame(l, n, r) {
17727
17796
  try {
17728
- const { y: t, u: e, v: i, width: a, height: s, chromaStride: d, chromaHeight: U } = l, F = n > 0 ? n : a, B = r > 0 ? r : s, y = a * s, E = d * U, v = y + E * 2, N = new Uint8Array(v);
17797
+ const { y: t, u: e, v: i, width: a, height: s, chromaStride: d, chromaHeight: c } = l, F = n > 0 ? n : a, B = r > 0 ? r : s, y = a * s, E = d * c, v = y + E * 2, N = new Uint8Array(v);
17729
17798
  N.set(t.subarray(0, y), 0);
17730
17799
  const T = a / 2, C = y;
17731
17800
  if (d === T)
17732
17801
  N.set(e.subarray(0, E), C);
17733
17802
  else
17734
- for (let Q = 0; Q < U; Q++)
17803
+ for (let Q = 0; Q < c; Q++)
17735
17804
  N.set(e.subarray(Q * d, Q * d + T), C + Q * T);
17736
- const m = C + T * U;
17805
+ const m = C + T * c;
17737
17806
  if (d === T)
17738
17807
  N.set(i.subarray(0, E), m);
17739
17808
  else
17740
- for (let Q = 0; Q < U; Q++)
17809
+ for (let Q = 0; Q < c; Q++)
17741
17810
  N.set(i.subarray(Q * d, Q * d + T), m + Q * T);
17742
17811
  return new VideoFrame(N, {
17743
17812
  format: "I420",
@@ -17776,7 +17845,7 @@ const Ko = class Ko extends BasePlayer {
17776
17845
  }
17777
17846
  };
17778
17847
  // Recent frame duration samples
17779
- c(Ko, "FPS_SAMPLE_COUNT", 10);
17848
+ U(Ko, "FPS_SAMPLE_COUNT", 10);
17780
17849
  let LiveVideoPlayer = Ko;
17781
17850
  var __defProp = Object.defineProperty, __export = (u, o) => {
17782
17851
  for (var l in o)
@@ -19076,9 +19145,9 @@ var __defProp = Object.defineProperty, __export = (u, o) => {
19076
19145
  parseInt(l[s])
19077
19146
  ) : typeof s == "number" ? s : s === "*" ? void 0 : parseInt(s);
19078
19147
  if (typeof a == "string") {
19079
- const U = a.replace(/(le|be)$/, "");
19148
+ const c = a.replace(/(le|be)$/, "");
19080
19149
  let F;
19081
- switch (/le$/.test(a) ? F = 2 : /be$/.test(a) && (F = 1), U) {
19150
+ switch (/le$/.test(a) ? F = 2 : /be$/.test(a) && (F = 1), c) {
19082
19151
  case "uint8":
19083
19152
  n = this.readUint8Array(d);
19084
19153
  break;
@@ -19121,24 +19190,24 @@ var __defProp = Object.defineProperty, __export = (u, o) => {
19121
19190
  }
19122
19191
  } else if (d) {
19123
19192
  n = new Array(d);
19124
- for (let U = 0; U < d; U++) {
19193
+ for (let c = 0; c < d; c++) {
19125
19194
  const F = this.readType(a, l);
19126
19195
  if (!F)
19127
19196
  return;
19128
- n[U] = F;
19197
+ n[c] = F;
19129
19198
  }
19130
19199
  } else
19131
19200
  for (n = []; ; ) {
19132
- const U = this.position;
19201
+ const c = this.position;
19133
19202
  try {
19134
19203
  const F = this.readType(a, l);
19135
19204
  if (!F) {
19136
- this.position = U;
19205
+ this.position = c;
19137
19206
  break;
19138
19207
  }
19139
19208
  n.push(F);
19140
19209
  } catch {
19141
- this.position = U;
19210
+ this.position = c;
19142
19211
  break;
19143
19212
  }
19144
19213
  }
@@ -19968,13 +20037,13 @@ function parseOneBox(u, o, l) {
19968
20037
  "BoxParser",
19969
20038
  "'" + d + "' box writing not yet implemented, keeping unparsed data in memory for later write"
19970
20039
  ), n.parseDataAndRewind(u)), n.parse(u);
19971
- const U = u.getPosition() - (n.start + n.size);
19972
- return U < 0 ? (Log.warn(
20040
+ const c = u.getPosition() - (n.start + n.size);
20041
+ return c < 0 ? (Log.warn(
19973
20042
  "BoxParser",
19974
- "Parsing of box '" + d + "' did not read the entire indicated box data size (missing " + -U + " bytes), seeking forward"
19975
- ), u.seek(n.start + n.size)) : U > 0 && n.size !== 0 && (Log.error(
20043
+ "Parsing of box '" + d + "' did not read the entire indicated box data size (missing " + -c + " bytes), seeking forward"
20044
+ ), u.seek(n.start + n.size)) : c > 0 && n.size !== 0 && (Log.error(
19976
20045
  "BoxParser",
19977
- "Parsing of box '" + d + "' read " + U + " more bytes than the indicated box data size, seeking backwards"
20046
+ "Parsing of box '" + d + "' read " + c + " more bytes than the indicated box data size, seeking backwards"
19978
20047
  ), u.seek(n.start + n.size)), { code: OK, box: n, size: n.size };
19979
20048
  }
19980
20049
  var ContainerBox = class extends Box {
@@ -20276,15 +20345,15 @@ var ContainerBox = class extends Box {
20276
20345
  constructor() {
20277
20346
  super(...arguments), this.box_name = "SampleTableBox", this.sgpds = [], this.sbgps = [], this.subBoxNames = ["sgpd", "sbgp"];
20278
20347
  }
20279
- }, ut.fourcc = "stbl", ut), Ut, mvexBox = (Ut = class extends ContainerBox {
20348
+ }, ut.fourcc = "stbl", ut), ct, mvexBox = (ct = class extends ContainerBox {
20280
20349
  constructor() {
20281
20350
  super(...arguments), this.box_name = "MovieExtendsBox", this.trexs = [], this.subBoxNames = ["trex"];
20282
20351
  }
20283
- }, Ut.fourcc = "mvex", Ut), ct, moofBox = (ct = class extends ContainerBox {
20352
+ }, ct.fourcc = "mvex", ct), Ut, moofBox = (Ut = class extends ContainerBox {
20284
20353
  constructor() {
20285
20354
  super(...arguments), this.box_name = "MovieFragmentBox", this.trafs = [], this.subBoxNames = ["traf"];
20286
20355
  }
20287
- }, ct.fourcc = "moof", ct), Ft, trafBox = (Ft = class extends ContainerBox {
20356
+ }, Ut.fourcc = "moof", Ut), Ft, trafBox = (Ft = class extends ContainerBox {
20288
20357
  constructor() {
20289
20358
  super(...arguments), this.box_name = "TrackFragmentBox", this.truns = [], this.sgpds = [], this.sbgps = [], this.subBoxNames = ["trun", "sgpd", "sbgp"];
20290
20359
  }
@@ -20559,7 +20628,7 @@ var ContainerBox = class extends Box {
20559
20628
  throw new Error("Error reading base offset size");
20560
20629
  }
20561
20630
  const s = [], d = o.readUint16();
20562
- for (let U = 0; U < d; U++) {
20631
+ for (let c = 0; c < d; c++) {
20563
20632
  let F = 0, B = 0, S = 0;
20564
20633
  if (this.version === 1 || this.version === 2)
20565
20634
  switch (this.index_size) {
@@ -20963,12 +21032,12 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
20963
21032
  constructor() {
20964
21033
  super(...arguments), this.box_name = "LHEVCSampleEntry";
20965
21034
  }
20966
- }, ue.fourcc = "lhe1", ue), Ue, lhv1SampleEntry = (Ue = class extends VisualSampleEntry {
21035
+ }, ue.fourcc = "lhe1", ue), ce, lhv1SampleEntry = (ce = class extends VisualSampleEntry {
20967
21036
  constructor() {
20968
21037
  super(...arguments), this.box_name = "LHEVCSampleEntry";
20969
21038
  }
20970
- }, Ue.fourcc = "lhv1", Ue), ce, dvh1SampleEntry = (ce = class extends VisualSampleEntry {
20971
- }, ce.fourcc = "dvh1", ce), Fe, dvheSampleEntry = (Fe = class extends VisualSampleEntry {
21039
+ }, ce.fourcc = "lhv1", ce), Ue, dvh1SampleEntry = (Ue = class extends VisualSampleEntry {
21040
+ }, Ue.fourcc = "dvh1", Ue), Fe, dvheSampleEntry = (Fe = class extends VisualSampleEntry {
20972
21041
  }, Fe.fourcc = "dvhe", Fe), vvcCSampleEntryBase = class extends VisualSampleEntry {
20973
21042
  getCodec() {
20974
21043
  let u = super.getCodec();
@@ -21396,7 +21465,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21396
21465
  print(o) {
21397
21466
  super.printHeader(o), o.log(o.indent + "creation_time: " + this.creation_time), o.log(o.indent + "modification_time: " + this.modification_time), o.log(o.indent + "track_id: " + this.track_id), o.log(o.indent + "duration: " + this.duration), o.log(o.indent + "volume: " + (this.volume >> 8)), o.log(o.indent + "matrix: " + this.matrix.join(", ")), o.log(o.indent + "layer: " + this.layer), o.log(o.indent + "alternate_group: " + this.alternate_group), o.log(o.indent + "width: " + this.width), o.log(o.indent + "height: " + this.height);
21398
21467
  }
21399
- }, un.fourcc = "tkhd", un), Un, trexBox = (Un = class extends FullBox {
21468
+ }, un.fourcc = "tkhd", un), cn, trexBox = (cn = class extends FullBox {
21400
21469
  constructor() {
21401
21470
  super(...arguments), this.box_name = "TrackExtendsBox";
21402
21471
  }
@@ -21406,7 +21475,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21406
21475
  write(o) {
21407
21476
  this.version = 0, this.flags = 0, this.size = 4 * 5, this.writeHeader(o), o.writeUint32(this.track_id), o.writeUint32(this.default_sample_description_index), o.writeUint32(this.default_sample_duration), o.writeUint32(this.default_sample_size), o.writeUint32(this.default_sample_flags);
21408
21477
  }
21409
- }, Un.fourcc = "trex", Un), cn, trunBox = (cn = class extends FullBox {
21478
+ }, cn.fourcc = "trex", cn), Un, trunBox = (Un = class extends FullBox {
21410
21479
  constructor() {
21411
21480
  super(...arguments), this.box_name = "TrackRunBox", this.sample_duration = [], this.sample_size = [], this.sample_flags = [], this.sample_composition_time_offset = [];
21412
21481
  }
@@ -21423,7 +21492,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21423
21492
  for (let l = 0; l < this.sample_count; l++)
21424
21493
  this.flags & TRUN_FLAGS_DURATION && o.writeUint32(this.sample_duration[l]), this.flags & TRUN_FLAGS_SIZE && o.writeUint32(this.sample_size[l]), this.flags & TRUN_FLAGS_FLAGS && o.writeUint32(this.sample_flags[l]), this.flags & TRUN_FLAGS_CTS_OFFSET && (this.version === 0 ? o.writeUint32(this.sample_composition_time_offset[l]) : o.writeInt32(this.sample_composition_time_offset[l]));
21425
21494
  }
21426
- }, cn.fourcc = "trun", cn), Fn, urlBox = (Fn = class extends FullBox {
21495
+ }, Un.fourcc = "trun", Un), Fn, urlBox = (Fn = class extends FullBox {
21427
21496
  constructor() {
21428
21497
  super(...arguments), this.box_name = "DataEntryUrlBox";
21429
21498
  }
@@ -21642,7 +21711,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21642
21711
  mime: ""
21643
21712
  };
21644
21713
  for (let r = 0; r < this.moov.traks.length; r++) {
21645
- const t = this.moov.traks[r], e = t.mdia.minf.stbl.stsd.entries[0], i = t.samples_size, a = t.mdia.mdhd.timescale, s = t.samples_duration, d = i * 8 * a / s, U = {
21714
+ const t = this.moov.traks[r], e = t.mdia.minf.stbl.stsd.entries[0], i = t.samples_size, a = t.mdia.mdhd.timescale, s = t.samples_duration, d = i * 8 * a / s, c = {
21646
21715
  samples_duration: s,
21647
21716
  bitrate: d,
21648
21717
  size: i,
@@ -21668,20 +21737,20 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21668
21737
  track_width: t.tkhd.width / 65536,
21669
21738
  volume: t.tkhd.volume
21670
21739
  };
21671
- if (n.tracks.push(U), t.tref)
21740
+ if (n.tracks.push(c), t.tref)
21672
21741
  for (let F = 0; F < t.tref.references.length; F++)
21673
- U.references.push({
21742
+ c.references.push({
21674
21743
  type: t.tref.references[F].type,
21675
21744
  track_ids: t.tref.references[F].track_ids
21676
21745
  });
21677
- t.edts !== void 0 && t.edts.elst !== void 0 && (U.edits = t.edts.elst.entries), e instanceof AudioSampleEntry ? (U.type = "audio", n.audioTracks.push(U), U.audio = {
21746
+ t.edts !== void 0 && t.edts.elst !== void 0 && (c.edits = t.edts.elst.entries), e instanceof AudioSampleEntry ? (c.type = "audio", n.audioTracks.push(c), c.audio = {
21678
21747
  sample_rate: e.getSampleRate(),
21679
21748
  channel_count: e.getChannelCount(),
21680
21749
  sample_size: e.getSampleSize()
21681
- }) : e instanceof VisualSampleEntry ? (U.type = "video", n.videoTracks.push(U), U.video = {
21750
+ }) : e instanceof VisualSampleEntry ? (c.type = "video", n.videoTracks.push(c), c.video = {
21682
21751
  width: e.getWidth(),
21683
21752
  height: e.getHeight()
21684
- }) : e instanceof SubtitleSampleEntry ? (U.type = "subtitles", n.subtitleTracks.push(U)) : e instanceof HintSampleEntry ? (U.type = "metadata", n.hintTracks.push(U)) : e instanceof MetadataSampleEntry ? (U.type = "metadata", n.metadataTracks.push(U)) : (U.type = "metadata", n.otherTracks.push(U));
21753
+ }) : e instanceof SubtitleSampleEntry ? (c.type = "subtitles", n.subtitleTracks.push(c)) : e instanceof HintSampleEntry ? (c.type = "metadata", n.hintTracks.push(c)) : e instanceof MetadataSampleEntry ? (c.type = "metadata", n.metadataTracks.push(c)) : (c.type = "metadata", n.otherTracks.push(c));
21685
21754
  }
21686
21755
  n.videoTracks && n.videoTracks.length > 0 ? n.mime += 'video/mp4; codecs="' : n.audioTracks && n.audioTracks.length > 0 ? n.mime += 'audio/mp4; codecs="' : n.mime += 'application/mp4; codecs="';
21687
21756
  for (let r = 0; r < n.tracks.length; r++)
@@ -21706,12 +21775,12 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21706
21775
  }
21707
21776
  n.state.accumulatedSize += t.size;
21708
21777
  const e = r.nextSample + 1, i = e - n.state.lastFragmentSampleNumber > n.nb_samples_per_fragment, a = e - n.state.lastSegmentSampleNumber > n.nb_samples;
21709
- let s = i || e % n.nb_samples_per_fragment === 0, d = a || e % n.nb_samples === 0, U = n.state.accumulatedSize >= n.size_per_segment;
21778
+ let s = i || e % n.nb_samples_per_fragment === 0, d = a || e % n.nb_samples === 0, c = n.state.accumulatedSize >= n.size_per_segment;
21710
21779
  const F = !n.rapAlignement || t.is_sync, B = o || r.nextSample + 1 >= r.samples.length;
21711
21780
  if (B && !F && Log.warn(
21712
21781
  "ISOFile",
21713
21782
  "Flushing track #" + n.id + " at sample #" + r.nextSample + " which is not a RAP, this may lead to playback issues"
21714
- ), s = s && F, d = d && F, U = U && F, s || U || B) {
21783
+ ), s = s && F, d = d && F, c = c && F, s || c || B) {
21715
21784
  i ? Log.warn(
21716
21785
  "ISOFile",
21717
21786
  "Fragment on track #" + n.id + " is overdue, creating it with samples [" + n.state.lastFragmentSampleNumber + ", " + r.nextSample + "]"
@@ -21732,7 +21801,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21732
21801
  continue;
21733
21802
  }
21734
21803
  }
21735
- (d || U || B) && (a ? Log.warn(
21804
+ (d || c || B) && (a ? Log.warn(
21736
21805
  "ISOFile",
21737
21806
  "Segment on track #" + n.id + " is overdue, sending it with samples [" + Math.max(0, r.nextSample - n.nb_samples) + ", " + (r.nextSample - 1) + "]"
21738
21807
  ) : Log.info(
@@ -21901,9 +21970,9 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21901
21970
  createFragment(o, l, n, r) {
21902
21971
  const t = [];
21903
21972
  for (let d = l; d <= n; d++) {
21904
- const U = this.getTrackById(o), F = this.getSample(U, d);
21973
+ const c = this.getTrackById(o), F = this.getSample(c, d);
21905
21974
  if (!F) {
21906
- this.setNextSeekPositionFromSample(U.samples[d]);
21975
+ this.setNextSeekPositionFromSample(c.samples[d]);
21907
21976
  return;
21908
21977
  }
21909
21978
  t.push(F);
@@ -21921,8 +21990,8 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
21921
21990
  let s = 0;
21922
21991
  for (const d of t)
21923
21992
  if (d.data) {
21924
- const U = MP4BoxBuffer.fromArrayBuffer(d.data.buffer, s);
21925
- a.stream.insertBuffer(U), s += d.data.byteLength;
21993
+ const c = MP4BoxBuffer.fromArrayBuffer(d.data.buffer, s);
21994
+ a.stream.insertBuffer(c), s += d.data.byteLength;
21926
21995
  }
21927
21996
  return a.write(e), e;
21928
21997
  }
@@ -22067,7 +22136,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22067
22136
  buildTrakSampleLists(o) {
22068
22137
  let l, n, r, t, e, i;
22069
22138
  o.samples = [], o.samples_duration = 0, o.samples_size = 0;
22070
- const a = o.mdia.minf.stbl.stco || o.mdia.minf.stbl.co64, s = o.mdia.minf.stbl.stsc, d = o.mdia.minf.stbl.stsz || o.mdia.minf.stbl.stz2, U = o.mdia.minf.stbl.stts, F = o.mdia.minf.stbl.ctts, B = o.mdia.minf.stbl.stss, S = o.mdia.minf.stbl.stsd, y = o.mdia.minf.stbl.subs, E = o.mdia.minf.stbl.stdp, v = o.mdia.minf.stbl.sbgps, N = o.mdia.minf.stbl.sgpds;
22139
+ const a = o.mdia.minf.stbl.stco || o.mdia.minf.stbl.co64, s = o.mdia.minf.stbl.stsc, d = o.mdia.minf.stbl.stsz || o.mdia.minf.stbl.stz2, c = o.mdia.minf.stbl.stts, F = o.mdia.minf.stbl.ctts, B = o.mdia.minf.stbl.stss, S = o.mdia.minf.stbl.stsd, y = o.mdia.minf.stbl.subs, E = o.mdia.minf.stbl.stdp, v = o.mdia.minf.stbl.sbgps, N = o.mdia.minf.stbl.sgpds;
22071
22140
  let T = -1, C = -1, m = -1, Q = -1, p = 0, f = 0, h = 0;
22072
22141
  if (w.initSampleGroups(o, void 0, v, N), !(typeof d > "u")) {
22073
22142
  for (l = 0; l < d.sample_sizes.length; l++) {
@@ -22078,7 +22147,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22078
22147
  alreadyRead: 0,
22079
22148
  size: d.sample_sizes[l]
22080
22149
  };
22081
- o.samples[l] = R, o.samples_size += R.size, l === 0 ? (r = 1, n = 0, R.chunk_index = r, R.chunk_run_index = n, i = s.samples_per_chunk[n], e = 0, n + 1 < s.first_chunk.length ? t = s.first_chunk[n + 1] - 1 : t = 1 / 0) : l < i ? (R.chunk_index = r, R.chunk_run_index = n) : (r++, R.chunk_index = r, e = 0, r <= t || (n++, n + 1 < s.first_chunk.length ? t = s.first_chunk[n + 1] - 1 : t = 1 / 0), R.chunk_run_index = n, i += s.samples_per_chunk[n]), R.description_index = s.sample_description_index[R.chunk_run_index] - 1, R.description = S.entries[R.description_index], R.offset = a.chunk_offsets[R.chunk_index - 1] + e, e += R.size, l > T && (C++, T < 0 && (T = 0), T += U.sample_counts[C]), l > 0 ? (o.samples[l - 1].duration = U.sample_deltas[C], o.samples_duration += o.samples[l - 1].duration, R.dts = o.samples[l - 1].dts + o.samples[l - 1].duration) : R.dts = 0, F ? (l >= m && (Q++, m < 0 && (m = 0), m += F.sample_counts[Q]), R.cts = o.samples[l].dts + F.sample_offsets[Q]) : R.cts = R.dts, B ? (l === B.sample_numbers[p] - 1 ? (R.is_sync = !0, p++) : (R.is_sync = !1, R.degradation_priority = 0), y && y.entries[f].sample_delta + h === l + 1 && (R.subsamples = y.entries[f].subsamples, h += y.entries[f].sample_delta, f++)) : R.is_sync = !0, w.process_sdtp(o.mdia.minf.stbl.sdtp, R, R.number), E ? R.degradation_priority = E.priority[l] : R.degradation_priority = 0, y && y.entries[f].sample_delta + h === l && (R.subsamples = y.entries[f].subsamples, h += y.entries[f].sample_delta), (v.length > 0 || N.length > 0) && w.setSampleGroupProperties(o, R, l, o.sample_groups_info);
22150
+ o.samples[l] = R, o.samples_size += R.size, l === 0 ? (r = 1, n = 0, R.chunk_index = r, R.chunk_run_index = n, i = s.samples_per_chunk[n], e = 0, n + 1 < s.first_chunk.length ? t = s.first_chunk[n + 1] - 1 : t = 1 / 0) : l < i ? (R.chunk_index = r, R.chunk_run_index = n) : (r++, R.chunk_index = r, e = 0, r <= t || (n++, n + 1 < s.first_chunk.length ? t = s.first_chunk[n + 1] - 1 : t = 1 / 0), R.chunk_run_index = n, i += s.samples_per_chunk[n]), R.description_index = s.sample_description_index[R.chunk_run_index] - 1, R.description = S.entries[R.description_index], R.offset = a.chunk_offsets[R.chunk_index - 1] + e, e += R.size, l > T && (C++, T < 0 && (T = 0), T += c.sample_counts[C]), l > 0 ? (o.samples[l - 1].duration = c.sample_deltas[C], o.samples_duration += o.samples[l - 1].duration, R.dts = o.samples[l - 1].dts + o.samples[l - 1].duration) : R.dts = 0, F ? (l >= m && (Q++, m < 0 && (m = 0), m += F.sample_counts[Q]), R.cts = o.samples[l].dts + F.sample_offsets[Q]) : R.cts = R.dts, B ? (l === B.sample_numbers[p] - 1 ? (R.is_sync = !0, p++) : (R.is_sync = !1, R.degradation_priority = 0), y && y.entries[f].sample_delta + h === l + 1 && (R.subsamples = y.entries[f].subsamples, h += y.entries[f].sample_delta, f++)) : R.is_sync = !0, w.process_sdtp(o.mdia.minf.stbl.sdtp, R, R.number), E ? R.degradation_priority = E.priority[l] : R.degradation_priority = 0, y && y.entries[f].sample_delta + h === l && (R.subsamples = y.entries[f].subsamples, h += y.entries[f].sample_delta), (v.length > 0 || N.length > 0) && w.setSampleGroupProperties(o, R, l, o.sample_groups_info);
22082
22151
  }
22083
22152
  l > 0 && (o.samples[l - 1].duration = Math.max(o.mdia.mdhd.duration - o.samples[l - 1].dts, 0), o.samples_duration += o.samples[l - 1].duration);
22084
22153
  }
@@ -22095,8 +22164,8 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22095
22164
  if (this.lastMoofIndex++, e.type === "moof") {
22096
22165
  const i = e;
22097
22166
  for (let a = 0; a < i.trafs.length; a++) {
22098
- const s = i.trafs[a], d = this.getTrackById(s.tfhd.track_id), U = this.getTrexById(s.tfhd.track_id);
22099
- s.tfhd.flags & TFHD_FLAG_SAMPLE_DESC ? o = s.tfhd.default_sample_description_index : o = U ? U.default_sample_description_index : 1, s.tfhd.flags & TFHD_FLAG_SAMPLE_DUR ? l = s.tfhd.default_sample_duration : l = U ? U.default_sample_duration : 0, s.tfhd.flags & TFHD_FLAG_SAMPLE_SIZE ? n = s.tfhd.default_sample_size : n = U ? U.default_sample_size : 0, s.tfhd.flags & TFHD_FLAG_SAMPLE_FLAGS ? r = s.tfhd.default_sample_flags : r = U ? U.default_sample_flags : 0, s.sample_number = 0, s.sbgps.length > 0 && w.initSampleGroups(d, s, s.sbgps, d.mdia.minf.stbl.sgpds, s.sgpds);
22167
+ const s = i.trafs[a], d = this.getTrackById(s.tfhd.track_id), c = this.getTrexById(s.tfhd.track_id);
22168
+ s.tfhd.flags & TFHD_FLAG_SAMPLE_DESC ? o = s.tfhd.default_sample_description_index : o = c ? c.default_sample_description_index : 1, s.tfhd.flags & TFHD_FLAG_SAMPLE_DUR ? l = s.tfhd.default_sample_duration : l = c ? c.default_sample_duration : 0, s.tfhd.flags & TFHD_FLAG_SAMPLE_SIZE ? n = s.tfhd.default_sample_size : n = c ? c.default_sample_size : 0, s.tfhd.flags & TFHD_FLAG_SAMPLE_FLAGS ? r = s.tfhd.default_sample_flags : r = c ? c.default_sample_flags : 0, s.sample_number = 0, s.sbgps.length > 0 && w.initSampleGroups(d, s, s.sbgps, d.mdia.minf.stbl.sgpds, s.sgpds);
22100
22169
  for (let F = 0; F < s.truns.length; F++) {
22101
22170
  const B = s.truns[F];
22102
22171
  for (let S = 0; S < B.sample_count; S++) {
@@ -22341,8 +22410,8 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22341
22410
  for (let s = 0; s < i.props.length; s++) {
22342
22411
  const d = i.props[s];
22343
22412
  if (d.property_index > 0 && d.property_index - 1 < n.iprp.ipco.boxes.length) {
22344
- const U = n.iprp.ipco.boxes[d.property_index - 1];
22345
- a.properties[U.type] = U, a.properties.boxes.push(U);
22413
+ const c = n.iprp.ipco.boxes[d.property_index - 1];
22414
+ a.properties[c.type] = c, a.properties.boxes.push(c);
22346
22415
  }
22347
22416
  }
22348
22417
  }
@@ -22497,8 +22566,8 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22497
22566
  "ISOFile",
22498
22567
  "Transferring 'mdat' data from buffer #" + t + " (" + i + " to " + a + ")"
22499
22568
  );
22500
- const s = a - i, d = new MP4BoxBuffer(s), U = l.stream.getAbsoluteEndPosition();
22501
- DataStream.memcpy(d, 0, e, i, s), d.fileStart = U, l.stream.insertBuffer(d), e.usedBytes += s;
22569
+ const s = a - i, d = new MP4BoxBuffer(s), c = l.stream.getAbsoluteEndPosition();
22570
+ DataStream.memcpy(d, 0, e, i, s), d.fileStart = c, l.stream.insertBuffer(d), e.usedBytes += s;
22502
22571
  }
22503
22572
  }
22504
22573
  }
@@ -22550,25 +22619,25 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22550
22619
  const s = t.addBox(new minfBox()), d = BoxRegistry.sampleEntry[l.type];
22551
22620
  if (!d)
22552
22621
  return;
22553
- const U = new d();
22554
- if (U.data_reference_index = 1, U instanceof VisualSampleEntry) {
22555
- const Q = U, p = s.addBox(new vmhdBox());
22622
+ const c = new d();
22623
+ if (c.data_reference_index = 1, c instanceof VisualSampleEntry) {
22624
+ const Q = c, p = s.addBox(new vmhdBox());
22556
22625
  p.graphicsmode = 0, p.opcolor = [0, 0, 0], Q.width = l.width, Q.height = l.height, Q.horizresolution = 72 << 16, Q.vertresolution = 72 << 16, Q.frame_count = 1, Q.compressorname = l.type + " Compressor", Q.depth = 24, l.avcDecoderConfigRecord ? Q.addBox(new avcCBox(l.avcDecoderConfigRecord.byteLength)).parse(new DataStream(l.avcDecoderConfigRecord)) : l.hevcDecoderConfigRecord && Q.addBox(new hvcCBox(l.hevcDecoderConfigRecord.byteLength)).parse(new DataStream(l.hevcDecoderConfigRecord));
22557
- } else if (U instanceof AudioSampleEntry) {
22558
- const Q = U, p = s.addBox(new smhdBox());
22626
+ } else if (c instanceof AudioSampleEntry) {
22627
+ const Q = c, p = s.addBox(new smhdBox());
22559
22628
  p.balance = l.balance || 0, Q.channel_count = l.channel_count || 2, Q.samplesize = l.samplesize || 16, Q.samplerate = l.samplerate || 65536;
22560
22629
  } else
22561
- U instanceof HintSampleEntry ? s.addBox(new hmhdBox()) : U instanceof SubtitleSampleEntry ? (s.addBox(new sthdBox()), U instanceof stppSampleEntry && (U.namespace = l.namespace || "nonamespace", U.schema_location = l.schema_location || "", U.auxiliary_mime_types = l.auxiliary_mime_types || "")) : U instanceof MetadataSampleEntry ? s.addBox(new nmhdBox()) : U instanceof SystemSampleEntry ? s.addBox(new nmhdBox()) : s.addBox(new nmhdBox());
22562
- l.description && U.addBox.call(
22563
- U,
22630
+ c instanceof HintSampleEntry ? s.addBox(new hmhdBox()) : c instanceof SubtitleSampleEntry ? (s.addBox(new sthdBox()), c instanceof stppSampleEntry && (c.namespace = l.namespace || "nonamespace", c.schema_location = l.schema_location || "", c.auxiliary_mime_types = l.auxiliary_mime_types || "")) : c instanceof MetadataSampleEntry ? s.addBox(new nmhdBox()) : c instanceof SystemSampleEntry ? s.addBox(new nmhdBox()) : s.addBox(new nmhdBox());
22631
+ l.description && c.addBox.call(
22632
+ c,
22564
22633
  l.description
22565
22634
  ), l.description_boxes && l.description_boxes.forEach(function(Q) {
22566
- U.addBox.call(U, Q);
22635
+ c.addBox.call(c, Q);
22567
22636
  });
22568
22637
  const B = s.addBox(new dinfBox()).addBox(new drefBox()), S = new urlBox();
22569
22638
  S.flags = 1, B.addEntry(S);
22570
22639
  const y = s.addBox(new stblBox());
22571
- y.addBox(new stsdBox()).addEntry(U);
22640
+ y.addBox(new stsdBox()).addEntry(c);
22572
22641
  const v = y.addBox(new sttsBox());
22573
22642
  v.sample_counts = [], v.sample_deltas = [];
22574
22643
  const N = y.addBox(new stscBox());
@@ -22590,7 +22659,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22590
22659
  is_leading: a = 0,
22591
22660
  depends_on: s = 0,
22592
22661
  is_depended_on: d = 0,
22593
- has_redundancy: U = 0,
22662
+ has_redundancy: c = 0,
22594
22663
  degradation_priority: F = 0,
22595
22664
  subsamples: B,
22596
22665
  offset: S = 0
@@ -22614,7 +22683,7 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22614
22683
  is_leading: a,
22615
22684
  depends_on: s,
22616
22685
  is_depended_on: d,
22617
- has_redundancy: U,
22686
+ has_redundancy: c,
22618
22687
  degradation_priority: F,
22619
22688
  offset: S,
22620
22689
  subsamples: B
@@ -22645,8 +22714,8 @@ var avcCSampleEntryBase = class extends VisualSampleEntry {
22645
22714
  const s = e.addBox(new trunBox());
22646
22715
  s.flags = TRUN_FLAGS_DATA_OFFSET | TRUN_FLAGS_DURATION | TRUN_FLAGS_SIZE | TRUN_FLAGS_FLAGS | TRUN_FLAGS_CTS_OFFSET, s.data_offset = 0, s.first_sample_flags = 0, s.sample_count = o.length;
22647
22716
  for (const d of o) {
22648
- let U = 0;
22649
- d.is_sync ? U = 1 << 25 : U = 65536, s.sample_duration.push(d.duration), s.sample_size.push(d.size), s.sample_flags.push(U), s.sample_composition_time_offset.push(d.cts - d.dts);
22717
+ let c = 0;
22718
+ d.is_sync ? c = 1 << 25 : c = 65536, s.sample_duration.push(d.duration), s.sample_size.push(d.size), s.sample_flags.push(c), s.sample_composition_time_offset.push(d.cts - d.dts);
22650
22719
  }
22651
22720
  return r;
22652
22721
  }
@@ -23511,14 +23580,14 @@ var pn, a1lxBox = (pn = class extends Box {
23511
23580
  parse(o) {
23512
23581
  this.angle = o.readUint8() & 3;
23513
23582
  }
23514
- }, ui.fourcc = "irot", ui), Ui, ispeBox = (Ui = class extends FullBox {
23583
+ }, ui.fourcc = "irot", ui), ci, ispeBox = (ci = class extends FullBox {
23515
23584
  constructor() {
23516
23585
  super(...arguments), this.box_name = "ImageSpatialExtentsProperty";
23517
23586
  }
23518
23587
  parse(o) {
23519
23588
  this.parseFullHeader(o), this.image_width = o.readUint32(), this.image_height = o.readUint32();
23520
23589
  }
23521
- }, Ui.fourcc = "ispe", Ui), ci, itaiBox = (ci = class extends FullBox {
23590
+ }, ci.fourcc = "ispe", ci), Ui, itaiBox = (Ui = class extends FullBox {
23522
23591
  constructor() {
23523
23592
  super(...arguments), this.box_name = "TAITimestampBox";
23524
23593
  }
@@ -23527,7 +23596,7 @@ var pn, a1lxBox = (pn = class extends Box {
23527
23596
  const l = o.readUint8();
23528
23597
  this.sychronization_state = l >> 7 & 1, this.timestamp_generation_failure = l >> 6 & 1, this.timestamp_is_modified = l >> 5 & 1;
23529
23598
  }
23530
- }, ci.fourcc = "itai", ci), Fi, kindBox = (Fi = class extends FullBox {
23599
+ }, Ui.fourcc = "itai", Ui), Fi, kindBox = (Fi = class extends FullBox {
23531
23600
  constructor() {
23532
23601
  super(...arguments), this.box_name = "KindBox";
23533
23602
  }
@@ -24168,21 +24237,21 @@ var _, dataBox = (_ = class extends Box {
24168
24237
  parse(o) {
24169
24238
  this.time = o.readUint32();
24170
24239
  }
24171
- }, uo.fourcc = "tmax", uo), Uo, tminBox = (Uo = class extends Box {
24240
+ }, uo.fourcc = "tmax", uo), co, tminBox = (co = class extends Box {
24172
24241
  constructor() {
24173
24242
  super(...arguments), this.box_name = "hintminrelativetime";
24174
24243
  }
24175
24244
  parse(o) {
24176
24245
  this.time = o.readUint32();
24177
24246
  }
24178
- }, Uo.fourcc = "tmin", Uo), co, totlBox = (co = class extends Box {
24247
+ }, co.fourcc = "tmin", co), Uo, totlBox = (Uo = class extends Box {
24179
24248
  constructor() {
24180
24249
  super(...arguments), this.box_name = "hintBytesSent";
24181
24250
  }
24182
24251
  parse(o) {
24183
24252
  this.bytessent = o.readUint32();
24184
24253
  }
24185
- }, co.fourcc = "totl", co), Fo, tpayBox = (Fo = class extends Box {
24254
+ }, Uo.fourcc = "totl", Uo), Fo, tpayBox = (Fo = class extends Box {
24186
24255
  constructor() {
24187
24256
  super(...arguments), this.box_name = "hintBytesSent";
24188
24257
  }
@@ -24493,27 +24562,27 @@ registerBoxes(all_boxes_exports);
24493
24562
  registerDescriptors(descriptor_exports);
24494
24563
  class MP4FileSource {
24495
24564
  constructor(o = {}) {
24496
- c(this, "mp4File", null);
24497
- c(this, "fileInfo", null);
24498
- c(this, "videoTrackId", null);
24499
- c(this, "audioTrackId", null);
24500
- c(this, "videoTrack", null);
24501
- c(this, "audioTrack", null);
24565
+ U(this, "mp4File", null);
24566
+ U(this, "fileInfo", null);
24567
+ U(this, "videoTrackId", null);
24568
+ U(this, "audioTrackId", null);
24569
+ U(this, "videoTrack", null);
24570
+ U(this, "audioTrack", null);
24502
24571
  // Sample extraction state
24503
- c(this, "nextVideoSampleIndex", 0);
24504
- c(this, "nextAudioSampleIndex", 0);
24505
- c(this, "totalVideoSamples", 0);
24506
- c(this, "totalAudioSamples", 0);
24507
- c(this, "samplesRequested", !1);
24508
- c(this, "isProgressiveLoading", !1);
24572
+ U(this, "nextVideoSampleIndex", 0);
24573
+ U(this, "nextAudioSampleIndex", 0);
24574
+ U(this, "totalVideoSamples", 0);
24575
+ U(this, "totalAudioSamples", 0);
24576
+ U(this, "samplesRequested", !1);
24577
+ U(this, "isProgressiveLoading", !1);
24509
24578
  // File loading state
24510
- c(this, "fileSize", 0);
24511
- c(this, "loadedBytes", 0);
24579
+ U(this, "fileSize", 0);
24580
+ U(this, "loadedBytes", 0);
24512
24581
  // Codec config data (needed for decoder configuration)
24513
- c(this, "videoDescription", null);
24514
- c(this, "audioDescription", null);
24582
+ U(this, "videoDescription", null);
24583
+ U(this, "audioDescription", null);
24515
24584
  // Event handlers
24516
- c(this, "events", {});
24585
+ U(this, "events", {});
24517
24586
  this.events = o;
24518
24587
  }
24519
24588
  /**
@@ -24553,14 +24622,14 @@ class MP4FileSource {
24553
24622
  return new Promise((t, e) => {
24554
24623
  let i = !1;
24555
24624
  const a = this.mp4File.onSamples;
24556
- this.mp4File.onSamples = (U, F, B) => {
24557
- !i && U === this.videoTrackId && B.length > 0 && (i = !0), a == null || a.call(this.mp4File, U, F, B);
24625
+ this.mp4File.onSamples = (c, F, B) => {
24626
+ !i && c === this.videoTrackId && B.length > 0 && (i = !0), a == null || a.call(this.mp4File, c, F, B);
24558
24627
  };
24559
24628
  const s = this.mp4File.onReady;
24560
- this.mp4File.onReady = (U) => {
24561
- s == null || s.call(this.mp4File, U), this.fileInfo && !r && (r = !0);
24629
+ this.mp4File.onReady = (c) => {
24630
+ s == null || s.call(this.mp4File, c), this.fileInfo && !r && (r = !0);
24562
24631
  }, (async () => {
24563
- var U, F, B, S, y, E, v, N, T, C;
24632
+ var c, F, B, S, y, E, v, N, T, C;
24564
24633
  try {
24565
24634
  const m = await fetch(o, {
24566
24635
  headers: { Range: `bytes=0-${l - 1}` }
@@ -24572,7 +24641,7 @@ class MP4FileSource {
24572
24641
  const f = await m.arrayBuffer();
24573
24642
  this.fileSize = f.byteLength, this.loadedBytes = f.byteLength;
24574
24643
  const h = f;
24575
- h.fileStart = 0, (U = this.mp4File) == null || U.appendBuffer(h), (F = this.mp4File) == null || F.flush(), this.fileInfo ? t(this.fileInfo) : e(new Error("File loaded but no video track found"));
24644
+ h.fileStart = 0, (c = this.mp4File) == null || c.appendBuffer(h), (F = this.mp4File) == null || F.flush(), this.fileInfo ? t(this.fileInfo) : e(new Error("File loaded but no video track found"));
24576
24645
  return;
24577
24646
  }
24578
24647
  if (this.isProgressiveLoading = !0, !this.fileSize) {
@@ -24611,7 +24680,7 @@ class MP4FileSource {
24611
24680
  */
24612
24681
  continueLoadingInBackground(o, l, n) {
24613
24682
  (async () => {
24614
- var t, e, i, a, s, d, U, F;
24683
+ var t, e, i, a, s, d, c, F;
24615
24684
  let r = l;
24616
24685
  try {
24617
24686
  for (; r < this.fileSize; ) {
@@ -24629,7 +24698,7 @@ class MP4FileSource {
24629
24698
  }
24630
24699
  (d = this.mp4File) == null || d.flush();
24631
24700
  } catch (B) {
24632
- (F = (U = this.events).onError) == null || F.call(U, B);
24701
+ (F = (c = this.events).onError) == null || F.call(c, B);
24633
24702
  }
24634
24703
  })();
24635
24704
  }
@@ -24651,9 +24720,9 @@ class MP4FileSource {
24651
24720
  let l = 0;
24652
24721
  return new Promise((n, r) => {
24653
24722
  const t = (i) => {
24654
- var s, d, U;
24723
+ var s, d, c;
24655
24724
  const a = new ArrayBuffer(i.byteLength);
24656
- new Uint8Array(a).set(i), a.fileStart = l, l += a.byteLength, this.loadedBytes = l, (d = (s = this.events).onProgress) == null || d.call(s, this.loadedBytes, this.fileSize), (U = this.mp4File) == null || U.appendBuffer(a);
24725
+ new Uint8Array(a).set(i), a.fileStart = l, l += a.byteLength, this.loadedBytes = l, (d = (s = this.events).onProgress) == null || d.call(s, this.loadedBytes, this.fileSize), (c = this.mp4File) == null || c.appendBuffer(a);
24657
24726
  }, e = async () => {
24658
24727
  var i;
24659
24728
  try {
@@ -24706,7 +24775,7 @@ class MP4FileSource {
24706
24775
  * Handle file ready event
24707
24776
  */
24708
24777
  handleFileReady(o) {
24709
- var l, n, r, t, e, i, a, s, d, U, F, B, S, y, E, v, N, T, C, m, Q, p, f, h, R, J, V, W, b, g;
24778
+ var l, n, r, t, e, i, a, s, d, c, F, B, S, y, E, v, N, T, C, m, Q, p, f, h, R, J, V, W, b, g;
24710
24779
  if (o.videoTracks.length > 0) {
24711
24780
  this.videoTrack = o.videoTracks[0], this.videoTrackId = this.videoTrack.id, this.totalVideoSamples = this.videoTrack.nb_samples;
24712
24781
  const Z = (l = this.mp4File) == null ? void 0 : l.getTrackById(this.videoTrackId);
@@ -24722,7 +24791,7 @@ class MP4FileSource {
24722
24791
  this.audioTrack = o.audioTracks[0], this.audioTrackId = this.audioTrack.id, this.totalAudioSamples = this.audioTrack.nb_samples;
24723
24792
  const Z = (a = this.mp4File) == null ? void 0 : a.getTrackById(this.audioTrackId);
24724
24793
  if (Z) {
24725
- const M = (B = (F = (U = (d = (s = Z.mdia) == null ? void 0 : s.minf) == null ? void 0 : d.stbl) == null ? void 0 : U.stsd) == null ? void 0 : F.entries) == null ? void 0 : B[0];
24794
+ const M = (B = (F = (c = (d = (s = Z.mdia) == null ? void 0 : s.minf) == null ? void 0 : d.stbl) == null ? void 0 : c.stsd) == null ? void 0 : F.entries) == null ? void 0 : B[0];
24726
24795
  if (M) {
24727
24796
  const O = M.esds;
24728
24797
  if (O) {
@@ -24787,10 +24856,10 @@ class MP4FileSource {
24787
24856
  if (!(n ? this.videoTrack : this.audioTrack))
24788
24857
  return;
24789
24858
  const t = l.filter((d) => d.data != null).map((d) => {
24790
- const U = d.cts / d.timescale * 1e6, F = d.duration / d.timescale * 1e6;
24859
+ const c = d.cts / d.timescale * 1e6, F = d.duration / d.timescale * 1e6;
24791
24860
  return {
24792
24861
  data: d.data,
24793
- timestamp: U,
24862
+ timestamp: c,
24794
24863
  duration: F,
24795
24864
  isKeyframe: d.is_sync,
24796
24865
  type: n ? "video" : "audio"
@@ -24964,14 +25033,14 @@ registerProcessor('audio-play-processor', AudioPlayProcessor);
24964
25033
  `;
24965
25034
  class FileAudioPlayer {
24966
25035
  constructor(o, l = {}) {
24967
- c(this, "ctx");
24968
- c(this, "decoder", null);
24969
- c(this, "workletNode", null);
24970
- c(this, "gainNode");
24971
- c(this, "initialized", !1);
24972
- c(this, "targetSampleRate");
25036
+ U(this, "ctx");
25037
+ U(this, "decoder", null);
25038
+ U(this, "workletNode", null);
25039
+ U(this, "gainNode");
25040
+ U(this, "initialized", !1);
25041
+ U(this, "targetSampleRate");
24973
25042
  // Audio codec config from MP4
24974
- c(this, "codecConfig", null);
25043
+ U(this, "codecConfig", null);
24975
25044
  this.ctx = o, this.targetSampleRate = l.sampleRate ?? o.sampleRate, this.gainNode = this.ctx.createGain();
24976
25045
  }
24977
25046
  /**
@@ -25040,8 +25109,8 @@ class FileAudioPlayer {
25040
25109
  if (o.numberOfChannels === 1)
25041
25110
  r.set(d), t.set(d);
25042
25111
  else
25043
- for (let U = 0; U < l; U++)
25044
- r[U] = d[U * 2], t[U] = d[U * 2 + 1];
25112
+ for (let c = 0; c < l; c++)
25113
+ r[c] = d[c * 2], t[c] = d[c * 2 + 1];
25045
25114
  } else {
25046
25115
  const a = o.allocationSize({
25047
25116
  planeIndex: 0,
@@ -25057,12 +25126,12 @@ class FileAudioPlayer {
25057
25126
  planeIndex: 1,
25058
25127
  frameOffset: 0,
25059
25128
  frameCount: o.numberOfFrames
25060
- }), U = new ArrayBuffer(d);
25061
- o.copyTo(U, {
25129
+ }), c = new ArrayBuffer(d);
25130
+ o.copyTo(c, {
25062
25131
  planeIndex: 1,
25063
25132
  frameOffset: 0,
25064
25133
  frameCount: o.numberOfFrames
25065
- }), t.set(new Float32Array(U));
25134
+ }), t.set(new Float32Array(c));
25066
25135
  } else
25067
25136
  t.set(r);
25068
25137
  }
@@ -25086,8 +25155,8 @@ class FileAudioPlayer {
25086
25155
  return o;
25087
25156
  const r = l / n, t = Math.floor(o.length / r), e = new Float32Array(t);
25088
25157
  for (let i = 0; i < t; i++) {
25089
- const a = i * r, s = Math.floor(a), d = Math.min(s + 1, o.length - 1), U = a - s;
25090
- e[i] = o[s] * (1 - U) + o[d] * U;
25158
+ const a = i * r, s = Math.floor(a), d = Math.min(s + 1, o.length - 1), c = a - s;
25159
+ e[i] = o[s] * (1 - c) + o[d] * c;
25091
25160
  }
25092
25161
  return e;
25093
25162
  }
@@ -25166,41 +25235,41 @@ class FileAudioPlayer {
25166
25235
  class FileVideoPlayer extends BasePlayer {
25167
25236
  constructor(l = {}) {
25168
25237
  super("idle", l.debugLogging ?? !1);
25169
- c(this, "config");
25238
+ U(this, "config");
25170
25239
  // Source and decoder
25171
- c(this, "fileSource", null);
25172
- c(this, "decoder", null);
25240
+ U(this, "fileSource", null);
25241
+ U(this, "decoder", null);
25173
25242
  // Audio
25174
- c(this, "audioContext", null);
25175
- c(this, "audioPlayer", null);
25176
- c(this, "ownsAudioContext", !1);
25177
- c(this, "audioInitialized", !1);
25243
+ U(this, "audioContext", null);
25244
+ U(this, "audioPlayer", null);
25245
+ U(this, "ownsAudioContext", !1);
25246
+ U(this, "audioInitialized", !1);
25178
25247
  // File info
25179
- c(this, "fileInfo", null);
25248
+ U(this, "fileInfo", null);
25180
25249
  // Frame buffer - sorted by timestamp
25181
- c(this, "frameBuffer", []);
25182
- c(this, "minBufferSize", 3);
25250
+ U(this, "frameBuffer", []);
25251
+ U(this, "minBufferSize", 3);
25183
25252
  // Minimum frames before starting playback (100ms at 30fps)
25184
25253
  // Sample queues - video and audio samples waiting to be decoded
25185
- c(this, "sampleQueue", []);
25186
- c(this, "audioSampleQueue", []);
25187
- c(this, "nextSampleIndex", 0);
25188
- c(this, "nextAudioSampleIndex", 0);
25189
- c(this, "maxDecoderQueue", 10);
25254
+ U(this, "sampleQueue", []);
25255
+ U(this, "audioSampleQueue", []);
25256
+ U(this, "nextSampleIndex", 0);
25257
+ U(this, "nextAudioSampleIndex", 0);
25258
+ U(this, "maxDecoderQueue", 10);
25190
25259
  // Max chunks to keep in decoder queue
25191
25260
  // Buffer ready promise - resolves when enough frames are buffered
25192
- c(this, "bufferReadyResolve", null);
25261
+ U(this, "bufferReadyResolve", null);
25193
25262
  // Playback state
25194
- c(this, "playStartTime", 0);
25263
+ U(this, "playStartTime", 0);
25195
25264
  // performance.now() when play started
25196
- c(this, "playStartPosition", 0);
25265
+ U(this, "playStartPosition", 0);
25197
25266
  // Video position when play started (ms)
25198
- c(this, "currentPosition", 0);
25267
+ U(this, "currentPosition", 0);
25199
25268
  // Current position in video (ms)
25200
- c(this, "lastVideoFrame", null);
25269
+ U(this, "lastVideoFrame", null);
25201
25270
  // Seeking state
25202
- c(this, "isSeeking", !1);
25203
- c(this, "maxAudioBufferMs", 2e3);
25271
+ U(this, "isSeeking", !1);
25272
+ U(this, "maxAudioBufferMs", 2e3);
25204
25273
  const n = l.playMode ?? (l.loop ? "loop" : "once");
25205
25274
  this.config = {
25206
25275
  preferredDecoder: l.preferredDecoder ?? "webcodecs-sw",
@@ -25569,10 +25638,10 @@ function createMoQSource(u) {
25569
25638
  class MoQSource extends BaseStreamSource {
25570
25639
  constructor(l) {
25571
25640
  super();
25572
- c(this, "config");
25573
- c(this, "session", null);
25574
- c(this, "trackTypeMap", /* @__PURE__ */ new Map());
25575
- c(this, "connecting", !1);
25641
+ U(this, "config");
25642
+ U(this, "session", null);
25643
+ U(this, "trackTypeMap", /* @__PURE__ */ new Map());
25644
+ U(this, "connecting", !1);
25576
25645
  this.config = l;
25577
25646
  for (const n of l.subscriptions)
25578
25647
  this.trackTypeMap.set(n.trackName, n.streamType);
@@ -25661,15 +25730,15 @@ const moqSource = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
25661
25730
  class WebSocketSource extends BaseStreamSource {
25662
25731
  constructor(l = {}) {
25663
25732
  super();
25664
- c(this, "webSocket", null);
25665
- c(this, "messageWaiters", []);
25666
- c(this, "requestId", 0);
25667
- c(this, "timeoutCheckInterval", null);
25668
- c(this, "config");
25669
- c(this, "lastKeyframeRequest", 0);
25670
- c(this, "currentTrackName", "default");
25671
- c(this, "reconnectTimeout", null);
25672
- c(this, "disposed", !1);
25733
+ U(this, "webSocket", null);
25734
+ U(this, "messageWaiters", []);
25735
+ U(this, "requestId", 0);
25736
+ U(this, "timeoutCheckInterval", null);
25737
+ U(this, "config");
25738
+ U(this, "lastKeyframeRequest", 0);
25739
+ U(this, "currentTrackName", "default");
25740
+ U(this, "reconnectTimeout", null);
25741
+ U(this, "disposed", !1);
25673
25742
  this.config = {
25674
25743
  url: l.url || "",
25675
25744
  useCurrentHost: l.useCurrentHost ?? !0,
@@ -25897,23 +25966,23 @@ function isAudioCodec(u) {
25897
25966
  }
25898
25967
  class MediaStreamEncoder {
25899
25968
  constructor(o, l, n, r) {
25900
- c(this, "audioWorker");
25901
- c(this, "videoWorker");
25902
- c(this, "audioProcessor");
25903
- c(this, "videoProcessor");
25904
- c(this, "disposed", !1);
25905
- c(this, "handlers", {
25969
+ U(this, "audioWorker");
25970
+ U(this, "videoWorker");
25971
+ U(this, "audioProcessor");
25972
+ U(this, "videoProcessor");
25973
+ U(this, "disposed", !1);
25974
+ U(this, "handlers", {
25906
25975
  chunk: /* @__PURE__ */ new Set(),
25907
25976
  "audio-levels": /* @__PURE__ */ new Set(),
25908
25977
  error: /* @__PURE__ */ new Set(),
25909
25978
  ready: /* @__PURE__ */ new Set()
25910
25979
  });
25911
- c(this, "audioReady", !1);
25912
- c(this, "videoReady", !1);
25913
- c(this, "hasAudio", !1);
25914
- c(this, "hasVideo", !1);
25915
- c(this, "audioMetadata");
25916
- c(this, "videoMetadata");
25980
+ U(this, "audioReady", !1);
25981
+ U(this, "videoReady", !1);
25982
+ U(this, "hasAudio", !1);
25983
+ U(this, "hasVideo", !1);
25984
+ U(this, "audioMetadata");
25985
+ U(this, "videoMetadata");
25917
25986
  const t = o.getAudioTracks(), e = o.getVideoTracks();
25918
25987
  this.hasAudio = t.length > 0 && !!n, this.hasVideo = e.length > 0 && !!l, this.hasAudio && n && this.createAudioEncoder(t[0], n, r), this.hasVideo && l && this.createVideoEncoder(e[0], l);
25919
25988
  }
@@ -25950,15 +26019,15 @@ class MediaStreamEncoder {
25950
26019
  new URL("/assets/audio-encoder.worker-c5c829bb.js", self.location),
25951
26020
  { type: "module" }
25952
26021
  ), this.audioWorker.onmessage = (s) => {
25953
- const { type: d, data: U, metadata: F } = s.data;
26022
+ const { type: d, data: c, metadata: F } = s.data;
25954
26023
  switch (d) {
25955
26024
  case "chunk":
25956
26025
  this.emit("chunk", {
25957
26026
  type: "audio",
25958
- chunk: U,
26027
+ chunk: c,
25959
26028
  keyframe: !1,
25960
26029
  // Audio doesn't have keyframes
25961
- timestamp: U.timestamp,
26030
+ timestamp: c.timestamp,
25962
26031
  metadata: {
25963
26032
  ...this.audioMetadata,
25964
26033
  decoderConfig: F == null ? void 0 : F.decoderConfig
@@ -25966,13 +26035,13 @@ class MediaStreamEncoder {
25966
26035
  });
25967
26036
  break;
25968
26037
  case "error":
25969
- this.emit("error", new Error(`Audio encoding error: ${U}`));
26038
+ this.emit("error", new Error(`Audio encoding error: ${c}`));
25970
26039
  break;
25971
26040
  case "ready":
25972
26041
  this.audioReady = !0, this.startProcessingAudio(o), this.checkReady();
25973
26042
  break;
25974
26043
  case "audio-levels":
25975
- this.emit("audio-levels", U);
26044
+ this.emit("audio-levels", c);
25976
26045
  break;
25977
26046
  }
25978
26047
  }, this.audioWorker.onerror = (s) => {
@@ -26002,14 +26071,14 @@ class MediaStreamEncoder {
26002
26071
  new URL("/assets/video-encoder.worker-a613b1f0.js", self.location),
26003
26072
  { type: "module" }
26004
26073
  ), this.videoWorker.onmessage = (s) => {
26005
- const { type: d, data: U, metadata: F } = s.data;
26074
+ const { type: d, data: c, metadata: F } = s.data;
26006
26075
  switch (d) {
26007
26076
  case "chunk":
26008
26077
  this.emit("chunk", {
26009
26078
  type: "video",
26010
- chunk: U,
26011
- keyframe: U.type === "key",
26012
- timestamp: U.timestamp,
26079
+ chunk: c,
26080
+ keyframe: c.type === "key",
26081
+ timestamp: c.timestamp,
26013
26082
  metadata: {
26014
26083
  ...this.videoMetadata,
26015
26084
  decoderConfig: F == null ? void 0 : F.decoderConfig
@@ -26017,7 +26086,7 @@ class MediaStreamEncoder {
26017
26086
  });
26018
26087
  break;
26019
26088
  case "error":
26020
- this.emit("error", new Error(`Video encoding error: ${U}`));
26089
+ this.emit("error", new Error(`Video encoding error: ${c}`));
26021
26090
  break;
26022
26091
  case "ready":
26023
26092
  this.videoReady = !0, this.startProcessingVideo(o), this.checkReady();
@@ -26072,9 +26141,9 @@ class MediaStreamEncoder {
26072
26141
  }
26073
26142
  class BaseCaptureSink {
26074
26143
  constructor(o) {
26075
- c(this, "config");
26076
- c(this, "keyframeCallback");
26077
- c(this, "_connected", !1);
26144
+ U(this, "config");
26145
+ U(this, "keyframeCallback");
26146
+ U(this, "_connected", !1);
26078
26147
  this.config = o;
26079
26148
  }
26080
26149
  get connected() {
@@ -26096,10 +26165,10 @@ class BaseCaptureSink {
26096
26165
  class WebSocketCaptureSink extends BaseCaptureSink {
26097
26166
  constructor(l) {
26098
26167
  super(l);
26099
- c(this, "websocket");
26100
- c(this, "wsConfig");
26101
- c(this, "reconnectTimer");
26102
- c(this, "disposed", !1);
26168
+ U(this, "websocket");
26169
+ U(this, "wsConfig");
26170
+ U(this, "reconnectTimer");
26171
+ U(this, "disposed", !1);
26103
26172
  this.wsConfig = l;
26104
26173
  }
26105
26174
  async connect() {
@@ -26167,17 +26236,17 @@ function createWebSocketSink(u) {
26167
26236
  const tr = class tr extends BaseCaptureSink {
26168
26237
  constructor(l) {
26169
26238
  super(l);
26170
- c(this, "moqConfig");
26171
- c(this, "session", null);
26172
- c(this, "connecting", !1);
26173
- c(this, "disposed", !1);
26174
- c(this, "sessionOwned", !1);
26239
+ U(this, "moqConfig");
26240
+ U(this, "session", null);
26241
+ U(this, "connecting", !1);
26242
+ U(this, "disposed", !1);
26243
+ U(this, "sessionOwned", !1);
26175
26244
  // Track if we own the session
26176
26245
  // Track current group for video (multiple frames can be in a group)
26177
- c(this, "currentVideoGroup", !0);
26246
+ U(this, "currentVideoGroup", !0);
26178
26247
  // Start with needing a new group
26179
26248
  // Audio grouping: bundle 50 audio frames per group
26180
- c(this, "audioFrameCount", 0);
26249
+ U(this, "audioFrameCount", 0);
26181
26250
  this.moqConfig = l, l.session && (this.session = l.session, this.sessionOwned = !1, this._connected = !0);
26182
26251
  }
26183
26252
  async connect() {
@@ -26279,21 +26348,21 @@ const tr = class tr extends BaseCaptureSink {
26279
26348
  }
26280
26349
  }
26281
26350
  };
26282
- c(tr, "AUDIO_FRAMES_PER_GROUP", 50);
26351
+ U(tr, "AUDIO_FRAMES_PER_GROUP", 50);
26283
26352
  let MoQCaptureSink = tr;
26284
26353
  function createMoQSink(u) {
26285
26354
  return new MoQCaptureSink(u);
26286
26355
  }
26287
26356
  class MediaCapture {
26288
26357
  constructor(o) {
26289
- c(this, "config");
26290
- c(this, "sink");
26291
- c(this, "encoder");
26292
- c(this, "mediaStream");
26293
- c(this, "state", "idle");
26294
- c(this, "disposed", !1);
26358
+ U(this, "config");
26359
+ U(this, "sink");
26360
+ U(this, "encoder");
26361
+ U(this, "mediaStream");
26362
+ U(this, "state", "idle");
26363
+ U(this, "disposed", !1);
26295
26364
  // Stats tracking
26296
- c(this, "stats", {
26365
+ U(this, "stats", {
26297
26366
  videoFramesEncoded: 0,
26298
26367
  audioFramesEncoded: 0,
26299
26368
  bytesSent: 0,
@@ -26304,10 +26373,10 @@ class MediaCapture {
26304
26373
  duration: 0
26305
26374
  });
26306
26375
  // Captured stream metadata
26307
- c(this, "videoMetadata");
26308
- c(this, "audioMetadata");
26376
+ U(this, "videoMetadata");
26377
+ U(this, "audioMetadata");
26309
26378
  // Event handlers
26310
- c(this, "handlers", {
26379
+ U(this, "handlers", {
26311
26380
  "state-change": /* @__PURE__ */ new Set(),
26312
26381
  "audio-levels": /* @__PURE__ */ new Set(),
26313
26382
  stats: /* @__PURE__ */ new Set(),