Skip to content

Commit

Permalink
Use Correct Stream Event When Multiple Cameras Exist (#1944)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellee1019 authored Feb 28, 2023
1 parent ebc4370 commit f3d5835
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/remote-control",
"version": "0.1.34",
"version": "0.1.35",
"license": "Apache-2.0",
"files": [
"src/components/**/*.vue",
Expand Down
4 changes: 4 additions & 0 deletions web/frontend/src/components/camera/camera.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ const viewCamera = async (isOn: boolean) => {
if (!eventStream) {
throw new Error('expected event stream to exist');
}
// Ignore event if received for the wrong stream, in the case of multiple cameras
if (eventStream.id !== props.cameraName) {
return;
}
videoEl.srcObject = eventStream;
});
Expand Down
2 changes: 1 addition & 1 deletion web/runtime-shared/static/control.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/runtime-shared/static/control.js.map

Large diffs are not rendered by default.

0 comments on commit f3d5835

Please sign in to comment.