←back to thread

46 points whatsthatabout | 3 comments | | HN request time: 1.572s | source

AutoPiP is a Safari extension that automatically enables Picture-in-Picture mode when switching tabs and disables it when returning to the video tab. No clicks needed - just seamless multitasking while watching videos.

Key features: • Automatic PiP activation when switching tabs • Smart detection for active videos only • Seamless disable on tab return • Zero configuration needed

GitHub: https://github.com/vordenken/AutoPiP

Show context
whatsthatabout ◴[] No.42254880[source]
As stated in the readme, 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!
replies(2): >>42258637 #>>42258894 #
1. bsimpson ◴[] No.42258894[source]
I'm surprised to see native code in a web extension.
replies(1): >>42258952 #
2. dangus ◴[] No.42258952[source]
Safari doesn’t use the same extension architecture as Chrome and Firefox.

https://developer.apple.com/documentation/SafariServices/saf...

replies(1): >>42259516 #
3. whatsthatabout ◴[] No.42259516[source]
Thats true, but in the end the web extension itself can work with all browsers (if the apis are implemented of course). AutoPiP for example would work without any modifications in chrome/firefox but they implement their own PiP api so it doesn't activate the macOS native one...