-
Notifications
You must be signed in to change notification settings - Fork 6
Home
NDevTK edited this page Mar 31, 2024
·
13 revisions
Welcome to the AutoPause wiki!
- If theirs a play event from the active, last active with media or the mediaPlaying tab or its trusted, Then make the tab top priority and if its audible pause all other media.
- If theirs a pause event from the mediaPlaying tab send a play message to the last played tab.
- If a tab is muted and hidden pause.
- If theirs no message from the content script and a tab is audible there maybe no permission so disable automatic resume.
- If nopermission mode discard tabs instead of pause including otherTabs (if not ignored)
- Keep track of the tab state as to not send messages repeatably.
- When theirs a message from the background control the media by changing the playbackRate this works without breaking the autoplay rules.
- If all media on a tab is paused or the playbackRate is 0 send a pause message to background.
- If all media on a tab is muted send a message to background.
When a HTMLMediaElement gets played and it does not exist in the DOM add it to a hidden head div and remove it on pause.
CSP: "default-src 'none'; script-src 'self'; frame-ancestors 'none'; form-action 'none'; upgrade-insecure-requests; block-all-mixed-content"
All permissions are optional and should always be requested by the user in the options page.
https://github.com/NDevTK/AutoPause/actions/workflows/builds.yml