Screen Capture api alternative code example
Example: Screen Capture api alternative
var constraints = {video: {mediaSource: "screen", width: 320, height: 200}};
navigator.mediaDevices.getUserMedia(constraints)
.then(stream => video.srcObject = stream)
.catch(e => console.log(e.message));