Always reset freeze detection on closeVideo

ipad-testing
Noah 2023-08-08 19:09:49 -07:00
parent 0e79788e0f
commit 6572ee2059
1 changed files with 7 additions and 7 deletions

View File

@ -1517,6 +1517,13 @@ const app = Vue.createApp({
);
},
closeVideo(username, name) {
// Clean up any lingering camera freeze states.
delete (this.WebRTC.frozenStreamDetected[username]);
if (this.WebRTC.frozenStreamInterval[username]) {
clearInterval(this.WebRTC.frozenStreamInterval);
delete(this.WebRTC.frozenStreamInterval[username]);
}
if (name === "offerer") {
// We are closing another user's video stream.
delete (this.WebRTC.streams[username]);
@ -1527,13 +1534,6 @@ const app = Vue.createApp({
delete (this.WebRTC.pc[username]);
}
// Clean up any lingering camera freeze states.
delete (this.WebRTC.frozenStreamDetected[username]);
if (this.WebRTC.frozenStreamInterval[username]) {
clearInterval(this.WebRTC.frozenStreamInterval);
delete(this.WebRTC.frozenStreamInterval[username]);
}
// Inform backend we have closed it.
this.sendWatch(username, false);
return;