mute-tab icon indicating copy to clipboard operation
mute-tab copied to clipboard

Mute state lost after tab discard

Open sersorrel opened this issue 1 year ago • 2 comments

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.

sersorrel avatar Feb 27 '23 22:02 sersorrel

This is reproducible with discards via chrome://discards and muting with chrome://flags/#enable-tab-audio-muting; opened https://crbug.com/1420381

sersorrel avatar Feb 28 '23 21:02 sersorrel

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.

sersorrel avatar Apr 03 '23 23:04 sersorrel