@viamrobotics/sdk 0.0.35 → 0.0.37
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/main.es.js +7 -21
- package/dist/main.umd.js +1 -1
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -38864,27 +38864,13 @@ class RobotClient {
|
|
|
38864
38864
|
n
|
|
38865
38865
|
);
|
|
38866
38866
|
this.peerConn = p.peerConnection, this.transportFactory = p.transportFactory, p.peerConnection.ontrack = (o) => {
|
|
38867
|
-
const
|
|
38868
|
-
if (!
|
|
38867
|
+
const r = o.streams[0];
|
|
38868
|
+
if (!r)
|
|
38869
38869
|
throw events.emit("track", o), new Error("expected event stream to exist");
|
|
38870
|
-
const
|
|
38871
|
-
Object.defineProperty(
|
|
38872
|
-
value:
|
|
38870
|
+
const i = r.id.replaceAll("+", ":");
|
|
38871
|
+
Object.defineProperty(r, "id", {
|
|
38872
|
+
value: i
|
|
38873
38873
|
}), events.emit("track", o);
|
|
38874
|
-
const c = i.id, d = document.querySelectorAll(
|
|
38875
|
-
`[data-stream="${c}"]`
|
|
38876
|
-
);
|
|
38877
|
-
for (const v of d) {
|
|
38878
|
-
const y = document.createElement(r);
|
|
38879
|
-
y.srcObject = i, y.autoplay = !0, y instanceof HTMLVideoElement ? (y.playsInline = !0, y.controls = !1) : y.controls = !0, v.querySelector(r)?.remove(), v.append(y);
|
|
38880
|
-
}
|
|
38881
|
-
const m = document.querySelectorAll(
|
|
38882
|
-
`[data-stream-preview="${c}"]`
|
|
38883
|
-
);
|
|
38884
|
-
for (const v of m) {
|
|
38885
|
-
const y = document.createElement(r);
|
|
38886
|
-
y.srcObject = i, y.autoplay = !0, y instanceof HTMLVideoElement ? (y.playsInline = !0, y.controls = !1) : y.controls = !0, v.querySelector(r)?.remove(), v.append(y);
|
|
38887
|
-
}
|
|
38888
38874
|
};
|
|
38889
38875
|
} else
|
|
38890
38876
|
this.transportFactory = await __webpack_exports__dialDirect(this.serviceHost, n);
|
|
@@ -39041,7 +39027,7 @@ const isLocalConnection = (t) => t.includes(".local"), dialDirect = async (t) =>
|
|
|
39041
39027
|
if (!e)
|
|
39042
39028
|
throw new Error("failed to connect to robot");
|
|
39043
39029
|
return e;
|
|
39044
|
-
}, version = "0.0.
|
|
39030
|
+
}, version = "0.0.37";
|
|
39045
39031
|
var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
39046
39032
|
(function(t) {
|
|
39047
39033
|
var e = googleProtobuf, s = e, n = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof n < "u" && n || typeof self < "u" && self || function() {
|
|
@@ -40535,7 +40521,7 @@ class ArmClient {
|
|
|
40535
40521
|
async stop(e = {}) {
|
|
40536
40522
|
const s = this.ArmService, n = new arm_pb.StopRequest();
|
|
40537
40523
|
n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
|
|
40538
|
-
s.
|
|
40524
|
+
s.stop.bind(s),
|
|
40539
40525
|
n
|
|
40540
40526
|
);
|
|
40541
40527
|
}
|