Created
March 27, 2020 19:47
-
-
Save shriyaRam/0d979fe1ba9cad98e7dda89c17f20851 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
async function start() { | |
console.log('Requesting local stream'); | |
startButton.disabled = true; | |
try { | |
const stream = await navigator.mediaDevices.getUserMedia({audio: true, video: true}); | |
console.log('Received local stream'); | |
localVideo.srcObject = stream; | |
localStream = stream; | |
local_Video.srcObject = stream; | |
callButton.disabled = false; | |
} catch (e) { | |
alert(`getUserMedia() error: ${e.name}`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment