mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-22 02:48:32 +00:00
Add files via upload
This commit is contained in:
parent
28a79b20b7
commit
06379c1f1f
@ -66,7 +66,7 @@
|
||||
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
|
||||
<link itemprop="url" href="./media/obsNinja_logo_full.png" />
|
||||
</span>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=26"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=27"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=177"></script>
|
||||
<input id="zoomSlider" type="range" style="display: none;" />
|
||||
<div id="header">
|
||||
@ -164,7 +164,7 @@
|
||||
<span
|
||||
id="helpbutton"
|
||||
title="Show Help Info"
|
||||
onclick="alert('Email steve@seguin.email if the system breaks or check https://reddit.com/r/obsninja for support.\n\nThe Wiki contains many help guides and advanced settings.\n\nAccess the debug menu by pressing CTRL (command) and Left-Clicking on a video.\n\nMost issues can be fixed by using Wired Internet instead of Wi-Fi.')"
|
||||
onclick="alert('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.')"
|
||||
style="cursor: pointer; display:none;"
|
||||
alt="How to Use This with OBS"
|
||||
>
|
||||
@ -602,7 +602,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="container-7" class="column columnfade pointer card advanced" style="overflow: hidden;" onclick="window.location = './speedtest';">
|
||||
<div id="container-7" class="column columnfade pointer card advanced" style="overflow: hidden;" onclick="window.location = './speedtest.html';">
|
||||
<h2><span data-translate="run-a-speed-test">Run a Speed Test</span></h2>
|
||||
<i style="margin-top:30px;font-size:600%;overflow:hidden;" class="las la-tachometer-alt"></i>
|
||||
</div>
|
||||
|
||||
43
main.css
43
main.css
@ -508,10 +508,21 @@ button.glyphicon-button.active.focus {
|
||||
|
||||
@media only screen and (max-height: 540px){
|
||||
#subControlButtons {
|
||||
transform: scale(0.90);
|
||||
transform: scale(0.88);
|
||||
}
|
||||
#gridlayout>#container.vidcon {
|
||||
height:90%
|
||||
height:88%
|
||||
}
|
||||
#controlButtons {
|
||||
height:54px;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-height: 500px){
|
||||
#subControlButtons {
|
||||
transform: scale(0.87);
|
||||
}
|
||||
#gridlayout>#container.vidcon {
|
||||
height:87%
|
||||
}
|
||||
#controlButtons {
|
||||
height:54px;
|
||||
@ -521,7 +532,16 @@ button.glyphicon-button.active.focus {
|
||||
#subControlButtons {
|
||||
transform: scale(0.85);
|
||||
}
|
||||
#header{
|
||||
#logoname{
|
||||
display:none;
|
||||
}
|
||||
#head1{
|
||||
display:none;
|
||||
}
|
||||
#head4{
|
||||
display:none;
|
||||
}
|
||||
#head2{
|
||||
display:none;
|
||||
}
|
||||
#gridlayout>#container.vidcon {
|
||||
@ -531,6 +551,20 @@ button.glyphicon-button.active.focus {
|
||||
height:50px;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-height: 300px){
|
||||
#gridlayout>#container.vidcon {
|
||||
height:81%
|
||||
}
|
||||
#subControlButtons {
|
||||
transform: scale(0.81);
|
||||
}
|
||||
#controlButtons {
|
||||
height:46.2px;
|
||||
}
|
||||
#head2 {
|
||||
display:none !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-height: 240px){
|
||||
#gridlayout>#container.vidcon {
|
||||
height:78%
|
||||
@ -576,6 +610,9 @@ button.glyphicon-button.active.focus {
|
||||
}
|
||||
}
|
||||
|
||||
#header:empty{
|
||||
display:none;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
|
||||
23
main.js
23
main.js
@ -769,9 +769,9 @@ if (urlParams.has('blind')) {
|
||||
|
||||
if (urlParams.has('dpi') || urlParams.has('dpr')) {
|
||||
session.devicePixelRatio = urlParams.get('dpi') || urlParams.get('dpr') || 2.0;
|
||||
} else if (window.devicePixelRatio && window.devicePixelRatio!==1){
|
||||
session.devicePixelRatio = window.devicePixelRatio; // this annoys me to no end.
|
||||
}
|
||||
} //else if (window.devicePixelRatio && window.devicePixelRatio!==1){
|
||||
// session.devicePixelRatio = window.devicePixelRatio; // this annoys me to no end.
|
||||
//}
|
||||
|
||||
if (urlParams.has('speakermute') || urlParams.has('mutespeaker') || urlParams.has('sm') || urlParams.has('ms')) {
|
||||
session.speakerMuted = true;
|
||||
@ -2911,8 +2911,13 @@ if ((session.roomid) || (urlParams.has('roomid')) || (urlParams.has('r')) || (ur
|
||||
|
||||
if (session.roomid.length > 0) {
|
||||
if (session.videoDevice === 0) {
|
||||
getById("add_camera").innerHTML = "Join room with Microphone";
|
||||
miniTranslate(getById("add_camera"), "join-room-with-mic");
|
||||
if (session.audioDevice === 0) {
|
||||
getById("add_camera").innerHTML = "Join room";
|
||||
miniTranslate(getById("add_camera"), "join-room");
|
||||
} else {
|
||||
getById("add_camera").innerHTML = "Join room with Microphone";
|
||||
miniTranslate(getById("add_camera"), "join-room-with-mic");
|
||||
}
|
||||
} else {
|
||||
getById("add_camera").innerHTML = "Join Room with Camera";
|
||||
miniTranslate(getById("add_camera"), "join-room-with-camera");
|
||||
@ -4908,6 +4913,8 @@ function createRoomCallback(passAdd, passAdd2) {
|
||||
codecGroupFlag = "&codec=h264";
|
||||
} else if (codecGroupFlag.value === "vp8") {
|
||||
codecGroupFlag = "&codec=vp8";
|
||||
} else if (codecGroupFlag.value === "av1") {
|
||||
codecGroupFlag = "&codec=av1";
|
||||
} else {
|
||||
codecGroupFlag = "";
|
||||
}
|
||||
@ -5002,6 +5009,10 @@ function createRoomCallback(passAdd, passAdd2) {
|
||||
getById("chatbutton").classList.add("advanced");
|
||||
}
|
||||
|
||||
if (session.autostart){
|
||||
press2talk(true);
|
||||
}
|
||||
|
||||
joinRoom(session.roomid);
|
||||
|
||||
}
|
||||
@ -10421,7 +10432,7 @@ function toggleQualityDirector(bitrate, UUID, ele = null) { // ele is specific t
|
||||
function createPopoutChat() {
|
||||
var randid = session.generateStreamID(8);
|
||||
log(randid);
|
||||
window.open('./popout?id=' + randid, 'popup', 'width=600,height=480,toolbar=no,menubar=no,resizable=yes');
|
||||
window.open('./popout.html?id=' + randid, 'popup', 'width=600,height=480,toolbar=no,menubar=no,resizable=yes');
|
||||
session.broadcastChannel = new BroadcastChannel(randid);
|
||||
session.broadcastChannel.onmessage = function(e) {
|
||||
if ("loaded" in e.data) {
|
||||
|
||||
35
thirdparty/CodecsHandler.js
vendored
35
thirdparty/CodecsHandler.js
vendored
@ -31,17 +31,13 @@ var CodecsHandler = (function() {
|
||||
|
||||
if (!info.videoCodecNumbers) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (codecName === 'vp8' && info.vp8LineNumber === info.videoCodecNumbers[0]) {
|
||||
} else if (codecName === 'vp8' && info.vp8LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (codecName === 'vp9' && info.vp9LineNumber === info.videoCodecNumbers[0]) {
|
||||
} else if (codecName === 'vp9' && info.vp9LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (codecName === 'h264' && info.h264LineNumber === info.videoCodecNumbers[0]) {
|
||||
} else if (codecName === 'h264' && info.h264LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
} else if (codecName === 'av1' && info.av1LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
@ -58,21 +54,24 @@ var CodecsHandler = (function() {
|
||||
return sdp;
|
||||
}
|
||||
preferCodecNumber = info.vp8LineNumber;
|
||||
}
|
||||
|
||||
if (codec === 'vp9') {
|
||||
|
||||
} else if (codec === 'vp9') {
|
||||
if (!info.vp9LineNumber) {
|
||||
return sdp;
|
||||
}
|
||||
preferCodecNumber = info.vp9LineNumber;
|
||||
}
|
||||
|
||||
if (codec === 'h264') {
|
||||
|
||||
} else if (codec === 'h264') {
|
||||
if (!info.h264LineNumber) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
preferCodecNumber = info.h264LineNumber;
|
||||
|
||||
} else if (codec === 'av1') {
|
||||
if (!info.av1LineNumber) {
|
||||
return sdp;
|
||||
}
|
||||
preferCodecNumber = info.av1LineNumber;
|
||||
}
|
||||
|
||||
var newLine = info.videoCodecNumbersOriginal.split('SAVPF')[0] + 'SAVPF ';
|
||||
@ -117,6 +116,10 @@ var CodecsHandler = (function() {
|
||||
|
||||
if (line.indexOf('H264/90000') !== -1 && !info.h264LineNumber) {
|
||||
info.h264LineNumber = line.replace('a=rtpmap:', '').split(' ')[0];
|
||||
}
|
||||
|
||||
if (line.indexOf('AV1X/90000') !== -1 && !info.av1LineNumber) {
|
||||
info.av1LineNumber = line.replace('a=rtpmap:', '').split(' ')[0];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
182
zoom.html
Normal file
182
zoom.html
Normal file
@ -0,0 +1,182 @@
|
||||
|
||||
<html>
|
||||
<head><style>
|
||||
span{margin:10px 0 0 0;display:block;}
|
||||
body {
|
||||
|
||||
background-color:#cdf;
|
||||
padding:0;
|
||||
width;100%;height:100%
|
||||
}
|
||||
|
||||
input{padding:5px;}
|
||||
|
||||
button {margin:10px 3px;}
|
||||
|
||||
#stream{
|
||||
display:block;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
<body id="main" style="margin:5%;"
|
||||
<meta charset="utf-8"/>
|
||||
|
||||
<video id="video" autoplay="true" muted="true" playsinline style='height:420px;background-color:black;display:block;margin:0 0 10px 0;'></video>
|
||||
<div id="devices">
|
||||
<div class="select">
|
||||
<label for="videoSource">Video source: </label><select id="videoSource"></select>
|
||||
</div>
|
||||
<div class="select">
|
||||
<label for="audioSource">Audio source: </label><select id="audioSource"></select>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="fullwindow()">FULL WINDOW</button>
|
||||
<script>
|
||||
window.onerror = function backupErr(errorMsg, url=false, lineNumber=false) {
|
||||
console.error(errorMsg);
|
||||
console.error(lineNumber);
|
||||
console.error("Unhandeled Error occured"); //or any message
|
||||
return false;
|
||||
};
|
||||
|
||||
function fullwindow(){
|
||||
videoElement.style.width="100%";
|
||||
videoElement.style.padding= "0";
|
||||
videoElement.style.margin="0";
|
||||
videoElement.style.height="100%";
|
||||
videoElement.style.zIndex="5";
|
||||
videoElement.style.position = "absolute";
|
||||
videoElement.style.top="0px";
|
||||
videoElement.style.left="0px";
|
||||
document.getElementById("main").style.overflow = "hidden";
|
||||
videoElement.style.overflow = "hidden"
|
||||
document.getElementById("main").style.backgroundColor="#000";
|
||||
videoElement.style.cursor="none";
|
||||
document.getElementById("main").style.cursor="none";
|
||||
}
|
||||
|
||||
var videoElement = document.getElementById("video");
|
||||
var gotDev = false;
|
||||
async function gotDevices() {
|
||||
if (gotDev){return;}
|
||||
gotDev=true;
|
||||
await navigator.mediaDevices.getUserMedia({audio:true, video:true}); // is needed to ask for permissinos.
|
||||
navigator.mediaDevices.enumerateDevices().then((deviceInfos)=>{
|
||||
for (let i = 0; i !== deviceInfos.length; ++i) {
|
||||
var deviceInfo = deviceInfos[i];
|
||||
var option = document.createElement("option");
|
||||
option.value = deviceInfo.deviceId;
|
||||
|
||||
if (deviceInfo.kind === "audioinput") {
|
||||
option.text = deviceInfo.label || "microphone " + (audioSelect.length + 1);
|
||||
audioSelect.appendChild(option);
|
||||
if (option.text.startsWith("CABLE")){
|
||||
option.selected =true;
|
||||
}
|
||||
} else if (deviceInfo.kind === "videoinput") {
|
||||
option.text = deviceInfo.label || "camera " + (videoSelect.length + 1);
|
||||
if (option.text.startsWith("NewTek")){
|
||||
continue;
|
||||
}
|
||||
videoSelect.appendChild(option);
|
||||
if (option.text.startsWith("OBS")){
|
||||
option.selected =true;
|
||||
}
|
||||
}
|
||||
}
|
||||
getStream();
|
||||
});
|
||||
}
|
||||
|
||||
function getStream() {
|
||||
if (window.stream) {
|
||||
window.stream.getTracks().forEach(function (track) {
|
||||
track.stop();
|
||||
log("TRack stopping");
|
||||
});
|
||||
}
|
||||
|
||||
const constraints = {
|
||||
audio: {
|
||||
deviceId: { exact: audioSelect.value },
|
||||
echoCancellation : false,
|
||||
autoGainControl : false,
|
||||
noiseSuppression : false
|
||||
},
|
||||
video: {
|
||||
deviceId: { exact: videoSelect.value },
|
||||
width: { min: 1280, ideal: 1920, max: 1920 },
|
||||
height: { min: 720, ideal: 1080, max: 1080 }
|
||||
}
|
||||
};
|
||||
return navigator.mediaDevices.getUserMedia(constraints)
|
||||
.then(gotStream)
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
|
||||
function gotStream(stream) {
|
||||
if (window.stream) {
|
||||
window.stream = stream; // make stream available to console
|
||||
videoElement.srcObject = stream;
|
||||
var senders = session.pc.getSenders();
|
||||
videoElement.srcObject.getVideoTracks().forEach((track)=>{
|
||||
var added = false;
|
||||
senders.forEach((sender) => { // I suppose there could be a race condition between negotiating and updating this. if joining at the same time as changnig streams?
|
||||
if (sender.track) {
|
||||
if (sender.track && sender.track.kind == "video") {
|
||||
sender.replaceTrack(track); // replace may not be supported by all browsers. eek.
|
||||
track.enabled = notCensored;
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (added==false){
|
||||
session.pc.addTrack(track);
|
||||
log("ADDED NOT REPLACED?");
|
||||
}
|
||||
});
|
||||
|
||||
videoElement.srcObject.getAudioTracks().forEach((track)=>{
|
||||
var added = false;
|
||||
senders.forEach((sender) => { // I suppose there could be a race condition between negotiating and updating this. if joining at the same time as changnig streams?
|
||||
if (sender.track) {
|
||||
if (sender.track && sender.track.kind == "audio") {
|
||||
sender.replaceTrack(track); // replace may not be supported by all browsers. eek.
|
||||
track.enabled = notCensored;
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (added==false){
|
||||
session.pc.addTrack(track);
|
||||
log("ADDED NOT REPLACED?");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
window.stream = stream; // make stream available to console
|
||||
videoElement.srcObject = stream;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var audioSelect = document.querySelector("select#audioSource");
|
||||
var videoSelect = document.querySelector("select#videoSource");
|
||||
audioSelect.onchange = getStream;
|
||||
videoSelect.onchange = getStream;
|
||||
gotDevices();
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user