nuclear
nuclear copied to clipboard
Menu Bar Issues
Platform: Mac: macOS Sonoma 14.5 Nuclear version: 0.6.31 Description of the issue: The Nuclear app does not support the music player in the top menu bar on Mac.
Do you mean this thing that appears when you click the icon with black and white bars?
Yes, although from my perspective, it looks like this.
Hey there - wanted to follow up on this one and try and fix the media controls for macOS.
As of latest Nuclear release (0.6.39), on macOS Sequoia 15.0, the media player does not display Album art, current playback status, timestamps, or previous/next track controls. On my end, this is how it looks:
Ideally, when playing a song in Nuclear, the macOS playback widget should act the same as when Spotify is playing audio in it’s desktop app:
This behaviour is also visible through the YouTube Web player, in the Safari browser (noting that YouTube has injected a skip forward/backward 30sec control:
From an initial read, it seems that the HTML Media Session API might be able to handle this entirely in the frontend side of the app, but there may be an electron-server-side part which can handle a direct system api interaction. I think that there is a good chance the system-specific behaviour can be bypassed by just using the standard browser/html media session API which would then provide support on all platforms, as Windows and Linux also have similar widgets for active media, which also support web audio sources such as YouTube or Spotify Web. This would be easier to test as well as there isn’t much of a defined testing process for the electron server code.
If we do need to focus on an electron level system audio handler, then a more modern version of electron-media-service (https://www.npmjs.com/package/electron-media-service) - if one exists - would be the way to go. I just think it would be less than ideal to implement OS-specific system API calls for media handling as this stifles maintainability.
Happy to be assigned the issue!
More on the Media Session API:
"The MediaMetadata interface lets a website provide rich metadata to the platform UI for media that is playing. This metadata includes the title, artist (creator) name, album (collection), artwork, and chapter information."
And most usefully to Nuclear: "The platform can show this metadata in media centers, notifications, device lock screens, and so on."
For the windows devices, the Media Session API would provide a display like this:
And - Hardware media keys are supported through Media Session! (Minor concern: how will this impact existing hardware media controls as currently implemented?)