Add files via upload

This commit is contained in:
Steve Seguin 2021-05-13 05:10:55 -04:00 committed by GitHub
parent 3882583d6c
commit 15030fe123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 79 additions and 82 deletions

25
changepass.html Normal file
View File

@ -0,0 +1,25 @@
<html><body><script>
var generateHash = function (str, length=false){
var buffer = new TextEncoder("utf-8").encode(str);
return crypto.subtle.digest("SHA-256", buffer).then(
function (hash) {
hash = new Uint8Array(hash);
if (length){
hash = hash.slice(0, parseInt(parseInt(length)/2));
}
hash = toHexString(hash);
return hash;
}
);
};
function toHexString(byteArray){
return Array.prototype.map.call(byteArray, function(byte){
return ('0' + (byte & 0xFF).toString(16)).slice(-2);
}).join('');
}
var password = prompt("Please enter the password");
generateHash(password + location.hostname, 4).then(function(hash) { // million to one error.
alert("hash value: "+hash)
});
</script></body></html>

View File

@ -509,4 +509,4 @@ function gohere(){
getPermssions();
</script>
</body>
</html>
</html>

View File

@ -55,7 +55,7 @@
}
</style>
<link rel="stylesheet" href="./lineawesome/css/line-awesome.min.css" />
<link rel="stylesheet" href="./main.css?ver=57" />
<link rel="stylesheet" href="./main.css?ver=58" />
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/adapter.min.js"></script>
</head>
<body id="main" class="hidden">
@ -167,7 +167,7 @@
<span
id="helpbutton"
title="Show Help Info"
onclick="warnUser('For support, please browse https://reddit.com/r/obsninja or join the live chat on Discord at https://discord.obs.ninja.\n\nThe Wiki also contains many help guides and advanced settings, located at https://wiki.obs.ninja.\n\nTo access the video stats menu, hold CTRL (command) and Left-Click on a video. Most video issues can be fixed by using Wired Internet instead of Wi-Fi.')"
onclick="warnUser('For support, please browse https://reddit.com/r/obsninja or join the live chat on Discord at https://discord.obs.ninja.\n\nThe documention also contains many guides and advanced settings, located at https://docs.obs.ninja.\n\nTo access the video stats menu, hold CTRL (command) and Left-Click on a video. Most video issues can be fixed by using Wired Internet instead of Wi-Fi.')"
style="cursor: pointer; display:none;"
alt="How to Use This with OBS"
>
@ -703,19 +703,19 @@
</i>
<br />
<li>
If you have <a href="https://github.com/steveseguin/obsninja/wiki/FAQ#video-is-pixelated">"pixel smearing"</a> or corrupted video, try adding <i>&codec=h264</i> or <i>&codec=vp9</i> to the OBS view link. Using Wi-Fi will make the issue worse.
If you have <a href="https://docs.obs.ninja/common-errors-and-known-issues/video-is-pixelated">"pixel smearing"</a> or corrupted video, try adding <i>&codec=h264</i> or <i>&codec=vp9</i> to the OBS view link. Using Wi-Fi will make the issue worse.
</li>
<li>
A list of less common issues can <a href="https://github.com/steveseguin/obsninja/wiki/Known-Issues-(browser-bugs-and-more)">be found here</a>.
A list of less common issues can <a href="https://docs.obs.ninja/common-errors-and-known-issues/known-issues-browser-bugs-and-more">be found here</a>.
</li>
<br />
👓🔆 Site Updated on April 20th: <a href="https://github.com/steveseguin/obsninja/wiki/v17-Release-Notes">v17 Release Notes</a>. The previous version can be found at <a href="https://obs.ninja/v164/">https://obs.ninja/v164/</a> if you are having issues with this minor update.
👓🔆 Site Updated on April 20th: <a href="https://docs.obs.ninja/release-notes/v17-release-notes">v17 Release Notes</a>. The previous version can be found at <a href="https://obs.ninja/v164/">https://obs.ninja/v164/</a> if you are having issues with this minor update.
<br />
<br />
<h3>
🛠 For support, see the <a href="https://www.reddit.com/r/OBSNinja/">sub-reddit <i class="lab la-reddit-alien"></i></a> or join the <a href="https://discord.gg/T4xpQVv">Discord <i class="lab la-discord"></i></a>. The <a href="https://github.com/steveseguin/obsninja/wiki/">Wiki is here</a> and my personal email is <i>steve@seguin.email</i>
🛠 For support, see the <a href="https://www.reddit.com/r/OBSNinja/">sub-reddit <i class="lab la-reddit-alien"></i></a> or join the <a href="https://discord.gg/T4xpQVv">Discord <i class="lab la-discord"></i></a>. The <a href="https://docs.obs.ninja/">documentation is here</a> and my personal email is <i>steve@seguin.email</i>
</h3>
</span>
@ -771,7 +771,7 @@
<li>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</li>
<br />
For advanced URL options and parameters, <a href="https://github.com/steveseguin/obsninja/wiki/Advanced-Settings">see the Wiki.</a>
For advanced URL options and parameters, <a href="https://docs.obs.ninja/advanced-settings">see the Documentation.</a>
</font>
</div>
</div>

View File

@ -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;
}

78
main.js
View File

@ -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;

View File

@ -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")) {

View File

@ -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;

View File

@ -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: <body onload=>loadIframe();"> !!!
@ -70,6 +72,8 @@
streamID = urlParams.get("sid");
}
document.getElementById("remote").innerHTML = "<a style='color:#CCC' href='./monitor?sid="+streamID+"'>Remote Monitoring Link</a><br /><br /><br /><br />";
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 @@
</li>
</ol>
<div id="screen" style="color: #CCC; margin:10px 0;"><a href="./speedtest?screen" style="color: #CCC;">Test screen-sharing performance here</a></div>
<div id="remote"></div>
</div>
<script>
var testType= "webcam";
if (urlParams.has("screen") || urlParams.has("ss") || urlParams.has("screenshare") || urlParams.has("screentest")) {
document.getElementById("screen").innerHTML = '<a href="./speedtest" style="color: #CCC;">Test webcam-streaming performance here</a>';
testType = "quality=0&screenshare&css=speedtest.css"
}
var bitrate = {
element: "bitrate-graph",
data: 0,

File diff suppressed because one or more lines are too long