Skip to content
HiroykiPublic

About

Youtube's Player for Everyone

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

PLAY. YouTube, without the ads.

Download Play  See it move  Look inside

Play opens YouTube videos in its own window and plays the media stream directly, so pre-roll and mid-roll ads are never requested. It runs on one PC, keeps your data there, and needs no account.

Intro film: the PLAY logo draws itself, opens into animated films, and shows the app

0 ads requested. 4K in AV1 and H.264. 0 ms stall on quality switch. 60 KB app window.

Important

Play is for personal use. Fetching streams directly is against the YouTube Terms of Service, so do not host it publicly.

  See it move

A thumbnail grows into the player, then shrinks into a corner player
It follows you
The thumbnail becomes the player, and the player shrinks into the corner while you browse.
Previews appear along the seek bar, then the quality menu switches to 2160p
Scrub with pictures
Previews along the seek bar. Switching from 360p to 2160p caused 0 ms of rebuffering in testing.
The search box opens, suggests titles, and shows results
Search from anywhere
Press /, type, or paste a YouTube link.
Slowest start in testing: 1.6 seconds when you hover first, 12.6 seconds when you click cold
Hover first, start sooner
Play prepares a video under the pointer. The bars run in real time and show the slowest start of each kind in testing.

  What you get

Home page
Home
Highlights with silent previews, continue watching, and a shelf for the time of day.
Watch page
Watch
Soft light follows the picture. Subtitles, chapters, speed, resume, live.
Weekly rankings and topics
Explore
Weekly rankings and nine topics.
Channel page
Channels
Videos, live streams, playlists, and one page for subscriptions.
Quality menu
Up to 4K
AV1 where the hardware decodes it efficiently, H.264 otherwise.
Settings page
Your data
One file on your PC, with daily backups, export, and import.

Sponsor segments that creators record into a video are part of the stream and still play.

  Install

  1. Download Play-Setup-<version>.exe from Releases.
  2. Check that its SHA-256 matches the one in the release notes.
  3. Run it. If SmartScreen shows "Windows protected your PC", choose More info, then Run anyway.
  4. Follow the wizard: Next, choose a folder, Install, Finish. No administrator rights are needed; the default folder is %LOCALAPPDATA%\Programs\Play.

Requirements: 64-bit Windows 11, where Play is tested. Windows 10 is untested and needs the WebView2 Runtime.

If the PC has no yt-dlp, Play downloads the official release on first start, about 23 MB, and verifies its SHA-256 before using it. A video opened during the download waits and then starts by itself.

Note

The installer is not code-signed. SmartScreen warns about it, and Smart App Control, where it is on, can block it without a way to continue.

To remove Play, use Settings > Apps. Your data stays in %LOCALAPPDATA%\Play.

Mac

  1. Download the .dmg from Releases: arm64 for Apple Silicon, x64 for Intel.
  2. Check that its SHA-256 matches the one in the release notes.
  3. Open it and drag Play to Applications.
  4. The app is not signed by Apple, so macOS blocks the first start. Allow it in System Settings > Privacy & Security > Open Anyway.

To build it yourself, you need Node.js 22 or later and the Command Line Tools (xcode-select --install):

bash mac/build.sh

Requirements: macOS 13.5 or later. Tested on macOS 15.5 with an M1; the Intel build has only been started under Rosetta. Data and logs stay in ~/Library/Application Support/Play; to remove Play, drag it to the Trash. If the Mac has no yt-dlp, Play downloads the official release on first start, about 54 MB. open -a Play <YouTube link> opens a link.

Android

  1. Download Play-<version>.apk from Releases on the phone.
  2. Check that its SHA-256 matches the one in the release notes.
  3. Open it and allow installing from that source. If Play Protect warns, choose More details > Install anyway.

Requirements: Android 8 or later with an up-to-date Android System WebView. Tested on one Android phone and on an Android emulator (API 37); older versions are untested. Share a link from another app to Play to open it. In Android Auto, Play appears as a media app and plays the sound only, because Android Auto does not allow video from the phone; for a sideloaded copy, turn on Unknown sources in the Android Auto developer settings. Data stays in the app and is removed with it, so export it in Settings first.

The app is under 1 MB because it carries no Node.js and no yt-dlp. The same server code runs in the WebView that comes with Android, and stream addresses come from youtubei.js. When YouTube changes, a new version of the app is needed.

To build it yourself, you need Node.js 22 or later, a JDK 17 or later, and the Android SDK with Platform 36:

bash android/build.sh

Above 1080p, Play needs AV1, which Safari's engine plays only on Macs that decode it in hardware (M3 and later). Other Macs get H.264 up to 1080p.

Run from source instead

You need Node.js 22 or later and yt-dlp on PATH.

npm install
npm start

Open http://localhost:4321. This copy keeps its data in data, separate from an installed copy. To move between the two, use Export and Import in Settings.

  Look inside

Play.exe talks to a local server on your PC. The server uses yt-dlp and library.json, asks YouTube for search and channels, and relays media from googlevideo.com.

