Resolve DEV-2816 while I'm at it - allow users to switch between screens

This commit is contained in:
Zach Fox 2019-11-27 13:01:41 -05:00
parent d4b50523c2
commit 5eae6711e6

View file

@ -190,6 +190,10 @@ function stopSharing() {
// Callback to start publishing after we have setup the chromium stream // Callback to start publishing after we have setup the chromium stream
function gotStream(stream) { function gotStream(stream) {
if (localStream) {
stopSharing();
}
localStream = stream; localStream = stream;
startTokboxPublisher(localStream); startTokboxPublisher(localStream);
@ -208,6 +212,9 @@ function onAccessApproved(desktop_id) {
console.log('Desktop Capture access rejected.'); console.log('Desktop Capture access rejected.');
return; return;
} }
document.getElementById('screenshare').style.visibility = "block"; document.getElementById('screenshare').style.visibility = "block";
desktopSharing = true; desktopSharing = true;
navigator.webkitGetUserMedia({ navigator.webkitGetUserMedia({