How can i get the active video stream (from the camera) after it has been created using getUserMedia() without any reference?
Is it possible to get the stream from an video object while it is playing?
I am using quagga.js to scan barcodes and i want to activate the torch and zoom capabilities. However, the function from quagga (getActiveTrack()) is not working and I cannot get the stream (or video track) object.
(I am loading quagga.min.js in the browser.)
It is possible to get the stream (mediaStreamTrack) by getting the srcObject from the video element (document.getElementById(‘video-element’).srcObject). I can now switch on/off torch and control zoom while scanning a barcode but it seems i cannot configure torch and zoom at the same time using camera capabilities. But this is another problem.