Play.exe starts the server on a loopback port and stops it on exit, even after a crash. The server finds stream addresses with yt-dlp, reads the MP4 index, and serves a DASH manifest, so the player requests only the byte ranges it needs.

What happens when you press play
sequenceDiagram
  autonumber
  participant P as Player
  participant S as Local server
  participant Y as yt-dlp
  participant G as googlevideo.com
  P->>S: Play this video
  S->>Y: Find stream addresses
  Y-->>S: Formats, captions, chapters
  Note over S: Wait until YouTube<br/>activates the addresses
  S->>G: First 4 KB of each format
  G-->>S: MP4 index
  S-->>P: DASH manifest
  loop While playing
    P->>S: Next byte range
    S->>G: Same range
    G-->>P: Media, relayed
  end
Loading
Privacy and security
  • The server listens on 127.0.0.1 and rejects requests with a foreign Host or Origin.
  • The media proxy accepts only video IDs and googlevideo.com addresses.
  • Text from YouTube is inserted as text, never as HTML, under a content security policy.
  • The app contacts YouTube and its image hosts, PyPI to check the yt-dlp version, and GitHub when it installs yt-dlp.
Project layout
Path Contents
server/youtube.js Search, channels, playlists, comments, home page
server/stream.js Stream lookup, DASH and HLS, media proxy, subtitles
server/ytdlp.js Finding, installing, and updating yt-dlp
server/library.js User data, backups, import
public Interface; plain JavaScript and CSS with no build step
windows/Play.cs Native window and server lifecycle
windows/Setup.cs Installer
mac/Play.swift Native Mac window and server lifecycle
mac/guard.mjs Stops the server when the Mac app exits or crashes
android/src Android window, loopback server, and media notification
android/engine Runs server inside a WebView, and replaces yt-dlp
Configuration
Variable Default Usage
PORT 4321 Server port
PLAY_LIBRARY data/library.json User data file; backups go to cadangan beside it
PLAY_BIN data/bin Where Play stores its own yt-dlp
PLAY_INSTALLED unset When set, a missing yt-dlp is installed on start
PLAY_YTDLP_URL latest yt-dlp release on GitHub Download source for yt-dlp
YTDLP unset Path to a specific yt-dlp
Build it yourself

The build uses csc.exe, the C# compiler included with Windows, and the Microsoft.Web.WebView2 SDK from the NuGet cache. It stops if a WebView2 file is not signed by Microsoft.

Command Output
powershell -ExecutionPolicy Bypass -File windows\build.ps1 Play.exe in the repository root
powershell -ExecutionPolicy Bypass -File windows\installer.ps1 dist\Play-Setup-<version>.exe

On a Mac, bash mac/build.sh makes dist/Play.app and dist/Play-<version>-<arch>.dmg; ARCH=x64 bash mac/build.sh builds for Intel. It bundles the official Node.js and stops if its checksum or signature is wrong.

The version comes from package.json. The installer script also stops if user data ends up in the package.

  Keys

Keyboard with shortcuts lighting up. Space or K plays, J and L jump, number keys jump through the video, F is full screen, T wide mode, I picture in picture, M mute, C subtitles, Shift N next, slash search.

Every shortcut as a list
Playback Navigation
Space K Play or pause / Search
J L 10 seconds back or forward Ctrl K Search, in the app
← → 5 seconds back or forward Alt ← → Back or forward, in the app
↑ ↓ Volume Shift N Next video
0 to 9 Jump to 0% to 90% F Full screen
< > Speed T Wide mode
M Mute I Picture in picture
C Subtitles F5 F11 Reload, full screen, in the app

  Questions

Why does a video sometimes take several seconds to start?

YouTube activates some stream addresses a few seconds after issuing them, and Play waits for that moment. Resting the pointer on a video first hides most of the wait.

A video stopped playing. What now?

YouTube changes often, and yt-dlp follows. Open Settings, which shows when a newer yt-dlp exists and can update the copy Play installed.

What does not work?
  • Private, members-only, and age-restricted videos, because Play does not sign in to YouTube.
  • Shorts are hidden from lists, but a Shorts link opens normally.
  • The interface is in Indonesian only.
Can I open it on my phone?

No. The server accepts connections only from the PC it runs on.

  License

Play is source-available under the PolyForm Noncommercial License 1.0.0: use, change, and share it for noncommercial purposes. The license covers Play itself; the libraries it uses keep their own licenses, and the YouTube Terms of Service still apply.

Thumbnails rush past and assemble into the PLAY logo

Star it  Report a bug  Back to top

Built with yt-dlp, YouTube.js, Shaka Player, Express, and Instrument Sans.
The film, demos, and screenshots show open movies by the Blender Foundation, licensed CC BY: Big Buck Bunny, Sintel, Tears of Steel, Spring, Coffee Run, Sprite Fright, Charge, Agent 327, and Wing It!
Play is not affiliated with YouTube or Google.

About

Youtube's Player for Everyone

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages