JSFiddle - React, Tailwind, and code Playground

JavaScript

navigator.webkitGetUserMedia({
    video: {
          width: { max: 640 },
          height: { max: 480 },
          frameRate: { max: 15 },
        },
    audio: true

}, function (stream) {}, function (err) {
    console.log(err)
});