This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Universal Video Autoplay Preference Memory

Utilities · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryUtilities
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script scans the page for video elements—video tags, audio tags, and iframes with video sources like YouTube, Vimeo, and Twitch—and detects their autoplay settings and current play state. It displays a floating panel allowing you to set a global autoplay preference: Allow Autoplay, Block Autoplay, or Ask. This preference is applied to all videos on the page and stored per domain so it persists across visits. For each detected video, the panel shows its source, current autoplay status, and allows individual overrides. When set to "Block Autoplay," the script pauses any videos that start playing automatically and prevents them from playing until you click play. When set to "Ask," a confirmation prompt appears before any video autoplays, allowing you to decide per video.

WHERE IT RUNS

Works on any webpage with video content—news sites, blogs, social media, video platforms, or any page with embedded videos. The script detects video elements, iframes with video sources, and common embedded players, making it compatible with most video-heavy websites.

HOW TO USE

The panel appears automatically when you visit a page with videos. Choose your preference: "Allow Autoplay" to let videos play automatically, "Block Autoplay" to prevent all autoplay, or "Ask" to confirm before each video plays. The preference is saved for the current domain and applied to all videos. The "Videos" section shows each detected video with its label, current status (Allowed/Blocked/Ask), and whether it has autoplay enabled. Click "Apply to All" to reapply the current preference to all videos. Use "Clear Overrides" to remove any per-video overrides. Each video can be individually overridden by responding to the "Ask" prompt—you can choose to allow or block that specific video and remember your choice for future visits. The script automatically detects new videos added to the page (e.g., in infinite scroll feeds) and applies the preference.

TECHNICAL MECHANISM: VIDEO ELEMENT DETECTION WITH AUTOPLAY ATTRIBUTE HANDLING AND PLAY EVENT INTERCEPTION

The script scans the DOM for video, audio, and iframe elements. For iframes, it checks the src attribute for video platform indicators (youtube.com, vimeo.com, twitch.tv, player, embed). For each video element, it detects the autoplay attribute and property, muted status, and paused/playing state. The preference is stored per domain using GM_setValue with three states: "allow," "block," and "ask." When "block" is active, the script removes the autoplay attribute, sets autoplay to false, and attaches a "play" event listener that pauses the video immediately and shows a visual indicator. When "ask" is active, the script pauses the video on play attempts and shows a confirmation dialog using confirm(). If the user approves, the video plays; if they decline, it stays paused. Users can choose to remember their choice, which stores a per-video override using a generated video ID based on src, poster, or element ID. The script uses a MutationObserver to detect new videos added to the page and applies the preference automatically. A rebuild panel function refreshes the UI when preferences change.

THE PANEL

The autoplay preference panel appears in a draggable, resizable panel that remembers its position per site. The panel shows preference buttons, current preference display, a list of detected videos with statuses, and control buttons. Drag by the header to reposition, collapse to a compact icon with a click, and resize using the bottom-right corner. The panel snaps to screen edges for tidy placement and closes with the Escape key. All settings—panel position—persist per website using GM_setValue, so your view returns exactly as you left it.

PLEASE NOTE

This script requires the free BotGentz extension to run. The script intercepts video play events to enforce preferences, which may interfere with some video player controls or custom JavaScript. The "Ask" mode uses confirm() dialogs, which may be disruptive on pages with many videos. The script does not block autoplay for audio-only elements by default but detects them. Per-video overrides are stored using a generated ID based on the video source or element properties; videos with identical sources may share overrides. The MutationObserver watches for new videos but may miss videos added via complex JavaScript frameworks. All data is stored locally in your browser via GM_setValue and never transmitted.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.