jpeg_camera icon indicating copy to clipboard operation
jpeg_camera copied to clipboard

Allow user to access stream object -- can be used e.g. to stop recording.

Open allen-edia opened this issue 8 years ago • 2 comments

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())

allen-edia avatar Aug 16 '17 08:08 allen-edia

@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!

nadeesha avatar Oct 27 '17 03:10 nadeesha

@amw I am having the same issue of #7 and this PR solves the problem, could it be merged? Thanks!

inakiarroyo avatar Jan 10 '18 10:01 inakiarroyo