Add files via upload

This commit is contained in:
Steve Seguin 2021-12-24 00:26:04 -05:00 committed by GitHub
parent 771b189b77
commit 0c8136ab3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 22 deletions

View File

@ -773,7 +773,7 @@
Some devices that use hardware encoding can experience video glitching; switching to VP8 or VP9 as a <a target='_blank' title='Jump to the documentation' href='https://docs.vdo.ninja/viewers-settings/codec'>codec</a> may help.
</li>
<li>
Video glitching and random audio-loss can occur when using the OBS browser source. The <a href='https://github.com/steveseguin/electroncapture/blob/master/README.md'>Electron Capture app</a> avoids these issues.
Video glitching and random audio-loss can occur when using the OBS browser source. The <a href='https://github.com/steveseguin/electroncapture/blob/master/README.md' target="_blank">Electron Capture app</a> avoids these issues.
</li>
<li>
Samsung smartphones (A-series) may fail to publish video with some mobile browsers; try using Firefox or the native <a href='https://docs.vdo.ninja/getting-started/native-mobile-app-versions#android-download-link'>VDO.Ninja Android app</a> in these cases.
@ -784,6 +784,7 @@
</h4>
<br />
🎁 Welcome to v20, updated December 24th. 🎄 <a target="_blank" href="https://docs.vdo.ninja/release-notes/v20">Release notes are here</a>. The previous version is <a href="https://vdo.ninja/v19/">available here</a> if you have new issues.
<br />
<br />
<h3>
@ -1864,9 +1865,10 @@
// session.configuration.iceTransportPolicy = "relay"; // uncomment to enable "&privacy" and force the TURN server
// session.wss = "wss://api.vdo.ninja:443"; // US-East (Default)
/// If wanting to fully-self-host, uncomment the following and deploy your own websocket server; good for air-gapped deployments
// session.wss = "wss://wss.contribute.cam:443"; // https://github.com/steveseguin/websocket_server
// session.wss = "wss://wss.yourdomainhere.com:443"; // https://github.com/steveseguin/websocket_server
// session.customWSS = true;
//////
@ -1904,7 +1906,6 @@
</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=246"></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>

27
lib.js
View File

