Merge branch 'Organized-css-files' into develop

This commit is contained in:
steveseguin
2024-06-23 02:39:16 -04:00
8 changed files with 488 additions and 255 deletions

125
draw.html Normal file
View File

@@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Screen Drawing</title>
<style>
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
#videoContainer {
position: relative;
width: 100%;
height: 100%;
background-color: black;
}
#video {
width: 100%;
height: 100%;
object-fit: cover;
}
#drawingCanvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#clearButton {
position: absolute;
top: 10px;
left: 10px;
z-index: 10;
padding: 10px;
background-color: white;
border: none;
cursor: pointer;
}
#startButton {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<button id="startButton">Start</button>
<div id="videoContainer" style="display: none;">
<video id="video" autoplay></video>
<canvas id="drawingCanvas"></canvas>
<button id="clearButton">Clear</button>
</div>
<script>
const startButton = document.getElementById('startButton');
const videoContainer = document.getElementById('videoContainer');
const video = document.getElementById('video');
const drawingCanvas = document.getElementById('drawingCanvas');
const clearButton = document.getElementById('clearButton');
const ctx = drawingCanvas.getContext('2d');
let drawing = false;
startButton.addEventListener('click', async () => {
try {
const stream = await navigator.mediaDevices.getDisplayMedia({ video: true });
video.srcObject = stream;
videoContainer.style.display = 'block';
startButton.style.display = 'none';
} catch (err) {
console.error('Error: ' + err);
}
});
function resizeCanvas() {
drawingCanvas.width = window.innerWidth;
drawingCanvas.height = window.innerHeight;
}
function getMousePos(canvas, evt) {
var rect = canvas.getBoundingClientRect();
return {
x: evt.clientX - rect.left,
y: evt.clientY - rect.top
};
}
drawingCanvas.addEventListener('mousedown', (event) => {
drawing = true;
const pos = getMousePos(drawingCanvas, event);
ctx.beginPath();
ctx.moveTo(pos.x, pos.y);
// drawingCanvas.style.pointerEvents = 'auto';
});
drawingCanvas.addEventListener('mouseup', () => {
drawing = false;
// drawingCanvas.style.pointerEvents = 'none';
});
drawingCanvas.addEventListener('mousemove', (event) => {
if (drawing) {
const pos = getMousePos(drawingCanvas, event);
ctx.lineTo(pos.x, pos.y);
ctx.stroke();
}
});
clearButton.addEventListener('click', () => {
ctx.clearRect(0, 0, drawingCanvas.width, drawingCanvas.height);
});
window.addEventListener('resize', resizeCanvas);
resizeCanvas();
</script>
</body>
</html>

View File

