@stinkycomputing/sesame-api-client 1.10.0-alpha.3 → 1.10.0-alpha.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/README.md CHANGED
@@ -259,7 +259,7 @@ ws.addEventListener('message', async (evt) => {
259
259
  | `dataType` | Payload type | Direction |
260
260
  |------------|-------------|-----------|
261
261
  | `'json'` | `unknown` (parsed JSON) | server → client |
262
- | `'transport-status'` | `sesame.v1.status.TransportEvent` | server → client |
262
+ | `'transport-status'` | `sesame.v1.status.TransportStatus` (every transportable source) | server → client |
263
263
  | `'audio-state'` | `sesame.v1.audio.AudioMixerStatus` | server → client |
264
264
  | `'output-status'` | `sesame.v1.outputs.OutputStatus` | server → client |
265
265
  | `'source-status'` | `sesame.v1.sources.SourceStatus` | server → client |
@@ -17718,6 +17718,114 @@ var sesame = $root.sesame = (() => {
17718
17718
  };
17719
17719
  return TransportEvent;
17720
17720
  }();
17721
+ status.TransportStatus = function() {
17722
+ function TransportStatus(properties) {
17723
+ this.sources = [];
17724
+ if (properties) {
17725
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
17726
+ if (properties[keys[i]] != null)
17727
+ this[keys[i]] = properties[keys[i]];
17728
+ }
17729
+ }
17730
+ TransportStatus.prototype.sources = $util.emptyArray;
17731
+ TransportStatus.create = function create(properties) {
17732
+ return new TransportStatus(properties);
17733
+ };
17734
+ TransportStatus.encode = function encode(message, writer) {
17735
+ if (!writer)
17736
+ writer = $Writer.create();
17737
+ if (message.sources != null && message.sources.length)
17738
+ for (let i = 0; i < message.sources.length; ++i)
17739
+ $root.sesame.v1.status.TransportEvent.encode(message.sources[i], writer.uint32(
17740
+ /* id 1, wireType 2 =*/
17741
+ 10
17742
+ ).fork()).ldelim();
17743
+ return writer;
17744
+ };
17745
+ TransportStatus.encodeDelimited = function encodeDelimited(message, writer) {
17746
+ return this.encode(message, writer).ldelim();
17747
+ };
17748
+ TransportStatus.decode = function decode(reader, length, error) {
17749
+ if (!(reader instanceof $Reader))
17750
+ reader = $Reader.create(reader);
17751
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.status.TransportStatus();
17752
+ while (reader.pos < end) {
17753
+ let tag = reader.uint32();
17754
+ if (tag === error)
17755
+ break;
17756
+ switch (tag >>> 3) {
17757
+ case 1: {
17758
+ if (!(message.sources && message.sources.length))
17759
+ message.sources = [];
17760
+ message.sources.push($root.sesame.v1.status.TransportEvent.decode(reader, reader.uint32()));
17761
+ break;
17762
+ }
17763
+ default:
17764
+ reader.skipType(tag & 7);
17765
+ break;
17766
+ }
17767
+ }
17768
+ return message;
17769
+ };
17770
+ TransportStatus.decodeDelimited = function decodeDelimited(reader) {
17771
+ if (!(reader instanceof $Reader))
17772
+ reader = new $Reader(reader);
17773
+ return this.decode(reader, reader.uint32());
17774
+ };
17775
+ TransportStatus.verify = function verify(message) {
17776
+ if (typeof message !== "object" || message === null)
17777
+ return "object expected";
17778
+ if (message.sources != null && message.hasOwnProperty("sources")) {
17779
+ if (!Array.isArray(message.sources))
17780
+ return "sources: array expected";
17781
+ for (let i = 0; i < message.sources.length; ++i) {
17782
+ let error = $root.sesame.v1.status.TransportEvent.verify(message.sources[i]);
17783
+ if (error)
17784
+ return "sources." + error;
17785
+ }
17786
+ }
17787
+ return null;
17788
+ };
17789
+ TransportStatus.fromObject = function fromObject(object) {
17790
+ if (object instanceof $root.sesame.v1.status.TransportStatus)
17791
+ return object;
17792
+ let message = new $root.sesame.v1.status.TransportStatus();
17793
+ if (object.sources) {
17794
+ if (!Array.isArray(object.sources))
17795
+ throw TypeError(".sesame.v1.status.TransportStatus.sources: array expected");
17796
+ message.sources = [];
17797
+ for (let i = 0; i < object.sources.length; ++i) {
17798
+ if (typeof object.sources[i] !== "object")
17799
+ throw TypeError(".sesame.v1.status.TransportStatus.sources: object expected");
17800
+ message.sources[i] = $root.sesame.v1.status.TransportEvent.fromObject(object.sources[i]);
17801
+ }
17802
+ }
17803
+ return message;
17804
+ };
17805
+ TransportStatus.toObject = function toObject(message, options) {
17806
+ if (!options)
17807
+ options = {};
17808
+ let object = {};
17809
+ if (options.arrays || options.defaults)
17810
+ object.sources = [];
17811
+ if (message.sources && message.sources.length) {
17812
+ object.sources = [];
17813
+ for (let j = 0; j < message.sources.length; ++j)
17814
+ object.sources[j] = $root.sesame.v1.status.TransportEvent.toObject(message.sources[j], options);
17815
+ }
17816
+ return object;
17817
+ };
17818
+ TransportStatus.prototype.toJSON = function toJSON() {
17819
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
17820
+ };
17821
+ TransportStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
17822
+ if (typeUrlPrefix === void 0) {
17823
+ typeUrlPrefix = "type.googleapis.com";
17824
+ }
17825
+ return typeUrlPrefix + "/sesame.v1.status.TransportStatus";
17826
+ };
17827
+ return TransportStatus;
17828
+ }();
17721
17829
  status.MetadataEvent = function() {
17722
17830
  function MetadataEvent(properties) {
17723
17831
  if (properties) {
@@ -29199,7 +29307,7 @@ function parseDataFrame(frame) {
29199
29307
  return {
29200
29308
  dataType: "transport-status",
29201
29309
  trackName,
29202
- event: sesame.v1.status.TransportEvent.decode(payload)
29310
+ status: sesame.v1.status.TransportStatus.decode(payload)
29203
29311
  };
29204
29312
  case sesame.v1.wire.DataType.DATA_TYPE_AUDIO_STATE:
29205
29313
  return {