A Safari extension that automatically enables Picture-in-Picture (PiP) mode for videos when switching tabs and disables it when returning to the video tab.
Note: This is my first coding project using Swift and Xcode. As a beginner, I welcome any help, suggestions, or contributions to improve the code and functionality
- Automatic PiP: Automatically enables Picture-in-Picture mode when switching away from a tab with a playing video
- Smart Detection: Only activates PiP for actively playing videos
- For Youtube: Automatically enable PiP when scrolling to Youtube comments
- Auto Disable: Automatically disables PiP when returning to the video tab
- Wide Compatibility: See Compatibility Status for more information
- Download the latest release here
Platform | Notes |
---|---|
YouTube | ✅ |
Twitch | ✅ |
Disney+ | ✅ |
Paramount+ | ✅ |
Amazon Prime Video | ❌ |
Apple TV+ | ❌* |
Netflix | |
MAX |
*AppleTV opens the app instead of launching in Safari.
- All HTML5 video players should theoretically work
- Some streaming services may require additional authentication or have DRM restrictions
- Compatibility may vary depending on Safari and macOS versions
This compatibility list will be updated as more platforms are tested. Please report your experiences with other video platforms through issues on GitHub.
- The extension works automatically when enabled
- PiP will activate automatically when:
- A video is actively playing including audio
- You switch to another tab/app
- You scroll down to the comments of a youtube video
- PiP will deactivate automatically when:
- You return to the video tab
- You scroll back up to the youtube video
If you find this extension helpful, consider supporting its development:
- macOS 14 or later
- Safari 16 or later
This extension is built using:
- Swift
- JavaScript
- Safari Web Extension API
- Only tested on macOS 15.1
- Code might need optimization (beginner project)
- Implement toolbar icon toggle functionality
- Test with other video platforms
- Test on different macOS versions
- Add visual status indication
- Code optimization and cleanup
- Improve documentation
- Publish the app via the App Store
As this is my first Swift/Xcode project, I'm particularly open to:
- Code reviews and suggestions
- Best practices advice
- Feature improvements
- Bug reports and fixes
- Documentation improvements
All contributions are welcome! Feel free to submit issues and pull requests.
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.
AutoPiP respects your privacy and does not collect any personal data. For more information, see our Privacy Policy.
- Inspired by various PiP extensions
- Built with Safari Web Extension technology
- Thanks to the Swift and Safari development community for resources and documentation
- Updater using Sparkle
- Icons by icons8
vordenken