@@ -638,25 +638,30 @@
<button class='gobutton' style="padding: 10px; font-size: 120%;animation: pulsate 2s ease-out infinite;" alt="clilck to select you screen to share" onclick="publishScreen()">
<span data-translate="select-screen-to-share">SELECT SCREEN TO SHARE</span>
</button>
<span id="gear_screen" style="display: inline-block; cursor: pointer;" onclick="toggle(document.getElementById('videoSettings2'));">
<span title="Change the capture resolution. This defines what the maximum resolution the video can be encoded at. A lower resolution will be smoother." id="gear_screen" style="display: inline-block; cursor: pointer;" onclick="toggle(document.getElementById('videoSettings2'));">
<i class="las la-cog" style="font-size: 170%; vertical-align: middle;" aria-hidden="true"></i>
</span>
<center>
<span id="videoSettings2" style="display: none;">
<form id="webcamquality2">
<input type="radio" id="maxres2" name="resolution2" value="-1" />
<label style="cursor:help" for="maxres2" title="Attempts to capture the same resolution that the window/display is displayed at">
<span data-translate="highest-resolution">Highest</span>
</label> &nbsp;&nbsp;|&nbsp;&nbsp;
<input type="radio" id="fullhd2" name="resolution2" value="0" />
<label for="fullhd">
<span data-translate="max-resolution">1080p (hi-def)</span>
<label style="cursor:help" for="fullhd2" title="This will capture at up to 1920x1080 resolution, but it will use up more CPU and may reduce frame rate.">
<span data-translate="1080p-resolution">Full HD</span>
</label> &nbsp;&nbsp;|&nbsp;&nbsp;
<input type="radio" checked id="halfhd2" name="resolution2" value="1" />
<label for="halfhd">
<span data-translate="balanced">720p (balanced)</span>
<label style="cursor:help" for="halfhd2" title="This will capture at a medium resolution; suitable for gaming where frame rates matter more than resolution" >
<span data-translate="720p-balanced">Balanced</span>
</label> &nbsp;&nbsp;|&nbsp;&nbsp;
<input type="radio" id="nothd2" name="resolution2" value="2" />
<label for="nothd">
<span data-translate="smooth-cool">360p (smooth)</span>
<label style="cursor:help" for="nothd2" title="This will capture at a low resolution, suitable for low powered computers or computers on poor networks">
<span data-translate="360p-smooth-cool">Low-res</span>
</label>
<div id="webcamstats2"></div>
</form>
@@ -1014,12 +1019,15 @@
If the video fails to load in OBS Studio, where the browser source remains blank, try disabling hardware-acceleration or
<a href='https://docs.vdo.ninja/common-errors-and-known-issues/obs.ninja-doesnt-show-up-in-obs-or-is-choppy' title="Click to link out to the VDO.Ninja help guide for common OBS Studio problems" target="_blank">refer to this help guide</a> for more.
</li>
<li>
Apple M1 chip users may wish to update to newer versions of macOS, as older versions (eg: Big Sur) seem more prone to audio/video delay and desync issues.
</li>
<br />
<h4>
<span style="color:#daad09;">Welcome to VDO Ninja! We've rebranded! Nothing else is changing and we're staying 100% free.</span>
</h4>
<br />
🌱 Site last updated on March 29th. You can also still access the previous version, which <a href="https://vdo.ninja/v24/">is hosted here</a>. Development <a target="_blank" title="Open a page with recent VDO.Ninja development and feature updates" href="https://updates.vdo.ninja/">updates are here.</a>
🌱 Site last updated on June 23th. You can also still access the previous version, which <a href="https://vdo.ninja/v24/">is hosted here</a>. Development <a target="_blank" title="Open a page with recent VDO.Ninja development and feature updates" href="https://updates.vdo.ninja/">updates are here.</a>
<br />
<br />
<h3>

541
lib.js
View File

