@stinkycomputing/sesame-api-client 1.5.0-alpha.8 → 1.5.0
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/README.md +433 -433
- package/dist/command-list.d.ts +16 -0
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.browser.mjs +31 -0
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +31 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +31 -0
- package/dist/index.mjs.map +2 -2
- package/dist/sesame-api-client.d.ts +15 -0
- package/dist/sesame-api-client.d.ts.map +1 -1
- package/docs/protocol-reference.md +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -23682,6 +23682,22 @@ var CommandList = class {
|
|
|
23682
23682
|
};
|
|
23683
23683
|
return this.add(item, timeOffsetMs);
|
|
23684
23684
|
}
|
|
23685
|
+
/**
|
|
23686
|
+
* Replace the server's entire metadata routing table with the supplied bindings.
|
|
23687
|
+
*
|
|
23688
|
+
* Each binding is either **outbound** or **inbound** - not both:
|
|
23689
|
+
*
|
|
23690
|
+
* - **Outbound** (`IMetadataOutboundBinding`): when `publishMetadata(nodeId, metadataId)`
|
|
23691
|
+
* is called (or the server pushes periodic state), the payload is forwarded to every
|
|
23692
|
+
* `(outputId, trackName)` pair that matches `(sourceId, metadataId)`.
|
|
23693
|
+
*
|
|
23694
|
+
* - **Inbound** (`IMetadataInboundBinding`): when a streaming source receives a
|
|
23695
|
+
* `FRAME_TYPE_DATA` frame on `trackName`, it is routed to `targetId` and emitted
|
|
23696
|
+
* as a `MetadataEvent` on `EVENT_TOPIC_METADATA`.
|
|
23697
|
+
*
|
|
23698
|
+
* This command replaces the **entire** table - pass all desired bindings at once.
|
|
23699
|
+
* An empty array clears all routing.
|
|
23700
|
+
*/
|
|
23685
23701
|
setMetadataBindings(bindings, timeOffsetMs) {
|
|
23686
23702
|
const item = new sesame.v1.commands.CommandListItem();
|
|
23687
23703
|
item.setMetadataBindings = { bindings };
|
|
@@ -24440,6 +24456,21 @@ var SesameClient = class extends EventEmitter3 {
|
|
|
24440
24456
|
await this.rpc.service.executeCommandList(cl.getCommandListMsg());
|
|
24441
24457
|
}
|
|
24442
24458
|
}
|
|
24459
|
+
/**
|
|
24460
|
+
* Publish a data-frame payload to all outbound targets registered for
|
|
24461
|
+
* `(nodeId, metadataId)` in the current MetadataRouter binding table.
|
|
24462
|
+
*
|
|
24463
|
+
* The server resolves the binding table entry for the given `(nodeId, metadataId)`
|
|
24464
|
+
* pair and sends a `FRAME_TYPE_DATA` frame to each configured `(outputId, trackName)`
|
|
24465
|
+
* target. If no outbound binding exists a warning is logged server-side and the call
|
|
24466
|
+
* is a no-op.
|
|
24467
|
+
*
|
|
24468
|
+
* @param nodeId ID of the publishing node (source, mixer, or other engine node).
|
|
24469
|
+
* @param metadataId Routing key - must match the `metadata_id` field in the binding.
|
|
24470
|
+
* @param payload Raw frame payload bytes. For `DATA_TYPE_JSON` this must be valid
|
|
24471
|
+
* UTF-8 encoded JSON; for `DATA_TYPE_BINARY` it is opaque bytes.
|
|
24472
|
+
* @param dataType Wire encoding of the payload (defaults to `DATA_TYPE_JSON`).
|
|
24473
|
+
*/
|
|
24443
24474
|
async publishMetadata(nodeId, metadataId, payload, dataType = DataType.DATA_TYPE_JSON) {
|
|
24444
24475
|
await this.rpc.service.publishMetadata({ nodeId, metadataId, payload, dataType });
|
|
24445
24476
|
}
|