fix(security): properly cleanup MediaStream on camera access failure

- Add stopStreamTracks() call in catch block to release any partially
  acquired media tracks when camera access fails
- Prevents privacy and resource leaks from orphaned media streams
This commit is contained in:
Johnpaul
2025-11-27 03:57:17 +01:00
parent 335b72bc62
commit f7f0c05d1a

View File

@@ -634,8 +634,8 @@ async function startCameraPreview() {
)
}
stopStreamTracks()
isShowingPreview.value = false
isCameraOn.value = false
}
}