diff --git a/lib/media/track/localmediatrack.js b/lib/media/track/localmediatrack.js index ce9434128..528b3912d 100644 --- a/lib/media/track/localmediatrack.js +++ b/lib/media/track/localmediatrack.js @@ -308,8 +308,10 @@ function restartWhenInadvertentlyStopped(localMediaTrack) { }).catch(error => { log.warn('Failed to detect silence:', error); }).finally(() => { - // Pause the dummy element again. - el.pause(); + // Pause the dummy element again, if there is no processed track. + if (!localMediaTrack.processedTrack) { + el.pause(); + } }); } diff --git a/lib/media/track/localvideotrack.js b/lib/media/track/localvideotrack.js index 601133605..90353f168 100644 --- a/lib/media/track/localvideotrack.js +++ b/lib/media/track/localvideotrack.js @@ -315,9 +315,10 @@ function workaroundSilentLocalVideo(localVideoTrack, doc) { }).catch(error => { log.warn('Failed to detect silence and restart:', error); }).finally(() => { - // If silent frames were not detected, then pause the dummy element again. + // If silent frames were not detected, then pause the dummy element again, + // if there is no processed track. el = localVideoTrack._dummyEl; - if (el && !el.paused) { + if (el && !el.paused && !localVideoTrack.processedTrack) { el.pause(); }