Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Child tabs don't mute on parent mute if not playing sound #3400

Closed
rixx opened this issue Oct 15, 2023 · 3 comments
Closed

[Bug] Child tabs don't mute on parent mute if not playing sound #3400

rixx opened this issue Oct 15, 2023 · 3 comments

Comments

@rixx
Copy link

rixx commented Oct 15, 2023

Abstract

As per #2486, child tabs should get (un)muted when they are collapsed and their parent tab is (un)muted. However, the muting only works for me if they are currently playing a sound. If Firefox does not show the mute button on the tab (e.g. when a video is paused), child tabs do not get muted.

Use case: opening a bunch of pages with video and pausing everything immediately, as not to miss anything; then muting tabs to make sure no sound will play (faulty auto-play etc is my nemesis).

Steps to reproduce

  1. have a parent tab and one or two child tabs, each with a youtube video
  2. pause videos in child tabs
  3. (optional) you may have to tab in and out a bit until the volume indicator disappaears
  4. select parent
  5. collapse tree
  6. mute parent
  7. expand tree: children are not muted

If you do the same while the child videos are playing, mute/unmute propagates.

Expected result

Mute the tabs even if they are not playing sound at that moment.

Environment

  • Platform (OS): Linux
  • Version of Firefox: 120.0a1 (2023-10-11) (64-bit)
  • Version (or revision) of Tree Style Tab: 3.9.17
piroor added a commit that referenced this issue Oct 30, 2023
@piroor
Copy link
Owner

piroor commented Oct 30, 2023

I'm negative to change the behavior of the "sound playing" icon on TST tree items.

Behaviors of the sound playing button and "Mute/Unmute Tab" context menu commands on Firefox's native tabs are:

1a. "Mute/Unmute Tab" context menu commands affect to the target tab whether the tab is sound-playing or not.
2a. The sound playing button is shown on a sound playing tab. Clicking on the button mutes the tab, and clicking again unmutes the tab.
3a. On recent versions of Firefox, the button is shown on "ready to play sound" tabs (e.g. YouTube tabs opened in the background) also. Clicking such a "ready to play" button starts playing sound of the tab.

On the other hand, the sound playing button and "Mute/Unmute Tab" context menu commands in TST are:

1b. "Mute/Unmute Tab" context menu commands affect to the target individual tab whether the tab is sound-playing or not. This is compatible to Firefox's native commands.
2b. The sound playing button is shown on a sound playing tab or the parent of a collapsed tree containing sound playing descendant. Clicking on the button mutes the sound playing tab, and clicking again unmutes the tab.
3b. "Ready to play sound" button never appear on TST tabs because Firefox does not expose such a state of tabs to addons via WebExtensions API.

The actual result you saw is from the behavior 2b. It is by design. I think it is most natural behavior of the button on TST's tree because the sound playing button on Firefox's native tabs does not provide ability to mute non-sound-playing tabs.

However I agree that there is demand to mute whole tree. Thus I've added new context menu commands "Mute/Unmute this Tree" and "Mute/Unmute Descendants". I hope these commands help you.

@rixx
Copy link
Author

rixx commented Oct 31, 2023

Thank you, yes, that added context menu will do the trick.

Just to explain my original reasoning (and why I still think that the behaviour is bug-alike, but certainly not a priority to fix): I think the discrepancy in expectation comes from the fact that you can mute a tab with Ctrl-m at all times, so I never use the actual button, and I was confused when two actions that have the same result in vanilla (button click / C-m both mute a tab) did not have the same result in TST.

@rixx rixx closed this as completed Oct 31, 2023
@piroor
Copy link
Owner

piroor commented Nov 1, 2023

Thank you for explanation!

Ctrl-M is processed by Firefox itself and it corresponds to the "Mute/Unmute Tab" command in the context menu. When you mainly see TST's sidebar, it works like as "Mute/Unmute the active individual tab". I also introduced keyboard shortcut slots for newly added commands so using them instead of Ctrl-M may reduce confusions like yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants