Theseus: a background tab that is playing sound is not frozen
Freezing background tabs stopped music and talks the moment you switched to another tab, which no other browser does. A tab that is audible when its freeze is due is checked again later and frozen only once it falls quiet.
This commit is contained in:
parent
449a967e21
commit
a5ce638848
1 changed files with 3 additions and 0 deletions
3
main.js
3
main.js
|
|
@ -3539,6 +3539,9 @@ function scheduleFreeze(tab) {
|
|||
if (!settings.freezeBackgroundTabs || tab.keepRunning || tab.pending || !tab.url || tab.id === activeId) return;
|
||||
tab.freezeTimer = setTimeout(() => {
|
||||
if (tab.id === activeId || !tabs.includes(tab) || tab.keepRunning || tab.pending || tabHasPendingDialog(tab.id)) return;
|
||||
// A tab playing sound (music, a talk) keeps playing, as in any browser;
|
||||
// check again later and freeze it once it falls quiet.
|
||||
try { if (tab.view.webContents.isCurrentlyAudible()) { scheduleFreeze(tab); return; } } catch {}
|
||||
setTabFrozen(tab, true);
|
||||
}, FREEZE_GRACE_MS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue