Most browser video downloaders fall into one of two traps: either they ask you to install a sketchy native desktop helper binary, or they route URLs through a remote server.

When I built VidPocket (published on the Chrome Web Store), I wanted a strict local-first, zero-backend Manifest V3 Chrome extension: no account, no analytics, no remote server, and no external helper app.

Here is how the multi-context architecture works under the hood, and the hardest Manifest V3 constraints I had to solve along the way.

The core problem: every site exposes video differently

A webpage might serve a straightforward MP4/WebM file, an HLS .m3u8 playlist, a temporary blob: URL, or media payloads buried inside platform-specific data responses (as on X and Threads). At the same time, DASH byte-range fragments can look like video requests in network traffic even though they are not complete downloadable files.

On top of that, Manifest V3 imposes strict lifecycle limits:

  • The toolbar popup dies the instant the user clicks away.
  • The extension service worker can be suspended at any time.
  • Heavy media processing cannot safely rely on the popup remaining open.

Context boundaries are the architecture

Instead of stuffing everything into the popup, VidPocket separates responsibilities cleanly across four extension contexts:

  1. Discovery (Content Scripts + MAIN-world Hooks): Scans directly accessible media on the page and parses platform-specific payloads (such as X and Threads) without offering broken byte-range fragments.
  2. Coordination (Service Worker + Storage): Owns the detection list and long-running job state. The toolbar popup is strictly a thin view over stored job state, so closing the popup never interrupts an active download.
  3. Media Processing (Native Downloads vs. Offscreen Document): Direct MP4/WebM files go straight through Chrome's native download API. Supported unencrypted HLS streams are routed into a packaged Offscreen Document.
  4. Local Packaging (mux.js + Bundled FFmpeg WASM): Inside the offscreen processor, VidPocket downloads up to 6 concurrent segments, rejects encrypted/DRM streams explicitly, and transmuxes segments into a clean local MP4 using mux.js or bundled FFmpeg WebAssembly, with AbortController and worker termination wired in for instant cancellation.

Testing the actual output file, not just the button

Media extensions break silently when sites change their DOM or when a stream muxes with missing audio tracks.

VidPocket ships with 11 default unit test suites covering detection, platform hooks, job state, preview matching, and HLS processing, plus an FFmpeg WebAssembly validation suite and live end-to-end tests against Chrome, X, and Threads. Instead of only asserting that a click handler fired, the media tests inspect the actual output container, audio/video streams, and duration.

Explicit boundaries by design

VidPocket handles directly accessible files and supported unencrypted HLS streams only. It intentionally does not bypass DRM, encrypted streams, or access controls. Keeping the scope honest makes the tool predictable, self-contained, and safe to publish cleanly on the Chrome Web Store.

Try it or read the code

Written by Bryce Yu (野生Bryce), independent AI product builder and tech content creator. Explore more tools on GitHub, videos on YouTube, and updates on X.