@stinkycomputing/sesame-api-client 1.5.1 → 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/LICENSE +22 -22
- package/README.md +433 -433
- package/dist/browser.cjs +21664 -0
- package/dist/browser.cjs.map +7 -0
- package/dist/browser.d.ts +16 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.mjs +21631 -0
- package/dist/browser.mjs.map +7 -0
- package/dist/command-list.d.ts +2 -1
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.browser.mjs +42 -5
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +42 -5
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +42 -5
- package/dist/index.mjs.map +2 -2
- package/dist/proto/.gitignore +2 -2
- package/dist/proto/api.d.ts +8 -1
- package/dist/proto/api.js +35 -0
- package/dist/sesame-api-client.d.ts +4 -1
- package/dist/sesame-api-client.d.ts.map +1 -1
- package/dist/sesame-binary-protocol.d.ts +99 -0
- package/dist/sesame-binary-protocol.d.ts.map +1 -0
- package/docs/protocol-reference.md +2368 -2207
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4863,6 +4863,7 @@ var sesame = $root.sesame = (() => {
|
|
|
4863
4863
|
values[valuesById[13] = "SOURCE_TRANSPORT_CMD_SKIP_NEXT"] = 13;
|
|
4864
4864
|
values[valuesById[14] = "SOURCE_TRANSPORT_CMD_TRANSITIONS_DISABLED"] = 14;
|
|
4865
4865
|
values[valuesById[15] = "SOURCE_TRANSPORT_CMD_SET_SCRUBBING"] = 15;
|
|
4866
|
+
values[valuesById[16] = "SOURCE_TRANSPORT_CMD_SET_END_NOTIFICATION"] = 16;
|
|
4866
4867
|
return values;
|
|
4867
4868
|
}();
|
|
4868
4869
|
sources.SourceTextureSize = function() {
|
|
@@ -8524,6 +8525,7 @@ var sesame = $root.sesame = (() => {
|
|
|
8524
8525
|
case 13:
|
|
8525
8526
|
case 14:
|
|
8526
8527
|
case 15:
|
|
8528
|
+
case 16:
|
|
8527
8529
|
break;
|
|
8528
8530
|
}
|
|
8529
8531
|
if (message.value != null && message.hasOwnProperty("value")) {
|
|
@@ -8610,6 +8612,10 @@ var sesame = $root.sesame = (() => {
|
|
|
8610
8612
|
case 15:
|
|
8611
8613
|
message.cmdType = 15;
|
|
8612
8614
|
break;
|
|
8615
|
+
case "SOURCE_TRANSPORT_CMD_SET_END_NOTIFICATION":
|
|
8616
|
+
case 16:
|
|
8617
|
+
message.cmdType = 16;
|
|
8618
|
+
break;
|
|
8613
8619
|
}
|
|
8614
8620
|
if (object.value != null) {
|
|
8615
8621
|
if (typeof object.value !== "object")
|
|
@@ -9078,6 +9084,7 @@ var sesame = $root.sesame = (() => {
|
|
|
9078
9084
|
case 13:
|
|
9079
9085
|
case 14:
|
|
9080
9086
|
case 15:
|
|
9087
|
+
case 16:
|
|
9081
9088
|
break;
|
|
9082
9089
|
}
|
|
9083
9090
|
if (message.value != null && message.hasOwnProperty("value")) {
|
|
@@ -9162,6 +9169,10 @@ var sesame = $root.sesame = (() => {
|
|
|
9162
9169
|
case 15:
|
|
9163
9170
|
message.cmdType = 15;
|
|
9164
9171
|
break;
|
|
9172
|
+
case "SOURCE_TRANSPORT_CMD_SET_END_NOTIFICATION":
|
|
9173
|
+
case 16:
|
|
9174
|
+
message.cmdType = 16;
|
|
9175
|
+
break;
|
|
9165
9176
|
}
|
|
9166
9177
|
if (object.value != null) {
|
|
9167
9178
|
if (typeof object.value !== "object")
|
|
@@ -14363,6 +14374,7 @@ var sesame = $root.sesame = (() => {
|
|
|
14363
14374
|
TransportEvent.prototype.preroll = 0;
|
|
14364
14375
|
TransportEvent.prototype.postroll = 0;
|
|
14365
14376
|
TransportEvent.prototype.metadata = null;
|
|
14377
|
+
TransportEvent.prototype.nearEnd = false;
|
|
14366
14378
|
TransportEvent.create = function create(properties) {
|
|
14367
14379
|
return new TransportEvent(properties);
|
|
14368
14380
|
};
|
|
@@ -14459,6 +14471,11 @@ var sesame = $root.sesame = (() => {
|
|
|
14459
14471
|
/* id 18, wireType 2 =*/
|
|
14460
14472
|
146
|
|
14461
14473
|
).fork()).ldelim();
|
|
14474
|
+
if (message.nearEnd != null && Object.hasOwnProperty.call(message, "nearEnd"))
|
|
14475
|
+
writer.uint32(
|
|
14476
|
+
/* id 19, wireType 0 =*/
|
|
14477
|
+
152
|
|
14478
|
+
).bool(message.nearEnd);
|
|
14462
14479
|
return writer;
|
|
14463
14480
|
};
|
|
14464
14481
|
TransportEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
|
@@ -14545,6 +14562,10 @@ var sesame = $root.sesame = (() => {
|
|
|
14545
14562
|
message.metadata = $root.sesame.v1.common.TransportMetadata.decode(reader, reader.uint32());
|
|
14546
14563
|
break;
|
|
14547
14564
|
}
|
|
14565
|
+
case 19: {
|
|
14566
|
+
message.nearEnd = reader.bool();
|
|
14567
|
+
break;
|
|
14568
|
+
}
|
|
14548
14569
|
default:
|
|
14549
14570
|
reader.skipType(tag & 7);
|
|
14550
14571
|
break;
|
|
@@ -14640,6 +14661,10 @@ var sesame = $root.sesame = (() => {
|
|
|
14640
14661
|
if (error)
|
|
14641
14662
|
return "metadata." + error;
|
|
14642
14663
|
}
|
|
14664
|
+
if (message.nearEnd != null && message.hasOwnProperty("nearEnd")) {
|
|
14665
|
+
if (typeof message.nearEnd !== "boolean")
|
|
14666
|
+
return "nearEnd: boolean expected";
|
|
14667
|
+
}
|
|
14643
14668
|
return null;
|
|
14644
14669
|
};
|
|
14645
14670
|
TransportEvent.fromObject = function fromObject(object) {
|
|
@@ -14767,6 +14792,8 @@ var sesame = $root.sesame = (() => {
|
|
|
14767
14792
|
throw TypeError(".sesame.v1.status.TransportEvent.metadata: object expected");
|
|
14768
14793
|
message.metadata = $root.sesame.v1.common.TransportMetadata.fromObject(object.metadata);
|
|
14769
14794
|
}
|
|
14795
|
+
if (object.nearEnd != null)
|
|
14796
|
+
message.nearEnd = Boolean(object.nearEnd);
|
|
14770
14797
|
return message;
|
|
14771
14798
|
};
|
|
14772
14799
|
TransportEvent.toObject = function toObject(message, options) {
|
|
@@ -14820,6 +14847,7 @@ var sesame = $root.sesame = (() => {
|
|
|
14820
14847
|
object.preroll = 0;
|
|
14821
14848
|
object.postroll = 0;
|
|
14822
14849
|
object.metadata = null;
|
|
14850
|
+
object.nearEnd = false;
|
|
14823
14851
|
}
|
|
14824
14852
|
if (message.sourceId != null && message.hasOwnProperty("sourceId"))
|
|
14825
14853
|
object.sourceId = message.sourceId;
|
|
@@ -14878,6 +14906,8 @@ var sesame = $root.sesame = (() => {
|
|
|
14878
14906
|
object.postroll = message.postroll;
|
|
14879
14907
|
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
14880
14908
|
object.metadata = $root.sesame.v1.common.TransportMetadata.toObject(message.metadata, options);
|
|
14909
|
+
if (message.nearEnd != null && message.hasOwnProperty("nearEnd"))
|
|
14910
|
+
object.nearEnd = message.nearEnd;
|
|
14881
14911
|
return object;
|
|
14882
14912
|
};
|
|
14883
14913
|
TransportEvent.prototype.toJSON = function toJSON() {
|
|
@@ -23422,11 +23452,12 @@ var CommandList = class {
|
|
|
23422
23452
|
}
|
|
23423
23453
|
applyTransaction(transaction) {
|
|
23424
23454
|
this.cl.commandList.forEach((item) => {
|
|
23425
|
-
if (transaction.transactionId !== void 0) {
|
|
23455
|
+
if (transaction.transactionId !== void 0 && item.transactionId == null) {
|
|
23426
23456
|
item.transactionId = transaction.transactionId;
|
|
23427
23457
|
}
|
|
23428
23458
|
if (transaction.dependencies !== void 0) {
|
|
23429
|
-
|
|
23459
|
+
const existing = item.transactionDeps ?? [];
|
|
23460
|
+
item.transactionDeps = [...new Set(existing.concat(transaction.dependencies))];
|
|
23430
23461
|
}
|
|
23431
23462
|
});
|
|
23432
23463
|
}
|
|
@@ -23609,7 +23640,7 @@ var CommandList = class {
|
|
|
23609
23640
|
}
|
|
23610
23641
|
}
|
|
23611
23642
|
item.updateSourceTransport = transportCmd;
|
|
23612
|
-
return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies:
|
|
23643
|
+
return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies: msg.dependencies });
|
|
23613
23644
|
}
|
|
23614
23645
|
sourceUpdate(id, cfg, timeOffsetMs) {
|
|
23615
23646
|
let item = new sesame.v1.commands.CommandListItem();
|
|
@@ -24361,15 +24392,21 @@ var EaseKind = /* @__PURE__ */ ((EaseKind2) => {
|
|
|
24361
24392
|
EaseKind2["BACK_INOUT"] = "backInOut";
|
|
24362
24393
|
return EaseKind2;
|
|
24363
24394
|
})(EaseKind || {});
|
|
24395
|
+
function appendQueryParam(url, key, value) {
|
|
24396
|
+
if (!value) return url;
|
|
24397
|
+
const separator = url.includes("?") ? "&" : "?";
|
|
24398
|
+
return `${url}${separator}${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
24399
|
+
}
|
|
24364
24400
|
var SesameClient = class extends EventEmitter3 {
|
|
24365
|
-
constructor(portOrUrl) {
|
|
24401
|
+
constructor(portOrUrl, clientOptions = {}) {
|
|
24366
24402
|
super();
|
|
24367
24403
|
this.subscriptions = [];
|
|
24368
24404
|
this.onMediaPacket = () => {
|
|
24369
24405
|
};
|
|
24370
24406
|
this.onCallbackMessage = () => {
|
|
24371
24407
|
};
|
|
24372
|
-
const
|
|
24408
|
+
const baseUrl = typeof portOrUrl === "number" ? `ws://127.0.0.1:${portOrUrl}/api` : portOrUrl;
|
|
24409
|
+
const url = appendQueryParam(baseUrl, "client", clientOptions.wsClientLabel ?? "");
|
|
24373
24410
|
this.conn = new SesameConnection({
|
|
24374
24411
|
url,
|
|
24375
24412
|
autoConnect: true,
|