jpeg_camera
jpeg_camera copied to clipboard
Allow user to access stream object -- can be used e.g. to stop recording.
Hi, this is intended to address #7.
The stream object is exposed to the application code.
The application code can then stop the stream with code like:
const { stream, } = <your webcam instance>
if (!stream) return console.error("No stream object, can't stop!")
stream.getTracks().forEach(track => track.stop())
@amw, is there any way to get this merged? This is a trivial change that alleviates some crucial pain points. (Like turning off the webcam) Thanks!
@amw I am having the same issue of #7 and this PR solves the problem, could it be merged? Thanks!