From 15030fe1236fc8ca9b8c20e4e2ca16f05def533f Mon Sep 17 00:00:00 2001 From: Steve Seguin Date: Thu, 13 May 2021 05:10:55 -0400 Subject: [PATCH] Add files via upload --- changepass.html | 25 ++++++++++++++++ electron.html | 2 +- index.html | 14 ++++----- main.css | 10 +------ main.js | 78 ++++++++++++------------------------------------- monitor.html | 7 ++--- speedtest.css | 7 +++++ speedtest.html | 16 +++++++++- webrtc.js | 2 +- 9 files changed, 79 insertions(+), 82 deletions(-) create mode 100644 changepass.html diff --git a/changepass.html b/changepass.html new file mode 100644 index 0000000..097f777 --- /dev/null +++ b/changepass.html @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/electron.html b/electron.html index ecf59b3..a4d5b64 100644 --- a/electron.html +++ b/electron.html @@ -509,4 +509,4 @@ function gohere(){ getPermssions(); - + \ No newline at end of file diff --git a/index.html b/index.html index 82f98b5..b57b742 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@ } - + @@ -167,7 +167,7 @@ @@ -771,7 +771,7 @@
  • Adding &showonly=SOME_OBS_VIRTUALCAM to the guest invite links allows for only a single video to be seen by the guests; this can be output of the OBS Virtual Camera for example

  • - For advanced URL options and parameters, see the Wiki. + For advanced URL options and parameters, see the Documentation. diff --git a/main.css b/main.css index 2f92681..73adcf6 100644 --- a/main.css +++ b/main.css @@ -226,7 +226,7 @@ button.white:active { text-shadow: 0.05em 0.05em 0px rgba(0,0,0,1); width:100%; height:100vh; - z-index: 1; + z-index: 6; vertical-align: top; text-align: center; top: 0; @@ -2467,14 +2467,6 @@ span#guestTips { display: block; margin: auto; } - -#iframe_source{ - width: 100%; - height: 100%; - margin: auto; - border: 10px dashed rgb(64 65 62) -} - #shareScreenGear{ display:none; } diff --git a/main.js b/main.js index 3e24749..6d26add 100644 --- a/main.js +++ b/main.js @@ -550,60 +550,8 @@ if (window.obsstudio) { }); }); - window.obsstudio.onVisibilityChange = function obsvisibility(visibility){ - try { - log("OBS VISIBILITY:"+visibility); - if (session.disableOBS===false){ - var bundle = {}; - bundle.sceneUpdate = []; - for (var UUID in session.rpcs){ - if (session.rpcs[UUID].visibility!==visibility){ // only move forward if there is a change; the event likes to double fire you see. - - session.rpcs[UUID].visibility = visibility; - var msg = {}; - msg.visibility = visibility; - - if (session.rpcs[UUID].videoElement.style.display == "none"){ // Flag will be left alone, but message will say its disabled. - msg.visibility = false; - } - if (session.optimize!==false){ - ////////////// bandwidth stuff - var bandwidth = parseInt(session.rpcs[UUID].targetBandwidth); // we don't want to change the target bandwidth, as that's still the real goal and are point of reference for reverting this change. - log("bandwidth:"+bandwidth); - if (visibility==false){ // limit bandwidth if not visible - if ((bandwidth > session.optimize) || (bandwidth<0)){ // limit to optimized bitrate - bandwidth = session.optimize; - } - } - if (session.rpcs[UUID].bandwidth !== bandwidth){ // bandwidth already set correctly. don't resend. - msg.bitrate = bandwidth; - if (session.sendRequest(msg, UUID)){ - session.rpcs[UUID].bandwidth=bandwidth; // this is letting the system know what the actual bandwidth is, even if it isn't the real target. - } else { - errorlog("Unable to set update OBS Visibility"); - } - } else { - session.sendRequest(msg, UUID); - msg.UUID = UUID; - bundle.sceneUpdate.push(msg) - } - ///////////////// end bandwidth stuff - } else { - session.sendRequest(msg, UUID); - msg.UUID = UUID; - bundle.sceneUpdate.push(msg) - } - } - } - for (var UUID in session.rpcs){ - session.sendRequest(bundle, UUID); - } - } - } catch (e){errorlog(e)}; - }; } - window.onload = function winonLoad() { // This just keeps people from killing the live stream accidentally. Also give me a headsup that the stream is ending window.addEventListener("beforeunload", function(e) { try { @@ -910,9 +858,13 @@ if (/CriOS/i.test(navigator.userAgent) && (iOS || iPad)) { } } +if (urlParams.has('tips')){ + getById("guestTips").style.display="flex"; +} + if (urlParams.has('broadcast') || urlParams.has('bc')) { log("Broadcast flag set"); - session.broadcast = urlParams.get('broadcast') || urlParams.get('bc'); + session.broadcast = urlParams.get('broadcast') || urlParams.get('bc') || null; //if ((iOS) || (iPad)) { // session.nopreview = false; //} else { @@ -942,7 +894,7 @@ if (urlParams.has('showlist')) { var directorLanding = false; if (urlParams.has('director') || urlParams.has('dir')) { - directorLanding = urlParams.get('director') || urlParams.get('dir'); + directorLanding = urlParams.get('director') || urlParams.get('dir') || null; if (directorLanding === null) { directorLanding = true; } else if (directorLanding.length === 0) { @@ -2516,6 +2468,7 @@ if (urlParams.has('turn')) { } } else if ((turnstring == "false") || (turnstring == "off") || (turnstring == "0")) { // disable TURN servers + if (!session.configuration){session.configuration={};} session.configuration = { iceServers: [ { urls: ["stun:stun.l.google.com:19302", "stun:stun4.l.google.com:19302"]} // more than 4 stun+turn servers will cause firefox issues? (2 + 2 for now then) @@ -2530,9 +2483,12 @@ if (urlParams.has('turn')) { turn.username = turnstring[0]; // myusername turn.credential = turnstring[1]; //mypassword turn.urls = [turnstring[2]]; // ["turn:turn.obs.ninja:443"]; - session.configuration.iceServers = [{ - urls: ["stun:stun.l.google.com:19302", "stun:stun4.l.google.com:19302"] - }]; + session.configuration = { + iceServers: [ + { urls: ["stun:stun.l.google.com:19302", "stun:stun4.l.google.com:19302"]} // more than 4 stun+turn servers will cause firefox issues? (2 + 2 for now then) + ], + sdpSemantics: 'unified-plan' // future-proofing + }; session.configuration.iceServers.push(turn); } } catch (e) { @@ -4373,7 +4329,7 @@ function TFLiteWorker(){ URL.revokeObjectURL(session.tfliteModule.img.src); // no longer needed, free memory session.tfliteModule.img.ready = true; } - session.tfliteModule.img.src = "./media/bg_sample.jpg"; + session.tfliteModule.img.src = "./media/bg_sample.webp"; session.tfliteModule.img.ready = false; console.log('Starting Loop'); @@ -6686,6 +6642,10 @@ session.publishIFrame = function(iframeURL){ iframe.allow="autoplay;camera;microphone"; iframe.allowtransparency="true"; iframe.allowfullscreen ="true"; + iframe.style.width="100%"; + iframe.style.height="100%"; + iframe.style.margin="auto"; + iframe.style.border = "10px dashed rgb(64 65 62)"; iframe.src = session.iframeSrc; iframe.id = "iframe_source" session.iframeEle = iframe; @@ -16137,7 +16097,7 @@ function effectsDynamicallyUpdate(event, ele, preview=true){ } } else if (effect === "5"){ if (session.tfliteModule.img){ - session.tfliteModule.img.src = "./media/bg_sample.jpg"; + session.tfliteModule.img.src = "./media/bg_sample.webp"; } if ((session.effects<3) || (session.effects>5)){ session.effects = 5; diff --git a/monitor.html b/monitor.html index 912df1a..b4ef70c 100644 --- a/monitor.html +++ b/monitor.html @@ -260,11 +260,10 @@ var iframe = document.createElement("iframe"); - if (urlParams.has('remote') || urlParams.has('rem')) { - var remote = urlParams.get('remote') || urlParams.get('rem') || "nosecurity"; - remote = remote.trim(); + if (urlParams.has("remote")) { + var remote = urlParams.get("remote"); } else { - var remote = ""; + var remote=""; } if (urlParams.has("sid")) { diff --git a/speedtest.css b/speedtest.css index cd86776..6283e25 100644 --- a/speedtest.css +++ b/speedtest.css @@ -13,6 +13,10 @@ body { background-color: #141926; } +#add_screen{ + display:none; +} + h1 { color: white; margin: 20px 0px; @@ -24,6 +28,9 @@ h1 small { font-size: 0.5em; } +video { + transform: translate(0px, 0%) !important; +} #explanation { color: white; font-family: sans-serif; diff --git a/speedtest.html b/speedtest.html index 9573faf..508951c 100644 --- a/speedtest.html +++ b/speedtest.html @@ -54,6 +54,8 @@ } } + + function loadIframe() { // this is pretty important if you want to avoid camera permission popup problems. YOu need to load the iFRAME after you load the parent body. A quick solution is like: loadIframe();"> !!! @@ -70,6 +72,8 @@ streamID = urlParams.get("sid"); } + + document.getElementById("remote").innerHTML = "Remote Monitoring Link



    "; var iframe = document.createElement("iframe"); @@ -80,7 +84,7 @@ iframe.allowfullscreen ="true"; //iframe.allow = "autoplay"; - var srcString = "./?push=" + streamID + "&cleanoutput&privacy&speedtest&webcam&audiodevice=0&fullscreen&transparent&remote"; + var srcString = "./?push=" + streamID + "&cleanoutput&privacy&speedtest&"+testType+"&audiodevice=0&fullscreen&transparent&remote"; if (urlParams.has("turn")) { srcString = srcString + "&turn=" + urlParams.get("turn"); @@ -363,10 +367,20 @@ +
    Test screen-sharing performance here
    +