From 56806a21862920e1eb03ed0f6e167bdc8dd5498d Mon Sep 17 00:00:00 2001 From: Steve Seguin Date: Mon, 17 May 2021 17:58:17 -0400 Subject: [PATCH] Add files via upload --- electron.html | 472 +++++++++++++++++++++++++++----------------------- iframe.html | 5 + index.html | 35 ++-- main.js | 109 +++++++++++- webrtc.js | 2 +- 5 files changed, 387 insertions(+), 236 deletions(-) diff --git a/electron.html b/electron.html index a4d5b64..b7fc151 100644 --- a/electron.html +++ b/electron.html @@ -1,227 +1,274 @@ - + + - + div#urlInput { + margin: 4em; + display: flex; + flex-direction: row; + } + @media only screen and (max-width: 940px) { + body{ + zoom: 0.74; + -moz-transform: scale(0.74); + -moz-transform-origin: 0 0; + + } + .container{ + max-width:99%; + } + div#urlInput { + margin: 2em; + } + div#audioOutputContainer, #history { + margin: 2em; + } + } + @media only screen and (max-width: 840px) { + body{ + zoom: 0.64; + -moz-transform: scale(0.64); + -moz-transform-origin: 0 0; + + } + + } + + @media only screen and (max-height: 639px) { + div#urlInput { + margin: 2em; + } + div#audioOutputContainer, #history { + margin: 2em; + } + } + + @media only screen and (max-width: 767px) { + + div#urlInput { + margin: 2em 1em; + } + div#audioOutputContainer, #history { + margin: 2em 1em; + } + } + + + @media only screen and (max-height: 380px) { + div#urlInput { + margin: 1em; + } + div#audioOutputContainer, #history { + margin: 1em; + } + } + + + + label[for="audioOutput"], label[for="lastUrls"] { + font-size: 3em; + } + + #warning4mac, #electronVersion { + background: #8500f7; + box-shadow: 0px 0px 50px 10px #8500f7ab, inset 0px 0px 10px 2px #8d08ffba; + border: 2px solid #8500f7; + border-radius: 10px; + width: 90%; + padding:1em; + margin:0 auto; + color:white; + font-size:1.3em; + margin-bottom: 20px; + } + + #warning4mac a, #electronVersion a { + color:white; + } + + ul#lastUrls { + list-style: none; + background: #101520; + color: white; + padding: 1em; + } + + ul#lastUrls li { + padding: 5px 0px; + } + ul#lastUrls li:nth-child(even) { + background-color: #182031; + } + + + @@ -490,17 +537,18 @@ function addUrlToHistory(url){ } } -function modURL(ele=false){ +function modURL(){ var url = document.getElementById('changeText').value; - console.log(url); - document.getElementById('changeText').value = url; + if (url.startsWith("obs.ninja")){ + url = "https://"+url; + } console.log(url); return url; } function gohere(){ addUrlToHistory(document.getElementById('changeText').value); localStorage.setItem('lastUrls', JSON.stringify(lastUrls)); - var url = modURL(true); + var url = modURL(); if (!(document.getElementById('changeText').value.includes("obs.ninja")) && (document.getElementById('changeText').value.includes("http")) && (document.getElementById('changeText').value.includes("&sink"))){ alert("Notice: The &sink command is domain specific.\nVisit https://YOURDOMAIN.com/electron instead."); } diff --git a/iframe.html b/iframe.html index 3ac4520..0881ae3 100644 --- a/iframe.html +++ b/iframe.html @@ -192,6 +192,11 @@ function loadIframe(){ // this is pretty important if you want to avoid camera button.onclick = function(){iframe.contentWindow.postMessage({"sendChat":"Hello!"}, '*');}; iframeContainer.appendChild(button); + var button = document.createElement("button"); + button.innerHTML = "Send Keyframe"; + button.onclick = function(){iframe.contentWindow.postMessage({"keyframe":true}, '*');}; + iframeContainer.appendChild(button); + var button = document.createElement("button"); button.innerHTML = "Insert Style Sheet"; var stylesheet = "#main { zoom: 0.5;} video {float: left; margin: 0; padding: 0; } #info {display:none;}"; diff --git a/index.html b/index.html index f0746d3..583cf6b 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@ } - + @@ -66,8 +66,8 @@ - - + +