fix for self deployment; shouldn't be showing wss

This commit is contained in:
steveseguin 2022-12-11 15:20:55 -05:00
parent 60822c80a8
commit 717e4e5457
4 changed files with 16 additions and 15 deletions

View File

@ -2334,6 +2334,6 @@
// 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=510"></script>
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=511"></script>
</body>
</html>

23
lib.js
View File

@ -2597,7 +2597,7 @@ function setupIncomingScreenTracking(v, UUID){ // SCREEN element.
if (session.director){
var wss = "";
if (session.customWSS){
if (session.customWSS && session.wssSetViaUrl){
if (session.customWSS!==true){
wss = "&pie="+session.customWSS;
} else {
@ -12381,7 +12381,7 @@ function soloLinkGenerator(streamID, scene=true){
}
var wss = "";
if (session.customWSS){
if (session.customWSS && session.wssSetViaUrl){
if (session.customWSS!==true){
wss = "&pie="+session.customWSS;
} else {
@ -14041,7 +14041,7 @@ async function createRoomCallback(passAdd, passAdd2) {
}
var wss = "";
if (session.customWSS){
if (session.customWSS && session.wssSetViaUrl){
if (session.customWSS!==true){
wss = "&pie="+session.customWSS;
} else {
@ -19815,7 +19815,6 @@ function setEncodings(sender, settings=null, callback=null){
sender.setParameters(params).then(() => {
if (callback){
log(callback);
setTimeout(function(){callback();},0);
}
log("COMPLETED SET ENCODINGS");
@ -19862,27 +19861,27 @@ session.applySoloChat = function(apply=true){ // mutes outbound mic audio; ;; d
if (session.soloChatUUID.length && (session.soloChatUUID.includes(uuid))){
settings.active = true;
setEncodings(sender, settings, (function(){
setEncodings(sender, settings, function(){
log(uuid);
document.querySelectorAll('[data-action-type="solo-chat"][data--u-u-i-d="'+uuid+'"]')[0].classList.add("pressed");
document.querySelectorAll('[data-action-type="solo-chat"][data--u-u-i-d="'+uuid+'"]')[0].classList.remove("hint");
}.bind(uuid))());
}.bind(uuid));
} else if (session.soloChatUUID.length==0){
settings.active = true;
setEncodings(sender, settings, (function(){
setEncodings(sender, settings, function(){
log(uuid);
document.querySelectorAll('[data-action-type="solo-chat"][data--u-u-i-d="'+uuid+'"]')[0].classList.remove("pressed");
document.querySelectorAll('[data-action-type="solo-chat"][data--u-u-i-d="'+uuid+'"]')[0].classList.remove("hint");
}.bind(uuid))());
}.bind(uuid));
} else {
settings.active = false;
setEncodings(sender, settings, (function(){
setEncodings(sender, settings, function(){
warnlog("mutied the output to:"+ uuid);
document.querySelectorAll('[data-action-type="solo-chat"][data--u-u-i-d="'+uuid+'"]')[0].classList.remove("pressed");
document.querySelectorAll('[data-action-type="solo-chat"][data--u-u-i-d="'+uuid+'"]')[0].classList.add("hint");
}.bind(uuid))());
}.bind(uuid));
}
});
@ -21313,7 +21312,7 @@ function updateReshareLink(){
}
var wss = "";
if (session.customWSS){
if (session.customWSS && session.wssSetViaUrl){
if (session.customWSS!==true){
wss = "&pie="+session.customWSS;
} else {
@ -26397,7 +26396,7 @@ function generateQRPageCallback(hash) {
var wss = "";
if (session.customWSS){
if (session.customWSS && session.wssSetViaUrl){
if (session.customWSS!==true){
wss = "&pie="+session.customWSS;
} else {

View File

@ -1448,6 +1448,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
// Deploy your own handshake server for free; see: https://github.com/steveseguin/websocket_server
if (urlParams.has('pie')){ // piesocket.com support is to be deprecated after dec/19/21, since piesocket is no longer a free service.
session.customWSS = urlParams.get('pie') || true; // If session.customWSS == true, then there is no need to set parameters via URL
session.wssSetViaUrl = true;
if (session.customWSS && (session.customWSS!==true)){
session.wss = "wss://free3.piesocket.com/v3/1?api_key="+session.customWSS; // if URL param is set, it will use the API key.
}
@ -1695,7 +1696,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
fakeElement.id = parseInt(Math.random() * 10000000000);
session.fakeFeeds.push(fakeElement);
}
if (session.view!==false){
if (session.view!==false || session.scene!==false){
setTimeout(function(){updateMixer();},1000);
}
}
@ -3422,6 +3423,7 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
if (urlParams.has('wss')) {
session.customWSS = true;
session.wssSetViaUrl = true;
if (urlParams.get('wss')) {
session.wss = urlParams.get('wss');
if (!session.wss.startsWith("wss://")){

File diff suppressed because one or more lines are too long