This commit is contained in:
Steve Seguin 2022-01-15 04:11:33 -05:00 committed by GitHub
parent 1641565a33
commit f96af0d543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 67 additions and 26 deletions

View File

@ -54,7 +54,7 @@
transition: opacity .1s linear;
}
</style>
<link rel="stylesheet" href="./main.css?ver=148" />
<link rel="stylesheet" href="./main.css?ver=150" />
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/adapter.min.js"></script>
<style id="lightbox-animations" type="text/css"></style>
</head>
@ -66,8 +66,8 @@
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="url" href="./media/vdoNinja_logo_full.png" />
</span>
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=35"></script>
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=339"></script>
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=36"></script>
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=340"></script>
<input id="zoomSlider" type="range" style="display: none;" />
<div id="header">
@ -242,7 +242,7 @@
<span data-translate="room-name">Room Name</span>:
</b>
</div>
<input type="text" autocorrect="off" autocapitalize="none" id="videoname1" placeholder="Enter a Room Name here" onkeydown="checkStrengthRoom(event, 'securityLevelRoom');" onchange="checkStrengthRoom(event, 'securityLevelRoom');" onkeyup="enterPressed(event, createRoom);" maxlength="30" style="font-size: 110%; padding: 5px;" />
<input type="text" autocorrect="off" autocapitalize="none" id="videoname1" placeholder="Enter a Room Name here" onkeydown="checkStrengthRoom(event, 'securityLevelRoom');" onchange="checkStrengthRoom(event, 'securityLevelRoom');" onkeyup="enterPressed(event, createRoom);" maxlength="30" style="max-width: 512px;width: 100%;font-size: 110%; padding: 5px;" />
<div id="securityLevelRoom" style="display:none;margin-top:3px;position:relative;top:3px;font-size:0.8em;"></div>
</th>
@ -260,7 +260,7 @@
<span data-translate="password-input-field">Password</span>:
</b>
</div>
<input type="text" autocorrect="off" autocapitalize="none" id="passwordRoom" placeholder="Optional room password here" onkeydown="checkStrengthRoom(event, 'securityLevelRoom');" onchange="checkStrengthRoom(event, 'securityLevelRoom');" onkeyup="enterPressed(event, createRoom);" maxlength="30" style="font-size: 110%; padding: 5px;" />
<input type="text" autocorrect="off" autocapitalize="none" id="passwordRoom" placeholder="Optional room password here" onkeydown="checkStrengthRoom(event, 'securityLevelRoom');" onchange="checkStrengthRoom(event, 'securityLevelRoom');" onkeyup="enterPressed(event, createRoom);" maxlength="50" style="max-width: 512px;width: 100%;font-size: 110%; padding: 5px;" />
</th>
</tr><tr >
@ -269,7 +269,7 @@
<input id="broadcastFlag" type="checkbox" title="For large group rooms, this option can reduce the load on remote guests substantially" />
</th><th style="text-align:left;; padding-top: 20px;">
<b>
<span data-translate="guests-only-see-director" style="cursor: help;" title="For large group rooms, this option can reduce the load on remote guests substantially" >Guests can only see the Director's Video</span>
<span data-translate="guests-only-see-director" style="cursor: help;" title="For large group rooms, this option can reduce the load on remote guests substantially" >The guests can see the director, but not other guests</span>
</b>
</th>
</tr><tr>
@ -278,10 +278,10 @@
<input id="showdirectorFlag" type="checkbox" title="The director will be visible in scenes as if a performer themselves." />
</th><th style="text-align:left;; padding-bottom: 20px;">
<b>
<span data-translate="scenes-can-see-director" style="cursor: help;" title="If checked, the director can be added to scenes as if a guest. Otherwise, the director will never appear in a scene." >Director will be performing; appearing in scenes</span>
<span data-translate="scenes-can-see-director" style="cursor: help;" title="If checked, the director can be added to scenes as if a guest. Otherwise, the director will never appear in a scene." >The director will be performing alongside guests, appearing in group scene links</span>
</b>
</th>
</tr><tr>
</tr><tr style="display:none;">
<th style="text-align:right; padding: 5px;">
</th>
@ -300,11 +300,11 @@
</tr>
</table>
<div style="margin: 0 auto; width: 400px; max-width:100%;">
<div style="margin: 0 auto; width: 512px; max-width:100%;">
<button onclick="createRoom()" class="gobutton" style="width:100%;" alt="Enter the room as the group's director" title="You'll enter as the room's director">
<span data-translate="enter-the-rooms-control">Enter the Room's Control Center</span>
<span data-translate="enter-the-rooms-control">Enter the Room's Control Center as the Director role</span>
</button>
<br /><br />
<br />
<button class="white roomnotes" style="display: block;" onclick="toggle(document.getElementById('roomnotes'),this);">
<span data-translate="show-tips">Show me some tips..</span>
</button>
@ -322,10 +322,10 @@
<br />
<br />
</ul>
<br />
<br /><br />
<i>Looking to just chat and not direct?</i>
<button onclick="jumptoroom2()" class="gobutton" style="width:100%;" alt="Enter the room as the group's director" title="You'll enter as the room's director">
<span data-translate="join-the-room-basic">Join room as participant</span>
<span data-translate="join-the-room-basic">Join the room as guest participant rather than a director</span>
</button>
</div>
</div>
@ -1917,11 +1917,11 @@
// session.introOnClean = true; // this will load the page with the webcam selection screen if &push or &room is in the URL; no need to use &webcam.
</script>
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/aes.js"></script>
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=248"></script>
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=250"></script>
<!--
// If you wish to change branding, blank offers a good clean start.
<script type="text/javascript" id="main-js" src="./main.js" data-translation="blank"></script>
-->
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=288"></script>
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=289"></script>
</body>
</html>

