Closed andersfischernielsen closed 2 years ago
It seems like the app uses default Electron notifications.
//Found in "currentTrackStore.js"
function _showNotification(track) {
if (document.visibilityState !== 'hidden') return
new window.Notification(track.user.username, {
body : track.title,
icon : track.artwork_url,
})
}
OnClick-events are supported by using:
var myNotification = new Notification('Title', {
body: 'Lorem Ipsum Dolor Sit Amet'
});
myNotification.onclick = function () {
console.log('Notification clicked')
}
https://github.com/atom/electron/blob/master/docs/tutorial/desktop-environment-integration.md#notifications-windows-linux-os-x
The problem remains if you skip a few tracks (via the media keys) and open up the app again. Wouldn't it make more sense if the app automatically scrolls to the current playing track whenever I focus the app window. This should solve @andersfischernielsens issue as well?
It'd be awesome if the Cumulus window would appear displaying the current sound playing when the user clicks the "sound changed" OS notification (I don't know if Windows shows a similar notification).
The feature could, as far as I can see, be implemented by displaying the Cumulus window as-is, since the currently playing sound is already in focus there.