Instagram Background Play

August 10, 2026 ยท View on GitHub

Instagram Background Play

Keep reels and videos playing when you switch tabs. No more frozen picture-in-picture.

GitHub License GitHub Release Greasy Fork Version Greasy Fork Downloads OpenUserJS

Overview

Instagram on the web pauses whatever you are watching the instant you switch to another tab or window. If your browser has automatic picture-in-picture (like Arc or Chrome's Auto-PiP), you get a frozen preview instead of a playing video.

This is not a bug on Instagram's side, it is deliberate. The page watches for the tab going hidden and pauses playback on purpose.

This user script stops that. Videos and reels keep playing when you switch away, and picture-in-picture stays live.

How it works

Instagram detects you leaving through three channels, and the script defuses each one:

  1. Page Visibility API spoofing: document.visibilityState always reports visible and document.hidden always reports false, so polling never notices you left.
  2. Event interception: visibilitychange, blur, focusout, pagehide and friends are captured at the window level before Instagram's listeners can react.
  3. Pause call filtering: any programmatic pause() fired while the tab is genuinely backgrounded is dropped. Your own pauses still work normally, whether you click the video or use picture-in-picture controls.

No data is collected, nothing leaves your browser, and the script only runs on instagram.com.

Installation

Step 1: Install a user script manager

BrowserManager
Chrome / Arc / Edge / Brave / OperaTampermonkey or Violentmonkey
FirefoxTampermonkey or Violentmonkey
SafariUserscripts

Important

On Chromium-based browsers (Chrome, Arc, Edge, Brave), Tampermonkey needs the Allow User Scripts toggle (or Developer mode on older versions) enabled on the extensions page, otherwise scripts silently never run. See the Tampermonkey FAQ.

Step 2: Install the script

One-click (recommended):

Get it on Greasy Fork Get it on OpenUserJS

Manual: click this link and your script manager will prompt you to install:

https://raw.githubusercontent.com/Zingzy/instagram-background-play/main/instagram-background-play.user.js

Updates are automatic either way. The script declares @updateURL, so your manager checks this repository for new versions on its own.

Usage

There is nothing to configure. Open Instagram, play a reel or video, switch tabs. It keeps playing.

Pairs well with automatic picture-in-picture:

  • Arc: built in, kicks in on tab switch automatically
  • Chrome: enable Auto-PiP in Settings > Site settings > Additional permissions > Automatic picture-in-picture

Caveats

  • Instagram believes the tab is always active. If you leave a DM conversation open in a backgrounded tab, read receipts may fire while you are away.
  • The script is intentionally scoped to instagram.com only. Sites legitimately use the visibility API to save battery, so a blanket override for every site is a bad idea.

Contributing

Issues and pull requests are welcome. If Instagram ships a change that breaks the script, please open an issue with your browser and script manager versions.

License

MIT