schmich/instascan

Cannot access video stream when the first camera is already used

panbak opened this issue · 1 comments

When the first of the cameras returned by Instascan.Camera.getCameras() is not available(is already used), there is an exception.
In the following image,I am running two instances of my code. At the first one Instascan.Camera.getCameras() works fine but on the second one I get the exception: Error: Cannot access video stream (NotReadableError).
image

I hope what I'm describing is clear.
Any work-around for this?

note: I noticed that the live demo has also the same issue https://schmich.github.io/instascan

It seems that this is not an issue of Instascan, but it is how navigator.mediaDevices.enumerateDevices(); called in getCameras() function works.