From abda363a8c3e7df1c107a664ecdae914fdd26089 Mon Sep 17 00:00:00 2001 From: "Glitch (peerjs-video)" Date: Fri, 11 Sep 2020 21:08:35 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=F0=9F=8E=A2=20Checkpoint=20./publi?= =?UTF-8?q?c/main.js:5975361/2716=20./public/index.html:5975361/146?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 4 --- public/main.js | 63 +---------------------------------------------- 2 files changed, 1 insertion(+), 66 deletions(-) diff --git a/public/index.html b/public/index.html index 07bd20e..cf1fa21 100644 --- a/public/index.html +++ b/public/index.html @@ -68,10 +68,6 @@ -
-
- Share screen -
diff --git a/public/main.js b/public/main.js index 0492ccd..0d3460e 100644 --- a/public/main.js +++ b/public/main.js @@ -218,68 +218,7 @@ var app = new Vue({ element.setSelectionRange(0, 99999); /*For mobile devices*/ document.execCommand("copy"); alert("Copied the text: " + element.value); - }, - getScreen: function(error, sourceId, screen_constraints) { - if (IsAndroidChrome) { - screen_constraints = { - mandatory: { - chromeMediaSource: 'screen' - }, - optional: [] - }; - - screen_constraints = { - video: screen_constraints - }; - - error = null; - } - - console.log('screen_constraints', JSON.stringify(screen_constraints, null, '\t')); - navigator.mediaDevices.getUserMedia(screen_constraints).then(function(stream) { - addStreamStopListener(stream, function() { - if (self.onuserleft) self.onuserleft('self'); - }); - - self.stream = stream; - - var video = document.createElement('video'); - video.id = 'self'; - video.muted = true; - video.volume = 0; - - try { - video.setAttributeNode(document.createAttribute('autoplay')); - video.setAttributeNode(document.createAttribute('playsinline')); - video.setAttributeNode(document.createAttribute('controls')); - } catch (e) { - video.setAttribute('autoplay', true); - video.setAttribute('playsinline', true); - video.setAttribute('controls', true); - } - - video.srcObject = stream; - - self.onaddstream({ - video: video, - stream: stream, - userid: 'self', - type: 'local' - }); - - callback(stream); - }).catch(function(error) { - if (adapter.browserDetails.browser === 'chrome' && location.protocol === 'http:') { - alert('HTTPs is required.'); - } else if (adapter.browserDetails.browser === 'chrome') { - alert('Screen capturing is either denied or not supported. Please install chrome extension for screen capturing or run chrome with command-line flag: --enable-usermedia-screen-capturing'); - } else if (adapter.browserDetails.browser === 'firefox') { - alert(Firefox_Screen_Capturing_Warning); - } - - console.error(error); - }); - } + } }, mounted() { console.log('VUE is alive!');