Forgot to pull before I merged.
This commit is contained in:
Steve Seguin 2020-08-27 04:27:45 -04:00 committed by GitHub
parent 05b021e18c
commit 5eefa9021d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 209 additions and 109 deletions

View File

@ -22,7 +22,7 @@
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicon-16x16.png" />
<link rel="icon" href="./images/favicon.ico" />
<link itemprop="thumbnailUrl" href="//images/obsNinja_logo_full.png" />
<link itemprop="thumbnailUrl" href="./images/obsNinja_logo_full.png" />
<!-- Primary Meta Tags -->
<title>OBS.Ninja</title>
<meta name="title" content="OBS.Ninja" />
@ -47,11 +47,11 @@
<meta property="twitter:image" content="./images/obsNinja_logo_full.png" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
<!-- <script src="//console.re/connector.js" data-channel="obsninjaalpha" id="consolerescript"></script> -->
<!-- <script src="//console.re/connector.js" data-channel="obsninjaalpha" type="text/javascript" id="consolerescript"></script>-->
<link rel="stylesheet" href="./lineawesome/css/line-awesome.min.css">
<script type="text/javascript" src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script type="text/javascript" src="./thirdparty/qrcode.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script type="text/javascript" crossorigin="anonymous" src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/qrcode.min.js"></script>
<script type="text/javascript" crossorigin="anonymous" src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="./main.css?ver=10" />
</head>
<body id="main">
@ -62,8 +62,8 @@
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="url" href="./images/obsNinja_logo_full.png" />
</span>
<script language="javascript" type="text/javascript" src="./thirdparty/CodecsHandler.js?ver=17"></script>
<script language="javascript" type="text/javascript" src="./webrtc.js?ver=55"></script>
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=17"></script>
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=56"></script>
<input id="zoomSlider" type="range" style="display: none;" />
<div id="header">
<a id="logoname" href="./" style="text-decoration: none; color: white; margin: 2px;">
@ -110,7 +110,7 @@
<div id="chatNotification"></div>
</div>
<div id="mutebutton" title="Mute the Mic" onclick="toggleMute()" class="advanced float" style="cursor: pointer;" alt="Toggle the mic">
<i id="mutetoggle" class="toggleSize las la-microphone my-float"></i>
<i id="mutetoggle" class="toggleSize las la-microphone my-float" style="position: relative; top: 0.5px;"></i>
</div>
<div id="mutevideobutton" title="Disable the Camera" onclick="toggleVideoMute()" class="advanced float" style="cursor: pointer;" alt="Toggle the camera">
<i id="mutevideotoggle" class="toggleSize las la-eye my-float"></i>
@ -255,7 +255,8 @@
<br />
<span id="headphonesDiv" style="text-align:left; margin:17px 0; max-width: 550px; min-width: 420px; background-color: #f3f3f3; display: none; padding: 10px 10px; border: 1px solid #ccc; vertical-align: middle;">
<div id="audioTitle2" class="title">
<i class="las la-headphones"></i><span data-translate="select-output-source"> Audio Output Destination:</span></div>
<i class="las la-headphones"></i><span data-translate="select-output-source"> Audio Output Destination: <button onclick="playtone()" style="margin:0 0 0 15px;" type="button">Test</button>
</span></div>
<select id="outputSource" ></select>
</span>
@ -313,7 +314,7 @@
<p id="audioScreenShare1">
<span data-translate="audio-sources">Audio Sources</span>
<br />
<select id="audioSourceScreenshare" multiple alt="tip: Hold CTRL (command) to select Multiple" title="tip: Hold CTRL (command) to select Multiple" style="height: 60px; width: 200px; resize: both; overflow: auto; padding: 5px;" onchange="requestAudioStream();">
<select id="audioSourceScreenshare" multiple alt="tip: Hold CTRL (command) to select Multiple" title="tip: Hold CTRL (command) to select Multiple" style="height: 60px; min-width: 290px; resize: both; overflow: auto; padding: 5px;" onchange="requestAudioStream();">
<option value="screenshare" selected>
<span data-translate="screen-shrae-audio">Screen Share Audio (default)</span>
</option>
@ -323,9 +324,9 @@
</select>
</p>
<br />
<span id="headphonesDiv2" style="background-color: #f3f3f3; display: none; padding: 5px 10px; border: 1px solid #ccc; vertical-align: middle;">
<i class="las la-headphones"></i><span data-translate="select-output-source"> Audio Output Destination:</span>:<br />
<select id="outputSourceScreenshare" style="background-color: #FFF; padding:5px; display: display:inline-block;vertical-align: middle;" onclick="requestOutputAudioStream();">
<span id="headphonesDiv2" style="background-color: #f3f3f3; min-width: 290px; display: none; padding: 5px 10px; border: 1px solid #ccc; vertical-align: middle;">
<i class="las la-headphones"></i><span data-translate="select-output-source"> Audio Output Destination: <button onclick="playtone(true)" style="margin:0;margin-left:15px;" type="button">Test</button></span></span><br />
<select id="outputSourceScreenshare" style="background-color: #FFF; padding:10px 5px; min-width: 288px; display: display:inline-block;vertical-align: middle;" onclick="requestOutputAudioStream();">
<option value="default">
<span data-translate="default">Default Device</span>
</option>
@ -361,7 +362,7 @@
<br />
<br />
<div style="margin: 20px; max-width: 400px; text-align: left; margin: auto auto;">
<div class="invite_setting_group">
<div class="invite_setting_group">
<h4>
<span data-translate="advanced-paramaters">Advanced Options</span>
</h4>
@ -513,28 +514,24 @@
</div>
<div id="gridlayout"></div>
<div id="controls_blank" style="display: none;">
<center>
<br />
<b>
<span data-translate="remote-control-for-obs">Remote Control for OBS</span>
</b>
<br />
<button data-value="0" style="font-size: 112%;" onclick="directEnable(this, event);">
<span data-translate="add-to-group">Add to Group Scene</span>
<b>
<button data-value="0" style="padding: 2px 10px 3px 5px;font-weight:display-block;margin: 2px 0 0 5px;" title="Add this Video to any remote '&scene=1'" onclick="directEnable(this, event);">
<span data-translate="add-to-group" view"> Add to Group Scene</span>
</button>
<button style="font-size: 112%;" onclick="directMute(this, event);">
<span data-translate="mute">Mute</span>
</button>
<button style="font-size: 112%;" onclick="recordVideo(this, event)">
<span data-translate="record">Record</span>
<button style="padding: 2px 10px 3px 5px;display:inline-block;margin: 2px 0 0 5px;" title="Start Recording this stream. *experimental*' views" onclick="recordVideo(this, event)">
<span data-translate="record">🔴 Record</span>
</button>
<br />
<span data-translate="volume">Volume</span>:
<input type="range" min="1" max="100" value="100" onclick="directVolume(this);" />
<br />
<br />
<hr />
</center>
<button style="padding: 2px 10px 3px 5px;display:inline-block;margin: 2px 0 0 5px;" title="Remotely Mute this Audio in all remote '&scene' views" onclick="directMute(this, event);">
<span data-translate="mute" >🔇 Mute in all Scenes</span>
</button>
<i style="font-size:2vh; position: relative; top: 3px;" title="Change this Audio's volume in all remote '&scene' views" class="las la-volume-up"></i>
<input type="range" min="1" max="100" value="100" title="Change this Audio's volume in all remote '&scene' views" onclick="directVolume(this);" style="width: 100px; position: relative; top: 4px;"/>
</b>
<br />
<hr style="margin:5px 0 0 0;"/>
</div>
<div id="popupSelector" style="display:none;">
<span id="videoMenu3" class="videoMenu">
@ -561,11 +558,10 @@
<br />
<span id="headphonesDiv3" style="display: inline-block;">
<div id="audioTitle3" class="title">
<i class="las la-headphones"></i><span data-translate="select-output-source"> Audio Output Destination:</span>
<i class="las la-headphones"></i><span data-translate="select-output-source"> Audio Output Destination:
</div>
<select id="outputSource3" ></select>
</span>
<br />
<button id="shareScreenGear" style="padding:20px;" onclick="grabScreen()"><b>Share Screen</b><br /><i style="padding:5px; font-size:300%;" class="las la-desktop"></i></button><br />
<button onclick="toggleSettings()" style="background-color:#EFEFEF;padding:10px 12px 12px 2px;"><i class="chevron right" style="font-size:150%;top:3px;position:relative;"></i> <b>Close Settings</b></button>
</p>
@ -600,6 +596,10 @@
<button style="width:60px;background-color:#EEE;" onclick="sendChatMessage()">Send</button>
</div>
<audio id="testtone" style="display:none;" preload="none">
<source src="tone.mp3" type="audio/mpeg">
<source src="tone.ogg" type="audio/ogg">
</audio>
<div id="messagePopup" class="popup-message"></div>
<div id="languages" class="popup-message" style="display: none; right: 0; bottom: 25px; position: absolute;">
@ -624,6 +624,8 @@
<br />
<a onclick="changeLg('ja');toggle(document.getElementById('languages'));" style="cursor: pointer;">Japanese</a>
<br />
<a onclick="changeLg('pig');toggle(document.getElementById('languages'));" style="cursor: pointer;">Pig Latin</a>
<br />
</u>
<br />
<a href="https://github.com/steveseguin/obsninja/tree/master/translations">Add More Here!</a>
@ -635,23 +637,24 @@
session.streamID = session.generateStreamID(); // randomly generates a streamID for this session. You can set your own programmatically if needed
session.configuration = {
iceServers: [
{ urls: ["stun:stun.l.google.com:19302", "stun:stun4.l.google.com:19302"] }, // more than 4 stun+turn servers may cause issues
],
};
// session.configuration = {
// iceServers: [
// { urls: ["stun:stun.l.google.com:19302", "stun:stun4.l.google.com:19302"] }, // more than 4 stun+turn servers may cause issues
// ],
// sdpSemantics: 'unified-plan'
// };
var turn = {};
turn.username = "steve";
turn.credential = "justtesting";
turn.urls = ["turn:turn.obs.ninja:443"]; // US CENTRAL
session.configuration.iceServers.push(turn);
// var turn = {};
// turn.username = "steve";
// turn.credential = "justtesting";
// turn.urls = ["turn:turn.obs.ninja:443"]; // US CENTRAL
// session.configuration.iceServers.push(turn);
turn = {};
turn.username = "steve";
turn.credential = "justtesting";
turn.urls = ["turn:turn2.obs.ninja:443"]; // US WEST
session.configuration.iceServers.push(turn);
// turn = {};
// turn.username = "steve";
// turn.credential = "justtesting";
// turn.urls = ["turn:turn2.obs.ninja:443"]; // US WEST
// session.configuration.iceServers.push(turn);
// session.configuration.iceTransportPolicy = "relay"; // uncomment to enable "&privacy" and force the TURN server
@ -689,7 +692,7 @@
// 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" id="main-js" src="./main.js?ver=36"></script>
<script type="text/javascript" src="./animations.js?ver=8"></script>
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=37"></script>
<script type="text/javascript" crossorigin="anonymous" src="./animations.js?ver=8"></script>
</body>
</html>

