Bugfix with freeze video interval

This commit is contained in:
Noah 2023-09-13 22:31:24 -07:00
parent b7dc4c8df6
commit d651f96678

View File

@ -1373,6 +1373,11 @@ export default {
videoTrack.onmute = freezeDetected; videoTrack.onmute = freezeDetected;
// Double check for frozen streams on an interval. // Double check for frozen streams on an interval.
if (this.WebRTC.frozenStreamInterval[username]) {
// Clear the existing interval (e.g. audio+video track sets up the
// interval twice right now, don't overwrite and lose the interval)
clearInterval(this.WebRTC.frozenStreamInterval[username]);
}
this.WebRTC.frozenStreamInterval[username] = setInterval(() => { this.WebRTC.frozenStreamInterval[username] = setInterval(() => {
if (videoTrack.muted) freezeDetected(); if (videoTrack.muted) freezeDetected();
}, 3000); }, 3000);