cleanup prep and leave call prep

This commit is contained in:
2026-04-09 16:53:29 -04:00
parent dad5de3d7f
commit dc37933fb8
2 changed files with 46 additions and 28 deletions

View File

@@ -25,7 +25,6 @@ window.setChannelId = function(channelId) {
currentChannelId = channelId;
LogMessage("Channel set to: " + currentChannelId);
};
// let userMedia = getUserMedia()
function LogMessage(msg) {
const messageLog = document.getElementById("messageLog");
messageLog.value += '\r\n' + msg;
@@ -96,7 +95,7 @@ async function ensurePeerConnection() {
peerConnection.onicegatheringstatechange = () => {
LogMessage("ICE gathering state: " + peerConnection.iceGatheringState);
};
}
} //Remove?
async function ensureLocalMedia(forceReload = false) {
const localMediaStatus = document.getElementById("localMediaStatus");
const localVideoStatus = document.getElementById("localVideoStatus");
@@ -239,7 +238,7 @@ async function joinChannelCall() {
// } catch (err) {
// LogMessage("joinChannelCall failed: " + err);
// }
}
} //Combine with channelCallJoin
async function ensurePeerConnection2()
{
@@ -353,6 +352,9 @@ async function IceCandidateAdded(candidate)
}
}
async function RtcLeaveCall()
{}
async function handleRtcSignal(rawJson) {
try {
const msg = typeof rawJson === "string" ? JSON.parse(rawJson) : rawJson;
@@ -442,7 +444,7 @@ async function handleRtcSignal(rawJson) {
} catch (err) {
LogMessage("handleRtcSignal failed: " + err);
}
}
} //Remove?
async function loadDevices() {
try {
@@ -526,7 +528,7 @@ async function waitForIceGatheringComplete(pc) {
pc.addEventListener("icegatheringstatechange", checkState);
});
}
} //Remove?
window.handleRtcSignal = handleRtcSignal;