-
-
Save kypflug/5d1e15bb33beb008a91a8bc789250255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var constraints = { | |
video: true | |
}; | |
function handleSuccess(stream) { | |
video.srcObject = stream; | |
} | |
function handleError(error) { | |
console.log('navigator.getDisplayMedia error: ', error); | |
} | |
navigator.getDisplayMedia(constraints). | |
then(handleSuccess).catch(handleError); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment