pass &trb=desktop,mobile bitrates

This commit is contained in:
steveseguin
2023-09-27 03:17:03 -04:00
parent 7694dec33a
commit 1a6378edbb
2 changed files with 15 additions and 5 deletions

View File

@@ -2630,11 +2630,11 @@
// session.hidehome = true; // If used, 'hide home' will make the landing page inaccessible, along with hiding a few go-home elements.
// session.record = false; // uncomment to block users from being able to record via vdo.ninja's built in recording function
</script>
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=915"></script>
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=916"></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>
-->
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=734"></script>
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=736"></script>
</body>
</html>

16
main.js
View File

@@ -3195,8 +3195,18 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
}
if (urlParams.has('totalroombitrate') || urlParams.has('totalroomvideobitrate') || urlParams.has('trb') || urlParams.has('totalbitrate') || urlParams.has('tb')) {
session.totalRoomBitrate = urlParams.get('totalroombitrate') || urlParams.get('totalroomvideobitrate') || urlParams.get('trb') || urlParams.get('totalbitrate') || urlParams.get('tb') || 0;
session.totalRoomBitrate = parseInt(session.totalRoomBitrate);
session.totalRoomBitrate = urlParams.get('totalroombitrate') || urlParams.get('totalroomvideobitrate') || urlParams.get('trb') || urlParams.get('totalbitrate') || urlParams.get('tb') || "";
if (session.totalRoomBitrate.split(",").length>1){
if (session.mobile){
session.totalRoomBitrate = session.totalRoomBitrate.split(",")[1];
} else {
session.totalRoomBitrate = session.totalRoomBitrate.split(",")[0];
}
}
session.totalRoomBitrate = parseInt(session.totalRoomBitrate) || 0;
if (session.totalRoomBitrate < 1) {
session.totalRoomBitrate = 0;
@@ -4952,7 +4962,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
//if (!session.flagship && session.mobile && (session.limitTotalBitrate===false)){
// session.limitTotalBitrate = session.totalRoomBitrate_default; // 500, with the max per guest stream out at maxMobileBitrate (350kbps) or 35-kbps if more than X in the room.
//}
if (urlParams.has('maxmobilebitrate')) {
session.maxMobileBitrate = parseInt(urlParams.has('maxmobilebitrate')) || 0;
}