Skip to content

Commit

Permalink
Merge pull request #867 from steveseguin/v17.2.99999
Browse files Browse the repository at this point in the history
V17.2.99999
  • Loading branch information
steveseguin authored May 13, 2021
2 parents 3882583 + cee772d commit 4adf5fb
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 82 deletions.
2 changes: 1 addition & 1 deletion electron.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,4 @@
getPermssions();
</script>
</body>
</html>
</html>
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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"
>
Expand Down Expand Up @@ -703,19 +703,19 @@ <h2>What is OBS.Ninja</h2>
</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>[email protected]</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>[email protected]</i>
</h3>

</span>
Expand Down Expand Up @@ -771,7 +771,7 @@ <h3>
<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>
Expand Down
10 changes: 1 addition & 9 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
78 changes: 19 additions & 59 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand All @@ -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) {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions monitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
7 changes: 7 additions & 0 deletions speedtest.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ body {
background-color: #141926;
}

#add_screen{
display:none;
}

h1 {
color: white;
margin: 20px 0px;
Expand All @@ -24,6 +28,9 @@ h1 small {
font-size: 0.5em;
}

video {
transform: translate(0px, 0%) !important;
}
#explanation {
color: white;
font-family: sans-serif;
Expand Down
16 changes: 15 additions & 1 deletion speedtest.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();"> !!!
Expand All @@ -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");
Expand All @@ -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");
Expand Down Expand Up @@ -363,10 +367,20 @@ <h2>How to use</h2>
</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,
Expand Down
2 changes: 1 addition & 1 deletion webrtc.js

Large diffs are not rendered by default.

0 comments on commit 4adf5fb

Please sign in to comment.