@viamrobotics/sdk 0.0.28 → 0.0.30

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.
@@ -142,6 +142,9 @@ export class Publishing extends jspb.Message {
142
142
  setLibrarySettingsList(value: Array<ClientLibrarySettings>): void;
143
143
  addLibrarySettings(value?: ClientLibrarySettings, index?: number): ClientLibrarySettings;
144
144
 
145
+ getProtoReferenceDocumentationUri(): string;
146
+ setProtoReferenceDocumentationUri(value: string): void;
147
+
145
148
  serializeBinary(): Uint8Array;
146
149
  toObject(includeInstance?: boolean): Publishing.AsObject;
147
150
  static toObject(includeInstance: boolean, msg: Publishing): Publishing.AsObject;
@@ -163,6 +166,7 @@ export namespace Publishing {
163
166
  docTagPrefix: string,
164
167
  organization: ClientLibraryOrganizationMap[keyof ClientLibraryOrganizationMap],
165
168
  librarySettingsList: Array<ClientLibrarySettings.AsObject>,
169
+ protoReferenceDocumentationUri: string,
166
170
  }
167
171
  }
168
172
 
package/dist/main.es.js CHANGED
@@ -226624,23 +226624,26 @@ class RobotClient {
226624
226624
  p
226625
226625
  );
226626
226626
  this.peerConn = i.peerConnection, this.transportFactory = i.transportFactory, i.peerConnection.ontrack = (s) => {
226627
- events.emit("track", s);
226628
226627
  const { kind: g } = s.track, l = s.streams[0];
226629
226628
  if (!l)
226630
- throw new Error("expected event stream to exist");
226631
- const u = l.id, c = document.querySelectorAll(
226632
- `[data-stream="${u}"]`
226633
- );
226634
- for (const h of c) {
226635
- const y = document.createElement(g);
226636
- y.srcObject = l, y.autoplay = !0, y instanceof HTMLVideoElement ? (y.playsInline = !0, y.controls = !1) : y.controls = !0, h.querySelector(g)?.remove(), h.append(y);
226629
+ throw events.emit("track", s), new Error("expected event stream to exist");
226630
+ const u = l.id.replaceAll("+", ":");
226631
+ Object.defineProperty(l, "id", {
226632
+ value: u
226633
+ }), events.emit("track", s);
226634
+ const c = l.id, m = document.querySelectorAll(
226635
+ `[data-stream="${c}"]`
226636
+ );
226637
+ for (const y of m) {
226638
+ const f = document.createElement(g);
226639
+ f.srcObject = l, f.autoplay = !0, f instanceof HTMLVideoElement ? (f.playsInline = !0, f.controls = !1) : f.controls = !0, y.querySelector(g)?.remove(), y.append(f);
226637
226640
  }
226638
- const m = document.querySelectorAll(
226639
- `[data-stream-preview="${u}"]`
226641
+ const h = document.querySelectorAll(
226642
+ `[data-stream-preview="${c}"]`
226640
226643
  );
226641
- for (const h of m) {
226642
- const y = document.createElement(g);
226643
- y.srcObject = l, y.autoplay = !0, y instanceof HTMLVideoElement ? (y.playsInline = !0, y.controls = !1) : y.controls = !0, h.querySelector(g)?.remove(), h.append(y);
226644
+ for (const y of h) {
226645
+ const f = document.createElement(g);
226646
+ f.srcObject = l, f.autoplay = !0, f instanceof HTMLVideoElement ? (f.playsInline = !0, f.controls = !1) : f.controls = !0, y.querySelector(g)?.remove(), y.append(f);
226644
226647
  }
226645
226648
  };
226646
226649
  } else
@@ -451228,6 +451231,9 @@ StreamServiceClient.prototype.removeStream = function o(e, r, p) {
451228
451231
  };
451229
451232
  };
451230
451233
  var StreamServiceClient_1 = StreamServiceClient;
451234
+ const getValidSDPTrackName = function(o) {
451235
+ return o.replaceAll(":", "+");
451236
+ };
451231
451237
  class StreamClient extends EventDispatcher {
451232
451238
  client;
451233
451239
  options;
@@ -451238,18 +451244,34 @@ class StreamClient extends EventDispatcher {
451238
451244
  return this.client;
451239
451245
  }
451240
451246
  async add(e) {
451241
- const r = this.streamService, p = new stream_pb$1.AddStreamRequest();
451242
- p.setName(e), this.options.requestLogger?.(p), await promisify(
451243
- r.addStream.bind(r),
451244
- p
451245
- );
451247
+ const r = this.streamService, p = new stream_pb$1.AddStreamRequest(), t = getValidSDPTrackName(e);
451248
+ p.setName(t), this.options.requestLogger?.(p);
451249
+ try {
451250
+ await promisify(
451251
+ r.addStream.bind(r),
451252
+ p
451253
+ );
451254
+ } catch {
451255
+ p.setName(e), this.options.requestLogger?.(p), await promisify(
451256
+ r.addStream.bind(r),
451257
+ p
451258
+ );
451259
+ }
451246
451260
  }
451247
451261
  async remove(e) {
451248
- const r = this.streamService, p = new stream_pb$1.RemoveStreamRequest();
451249
- p.setName(e), this.options.requestLogger?.(p), await promisify(
451250
- r.removeStream.bind(r),
451251
- p
451252
- );
451262
+ const r = this.streamService, p = new stream_pb$1.RemoveStreamRequest(), t = getValidSDPTrackName(e);
451263
+ p.setName(t), this.options.requestLogger?.(p);
451264
+ try {
451265
+ await promisify(
451266
+ r.removeStream.bind(r),
451267
+ p
451268
+ );
451269
+ } catch {
451270
+ p.setName(e), this.options.requestLogger?.(p), await promisify(
451271
+ r.removeStream.bind(r),
451272
+ p
451273
+ );
451274
+ }
451253
451275
  }
451254
451276
  }
451255
451277
  export {