Pause YouTube player when page is hidden and resume when it is active again!
Automatically pause the YouTube tab when the tab is hidden
Automatically resume the YouTube player when that gets focused
Can get disabled from the action button.
How it works:
Only on YouTube pages, a very tiny script is injected, which controls the player's playing state based on document visibility status. When a YouTube tab is brought to the front, the player automatically resumes exactly like pressing the play button, and when the document is hidden, the player will automatically pause exactly like when the pause button is pressed.
Sample Use Case:
Having multiple YouTube players on different tabs. When a tab is focused, only the active player is playing, and all other players will go to the pause state.
For FAQs and other useful YouTube enhancer extensions please visit:
0.1.1: It is possible to disable and re-enable the extension from the toolbar button. This is useful when you want to listen to YouTube videos in a background tab.
0.2.0: It now uses manifest v3. You need Chrome "95" or greater to update to this version.