55
lib.js
View File

@ -318,9 +318,26 @@ function submitDebugLog(msg){
}
}
function detectGPUSupport() {
try {
const gl = document.createElement('canvas').getContext('webgl');
if (!gl) {
return false;
}
const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
if (debugInfo){
return gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
}
} catch(e){}
return false;
}
var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform); // used by main.js also
var iPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform));
var macOS = navigator.userAgent.indexOf('Mac OS X') != -1;
var gpgpuSupport = detectGPUSupport();
log(gpgpuSupport);
function isAlphaNumeric(str) {
@ -4443,8 +4460,6 @@ function applyEffects(track) { // video only please. do not touch audio. Run up
} else {
session.canvasSource.onloadeddata = mainMeshMask;
}
} else {
if (session.canvasource){
session.canvasSource.srcObject.getVideoTracks().forEach(function(trk) {
@ -12798,7 +12813,8 @@ if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) { // this ena
</button>
</li>
`).join('')}
<div style="text-align: center;margin: auto 5px;font-size: 120%;"><i class="las la-music" style="font-size:40px;"></i><br />Include Desktop Audio<br /><input id="alsoCaptureAudio" style="width:20px;height:20px;margin-top: 10px;" type="checkbox" checked></div>
<div id="alsoCaptureAudioParent1" style="text-align: center;margin: auto 5px;font-size: 120%;"><i class="las la-music" style="font-size:40px;"></i><br />Include Desktop Audio<br /><input id="alsoCaptureAudio" style="width:20px;height:20px;margin-top: 10px;" type="checkbox" checked></div>
<div id="alsoCaptureAudioParent2" style="text-align: center;margin: auto 5px;font-size: 120%;display:none;"><i class="las la-music" style="font-size:40px;"></i><br />Audio capture not <br />supported on macOS</div>
<button id="captureDesktopAudio" class="desktop-capturer-click" style="margin: 10px;"><i class="las la-music" style="font-size:40px;"></i><br />Capture ONLY<br />Desktop Audio</button>
<button id="cancelscreenshare" style="margin: 10px; background-color: #F88; width: 100px;"><i class="las la-window-close" style="font-size:40px;"></i><br />Cancel</button>
</ul>
@ -12807,6 +12823,13 @@ if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) { // this ena
}
document.body.appendChild(selectionElem);
if (macOS){
getById("captureDesktopAudio").style.display = "none";
getById("alsoCaptureAudio").checked = false;
getById("alsoCaptureAudioParent1").style.display = "none";
getById("alsoCaptureAudioParent2").style.display = "inline-block";
}
document.getElementById('cancelscreenshare').addEventListener('click', async () => {
selectionElem.remove();
reject(null);
@ -12838,7 +12861,7 @@ if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) { // this ena
resolve(stream);
selectionElem.remove();
} else {
var audioStream = false;
var audioStream = false;
if (getById("alsoCaptureAudio").checked){
var new_constraints = {
audio: {
@ -12939,7 +12962,7 @@ async function grabScreen(quality = 0, audio = true, videoOnEnd = false) {
if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) {
if (!ElectronDesktopCapture){
if (!(session.cleanOutput)) {
warnUser("Your Electron app does not support Screen Capture.<br /><br />Update your Electron Capture app and then enable Elevated Privileges (right click) to access screen-sharing.");
warnUser("Enable Elevated Privileges to allow screen-sharing. (right click this window to see that option)");
}
return false;
}
@ -14823,7 +14846,7 @@ async function publishScreen2(constraints, audioList=[], audio=true){ // webcam
if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) {
if (!ElectronDesktopCapture){
if (!(session.cleanOutput && session.cleanish==false)){
warnUser("Your Electron app does not support Screen Capture.<br /><br />Update your Electron Capture app and then enable Elevated Privileges to access screen-sharing.");
warnUser("Enable Elevated Privileges to allow screen-sharing. (right click this window to see that option)");
}
return false;
}
@ -15163,7 +15186,7 @@ async function publishScreen2(constraints, audioList=[], audio=true){ // webcam
if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) {
if (!ElectronDesktopCapture){
if (!(session.cleanOutput)) {
warnUser("Your Electron app does not support Screen Capture.<br /><br />Update your Electron Capture app and then enable Elevated Privileges to access screen-sharing.");
warnUser("Enable Elevated Privileges to allow screen-sharing. (right click this window to see that option)");
}
return false;
}
@ -21477,6 +21500,17 @@ function effectsDynamicallyUpdate(event, ele){
getById("selectImageTFLITE").style.display = "block";
getById("selectImageTFLITE3").style.display = "block";
} else if (session.effects === "6"){
if (!gpgpuSupport){
if (!session.cleanOutput){
warnUser("Hardware acceleration isn't detected.<br /><br />This effect will not work",4000);
return;
}
} else if (gpgpuSupport == "Google SwiftShader"){
if (!session.cleanOutput){
warnUser("Hardware acceleration isn't detected.<br /><br />Please enable it for this effect to work correctly.<br /><br /><i>Settings -> Advanced -> System -> Use hardware-accleration</i>");
}
return;
}
loadTensorflowJS();
updateRenderOutpipe();
//mainMeshMask();
@ -21502,8 +21536,15 @@ function loadEffect(effect){
warnlog("Loading Effect: "+effect);
var script = document.createElement('script');
script.onload = function() {
effectsLoaded[filename] = effectsEngine(effect);
effectsLoaded[filename]();
if (gpgpuSupport == "Google SwiftShader"){
if (!session.cleanOutput){
warnUser("Hardware acceleration isn't detected.<br /><br />Please enable it for better performance.<br /><br /><i>Settings -> Advanced -> System -> Use hardware-accleration</i>");
}
}
}
script.src = "./filters/"+filename+".js?"+parseInt(1000*Math.random());
document.head.appendChild(script);

View File

@ -1401,7 +1401,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
session.audioMeterGuest = false;
session.audioEffects = false;
if (window.obsstudio.pluginVersion){
if (navigator.userAgent.indexOf('Mac OS X') !== -1){ // if mac, no fix
if (macOS){ // if mac, no fix
//session.obsfix = false;
} else if (window.obsstudio.pluginVersion=="2.17.4"){ // if obs v27.2 beta, no fix
//session.obsfix = false;
@ -1422,7 +1422,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
}
try {
log("OBS VERSION:" + window.obsstudio.pluginVersion);
log("macOS: " + navigator.userAgent.indexOf('Mac OS X') != -1);
log("macOS: " + macOS);
log(window.obsstudio);
if (typeof document.visibilityState !== "undefined"){
@ -1449,7 +1449,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
var cefVersion = getChromeVersion();
if (ver1.length == 3) { // Should be 3, but disabled3
if ((ver1.length == 3) && (parseInt(ver1[0]) == 2) && (cefVersion < 76) && (navigator.userAgent.indexOf('Mac OS X') != -1)) {
if ((ver1.length == 3) && (parseInt(ver1[0]) == 2) && (cefVersion < 76) && (macOS)) {
updateURL("streamlabs");
getById("main").innerHTML = "<div style='background-color:black;color:white;' data-translate='obs-macos-not-supported'><h1>Update OBS Studio to v26.1.2 or newer; older versions and StreamLabs OBS are not supported on macOS.\
<br /><i><small><small>download here: <a href='https://github.com/obsproject/obs-studio/releases'>https://github.com/obsproject/obs-studio/releases</a></small></small></i>\

File diff suppressed because one or more lines are too long