speedtest temp fix ; &label increased to 100char max

This commit is contained in:
Steve Seguin 2022-10-04 01:03:32 -04:00
parent 09467fac9a
commit fbbc6c6c31
6 changed files with 54 additions and 7 deletions

View File

@ -373,7 +373,7 @@
if (out.split("Bitrate_in_kbps").length > 1) {
for (var key in e.data.stats.inbound_stats[streamID]) {
if (key.startsWith("RTCMediaStreamTrack_receiver")) {
if (key.startsWith("RTCMediaStreamTrack_receiver") || key.startsWith("DEPRECATED_RTCMediaStreamTrack_receiver") ) {
var bitrate = e.data.stats.inbound_stats[streamID][key][
"Bitrate_in_kbps"
];

View File

@ -57,7 +57,7 @@
<meta property="twitter:image" content="./media/vdoNinja_logo_full.png" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
<link rel="stylesheet" href="./main.css?ver=213" />
<link rel="stylesheet" href="./main.css?ver=215" />
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/adapter.min.js"></script>
<style id="lightbox-animations" type="text/css"></style>
<!-- <link rel="manifest" href="manifest.json" /> -->
@ -568,7 +568,7 @@
</center>
<div id="consentWarning2" class="startupWarning hidden">
<i class="las la-exclamation-circle"></i>
<p><span data-translate="privacy-disabled">Privacy warning: The director will be able to remotely access your camera and microphone if you continue.</span></p>
<p><span data-translate="privacy-disabled">Privacy warning: The director will be able to remotely change which camera and microphone is being used while this page is open, if you continue.</span></p>
</div>
<p id="audioScreenShare1">
<i class="las la-microphone-alt"></i>
@ -2266,7 +2266,7 @@
// session.defaultBackgroundImages = ["./media/bg_sample1.webp", "./media/bg_sample2.webp"]; // for &effects=5 (virtual backgrounds)
</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=483"></script>
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=488"></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>

28
lib.js
View File

@ -1020,7 +1020,7 @@ var sanitizeLabel = function(string) {
temp.innerText = string;
temp.innerText = temp.innerHTML;
temp = temp.textContent || temp.innerText || "";
temp = temp.substring(0, Math.min(temp.length, 50));
temp = temp.substring(0, Math.min(temp.length, 100));
return temp.trim();
};
@ -21635,6 +21635,13 @@ function updateDirectorsAudio(dataN, UUID) {
input.options.add(opt);
opt = new Option("On", true);
input.options.add(opt);
try{
if (i in data.currentAudioConstraints) {
if (data.audioConstraints[i]['torch'] == true) {
opt.selected = "true";
}
}
} catch(e){}
} else {
continue;
}
@ -21673,6 +21680,12 @@ function updateDirectorsAudio(dataN, UUID) {
opt = new Option("On", true);
input.options.add(opt);
try{
if (data.audioConstraints[i] === true){
opt.selected = "true";
}
} catch(e){}
input.dataset.deviceId = data.deviceId;
input.id = "constraints_" + i + "_"+n;
input.className = "constraintCameraInput";
@ -21885,6 +21898,13 @@ function updateDirectorsVideo(data, UUID) {
input.options.add(opt);
opt = new Option("On", true);
input.options.add(opt);
try{
if (i in data.currentCameraConstraints) {
if (data.cameraConstraints[i]['torch'] == true) {
opt.selected = "true";
}
}
} catch(e){}
} else {
continue;
}
@ -21923,6 +21943,12 @@ function updateDirectorsVideo(data, UUID) {
input.options.add(opt);
opt = new Option("On", true);
input.options.add(opt);
try{
if (data.audioConstraints[i] === true){
opt.selected = "true";
}
} catch(e){}
input.id = "constraints_" + i;
input.className = "constraintCameraInput";

View File

@ -3744,6 +3744,15 @@ input:checked + .slider:before {
padding: 2px 0 0 0;
}
.darktheme .startupWarning{
background: black!important;
box-shadow: 0px 5px 10px -5px #a5a566;
color: white!important;
}
.cameraTip {
width: 100%;
display: block;
@ -3778,6 +3787,9 @@ input:checked + .slider:before {
margin: 0px auto 10px auto;
}
.darktheme .startupWarning{
}
#alertModal {
position: absolute;
background-color: rgb(221 221 221);
@ -4354,4 +4366,7 @@ body.darktheme .invite_setting_item>select{
}
body.darktheme .containerGreen{
background-color: #243824!important;
}
body.darktheme .startupWarning>.las {
color:white!important;
}

View File

@ -2430,6 +2430,11 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
session.welcomeMessage = urlParams.get('entrymsg') || urlParams.get('welcome');
session.welcomeMessage = decodeURIComponent(session.welcomeMessage);
}
if (urlParams.has('welcomeimage') || urlParams.has('welcomeimg')) {
session.welcomeImage = urlParams.get('welcomeimage') || urlParams.get('welcomeimg');
session.welcomeImage = decodeURIComponent(session.welcomeImage);
}
if (urlParams.has('mixminus')){
session.mixMinus = true;
@ -3719,7 +3724,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
session.waitImage = urlParams.get('waitimage') || false;
}
if (((session.view) && (session.roomid === false)) || (session.waitImage && (session.scene!==false))) {
getById("container-4").className = 'column columnfade';
@ -4310,6 +4314,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
stats.total_inbound_connections = Object.keys(session.rpcs).length;
for (var i in session.rpcs) {
stats.inbound_stats[session.rpcs[i].streamID] = session.rpcs[i].stats;
console.log(stats);
}
for (var uuid in session.pcs) {
setTimeout(function(UUID) {

View File

@ -349,6 +349,7 @@
var previousResolution;
eventer(messageEvent, function (e) {
//console.log(e.data);
if ("action" in e.data) {
if (e.data.action == "available-speedtest-servers"){
@ -410,7 +411,7 @@
if (out.split("Bitrate_in_kbps").length > 1) {
for (var key in e.data.stats.inbound_stats[streamID]) {
if (key.startsWith("RTCMediaStreamTrack_receiver")) {
if (key.startsWith("RTCMediaStreamTrack_receiver") || key.startsWith("DEPRECATED_RTCMediaStreamTrack_receiver")) {
var bitrate = e.data.stats.inbound_stats[streamID][key][
"Bitrate_in_kbps"
];