@stinkycomputing/sesame-api-client 1.5.2 → 1.5.4
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/dist/command-list.d.ts +2 -1
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.browser.mjs +12 -5
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +12 -5
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +2 -2
- package/dist/sesame-api-client.d.ts +4 -1
- package/dist/sesame-api-client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23514,11 +23514,12 @@ var CommandList = class {
|
|
|
23514
23514
|
}
|
|
23515
23515
|
applyTransaction(transaction) {
|
|
23516
23516
|
this.cl.commandList.forEach((item) => {
|
|
23517
|
-
if (transaction.transactionId !== void 0) {
|
|
23517
|
+
if (transaction.transactionId !== void 0 && item.transactionId == null) {
|
|
23518
23518
|
item.transactionId = transaction.transactionId;
|
|
23519
23519
|
}
|
|
23520
23520
|
if (transaction.dependencies !== void 0) {
|
|
23521
|
-
|
|
23521
|
+
const existing = item.transactionDeps ?? [];
|
|
23522
|
+
item.transactionDeps = [...new Set(existing.concat(transaction.dependencies))];
|
|
23522
23523
|
}
|
|
23523
23524
|
});
|
|
23524
23525
|
}
|
|
@@ -23701,7 +23702,7 @@ var CommandList = class {
|
|
|
23701
23702
|
}
|
|
23702
23703
|
}
|
|
23703
23704
|
item.updateSourceTransport = transportCmd;
|
|
23704
|
-
return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies:
|
|
23705
|
+
return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies: msg.dependencies });
|
|
23705
23706
|
}
|
|
23706
23707
|
sourceUpdate(id, cfg, timeOffsetMs) {
|
|
23707
23708
|
let item = new sesame.v1.commands.CommandListItem();
|
|
@@ -24453,15 +24454,21 @@ var EaseKind = /* @__PURE__ */ ((EaseKind2) => {
|
|
|
24453
24454
|
EaseKind2["BACK_INOUT"] = "backInOut";
|
|
24454
24455
|
return EaseKind2;
|
|
24455
24456
|
})(EaseKind || {});
|
|
24457
|
+
function appendQueryParam(url, key, value) {
|
|
24458
|
+
if (!value) return url;
|
|
24459
|
+
const separator = url.includes("?") ? "&" : "?";
|
|
24460
|
+
return `${url}${separator}${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
24461
|
+
}
|
|
24456
24462
|
var SesameClient = class extends import_events3.EventEmitter {
|
|
24457
|
-
constructor(portOrUrl) {
|
|
24463
|
+
constructor(portOrUrl, clientOptions = {}) {
|
|
24458
24464
|
super();
|
|
24459
24465
|
this.subscriptions = [];
|
|
24460
24466
|
this.onMediaPacket = () => {
|
|
24461
24467
|
};
|
|
24462
24468
|
this.onCallbackMessage = () => {
|
|
24463
24469
|
};
|
|
24464
|
-
const
|
|
24470
|
+
const baseUrl = typeof portOrUrl === "number" ? `ws://127.0.0.1:${portOrUrl}/api` : portOrUrl;
|
|
24471
|
+
const url = appendQueryParam(baseUrl, "client", clientOptions.wsClientLabel ?? "");
|
|
24465
24472
|
this.conn = new SesameConnection({
|
|
24466
24473
|
url,
|
|
24467
24474
|
autoConnect: true,
|