mute-tab
mute-tab copied to clipboard
Mute state lost after tab discard
A user reports that tabs become unmuted if they are left alone for a while (presumably: discarded by Memory Saver) and then interacted with again. I would assume that Memory Saver tab discards clear the tab mute state, which is probably a bug in Chrome, but is potentially fixable in Tab Muter.
In either case, this needs further investigation (e.g. does it also happen if you mute the tab with chrome://flags/#enable-tab-audio-muting and then unload it?) and potentially a crbug; once resolved, the user should be updated.
This is reproducible with discards via chrome://discards and muting with chrome://flags/#enable-tab-audio-muting; opened https://crbug.com/1420381
As mentioned on the crbug, this is currently an expected problem. It might be fixed in the future, but is not likely to go away soon.
In terms of working around this in Tab Muter, my best guess would be to maintain our own mapping of tab IDs to mute state (or more realistically a set of muted tab IDs), though that relies on tab IDs being reused iff a tab is reopened or undiscarded, and I don't know whether that's the case. Additionally, I'm unsure if there's a good way to persist such a mapping/set, given the new restrictions on extension background scripts/service workers.