View File

@ -171,7 +171,18 @@ hr {
margin:0;
}
/* Invite link generator */
.invite_setting_group {
margin: 20px 0px;
background-color: #d2d2d2;
padding: 10px;
}
.invite_setting_group h4 {
margin:10px 0px 20px;
}
.invite_setting_item {
margin: 10px 0px;
}
.directorsgrid {
justify-items: normal;
@ -182,15 +193,14 @@ hr {
}
.directorsgrid video {
max-width: 400px;
max-height: 225px;
min-width: 300px;
height: 169px;
width: 300px;
padding:10px 10px 0px 10px !important;
}
.directorsgrid .vidcon {
display: inline-block !important;
max-width: 400px !important;
width: 300px !important;
max-height: 500px !important;
background: #E3E4EF;
}
@ -718,6 +728,8 @@ img {
.rotate225 {
transform: rotate(135deg);
position: relative;
top: 1px;
}
@ -1281,15 +1293,3 @@ input[type=checkbox]
}
}
/* Invite link generator */
.invite_setting_group {
margin: 20px 0px;
background-color: #d2d2d2;
padding: 10px;
}
.invite_setting_group h4 {
margin:10px 0px 20px;
}
.invite_setting_item {
margin: 10px 0px;
}

124
main.js
View File

@ -442,6 +442,12 @@ if (urlParams.has('icefilter')){
session.icefilter = urlParams.get('icefilter');
}
if (urlParams.has('nopreview')){
log("preview OFF");
session.nopreview = true;
}
if (urlParams.has('obsfix')){
session.obsfix = urlParams.get('obsfix');
if (session.obsfix){
@ -536,7 +542,7 @@ if (urlParams.has("autojoin") || urlParams.has("autostart") || urlParams.has("aj
if (urlParams.has('novideo') || urlParams.has('nv') || urlParams.has('hidevideo')){
session.novideo = urlParams.get('novideo') || urlParams.get('nv') || urlParams.has('hidevideo');
session.novideo = urlParams.get('novideo') || urlParams.get('nv') || urlParams.get('hidevideo');
if (!(session.novideo)){
session.novideo=[];
@ -549,7 +555,7 @@ if (urlParams.has('novideo') || urlParams.has('nv') || urlParams.has('hidevideo'
if (urlParams.has('noaudio') || urlParams.has('na') || urlParams.has('hideaudio')){
session.noaudio = urlParams.get('noaudio') || urlParams.get('na') || urlParams.has('hideaudio');
session.noaudio = urlParams.get('noaudio') || urlParams.get('na') || urlParams.get('hideaudio');
errorlog(session.noaudio);
if (!(session.noaudio)){
@ -1362,13 +1368,13 @@ function directEnable(ele, event){ // A directing room only is controlled by the
if (ele.parentNode.parentNode.dataset.enable==1){
ele.parentNode.parentNode.dataset.enable = 0;
ele.className = "";
ele.innerHTML = "Add to Group Scene";
ele.innerHTML = " Add to Group Scene";
ele.parentNode.parentNode.style.backgroundColor = "#E3E4FF";
} else {
ele.parentNode.parentNode.style.backgroundColor = "#AFA";
ele.parentNode.parentNode.dataset.enable = 1;
ele.className = "pressed";
ele.innerHTML = "Remove from Group Scene";
ele.innerHTML = " Remove from Scene";
}
}
var msg = {};
@ -1388,11 +1394,11 @@ function directMute(ele, event){ // A directing room only is controlled by the D
if (ele.parentNode.parentNode.dataset.mute==0){
ele.parentNode.parentNode.dataset.mute = 1;
ele.className = "";
ele.innerHTML = "Mute";
ele.innerHTML = "🔇 Mute in all Scenes";
} else {
ele.parentNode.parentNode.dataset.mute = 0;
ele.className = "pressed";
ele.innerHTML = "Unmute";
ele.innerHTML = "🔊 un-Mute all Scenes";
}
}
var msg = {};
@ -1767,22 +1773,25 @@ function createRoom(roomname=false){
passAdd2="&password="+session.password;
}
gridlayout.innerHTML = "<br /><div style='display:inline-block'><font style='font-size:130%;color:white;'></font><input onclick='popupMessage(event);copyFunction(this)' onmousedown='copyFunction(this)' style='cursor:grab;font-weight:bold;background-color:#78F; width:400px; font-size:100%; padding:10px; border:2px solid black; margin:5px;' class='task' value='https://"+location.host+location.pathname+"?room="+session.roomid+passAdd+"' /><font style='font-size:110%;color:white;'><i class='las la-video' style='position:relative;top:7px;font-size:2em;' aria-hidden='true'></i> - Invites users to join the group and broadcast their feed to it. These users will see every feed, so performance problems may arise for some guests if too many people join a room.</font></div>";
gridlayout.innerHTML = "<br /><div style='display:inline-block'><font style='font-size:130%;color:white;'></font><input onclick='popupMessage(event);copyFunction(this)' onmousedown='copyFunction(this)' style='cursor:grab;font-weight:bold;background-color:#78F; width:400px; font-size:100%; padding:10px; border:2px solid black; margin:5px;' class='task' value='https://"+location.host+location.pathname+"?room="+session.roomid+passAdd+"' /><font style='font-size:110%;color:white;'><i class='las la-video' style='position:relative;top:7px;font-size:2em;' aria-hidden='true'></i> - Invites users to join the group and broadcast their feed to it. These users will see every feed in the room.</font></div>";
gridlayout.innerHTML += "<br /><font style='font-size:130%;color:white;'></font><input class='task' onclick='popupMessage(event);copyFunction(this)' onmousedown='copyFunction(this)' style='cursor:grab;font-weight:bold;background-color:#F45;width:400px;font-size:100%;padding:10px;border:2px solid black;margin:5px;' value='https://"+location.host+location.pathname+"?room="+session.roomid+passAdd+"&view' /><font style='font-size:110%;color:white;'><i class='las la-video' style='position:relative;top:7px;font-size:2em;' aria-hidden='true'></i> - Link to Invite users to broadcast their feeds to the group. These users will not see or hear any feed from the group.</font><br />";
gridlayout.innerHTML += "<font style='font-size:130%;color:white'></font><input class='task' onmousedown='copyFunction(this)' data-drag='1' onclick='popupMessage(event);copyFunction(this)' style='cursor:grab;font-weight:bold;background-color:#5F4;width:400px;font-size:100%;padding:10px;border:2px solid black;margin:5px;' value='https://"+location.host+location.pathname+"?scene=1&room="+session.roomid+passAdd2+"' /><font style='font-size:110%;color:white'><i class='las la-th-large' style='position:relative;top:7px;font-size:2em;' aria-hidden='true'></i> - This is an OBS Browser Source link that contains the group chat in just a single scene. Videos must be added to Group Scene.</font><br />";
gridlayout.innerHTML += "<font style='font-size:130%;color:white'></font><input class='task' onmousedown='copyFunction(this)' data-drag='1' onclick='popupMessage(event);copyFunction(this)' style='cursor:grab;font-weight:bold;background-color:#5F4;width:400px;font-size:100%;padding:10px;border:2px solid black;margin:5px;' value='https://"+location.host+location.pathname+"?scene=1&room="+session.roomid+passAdd2+"' /><font style='font-size:110%;color:white'><i class='las la-th-large' style='position:relative;top:7px;font-size:2em;' aria-hidden='true'></i> - This is an OBS Browser Source link that contains the group chat in just a single scene. Videos must be manually added to this scene.</font><br />";
gridlayout.innerHTML += '<button style="margin:10px;" onclick="toggle(getById(\'roomnotes2\'),this);">Click Here for a quick overview and help</button><br />';
gridlayout.innerHTML += '<button style="margin:10px;" onclick="toggle(getById(\'roomnotes2\'),this);">Click Here for a quick overview and help</button><br />';
gridlayout.innerHTML += "<div id='roomnotes2' style='display:none;padding:0 0 0 10px;' ><br />\
<font style='color:#CCC;'>Welcome. This is the control-room for the group-chat. There are different things you can use this room for:<br /><br />\
<li>You can host a small-group chat here. Share the blue link to invite guests who will join the chat automatically.</li>\
<li>You can use it to invite and manage up to ~20 remote camera streams. Use the red-colored add camera link to bring in such streams.</li>\
<li>You can add and remote control individual streams loaded into OBS. The required solo-links to add to OBS will appear under videos as they load.</li>\
<li>You can host a group chat with friends using a room. Share the blue link to invite guests who will join the chat automatically.</li>\
<li>A group room can handle around 4 to 30 guests, depending on numerous factors, including CPU and available bandwidth of all guests in the room.</li>\
<li>Solo-views of each video are offered under videos as they load. These can be used within an OBS Browser Source.</li>\
<li>You can use the auto-mixing Group Scene, the green link, to auto arrange multiple videos for you in OBS.</li>\
<li>You can use it to record video streams independently</li>\
<li>You can use this control room to record isolated video or audio streams, but it is an experimental feature still.</li>\
<li>Videos in the Director's room will be of low quality on purpose; to save bandwidth/CPU</li>\
<li>Guest's in the room will see each other's videos at a very limited quality to conserve bandwidth/CPU.</li>\
<li>OBS will see a guest's video in high-quality; the default video bitrate is 2500kbps.</li>\
<br />\
As guests join, their videos will appear below. You can bring their video streams into OBS as solo-scenes or you can add them to the Group Scene.\
<br />The Group Scene auto-mixes videos that have been added to the group scene. Please note that the Auto-Mixer requires guests be manually added to it for them to appear in it; they are not added automatically.<br /><Br />Apple mobile devices, such as iPhones and iPads, do not fully support Video Group Chat. This is a hardware constraint.<br /><br />\
@ -2532,7 +2541,28 @@ function gotDevices2(deviceInfos){
}
}
function playtone(screen=false){
if (screen){
var outputSelect = document.querySelector('select#outputSourceScreenshare');
session.sink = outputSelect.options[outputSelect.selectedIndex].value;
}
var testtone= getById("testtone");
if (testtone){
if (session.sink){
testtone.setSinkId(session.sink).then(() => {
log("changing audio sink:"+session.sink);
testtone.play();
}).catch(error => {
errolog("couldn't set sink");
errorlog(error);
});
} else {
testtone.play();
}
}
}
async function getAudioOnly(selector, trackid=null){
var audioSelect = document.querySelector(selector).querySelectorAll("input");
@ -2715,23 +2745,28 @@ async function grabScreen(quality=0, audio=true){
session.streamSrc = getById(eleName).srcObject;
if (track.kind == "video"){
toggleVideoMute(true);
for (UUID in session.pcs){
try {
var senders = session.pcs[UUID].getSenders(); // for any connected peer, update the video they have if connected with a video already.
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.kind == "video"){
sender.replaceTrack(track); // replace may not be supported by all browsers. eek.
added=true;
}
if (((iOS) || (iPad)) && (session.pcs[UUID].guest==true)){
warnlog("iOS and GUest detected");
} else if ((session.pcs[UUID].guest==true) && (session.roombitrate===0)) {
log("room rate restriction detected. No videos will be published to other guests");
} else if (session.pcs[UUID].allowVideo==true){ // allow
var senders = session.pcs[UUID].getSenders(); // for any connected peer, update the video they have if connected with a video already.
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.kind == "video"){
sender.replaceTrack(track); // replace may not be supported by all browsers. eek.
added=true;
}
}
});
if (added==false){
session.pcs[UUID].addTrack(track, stream);
}
});
if (added==false){
session.pcs[UUID].addTrack(track, stream);
}
} catch (e){
errorlog(e);
@ -2741,7 +2776,9 @@ async function grabScreen(quality=0, audio=true){
toggleMute(true); // I might want to move this outside the loop, but whatever
for (UUID in session.pcs){
try {
session.pcs[UUID].addTrack(track, stream);
if (session.pcs[UUID].allowAudio==true){
session.pcs[UUID].addTrack(track, stream);
}
} catch (e){
errorlog(log);
}
@ -2903,18 +2940,25 @@ async function grabVideo(quality=0, eleName='previewWebcam', selector="select#vi
toggleVideoMute(true);
for (UUID in session.pcs){
try {
var senders = session.pcs[UUID].getSenders(); // for any connected peer, update the video they have if connected with a video already.
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.kind == "video"){
sender.replaceTrack(track); // replace may not be supported by all browsers. eek.
added=true;
if (((iOS) || (iPad)) && (session.pcs[UUID].guest==true)){
warnlog("iOS and GUest detected");
} else if ((session.pcs[UUID].guest==true) && (session.roombitrate===0)) {
log("room rate restriction detected. No videos will be published to other guests");
} else if (session.pcs[UUID].allowVideo==true){ // allow
var senders = session.pcs[UUID].getSenders(); // for any connected peer, update the video they have if connected with a video already.
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.kind == "video"){
sender.replaceTrack(track); // replace may not be supported by all browsers. eek.
added=true;
}
}
});
if (added==false){
session.pcs[UUID].addTrack(track, stream); // can't replace, so adding
}
});
if (added==false){
session.pcs[UUID].addTrack(track, stream); // can't replace, so adding
}
} catch (e){
@ -3062,8 +3106,10 @@ async function grabAudio(eleName="previewWebcam", selector="#audioSource", track
toggleMute(true);
for (UUID in session.pcs){
session.pcs[UUID].addTrack(track, streams[i]);
//sender.replaceTrack(track);
if (session.pcs[UUID].allowAudio==true){ // allow
session.pcs[UUID].addTrack(track, streams[i]);
//sender.replaceTrack(track);
}
}
});
}

BIN
tone.mp3 Normal file

Binary file not shown.

BIN
tone.ogg Normal file

Binary file not shown.

51
translations/pig.json Normal file
View File

@ -0,0 +1,51 @@
{
"GO": "OGAY",
"add-group-chat": "Addway Oupgray Atchay",
"add-to-group": "Addway Oupgray Atchay",
"add-your-camera": "Addway ouryay Ameracay",
"added-notes": "\n\t\t\t\t<u><i>Addedway Otesnay:</i></u>\n\t\t\t\t<li>Anyoneway ancay enterway away oomray ifway eythay owknay ethay amenay, osay eepkay itway uniqueway</li>\n\t\t\t\t<li>Avinghay oremay anthay ourfay (4) eoplepay inway away oomray isway otnay advisableway ueday otay erformancepay easonsray, utbay itway ependsday onway ouryay ardwarehay.</li>\n\t\t\t\t<li>iOSWAY evicesday illway avehay eirthay ideovay onlyway ebay isiblevay otay ethay irectorday. Isthay isway away ardwarehay imitationlay.</li>\n\t\t\t\t<li>Ethay \"Ecordingray\" optionway isway ewnay andway isway onsideredcay experimentalway.</li>\n\t\t\t\t",
"advanced-paramaters": "Advancedway Arameterspay",
"audio-sources": "Audioway Ourcessay",
"back": "Ackbay",
"balanced": "Alancedbay",
"copy-this-url": "Arableshay Inklay otay isthay ideovay",
"copy-to-clipboard": "Opycay otay Ipboardclay",
"create-reusable-invite": "Eatecray Eusableray Inviteway",
"enable-stereo-and-pro": "Enableway Ereostay andway Opray HDAY Audioway",
"enter-the-rooms-control": "Enterway ethay Oom'sray Ontrolcay Entercay",
"force-vp9-video-codec": "Orcefay VPAY9 Ideovay Odeccay (esslay artifactingway)",
"generate-invite-link": "ENERATEGAY ETHAY INVITEWAY INKLAY",
"here-you-can-pre-generate": "Erehay ouyay ancay epray-enerategay away eusableray iewvay inklay andway away elatedray uestgay inviteway inklay.",
"high-security-mode": "Ighhay Ecuritysay Odemay",
"info-blob": "",
"joining-room": "Ouyay areway oiningjay oomray",
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS Ninja - Pig Latin",
"max-resolution": "Axmay Esolutionray",
"mute": "Utemay",
"no-audio": "Onay Audioway",
"note-share-audio": "\n",
"open-in-new-tab": "Openway inway ewnay Abtay",
"record": "Ecordray",
"remote-control-for-obs": "Emoteray Ontrolcay",
"remote-screenshare-obs": "Emoteray Eensharescray",
"room-name": "Oomray Amenay",
"rooms-allow-for": "Oomsray allowway orfay implifiedsay oupgray-atchay andway ethay advancedway anagementmay ofway ultiplemay eamsstray atway onceway.",
"select-audio-source": "Electsay Audioway Ourcessay",
"select-audio-video": "Electsay ethay audioway/ideovay ourcesay elowbay",
"select-screen-to-share": "ELECTSAY EENSCRAY OTAY ARESHAY",
"show-tips": "Owshay emay omesay ipstay..",
"smooth-cool": "Oothsmay andway Oolcay",
"unlock-video-bitrate": "Unlockway Ideovay Itratebay (20mbpsay)",
"video-source": "Ideovay ourcesay",
"volume": "Olumevay",
"you-are-in-the-control-center": "Ouyay areway inway ethay oom'sray ontrolcay entercay",
"waiting-for-camera": "Aitingway orfay Ameracay otay Oadlay",
"video-resolution": "Ideovay Esolutionray: ",
"hide-screen-share": "Idehay Eensharescray Optionway",
"allow-remote-control": "Emoteray Ontrolcay Ameracay Oomzay (androidway)",
"add-the-guest-to-a-room": " Addway ethay uestgay otay away oomray:",
"invite-group-chat-type": "Isthay oomray uestgay ancay:",
"can-see-and-hear": "Ancay eesay andway earhay ethay oupgray atchay",
"can-hear-only": "Ancay onlyway earhay ethay oupgray atchay",
"cant-see-or-hear": "Annotcay earhay orway eesay ethay oupgray atchay"
}

File diff suppressed because one or more lines are too long