@moq/publish 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/element.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as c from "@moq/lite";
|
|
2
2
|
import { Signal as o, Effect as u } from "@moq/signals";
|
|
3
|
-
import { B as d, C as h, M as b, S as v, F as g } from "./screen-
|
|
3
|
+
import { B as d, C as h, M as b, S as v, F as g } from "./screen-BORpmf_D.js";
|
|
4
4
|
const m = ["url", "name", "muted", "invisible", "source"], p = new FinalizationRegistry((l) => l.close());
|
|
5
5
|
class w extends HTMLElement {
|
|
6
6
|
static observedAttributes = m;
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as e, C as o, D as a, F as r, M as t, S as s } from "./screen-
|
|
2
|
-
import { B as u, i as p, a as _, P as b, u as S, b as f } from "./screen-
|
|
1
|
+
import { E as e, C as o, D as a, F as r, M as t, S as s } from "./screen-BORpmf_D.js";
|
|
2
|
+
import { B as u, i as p, a as _, P as b, u as S, b as f } from "./screen-BORpmf_D.js";
|
|
3
3
|
const n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
4
|
__proto__: null,
|
|
5
5
|
Encoder: e
|
package/package.json
CHANGED
|
@@ -3469,7 +3469,7 @@ var Effect = class _Effect {
|
|
|
3469
3469
|
this.#scheduled = false;
|
|
3470
3470
|
if (this.#fn) {
|
|
3471
3471
|
this.#fn(this);
|
|
3472
|
-
if (DEV && this.#unwatch.length === 0) {
|
|
3472
|
+
if (DEV && this.#dispose !== void 0 && this.#unwatch.length === 0 && this.#dispose.length === 0 && this.#async.length === 0) {
|
|
3473
3473
|
console.warn("Effect did not subscribe to any signals; it will never rerun.", this.#stack);
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
@@ -3629,10 +3629,6 @@ var Effect = class _Effect {
|
|
|
3629
3629
|
target.addEventListener(type, listener, options);
|
|
3630
3630
|
this.cleanup(() => target.removeEventListener(type, listener, options));
|
|
3631
3631
|
}
|
|
3632
|
-
// Reschedule the effect to run again.
|
|
3633
|
-
reload() {
|
|
3634
|
-
this.#schedule();
|
|
3635
|
-
}
|
|
3636
3632
|
// Register a cleanup function.
|
|
3637
3633
|
cleanup(fn) {
|
|
3638
3634
|
if (this.#dispose === void 0) {
|
|
@@ -4047,6 +4043,11 @@ function setInt32(dst, v) {
|
|
|
4047
4043
|
return new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
|
|
4048
4044
|
}
|
|
4049
4045
|
|
|
4046
|
+
// ../lite/src/util/error.ts
|
|
4047
|
+
function unreachable(value) {
|
|
4048
|
+
throw new Error(\`unreachable: \${value}\`);
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4050
4051
|
// ../../node_modules/.bun/async-mutex@0.5.0/node_modules/async-mutex/index.mjs
|
|
4051
4052
|
var E_TIMEOUT = new Error("timeout while waiting for mutex to become available");
|
|
4052
4053
|
var E_ALREADY_LOCKED = new Error("mutex already locked");
|
|
@@ -4590,8 +4591,7 @@ var Publish = class _Publish {
|
|
|
4590
4591
|
await w.bool(this.forward);
|
|
4591
4592
|
await w.u53(0);
|
|
4592
4593
|
} else {
|
|
4593
|
-
|
|
4594
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
4594
|
+
unreachable(version);
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
4597
|
async encode(w, version) {
|
|
@@ -4637,8 +4637,7 @@ var Publish = class _Publish {
|
|
|
4637
4637
|
forward
|
|
4638
4638
|
});
|
|
4639
4639
|
} else {
|
|
4640
|
-
|
|
4641
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
4640
|
+
unreachable(version);
|
|
4642
4641
|
}
|
|
4643
4642
|
}
|
|
4644
4643
|
};
|
|
@@ -5010,8 +5009,7 @@ var ClientSetup = class _ClientSetup {
|
|
|
5010
5009
|
}
|
|
5011
5010
|
await this.parameters.encode(w, version);
|
|
5012
5011
|
} else {
|
|
5013
|
-
|
|
5014
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5012
|
+
unreachable(version);
|
|
5015
5013
|
}
|
|
5016
5014
|
}
|
|
5017
5015
|
async encode(w, version) {
|
|
@@ -5034,8 +5032,7 @@ var ClientSetup = class _ClientSetup {
|
|
|
5034
5032
|
const parameters = await Parameters.decode(r, version);
|
|
5035
5033
|
return new _ClientSetup({ versions: supportedVersions, parameters });
|
|
5036
5034
|
} else {
|
|
5037
|
-
|
|
5038
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5035
|
+
unreachable(version);
|
|
5039
5036
|
}
|
|
5040
5037
|
}
|
|
5041
5038
|
static async decode(r, version) {
|
|
@@ -5057,8 +5054,7 @@ var ServerSetup = class _ServerSetup {
|
|
|
5057
5054
|
await w.u53(this.version);
|
|
5058
5055
|
await this.parameters.encode(w, version);
|
|
5059
5056
|
} else {
|
|
5060
|
-
|
|
5061
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5057
|
+
unreachable(version);
|
|
5062
5058
|
}
|
|
5063
5059
|
}
|
|
5064
5060
|
async encode(w, version) {
|
|
@@ -5073,8 +5069,7 @@ var ServerSetup = class _ServerSetup {
|
|
|
5073
5069
|
const parameters = await Parameters.decode(r, version);
|
|
5074
5070
|
return new _ServerSetup({ version: selectedVersion, parameters });
|
|
5075
5071
|
} else {
|
|
5076
|
-
|
|
5077
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5072
|
+
unreachable(version);
|
|
5078
5073
|
}
|
|
5079
5074
|
}
|
|
5080
5075
|
static async decode(r, version) {
|
|
@@ -5119,8 +5114,7 @@ var Subscribe = class _Subscribe {
|
|
|
5119
5114
|
await w.u53(2);
|
|
5120
5115
|
await w.u53(0);
|
|
5121
5116
|
} else {
|
|
5122
|
-
|
|
5123
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5117
|
+
unreachable(version);
|
|
5124
5118
|
}
|
|
5125
5119
|
}
|
|
5126
5120
|
async encode(w, version) {
|
|
@@ -5172,8 +5166,7 @@ var Subscribe = class _Subscribe {
|
|
|
5172
5166
|
await Parameters.decode(r, version);
|
|
5173
5167
|
return new _Subscribe({ requestId, trackNamespace, trackName, subscriberPriority });
|
|
5174
5168
|
} else {
|
|
5175
|
-
|
|
5176
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5169
|
+
unreachable(version);
|
|
5177
5170
|
}
|
|
5178
5171
|
}
|
|
5179
5172
|
};
|
|
@@ -5198,8 +5191,7 @@ var SubscribeOk = class _SubscribeOk {
|
|
|
5198
5191
|
await w.bool(false);
|
|
5199
5192
|
await w.u53(0);
|
|
5200
5193
|
} else {
|
|
5201
|
-
|
|
5202
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5194
|
+
unreachable(version);
|
|
5203
5195
|
}
|
|
5204
5196
|
}
|
|
5205
5197
|
async encode(w, version) {
|
|
@@ -5226,8 +5218,7 @@ var SubscribeOk = class _SubscribeOk {
|
|
|
5226
5218
|
}
|
|
5227
5219
|
await Parameters.decode(r, version);
|
|
5228
5220
|
} else {
|
|
5229
|
-
|
|
5230
|
-
throw new Error(\`unsupported version: \${_}\`);
|
|
5221
|
+
unreachable(version);
|
|
5231
5222
|
}
|
|
5232
5223
|
return new _SubscribeOk({ requestId, trackAlias });
|
|
5233
5224
|
}
|
|
@@ -6035,7 +6026,7 @@ class Pe {
|
|
|
6035
6026
|
m *= 1.1;
|
|
6036
6027
|
else
|
|
6037
6028
|
throw new Error(`unknown codec: ${h}`);
|
|
6038
|
-
m = Math.min(m, c.maxBitrate || m);
|
|
6029
|
+
m = Math.round(Math.min(m, c.maxBitrate || m));
|
|
6039
6030
|
const E = {
|
|
6040
6031
|
codec: h,
|
|
6041
6032
|
width: i.width,
|
|
@@ -6345,7 +6336,8 @@ class Hn {
|
|
|
6345
6336
|
signals = new P();
|
|
6346
6337
|
constructor(n, t) {
|
|
6347
6338
|
this.kind = n, this.preferred = f.from(t?.preferred), this.signals.run((r) => {
|
|
6348
|
-
r.spawn(this.#r.bind(this, r)), r.event(navigator.mediaDevices, "devicechange", () =>
|
|
6339
|
+
r.spawn(this.#r.bind(this, r)), r.event(navigator.mediaDevices, "devicechange", () => this.permission.mutate(() => {
|
|
6340
|
+
}));
|
|
6349
6341
|
}), this.signals.run(this.#s.bind(this));
|
|
6350
6342
|
}
|
|
6351
6343
|
async #r(n) {
|
|
@@ -6583,4 +6575,4 @@ export {
|
|
|
6583
6575
|
aa as i,
|
|
6584
6576
|
da as u
|
|
6585
6577
|
};
|
|
6586
|
-
//# sourceMappingURL=screen-
|
|
6578
|
+
//# sourceMappingURL=screen-BORpmf_D.js.map
|