@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/dist/index.cjs CHANGED
@@ -23744,6 +23744,22 @@ var CommandList = class {
23744
23744
  };
23745
23745
  return this.add(item, timeOffsetMs);
23746
23746
  }
23747
+ /**
23748
+ * Replace the server's entire metadata routing table with the supplied bindings.
23749
+ *
23750
+ * Each binding is either **outbound** or **inbound** - not both:
23751
+ *
23752
+ * - **Outbound** (`IMetadataOutboundBinding`): when `publishMetadata(nodeId, metadataId)`
23753
+ * is called (or the server pushes periodic state), the payload is forwarded to every
23754
+ * `(outputId, trackName)` pair that matches `(sourceId, metadataId)`.
23755
+ *
23756
+ * - **Inbound** (`IMetadataInboundBinding`): when a streaming source receives a
23757
+ * `FRAME_TYPE_DATA` frame on `trackName`, it is routed to `targetId` and emitted
23758
+ * as a `MetadataEvent` on `EVENT_TOPIC_METADATA`.
23759
+ *
23760
+ * This command replaces the **entire** table - pass all desired bindings at once.
23761
+ * An empty array clears all routing.
23762
+ */
23747
23763
  setMetadataBindings(bindings, timeOffsetMs) {
23748
23764
  const item = new sesame.v1.commands.CommandListItem();
23749
23765
  item.setMetadataBindings = { bindings };
@@ -24502,6 +24518,21 @@ var SesameClient = class extends import_events3.EventEmitter {
24502
24518
  await this.rpc.service.executeCommandList(cl.getCommandListMsg());
24503
24519
  }
24504
24520
  }
24521
+ /**
24522
+ * Publish a data-frame payload to all outbound targets registered for
24523
+ * `(nodeId, metadataId)` in the current MetadataRouter binding table.
24524
+ *
24525
+ * The server resolves the binding table entry for the given `(nodeId, metadataId)`
24526
+ * pair and sends a `FRAME_TYPE_DATA` frame to each configured `(outputId, trackName)`
24527
+ * target. If no outbound binding exists a warning is logged server-side and the call
24528
+ * is a no-op.
24529
+ *
24530
+ * @param nodeId ID of the publishing node (source, mixer, or other engine node).
24531
+ * @param metadataId Routing key - must match the `metadata_id` field in the binding.
24532
+ * @param payload Raw frame payload bytes. For `DATA_TYPE_JSON` this must be valid
24533
+ * UTF-8 encoded JSON; for `DATA_TYPE_BINARY` it is opaque bytes.
24534
+ * @param dataType Wire encoding of the payload (defaults to `DATA_TYPE_JSON`).
24535
+ */
24505
24536
  async publishMetadata(nodeId, metadataId, payload, dataType = DataType.DATA_TYPE_JSON) {
24506
24537
  await this.rpc.service.publishMetadata({ nodeId, metadataId, payload, dataType });
24507
24538
  }