switch camera using MediaDevices.getUserMedia() in vuejs 2
switch camera using MediaDevices.getUserMedia() in vuejs 2 I'm trying to develop a website where i can switch camera from chrome in mobile devices. Current im using vuejs 2 framework and using MediaDevices.getUserMedia() to take image. From here i understand how am i gonna use my code. Individually both of front and back camera working. But where im trying to switch between then its not working. Here is my code: <template> <div class="container" id="scanIdCardPage"> <div class="scanIdCardDiv"> <div class="scanCardContainer" v-show="afterTakingPhoto"> <video ref="video" id="video" :style="{width: divWidth}" autoplay></video> <canvas ref="canvas" id="canvas" width="320" height="240" style="display: none;"></canvas> </div...