Skip to content

Commit

Permalink
fix(lld): camera does not shut off when not scanning qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey committed Jun 10, 2024
1 parent 13553be commit 64ec9c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/beige-years-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Fix Send: Camera does not shut off when not scanning QR code
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export default class QRCodeCameraPickerCanvas extends PureComponent<
}),
])
.then(stream => {
if (this.unmounted) return;
if (this.unmounted) {
stream.getTracks().forEach(track => track.stop());
return;
}
this.setState({
error: null,
});
Expand All @@ -153,6 +156,7 @@ export default class QRCodeCameraPickerCanvas extends PureComponent<
video.srcObject = null;
video = null;
}
stream.getTracks().forEach(track => track.stop());
});
video.onloadedmetadata = () => {
if (this.unmounted || !video) return;
Expand Down

0 comments on commit 64ec9c2

Please sign in to comment.