Desktop app

FloatTube

A YouTube window for macOS that floats above everything else

Safari has a picture-in-picture mode, but it only works while audio is playing. That rules out the thing I actually want: a video parked in the corner of a screen while I work on something else, muted or not, staying put no matter which desktop I switch to.

FloatTube is a single window that does one thing. It opens straight to YouTube, sits above every other window, and follows you across desktops. You sign in with your normal Google account and it stays signed in.

Parking it somewhere useful

The titlebar has a snap button that throws the window flush into the top-right corner. Clicking it again cycles through smaller sizes, so getting from “watching properly” to “tucked out of the way” is one click rather than a drag and a resize.

Two other controls matter when a window lives permanently on top of your work. Opacity turns it down when it’s overlapping something you need to read, and click-through makes it inert so you can select and click straight through it. Since a click-through window can’t be clicked to turn it off again, the menu bar icon is the way back.

How it works

It’s a WKWebView in an NSPanel, which is the whole trick. A panel at floating level with canJoinAllSpaces gets you always-on-top and every-desktop behaviour for free, and nonactivating means clicking the video doesn’t steal focus from your editor.

The fiddly part is Google. Sign-in is refused from anything that looks like an embedded webview, so the app presents a Safari user-agent — without it you get “this browser or app may not be secure” and no way in. The session lives in a persistent data store keyed to the bundle identifier, which is also why the app is ad-hoc signed on every build: an unstable identity throws the cookies away and logs you out.

One design note that cost me a window. Closing used to quit the app, and on a utility-style panel the close button is small and sits exactly where you grab to drag the window into a corner. A slightly-off click made the whole thing vanish with no crash log and nothing to find. Closing now hides instead, and the menu bar icon always gets it back.

Getting it

Builds are universal, signed and notarised, so it installs like any other app:

git clone https://github.com/torbensko/float-tube
cd float-tube && ./install.sh

Or grab the DMG from the releases page.