Stop/Close webcam stream which is opened by navigator.mediaDevices.getUserMedia [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I opened a webcam by using the following JavaScript code: const stream = await navigator.mediaDevices.getUserMedia({ … Read more

How to handle “Uncaught (in promise) DOMException: play() failed because the user didn’t interact with the document first.” on Desktop with Chrome 66?

I’m getting the error message.. Uncaught (in promise) DOMException: play() failed because the user didn’t interact with the document first. ..when trying to play video on desktop using Chrome version 66. I did find an ad that began playback automatically on a website however using the following HTML: <video title=”Advertisement” webkit-playsinline=”true” playsinline=”true” style=”background-color: rgb(0, 0, … Read more