@ -7725,7 +7725,7 @@ function outboundAudioPipeline() {
if (session.disableWebAudio) {
//if (session.mobile){return session.streamSrc;} // iOS devices can't remap video tracks, else KABOOM. Might as well do this for android also.
var newStream = createMediaStream();
session.streamSrc.getAudioTracks().forEach(function(track) { // this seems to fix a bug with macbooks.
newStream.addTrack(track, session.streamSrc);
@ -12566,7 +12566,8 @@ async function grabVideo(quality = 0, eleName = 'previewWebcam', selector = "sel
});
updateRenderOutpipe();
// senderAudioUpdate
if (wasDisabled && !session.videoMuted){
var msg = {};
@ -12621,7 +12622,6 @@ async function grabVideo(quality = 0, eleName = 'previewWebcam', selector = "sel
if (getUserMediaRequestID !== gumid) { // new camera selected in this time.
return;
}
makeImages(true);
if (getById("popupSelector_constraints_loading")) {
@ -17255,11 +17255,22 @@ Promise.wait = function(ms) {
Promise.prototype.timeout = function(ms) {
return Promise.race([
this, Promise.wait(ms).then(function() {
var errormsg = new Error("Time Out\nDid you accept camera permissions in time? Please do so first.\n\nOtherwise, do you have NDI Tools installed? Maybe try uninstalling it.\n\nPlease also ensure your camera and audio device are correctly connected and not already in use. You may also need to refresh the page.");
errormsg.name = "timedOut";
errormsg.message = "Time Out\nDid you accept camera permissions in time? Please do so first.\n\nOtherwise, do you have NDI Tools installed? Maybe try uninstalling it.\n\nPlease also ensure your camera and audio device are correctly connected and not already in use. You may also need to refresh the page."
throw errormsg;
if (iOS || iPad){
var errormsg = new Error("Time Out\nDid you accept camera permissions in time? Please do so first.\n\nIf using an iPhone or iPad, try fully closing your browser and open it again; Safari sometimes jams up the camera.");
errormsg.name = "timedOut";
errormsg.message = "Time Out\nDid you accept camera permissions in time? Please do so first.\n\nIf using an iPhone or iPad, try fully closing your browser and open it again; Safari sometimes jams up the camera."
throw errormsg;
} else if (session.mobile){
var errormsg = new Error("Time Out\nDid you accept camera permissions in time? Please do so first.\n\nMake sure no other application is using the camera already and that you are using a compatible browser. If issues persist, maybe try the official native mobile app.");
errormsg.name = "timedOut";
errormsg.message = "Time Out\nDid you accept camera permissions in time? Please do so first.\n\nMake sure no other application is using the camera already and that you are using a compatible browser. If issues persist, maybe try the official native mobile app."
throw errormsg;
} else {
var errormsg = new Error("Time Out\nDid you accept camera permissions in time? Please do so first.\n\nOtherwise, do you have NDI Tools installed? Maybe try uninstalling it.\n\nPlease also ensure your camera and audio device are correctly connected and not already in use. You may also need to refresh the page.");
errormsg.name = "timedOut";
errormsg.message = "Time Out\nDid you accept camera permissions in time? Please do so first.\n\nOtherwise, do you have NDI Tools installed? Maybe try uninstalling it.\n\nPlease also ensure your camera and audio device are correctly connected and not already in use. You may also need to refresh the page."
throw errormsg;
}
})
])
};

View File

@ -15,7 +15,8 @@
--color-mode: light;
--button-radius: 2px;
--myvideo-max-width: min(800px,100vw);
--myvideo-width:800px;
--myvideo-width:unset;
--myvideo-height:auto;
}
* {
@ -1731,7 +1732,7 @@ img {
width: var(--myvideo-width);
max-width: 800px !important;
max-height: 100% !important;
height: auto !important;
height: var(--myvideo-height) !important;
display: block !important;
margin: auto auto !important;
position: relative !important;

20
main.js
View File

@ -141,6 +141,10 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
if (urlParams.has('cleanoutput') || urlParams.has('clean') || urlParams.has('cleanish')) {
session.cleanOutput = true;
}
if (urlParams.has('cleanviewer') || urlParams.has('cv')) {
session.cleanViewer = true;
}
if (urlParams.has('retrytimeout')) {
session.retryTimeout = parseInt(urlParams.get('retrytimeout'));
@ -632,6 +636,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
document.documentElement.style.setProperty('--fit-style', 'cover');
document.documentElement.style.setProperty('--myvideo-max-width', '100vw');
document.documentElement.style.setProperty('--myvideo-width', '100vw');
document.documentElement.style.setProperty('--myvideo-height', '100vh');
}
if (urlParams.has('record')) {
@ -869,6 +874,10 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
}
if (urlParams.has('transparent') || urlParams.has('transparency')) { // sets the window to be transparent - useful for IFRAMES?
session.transparent=true;
}
if (session.transparent){
getById("main").style.backgroundColor = "rgba(0,0,0,0)";
document.documentElement.style.setProperty('--container-color', '#0000');
document.documentElement.style.setProperty('--background-color', '#0000');
@ -1291,8 +1300,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
session.micDelay = parseInt(session.micDelay) || 0;
session.disableWebAudio = false;
}
if (urlParams.has('tips')){
getById("guestTips").style.display="flex";
@ -1393,9 +1400,9 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
}
}
if (navigator.userAgent.indexOf('Mac OS X') != -1) {
session.codec = "h264"; // default the codec to h264 if OBS is on macOS (that's all it supports with hardware)
}
//if (navigator.userAgent.indexOf('Mac OS X') != -1) {
// session.codec = "h264"; // default the codec to h264 if OBS is on macOS (that's all it supports with hardware) // oct 2021, OBS now supports vp8 and actually breaks with h264 android devices.
//}
if (session.disableOBS===false){
window.addEventListener("obsSourceVisibleChanged", obsSourceVisibleChanged);
@ -2540,7 +2547,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
}
}
if ((session.roomid) || (urlParams.has('roomid')) || (urlParams.has('r')) || (urlParams.has('room')) || (filename) || (session.permaid !== false)) {
var roomid = "";
@ -3472,7 +3478,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
getById("gridlayout").appendChild(session.rpcs[i].videoElement);
} catch(e){warnlog(e);}
} else if ("remove" in e.data) {
try {
session.rpcs[i].videoElement.parentNode.removeChild(session.rpcs[i].videoElement);
@ -3596,7 +3601,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
midiHotkeysNote(note,velocity);
});
}
}
}).catch(errorlog);
};

File diff suppressed because one or more lines are too long