@@ -4193,8 +4193,10 @@ function setupIncomingScreenTracking(v, UUID) {
if (session.customWSS || session.wssSetViaUrl){
if (session.customWSS && (session.customWSS!==true)){
wss = "&pie="+session.customWSS;
} else if (session.customWSS==true){
wss = "&wss=" + session.wss;
} else {
wss = "&wss="+session.wss;
wss = "&wss2=" + session.wss;
}
} */
/*
@@ -8521,211 +8523,169 @@ function setAvatarImage(tracks) {
var drawOnScreenObject = null;
function drawOnScreen() {
var canvas = document.getElementById("drawOnSCreen");
if (!canvas) {
canvas = document.createElement("canvas");
getById("gridlayout").appendChild(canvas);
getById("gridlayout").style.position = "relative";
} else {
return;
}
var canvas = document.getElementById("drawOnScreen");
if (!canvas) {
canvas = document.createElement("canvas");
document.getElementById("gridlayout").appendChild(canvas);
document.getElementById("gridlayout").style.position = "relative";
} else {
return;
}
var ctx = canvas.getContext("2d");
canvas.width = parseInt(getById("gridlayout").clientWidth / 2);
canvas.height = parseInt(getById("gridlayout").clientHeight / 2);
canvas.style.width = "100%";
canvas.style.height = "100%";
canvas.style.display = "block";
canvas.style.position = "absolute";
canvas.style.bottom = "0";
canvas.style.left = "0";
var ctx = canvas.getContext("2d");
canvas.width = parseInt(document.getElementById("gridlayout").clientWidth / 2);
canvas.height = parseInt(document.getElementById("gridlayout").clientHeight / 2);
canvas.style.width = "100%";
canvas.style.height = "100%";
canvas.style.display = "block";
canvas.style.position = "absolute";
canvas.style.bottom = "0";
canvas.style.left = "0";
var flag = false,
prevX = 0,
currX = 0,
prevY = 0,
currY = 0,
dot_flag = false;
var flag = false,
prevX = 0,
currX = 0,
prevY = 0,
currY = 0,
dot_flag = false;
var x = "black",
y = 2;
var x = "black",
y = 2;
var object = {};
var object = {};
object.stop = function stop() {
canvas.removeEventListener(
"mousemove",
function (e) {
findxy("move", e);
},
false
);
canvas.removeEventListener(
"mousedown",
function (e) {
findxy("down", e);
},
false
);
canvas.removeEventListener(
"mouseup",
function (e) {
findxy("up", e);
},
false
);
canvas.removeEventListener(
"mouseout",
function (e) {
findxy("out", e);
},
false
);
canvas.remove();
function findxy(res, e) {
if (res == "down") {
prevX = currX;
prevY = currY;
currX = e.clientX - canvas.offsetLeft;
currY = e.clientY - canvas.offsetTop;
getById("startDrawScreen").classList.remove("hidden");
flag = true;
dot_flag = true;
if (dot_flag) {
ctx.beginPath();
ctx.fillStyle = x;
ctx.fillRect(currX, currY, 2, 2);
ctx.closePath();
dot_flag = false;
}
}
if (res == "up" || res == "out") {
flag = false;
}
if (res == "move") {
if (flag) {
prevX = currX;
prevY = currY;
currX = e.clientX - canvas.offsetLeft;
currY = e.clientY - canvas.offsetTop;
draw();
}
}
}
document.querySelectorAll(".drawActive").forEach(ele => {
ele.classList.add("hidden");
});
function draw() {
ctx.beginPath();
delete canvas;
drawOnScreenObject = null;
object = null;
};
var mx = canvas.width / parseInt(document.getElementById("gridlayout").clientWidth);
var my = canvas.height / parseInt(document.getElementById("gridlayout").clientHeight);
var mo = parseInt(document.getElementById("header").clientHeight);
object.init = function init() {
//console.log("init");
canvas.addEventListener(
"mousemove",
function (e) {
findxy("move", e);
},
false
);
canvas.addEventListener(
"mousedown",
function (e) {
findxy("down", e);
},
false
);
canvas.addEventListener(
"mouseup",
function (e) {
findxy("up", e);
},
false
);
canvas.addEventListener(
"mouseout",
function (e) {
findxy("out", e);
},
false
);
ctx.moveTo(prevX * mx, prevY * my - mo * my);
ctx.lineTo(currX * mx, currY * my - mo * my);
ctx.strokeStyle = x;
ctx.lineWidth = y;
ctx.stroke();
ctx.closePath();
}
getById("startDrawScreen").classList.add("hidden");
function onMouseMove(e) {
findxy("move", e);
}
document.querySelectorAll(".drawActive").forEach(ele => {
ele.classList.remove("hidden");
});
};
function onMouseDown(e) {
findxy("down", e);
}
object.color = function color(obj) {
switch (obj.dataset.color) {
case "green":
x = "green";
break;
case "blue":
x = "blue";
break;
case "red":
x = "red";
break;
case "yellow":
x = "yellow";
break;
case "orange":
x = "orange";
break;
case "black":
x = "black";
break;
case "white":
x = "white";
break;
}
if (x == "white") y = 14;
else y = 2;
};
function onMouseUp(e) {
findxy("up", e);
}
function draw() {
//console.log('draw',prevX,currX);
ctx.beginPath();
function onMouseOut(e) {
findxy("out", e);
}
var mx = canvas.width / parseInt(getById("gridlayout").clientWidth);
var my = canvas.height / parseInt(getById("gridlayout").clientHeight);
var mo = parseInt(getById("header").clientHeight);
object.stop = function stop() {
canvas.removeEventListener("mousemove", onMouseMove, false);
canvas.removeEventListener("mousedown", onMouseDown, false);
canvas.removeEventListener("mouseup", onMouseUp, false);
canvas.removeEventListener("mouseout", onMouseOut, false);
canvas.remove();
ctx.moveTo(prevX * mx, prevY * my - mo * my);
ctx.lineTo(currX * mx, currY * my - mo * my);
ctx.strokeStyle = x;
ctx.lineWidth = y;
ctx.stroke();
ctx.closePath();
}
document.getElementById("startDrawScreen").classList.remove("hidden");
object.erase = function erase() {
//var m = confirm("Want to clear");
// if (m) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
//document.getElementById("canvasimg").style.display = "none";
// }
};
document.querySelectorAll(".drawActive").forEach(ele => {
ele.classList.add("hidden");
});
object.save = function save() {
//document.getElementById("canvasimg").style.border = "2px solid";
var dataURL = canvas.toDataURL();
// document.getElementById("canvasimg").src = dataURL;
// document.getElementById("canvasimg").style.display = "inline";
};
drawOnScreenObject = null;
};
function findxy(res, e) {
//console.log(res,e);
if (res == "down") {
prevX = currX;
prevY = currY;
currX = e.clientX - canvas.offsetLeft;
currY = e.clientY - canvas.offsetTop;
object.init = function init() {
canvas.addEventListener("mousemove", onMouseMove, false);
canvas.addEventListener("mousedown", onMouseDown, false);
canvas.addEventListener("mouseup", onMouseUp, false);
canvas.addEventListener("mouseout", onMouseOut, false);
flag = true;
dot_flag = true;
if (dot_flag) {
ctx.beginPath();
ctx.fillStyle = x;
ctx.fillRect(currX, currY, 2, 2);
ctx.closePath();
dot_flag = false;
}
}
if (res == "up" || res == "out") {
flag = false;
}
if (res == "move") {
if (flag) {
prevX = currX;
prevY = currY;
currX = e.clientX - canvas.offsetLeft;
currY = e.clientY - canvas.offsetTop;
draw();
}
}
}
object.init();
drawOnScreenObject = object;
return object;
document.getElementById("startDrawScreen").classList.add("hidden");
document.querySelectorAll(".drawActive").forEach(ele => {
ele.classList.remove("hidden");
});
};
object.color = function color(obj) {
switch (obj.dataset.color) {
case "green":
x = "green";
break;
case "blue":
x = "blue";
break;
case "red":
x = "red";
break;
case "yellow":
x = "yellow";
break;
case "orange":
x = "orange";
break;
case "black":
x = "black";
break;
case "white":
x = "white";
break;
}
if (x == "white") y = 14;
else y = 2;
};
object.erase = function erase() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
};
object.save = function save() {
var dataURL = canvas.toDataURL();
};
object.init();
drawOnScreenObject = object;
return object;
}
////////// Canvas Effects ///////////////
var drawFrameMirroredActive = false;
@@ -16189,6 +16149,20 @@ async function publishScreen() {
if (quality == -1) {
// unlocked capture resolution
} else if (quality == -2) {
video.width = {
ideal: 3840
};
video.height = {
ideal: 2160
};
} else if (quality == -3) {
video.width = {
ideal: 2560
};
video.height = {
ideal: 1440
};
} else if (quality == 0) {
video.width = {
ideal: 1920
@@ -17068,10 +17042,12 @@ function soloLinkGenerator(streamID, scene = true) {
var wss = "";
if (session.wssSetViaUrl) {
if (session.customWSS && session.customWSS !== true) {
if (session.customWSS && (session.customWSS !== true)) {
wss = "&pie=" + session.customWSS;
} else {
} else if (session.customWSS==true){
wss = "&wss=" + session.wss;
} else {
wss = "&wss2=" + session.wss;
}
}
@@ -19635,8 +19611,10 @@ async function createRoomCallback(passAdd, passAdd2) {
if (session.wssSetViaUrl) {
if (session.customWSS && session.customWSS !== true) {
wss = "&pie=" + session.customWSS;
} else {
} else if (session.customWSS==true){
wss = "&wss=" + session.wss;
} else {
wss = "&wss2=" + session.wss;
}
}
@@ -21426,53 +21404,111 @@ var SelectedAudioOutputDevices = false; // session.sink
var SelectedAudioInputDevices = []; // ..
var SelectedVideoInputDevices = []; // ..
async function enumerateDevices() {
log("enumerated start");
// async function enumerateDevices() {
// log("enumerated start");
if (typeof navigator.mediaDevices === "object" && typeof navigator.mediaDevices.enumerateDevices === "function") {
return await navigator.mediaDevices.enumerateDevices();
} else if (typeof navigator.enumerateDevices === "function") {
log("enumerated failed 1");
return await navigator.enumerateDevices();
} else {
return await new Promise((resolve, reject) => {
try {
if (window.MediaStreamTrack == null || window.MediaStreamTrack.getSources == null) {
throw new Error();
}
window.MediaStreamTrack.getSources(devices => {
resolve(
devices
.filter(device => {
return device.kind.toLowerCase() === "video" || device.kind.toLowerCase() === "videoinput";
})
.map(device => {
return {
deviceId: device.deviceId != null ? device.deviceId : "",
groupId: device.groupId,
kind: "videoinput",
label: device.label,
toJSON: /* istanbul ignore next */ function () {
return this;
}
};
})
);
});
} catch (e) {
errorlog(e);
if (!session.cleanOutput) {
if (location.protocol !== "https:") {
warnUser("Error listing the media devices.\n\nYour browser will not allow access to media devices without SSL enabled.\n\nPossible solutions include switching to https, accessing the site from http://localhost, or enabling the `unsafely-treat-insecure-origin-as-secure` browser switch.");
} else if ("isSecureContext" in window && window.isSecureContext === false) {
warnUser("Error listing the media devices.\n\nThe website may have assets loaded in an insecure context.");
} else {
warnUser("An unknown error occured while trying to list the media devices.");
}
}
// if (typeof navigator.mediaDevices === "object" && typeof navigator.mediaDevices.enumerateDevices === "function") {
// return await navigator.mediaDevices.enumerateDevices();
// } else if (typeof navigator.enumerateDevices === "function") {
// log("enumerated failed 1");
// return await navigator.enumerateDevices();
// } else {
// return await new Promise((resolve, reject) => {
// try {
// if (window.MediaStreamTrack == null || window.MediaStreamTrack.getSources == null) {
// throw new Error();
// }
// window.MediaStreamTrack.getSources(devices => {
// resolve(
// devices
// .filter(device => {
// return device.kind.toLowerCase() === "video" || device.kind.toLowerCase() === "videoinput";
// })
// .map(device => {
// return {
// deviceId: device.deviceId != null ? device.deviceId : "",
// groupId: device.groupId,
// kind: "videoinput",
// label: device.label,
// toJSON: /* istanbul ignore next */ function () {
// return this;
// }
// };
// })
// );
// });
// } catch (e) {
// errorlog(e);
// if (!session.cleanOutput) {
// if (location.protocol !== "https:") {
// warnUser("Error listing the media devices.\n\nYour browser will not allow access to media devices without SSL enabled.\n\nPossible solutions include switching to https, accessing the site from http://localhost, or enabling the `unsafely-treat-insecure-origin-as-secure` browser switch.");
// } else if ("isSecureContext" in window && window.isSecureContext === false) {
// warnUser("Error listing the media devices.\n\nThe website may have assets loaded in an insecure context.");
// } else {
// warnUser("An unknown error occured while trying to list the media devices.");
// }
// }
// }
// });
// }
// }
async function enumerateDevices() {
log("enumerated start");
const timeout = new Promise((_, reject) =>
setTimeout(() => reject(function(){
if (!session.cleanOutput) {
warnUser("The browser has not responded to our request to list available media devices.\n\nPossible solutions:\n\n- Restart the computer and try again\n- Try another browser\n- Remove or uninstall devices that are not needed\n- Uninstall and reinstall your browser");
}
});
}
new Error("Device enumeration timed out.\n\nThe browser has not responded to our request to list available media devices.\n\nPossible solutions:\n\n- Restart the computer and try again\n- Try another browser\n- Remove or uninstall devices that are not needed\n- Uninstall and reinstall your browser");
}), 15000)
);
const enumeratePromise = new Promise(async (resolve, reject) => {
try {
if (typeof navigator.mediaDevices === "object" && typeof navigator.mediaDevices.enumerateDevices === "function") {
resolve(await navigator.mediaDevices.enumerateDevices());
} else if (typeof navigator.enumerateDevices === "function") {
log("enumerated failed 1");
resolve(await navigator.enumerateDevices());
} else {
window.MediaStreamTrack.getSources(devices => {
resolve(
devices
.filter(device => {
return device.kind.toLowerCase() === "video" || device.kind.toLowerCase() === "videoinput";
})
.map(device => {
return {
deviceId: device.deviceId != null ? device.deviceId : "",
groupId: device.groupId,
kind: "videoinput",
label: device.label,
toJSON: /* istanbul ignore next */ function () {
return this;
}
};
})
);
});
}
} catch (e) {
errorlog(e);
if (!session.cleanOutput) {
if (location.protocol !== "https:") {
warnUser("Error listing the media devices.\n\nYour browser will not allow access to media devices without SSL enabled.\n\nPossible solutions include switching to https, accessing the site from http://localhost, or enabling the `unsafely-treat-insecure-origin-as-secure` browser switch.");
} else if ("isSecureContext" in window && window.isSecureContext === false) {
warnUser("Error listing the media devices.\n\nThe website may have assets loaded in an insecure context.");
} else {
warnUser("An unknown error occured while trying to list the media devices.");
}
}
reject(e);
}
});
return Promise.race([enumeratePromise, timeout]);
}
function requestOutputAudioStream() {
@@ -29250,8 +29286,10 @@ function updateReshareLink() {
if (session.wssSetViaUrl) {
if (session.customWSS && session.customWSS !== true) {
wss = "&pie=" + session.customWSS;
} else {
} else if (session.customWSS==true){
wss = "&wss=" + session.wss;
} else {
wss = "&wss2=" + session.wss;
}
}
if (session.audience && !session.audienceToken) {
@@ -35476,8 +35514,10 @@ function generateQRPageCallback(hash) {
if (session.wssSetViaUrl) {
if (session.customWSS && session.customWSS !== true) {
wss = "&pie=" + session.customWSS;
} else {
} else if (session.customWSS==true){
wss = "&wss=" + session.wss;
} else {
wss = "&wss2=" + session.wss;
}
}
@@ -40625,6 +40665,7 @@ function changeGroupDirector(ele, state = null) {
session.sendMessage({ group: false });
}
if (change) {
updateMixer();
pokeIframeAPI("group-set-updated", session.group);
}
@@ -40750,6 +40791,7 @@ function changeGroupDirectorAPI(group, state = null, update = true) {
}
}
if (changed) {
updateMixer();
pokeIframeAPI("group-set-updated", session.group);
}
@@ -40790,6 +40832,7 @@ function changeGroupViewDirectorAPI(group, state = null) {
}
if (changed) {
updateMixer();
pokeIframeAPI("group-view-set-updated", session.groupView);
}
@@ -40806,30 +40849,36 @@ function changeGroup(ele, state = null) {
var group = ele.dataset.group;
var index = session.rpcs[ele.dataset.UUID].group.indexOf(group);
var changed = false;
if (state === true) {
ele.classList.add("pressed");
ele.ariaPressed = "true";
if (index === -1) {
session.rpcs[ele.dataset.UUID].group.push(group);
changed = true;
}
} else if (state === false) {
ele.classList.remove("pressed");
ele.ariaPressed = "false";
if (index > -1) {
session.rpcs[ele.dataset.UUID].group.splice(index, 1);
changed = true;
}
} else if (ele.classList.contains("pressed")) {
ele.classList.remove("pressed");
ele.ariaPressed = "false";
if (index > -1) {
session.rpcs[ele.dataset.UUID].group.splice(index, 1);
changed = true;
}
} else {
ele.classList.add("pressed");
ele.ariaPressed = "true";
if (index === -1) {
session.rpcs[ele.dataset.UUID].group.push(group);
changed = true;
}
}
if (session.rpcs[ele.dataset.UUID].group.length) {
@@ -40837,7 +40886,11 @@ function changeGroup(ele, state = null) {
} else {
session.sendRequest({ group: false }, ele.dataset.UUID);
}
syncDirectorState(ele);
syncDirectorState(ele);
if (changed) {
updateMixer();
}
if (session.rpcs[ele.dataset.UUID].group.indexOf(group) === -1) {
return false;
@@ -45659,6 +45712,20 @@ async function createSecondStream() {
if (quality == -1) {
// unlocked capture resolution
} else if (quality == -2) {
video.width = {
ideal: 3840
};
video.height = {
ideal: 2160
};
} else if (quality == -3) {
video.width = {
ideal: 2560
};
video.height = {
ideal: 1440
};
} else if (quality == 0) {
video.width = {
ideal: 1920

43
main.js
View File

@@ -5294,13 +5294,46 @@ async function main() {
}
if (urlParams.has("screensharequality") || urlParams.has("ssq")) {
if (urlParams.get("screensharequality") || urlParams.get("ssq")) {
session.screensharequality = urlParams.get("screensharequality") || urlParams.get("ssq");
session.screensharequality = urlParams.get("screensharequality") || urlParams.get("ssq") || "0";
if (session.screensharequality.toLowerCase() == "4k") {
session.screensharequality = -2;
} else if (session.screensharequality.toLowerCase() == "2160p") {
session.screensharequality = -2;
} else if (session.screensharequality.toLowerCase() == "2160") {
session.screensharequality = -2;
} else if (session.screensharequality.toLowerCase() == "2k") {
session.screensharequality = -3;
} else if (session.screensharequality.toLowerCase() == "1440p") {
session.screensharequality = -3;
} else if (session.screensharequality.toLowerCase() == "1440") {
session.screensharequality = -3;
} else if (session.screensharequality.toLowerCase() == "hd") {
session.screensharequality = 1;
} else if (session.screensharequality.toLowerCase() == "720p") {
session.screensharequality = 1;
} else if (session.screensharequality.toLowerCase() == "720") {
session.screensharequality = 1;
} else if (session.screensharequality.toLowerCase() == "fullhd") {
session.screensharequality = 0;
} else if (session.screensharequality.toLowerCase() == "1080p") {
session.screensharequality = 0;
} else if (session.screensharequality.toLowerCase() == "1080") {
session.screensharequality = 0;
} else if (session.screensharequality.toLowerCase() == "high") {
session.screensharequality = 0;
} else if (session.screensharequality.toLowerCase() == "360p") {
session.screensharequality = 2;
} else if (session.screensharequality.toLowerCase() == "360") {
session.screensharequality = 2;
} else if (session.screensharequality.toLowerCase() == "low") {
session.screensharequality = 2;
} else {
session.screensharequality = parseInt(session.screensharequality) || 0;
try {
getById("gear_screen").parentNode.removeChild(getById("gear_screen"));
} catch (e) {}
}
try {
getById("gear_screen").parentNode.removeChild(getById("gear_screen"));
} catch (e) {}
}
if (urlParams.has("screensharebitrate") || urlParams.has("ssbitrate")) {

View File

@@ -715,4 +715,4 @@
"show-more-options": "显示更多选项",
"system-default": "系统默认"
}
}
}

View File

@@ -467,7 +467,7 @@
"publish-settings": "Publishing setup",
"remote-control-obs-menu": "Remote Controller for OBS Studio",
"apply-new-guest-settings": "Apply settings",
"cancel": "Cancel",
"cancel": "Annuler",
"invisible-guests": "Not Visible",
"select-local-image": "Select Local Image",
"available-languages": "Options de langues disponibles :",
@@ -552,7 +552,7 @@
"guest-4": "Guest 4",
"waiting-for-camera": "Chargement de la caméra",
"local-global-record": "Local record - stop all",
"ok": "✔ OK",
"ok": "✔ Valider",
"join-room": "Join room",
"join-room-with-mic": "Rejoindre la salle avec votre micro",
"join-room-with-mic-only": "Join with just Microphone",

View File

@@ -739,4 +739,4 @@
"show-more-options": "Show more options",
"system-default": "System Default"
}
}
}

File diff suppressed because one or more lines are too long