Repository navigation
Sonar: a SwiftUI music player with menu bar and notch controls #874
can4hou6joeng4
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I'm building Sonar, a SwiftUI music player for iPhone and Mac. I wanted a small place to search, save a playlist, and listen without opening a full music window each time.
Atoll's notch interaction inspired part of the Mac experience, so I thought this would fit the Show and tell section. Thank you for sharing that work. Atoll is credited in the README; Sonar's views, window controller, and playback implementation are its own.
The Mac app pairs a menu bar library with a compact top player. Both use one playback service and the same library store, so selecting a track or changing its favorite state updates both surfaces. The top player expands on hover and includes artwork, lyrics, seeking, and volume; displays without a notch use a top capsule.
For the source bridge, I adapted the WY/TX portion of lx-music-mobile to JavaScriptCore. The app also has local SwiftData playlists and JSON backup. The iPhone and Mac libraries are independent, with backup files for manual transfer.
The project is still early. It requires iOS 17+ or macOS 14+, and the interface is mainly Chinese. Third-party search and music availability can change. The experimental Mac download is ad-hoc signed and not notarized; source builds and signing details are documented in the README.
I'd appreciate feedback on how the hover expansion and controls work in a small area, especially on displays without a notch. Source, real screenshots, build instructions, and the GPL-3.0/third-party notices are in the repository.
All reactions