Why is this code not working:
videoCallButton.onclick = function()
{navigator.getUserMedia(mediaConstraints, handleUserMedia, handleUserMediaError);
};
but this one It is:
videoCallButton.onclick = navigator.getUserMedia(
mediaConstraints, handleUserMedia, handleUserMediaError
);
and the event onclick works everytime page is loaded, without clicking
videoCallButton.onclick = alert("yes");