mirror of
https://github.com/SrIzan10/vdo.ninja.git
synced 2026-05-01 11:05:24 +00:00
version 25.0
This commit is contained in:
16
index.html
16
index.html
@@ -92,7 +92,7 @@
|
||||
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=10"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/aes.js"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=780"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=781"></script>
|
||||
<input id="zoomSlider" type="range" style="display: none;" />
|
||||
<span id="electronDragZone" style="pointer-events: none; z-index:-10; position:absolute;top:0;left:0;width:100%;height:2%;-webkit-app-region: drag;min-height:20px;"></span>
|
||||
<div id="header">
|
||||
@@ -1007,18 +1007,18 @@
|
||||
</i>
|
||||
<br />
|
||||
<li>
|
||||
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.
|
||||
Starting OBS in Administrator mode has resolved a couple recent user issues related to Windows Firewall P2P blocking and video/audio degraded performance issues.
|
||||
</li>
|
||||
<li>
|
||||
Samsung smartphones (A-series) may fail to publish video with some mobile browsers; try using Firefox Mobile or the native <a href='https://docs.vdo.ninja/getting-started/native-mobile-app-versions#android-download-link' title="Info on the native app versions of VDO.Ninja">Android app</a> in these cases.
|
||||
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>
|
||||
<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 December 19th. You can also still access the previous version, which <a href="https://vdo.ninja/v23/">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 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>
|
||||
<br />
|
||||
<br />
|
||||
<h3>
|
||||
@@ -2584,7 +2584,7 @@
|
||||
// if (!window.location.search){document.body.innerHTML = "";} // uncomment this line, if you wish to try it.
|
||||
|
||||
var session = WebRTC.Media; // session is a required global variable if configuring manually. Run before loading main.js but after webrtc.js.
|
||||
session.version = "24.9";
|
||||
session.version = "25.0";
|
||||
session.streamID = session.generateStreamID(); // randomly generates a streamID for this session. You can set your own programmatically if needed
|
||||
|
||||
session.defaultPassword = "someEncryptionKey123"; // Change this password if self-deploying for added security/privacy
|
||||
@@ -2705,7 +2705,7 @@
|
||||
// session.decrypted = session.decodeInvite("U2FsdGVkX1+d58DFIHoO3EQZSuX86ch4PqW2ouztnJ0="); // get a code from invite.cam
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=1137"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=844"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=1140"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=848"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
66
lib.js
66
lib.js
@@ -18776,7 +18776,6 @@ async function createDirectorOnlyBox() {
|
||||
if (session.slotmode){
|
||||
pokeIframeAPI("slot-updated", biggestSlot, null, session.streamID); // need to support self-director
|
||||
session.pastSlots[session.streamID] = biggestSlot;
|
||||
|
||||
createSlotUpdate();
|
||||
}
|
||||
}
|
||||
@@ -18988,7 +18987,6 @@ async function createDirectorScreenshareOnlyBox() { // sstype=3
|
||||
if (session.slotmode){
|
||||
pokeIframeAPI("slot-updated", biggestSlot, null, session.streamID+":s"); // need to support self-director
|
||||
session.pastSlots[session.streamID+":s"] = biggestSlot;
|
||||
|
||||
createSlotUpdate();
|
||||
}
|
||||
}
|
||||
@@ -19807,7 +19805,7 @@ async function enumerateDevices() {
|
||||
errorlog(e);
|
||||
if (!session.cleanOutput){
|
||||
if (location.protocol !== 'https:') {
|
||||
warnUser("Error listing the media devices.\n\nThe website needs to be loaded via https (ssl) to access media devices.");
|
||||
warnUser("Error listing the media devices.\n\nThe website needs to be loaded via https (ssl) to access media devices.\n\nPossible solutions include switching to HTTPS, accessing the site from localhost, using the `unsafely-treat-insecure-origin-as-secure` browser switch, or using the Electron Capture desktop app instead.");
|
||||
} 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 {
|
||||
@@ -22067,6 +22065,54 @@ function playtone(screen = false, tonename="testtone") {
|
||||
}
|
||||
}
|
||||
|
||||
function updateAudioSource(newUrl) {
|
||||
var audioElement = document.getElementById('testtone');
|
||||
var sources = audioElement.getElementsByTagName('source');
|
||||
var extension = newUrl.split('.').pop().toLowerCase();
|
||||
var mimeType;
|
||||
|
||||
switch (extension) {
|
||||
case 'mp3':
|
||||
mimeType = 'audio/mpeg';
|
||||
break;
|
||||
case 'wav':
|
||||
mimeType = 'audio/wav';
|
||||
break;
|
||||
case 'ogg':
|
||||
mimeType = 'audio/ogg';
|
||||
break;
|
||||
case 'aac':
|
||||
case 'm4a':
|
||||
mimeType = 'audio/aac';
|
||||
break;
|
||||
case 'opus':
|
||||
mimeType = 'audio/opus';
|
||||
break;
|
||||
case 'flac':
|
||||
mimeType = 'audio/flac';
|
||||
break;
|
||||
case 'webm':
|
||||
mimeType = 'audio/webm';
|
||||
break;
|
||||
default:
|
||||
console.error('Unsupported file type:', extension);
|
||||
return;
|
||||
}
|
||||
if (sources.length === 1) {
|
||||
sources[0].src = newUrl;
|
||||
sources[0].type = mimeType;
|
||||
} else {
|
||||
audioElement.innerHTML = '';
|
||||
var newSource = document.createElement('source');
|
||||
newSource.src = newUrl;
|
||||
newSource.type = mimeType;
|
||||
audioElement.appendChild(newSource);
|
||||
}
|
||||
audioElement.load();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showNotification(title, body="") {
|
||||
if (!Notification){return;}
|
||||
if (Notification.permission !== 'granted') {
|
||||
@@ -40402,7 +40448,19 @@ function whipOut(){
|
||||
|
||||
xhttp.onerror = function(e) {
|
||||
errorlog(e);
|
||||
warnUser("Whip out failed.");
|
||||
|
||||
if ((window.location.protocol=="https:") && session.whipOutput.startsWith("http://") && !session.whipOutput.startsWith("http://localhost")){
|
||||
console.warn("Mixed HTTP and HTTPS content; this may not work. There are some options, like using localhost, disabling web security in your browser, or using SSL entirely");
|
||||
if (!session.cleanOutput){
|
||||
if (window.location.hostname === "vdo.ninja"){
|
||||
warnUser("Error: You cannot publish to an HTTP WHIP endpoint from an HTTPS-enabled website.\n\nThere are some possible exceptions and solutions, such as deploying an SSL certificate, hosting from localhost, trying from http://insecure.vdo.ninja, and/or using the Electron Capture app.");
|
||||
} else {
|
||||
warnUser("Error: You cannot publish to an HTTP WHIP endpoint from an HTTPS-enabled website.");
|
||||
}
|
||||
}
|
||||
} else if (!session.cleanOutput){
|
||||
warnUser("WHIP out failed.\n\nCheck the developer console for possible details.");
|
||||
}
|
||||
};
|
||||
xhttp.send(data);
|
||||
|
||||
|
||||
28
main.js
28
main.js
@@ -612,7 +612,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (urlParams.has('broadcasttransfer') || urlParams.has('bct')) {
|
||||
log("Broadcast transfer flag set");
|
||||
session.broadcastTransfer = urlParams.get('broadcasttransfer') || urlParams.get('bct') || null;
|
||||
@@ -1193,7 +1192,11 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
|
||||
session.videoMutedFlag = true;
|
||||
}
|
||||
|
||||
if (urlParams.has('layout')) {
|
||||
if (urlParams.get('viewslot')){
|
||||
session.viewslot = parseInt(urlParams.get('viewslot')) || false;
|
||||
session.accept_layouts = true;
|
||||
session.layout = {};
|
||||
} else if (urlParams.has('layout')) {
|
||||
|
||||
if (!urlParams.get('layout')){
|
||||
session.accept_layouts = true;
|
||||
@@ -1622,8 +1625,10 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
|
||||
//}
|
||||
|
||||
if (urlParams.has('hiddenscenebitrate')) {
|
||||
session.hiddenSceneViewBitrate = parseInt(urlParams.get('hiddenscenebitrate')) || 0;
|
||||
} else if (urlParams.has('layout') && (session.scene!==false)){
|
||||
session.hiddenSceneViewBitrate = parseInt(urlParams.get('hiddenscenebitrate')) || 0;
|
||||
} else if (urlParams.has('layout') && (session.scene!==false) && !session.viewslot){
|
||||
session.hiddenSceneViewBitrate = false;
|
||||
} else if (urlParams.has('nohiddensceneoptimization')) {
|
||||
session.hiddenSceneViewBitrate = false;
|
||||
}
|
||||
|
||||
@@ -3393,7 +3398,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
|
||||
} else if (Notification.permission !== 'granted') {
|
||||
Notification.requestPermission();
|
||||
}
|
||||
|
||||
}
|
||||
if (urlParams.has('r2d2')) {
|
||||
/* var addtone = createAudioElement();
|
||||
@@ -3409,6 +3413,20 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
|
||||
session.beepToNotify = true;
|
||||
}
|
||||
|
||||
if (urlParams.get("custombeep")){
|
||||
updateAudioSource(urlParams.get("custombeep"));
|
||||
}
|
||||
|
||||
if (urlParams.has("beepvolume")){
|
||||
try { // jointone
|
||||
document.getElementById('testtone').volume = parseInt(urlParams.get("beepvolume"))/100 || 0;
|
||||
document.getElementById('jointone').volume = parseInt(urlParams.get("beepvolume"))/100 || 0;
|
||||
document.getElementById('leavetone').volume = parseInt(urlParams.get("beepvolume"))/100 || 0;
|
||||
} catch(e){
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (urlParams.has('easyexit') || urlParams.has('ee')) {
|
||||
session.noExitPrompt = true;
|
||||
}
|
||||
|
||||
23
whip.html
23
whip.html
@@ -271,12 +271,21 @@
|
||||
background-color: #182031;
|
||||
}
|
||||
|
||||
.inputCombo {
|
||||
.inputComboGrid,.inputCombo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
flex-grow: 1;
|
||||
}
|
||||
@media only screen and (max-width: 699px) {
|
||||
.inputComboGrid {
|
||||
display: grid;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
.inputComboGrid > * {
|
||||
margin: 2px 0;
|
||||
}
|
||||
}
|
||||
#version{
|
||||
margin: 0 auto;
|
||||
font-size: 30%;
|
||||
@@ -318,7 +327,7 @@
|
||||
<div class="details">⚙️</div>
|
||||
</div>
|
||||
|
||||
<div class="inputCombo" id="advanced" style="margin: 10px 0px 10px 10px;">
|
||||
<div class="inputComboGrid" id="advanced" style="margin: 10px 0px 10px 10px;">
|
||||
<select style="border-radius:10px;margin-right:5px;width:unset!important;" class="changeText" id="whipoutaudiobitrate" title="Which audio bitrate target would you prefer? 128-kbps is fine for music." >
|
||||
<option value="0" selected>🎙️Default Audio Bitrate</option>
|
||||
<option value="32">🎙️32-kbps</option>
|
||||
@@ -343,7 +352,7 @@
|
||||
<option value="0">🎙️Mono</option>
|
||||
</select >
|
||||
</div>
|
||||
<div class="inputCombo" id="advanced2" style="margin: 10px 0px 10px 10px;">
|
||||
<div class="inputComboGrid" id="advanced2" style="margin: 10px 0px 10px 10px;">
|
||||
<select style="border-radius:10px;margin-right:5px;width:unset!important;" class="changeText" id="bitrateGroupFlag" title="Which video bitrate target would you prefer?" >
|
||||
<option value="0" selected>🎦Default Video Bitrate</option>
|
||||
<option value="500">🎦500-kbps</option>
|
||||
@@ -417,7 +426,7 @@
|
||||
<input type="password" id="changeText3a" class="inputfield changeText" placeholder="🗝️ Authentication Bearer Token (optional)" />
|
||||
<div class="details">⚙️</div>
|
||||
</div>
|
||||
<div class="inputCombo" id="advancedwhep" style="margin: 10px 0px 10px 10px;">
|
||||
<div class="inputComboGrid" id="advancedwhep" style="margin: 10px 0px 10px 10px;">
|
||||
<select style="border-radius:10px;margin-right:5px;width:unset!important;" class="changeText" id="whepbuffer" title="Adding a playback buffer can help reduce frame loss or jitter" >
|
||||
<option value="0" selected>⌛No added playback buffer</option>
|
||||
<option value="500">⌛500-ms added</option>
|
||||
@@ -437,7 +446,7 @@
|
||||
<option value="1">🔑 E2EE On</option>
|
||||
</select >
|
||||
</div>
|
||||
<div class="inputCombo" id="advanced3" style="margin: 10px 0px 10px 10px;">
|
||||
<div class="inputComboGrid" id="advanced3" style="margin: 10px 0px 10px 10px;">
|
||||
<select style="border-radius:10px;margin-right:5px;width:unset!important;" class="changeText" id="stereowhep" title="Stereo is available only if auto-gain and noise-reduction is off." >
|
||||
<option value="1" selected>🎙️Stereo</option>
|
||||
<option value="0">🎙️Mono</option>
|
||||
@@ -571,10 +580,6 @@ const scalabilityModes = [
|
||||
|
||||
function gohere1(){
|
||||
if (document.getElementById('changeText1').value){
|
||||
|
||||
if (document.getElementById('changeText1').value.startsWith("http://")){
|
||||
document.getElementById('changeText1').value = document.getElementById('changeText1').value.replace("http://","https://");
|
||||
}
|
||||
|
||||
localStorage.setItem('changeText1', document.getElementById('changeText1').value);
|
||||
localStorage.setItem('changeText1a', document.getElementById('changeText1a').value || "");
|
||||
|
||||
Reference in New Issue
Block a user