🌐 中文č¯ģč€…č¯ˇįœ‹īŧšã€ŠčŽŠč§†éĸ‘æ‚ŦæĩŽåœ¨ Mac å…¨åąåē”į”¨äš‹ä¸Šã€‹

I do almost all of my work in fullscreen. One Space for my editor, one for the terminal, one for the browser — no title bars, no Dock, no clutter. It is a lovely way to work, right up until the moment I want to watch something while I code.

Picture the scene: I am following along with a conference talk, or keeping half an eye on a Twitch stream, or I just want a little video playing in the corner while I grind through a refactor. On Windows, or on a Mac where nothing is fullscreen, Chrome's built-in Picture-in-Picture handles this perfectly. But the second my editor goes fullscreen, the floating PiP window vanishes behind it. It is still "always on top" — just on top of a different Space. So I built a tool to fix it, and I open-sourced it: FullFloatPiP on GitHub.

Why Chrome's Picture-in-Picture can't float above fullscreen on macOS

I went down a real rabbit hole on this one, because at first it feels like a bug. It is not. It is two design decisions stacking on top of each other.

The first is macOS Spaces. When you send an app fullscreen on a Mac, macOS does not just maximize the window — it moves that app into its own dedicated Space. Your ordinary windows, including Chrome's little PiP popup, live back on the desktop Space. The instant you switch into your fullscreen IDE, anything on the desktop Space is hidden by definition. "Always on top" only means "on top of its own Space," and a fullscreen app is a wall around its own world.

The second is the browser sandbox. For very good security reasons, Chrome is not allowed to create a window at the system level that would be required to sit above a fullscreen application. The browser simply does not have that privilege. So no amount of clever JavaScript or fiddling with a PiP extension can get a Chrome-owned window to float above a fullscreen app — the capability lives below the browser, at the operating-system layer.

I tried every "always on top" utility and PiP extension I could find. They all hit the same wall. The window would behave beautifully until I went fullscreen, and then it was gone.

What I actually wanted

My wish list was short but stubborn:

  • A genuine floating video window that stays visible above a fullscreen IDE or terminal.
  • Cross-Space behaviour, so the window follows me when I switch desktops instead of getting left behind.
  • Support for the sites I actually watch — YouTube, Bilibili, Twitch — not just generic HTML5 video.
  • A clean, borderless look, with playback controls that only appear when I hover.

Nothing out there ticked all four boxes. So one weekend I stopped searching and started building.

Meet FullFloatPiP

FullFloatPiP is the tool I wished already existed: a truly always-on-top floating video window for macOS that stays put even when another app is fullscreen. I can throw a YouTube tutorial into a small window in the corner, send my editor fullscreen, and the video is still right there, floating above everything. People call this "vibe coding" now — fullscreen terminal, a stream or some lo-fi in the corner, zero context switching. That is exactly the workflow it was built for.

How it works under the hood

The trick is to stop asking the browser to do something it is not allowed to do. FullFloatPiP is a hybrid: a Chrome extension plus a small native macOS app written in Swift, talking to each other over Chrome's Native Messaging protocol.

  • The Chrome extension does what the browser is good at: detecting the video on the page (a badge shows how many it found), grabbing the right stream, and handling site-specific quirks.
  • The native Swift app does what the browser is forbidden from doing: it renders the actual floating window as an NSPanel set to the maximum window level, with collection behaviour that lets it appear across all Spaces and above fullscreen apps.

Because that window is created by a native process at the system level — not by the sandboxed browser — it can finally sit exactly where I always wanted it. The video loading is layered, too: it pulls directly from <video> elements where it can, falls back to a small local HTTP server with the right Referer headers for YouTube, uses site-specific embed players for places like Bilibili and Twitch, and full-page loading with JavaScript injection as a last resort.

The features I use every day

  • Floats above everything, including fullscreen apps, and stays visible across Spaces.
  • Clean, borderless window with a YouTube-style control bar that appears on hover: play/pause, seek, a 10-second skip, volume and mute, and a current/total time display.
  • Automatic video detection with a badge showing how many videos are on the page.
  • Aspect-ratio lock while you drag the corners to resize.
  • Position memory between sessions, so it reopens where you left it.
  • Drag the title bar to move it; press ESC to close.

Sites it supports

Out of the box it handles YouTube, Bilibili, Twitch, Youku, iQiyi, Tencent Video, and Douyin, with generic HTML5 video detection as a fallback for everything else.

Getting started

You will need macOS 12 (Monterey) or later, Google Chrome, and Xcode Command Line Tools. Then it is a clone and one script:

git clone https://github.com/Sigmame/full-float-pip.git
cd full-float-pip
chmod +x scripts/install.sh
./scripts/install.sh

The script compiles the Swift app, installs the executables, configures Chrome Native Messaging, and walks you through loading the extension at chrome://extensions. After that: open a supported video site, click the FullFloatPiP icon, pick a video, hit Float, and switch into whatever fullscreen app you like. Full instructions are in the README on GitHub.

What it can't do (yet)

I would rather be honest than oversell it:

  • DRM-protected content (Netflix, Disney+) will not play — Widevine prevents it in the isolated floating window.
  • Some blob: URLs fall back to full-page loading.
  • Cookie/login state is not shared with your main Chrome session.
  • It is macOS only — the whole point is the native window layer, so there is no Windows or Linux build.

It's open source — take it, break it, improve it

FullFloatPiP is MIT-licensed and lives on GitHub. I built it to scratch my own itch, but if you also live in fullscreen and have wanted a video to float above it, it might scratch yours too. If it does, a star helps other people find it, and issues and pull requests are very welcome.

👉 Grab the source here: github.com/Sigmame/full-float-pip

If you have built your whole workflow around fullscreen apps and quietly missed being able to watch things while you work — this is the small tool that gave that back to me. I hope it does the same for you.