JSFiddle - React, Tailwind, and code Playground

by Thornton_Fernbacher

JavaScript

function startCapture(displayMediaOptions) {
 return navigator.mediaDevices.getDisplayMedia(displayMediaOptions).catch(err => console.log("Unable to open capture: ", err));
}

startCapture({
	video:true,
  audio:true
})
.then(stream => {
console.log(stream);
})