A minimal distraction free macOS YouTube player built with SwiftUI and WKWebView, using the YouTube iframe API. I use this to listen to music when I need to focus and can't afford getting distracted.
- Playback control: Play, pause and seek (told you it was minimal)
- Video list: Manage a library of videos to play
- Persistence: Video URLs stored locally in UserDefaults
- macOS 14.0+
- Xcode 15+
- Open
NullStream.xcodeprojin Xcode - Select the NullStream scheme
- Build and run (⌘R)
To build a release and install it to /Applications, run make install (quit the app first). This runs:
xcodebuild -project NullStream.xcodeproj -scheme NullStream -configuration Release -derivedDataPath build.noindex build rm -rf /Applications/NullStream.app cp -R build.noindex/Build/Products/Release/NullStream.app /Applications/
Note this only works on the machine it was built as it's signed with "Sign to Run Locally".
- Add a video: Click "Add URL" and paste a YouTube URL (e.g.
https://www.youtube.com/watch?v=dQw4w9WgXcQ) - Play/Pause: Use the control bar, the Space key, the media keys or the macOS Now Playing menu bar item
- Left pane: Toggle the sidebar to show/hide your saved video list
- Open new video: Click a video in the list, or add a new one with "Add URL"
- Reset player: If YouTube refuses to play, use Playback → Reset Player (this also happens automatically on recoverable errors and after waking from sleep)
