Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Media notifications on Android lock screen (Media Session API)
#1
I'm not sure of this is even possible, nevertheless it would be great if moode could address the Media Session API on Android devices and show notifications like track metadata, covers, controls,... on the lock screen.

Some websites and browsers are able to do that (YouTube, Vimeo, Soundcloud on Firefox, Chrome). It really is an advantage not having to unlock your device every time you want to control your music output.

https://developers.google.com/web/update...ia-session

https://developer.mozilla.org/en-US/docs...ession_API

https://w3c.github.io/mediasession
Reply
#2
Cool idea. AFAICT mediasession is usable in iOS too.

I gotta say, though, that I find it a mixed blessing to have apps cropping up in my locked screen, especially when they expose controls.

But that's just me Rolleyes

Regards,
Kent
Reply
#3
Of course its possible. Maybe a developer that has experience with this API will volunteer their time to work on it :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Fantastic, we have to wait then. Wink
Reply
#5
This is just a draft proposal at this stage so probably a bit undercooked for moode. It also seems like it’s meant to work with media playing in the browser itself whereas Moore’s web ui is controlling the moode backend on the Pi which is playing the actual music. In other words what’s current in the web ui in the background (if it’s even running rather than just frozen) isn’t necessarily what’s current on the Pi, and what’s playing on the Pi isn’t even what’s necessarily playing on your device.

That said it 1) seems sort of possible to set the metadata anyway, 2) doesn’t do anything on iOS.
Reply
#6
(05-15-2020, 05:46 AM)swizzle Wrote: It also seems like it’s meant to work with media playing in the browser itself whereas Moore’s web ui is controlling the moode backend on the Pi which is playing the actual music. In other words what’s current in the web ui in the background (if it’s even running rather than just frozen) isn’t necessarily what’s current on the Pi, and what’s playing on the Pi isn’t even what’s necessarily playing on your device.

Interesting point... But isn't this the case on every media player website?

This user describes a similar problem and provides example code how to solve it:
https://stackoverflow.com/questions/5895...hout-audio

Here's another start guide:
https://codesource.io/getting-started-with-the-media-session-api

Does anyone know if Volumio with its app can control the notifications?
Reply
#7
I was playing around on my Android phone and you can use an MPD client such as M.A.L.P. to control Moode and as long as it's currently playing something it (MALP specifically, others likely will too) will place a banner in your notifications and lock screen.  While not integrated directly into Moode it's a pretty good solution which includes playback controls and media info / album art.
Reply
#8
@Rees86 Cool! I'm not sure how to set this up. Could you please share your MALP settings?
Reply
#9
(06-14-2020, 05:38 PM)michdal Wrote: @Rees86 Cool! I'm not sure how to set this up. Could you please share your MALP settings?

Hey sorry I took so long to respond, I was trying to play around to find out what I did to make the lock screen and notification controls work for me, and if there was a specific Android version that allowed this.  

Maybe my memory is playing tricks on me but I recall that somewhere around Android 6 or 7 they redid the notification system to allow better notifications.

Anyway there is an option that I believe is enabled by default that controls the lock screen and notification controls for MALP in the App Settings Called "Show Notification".  The notification in the Android system will only appear when music is playing and goes away as soon as playback stops.

If you're having trouble connecting , I just entered the IP address of my MoOde player and left port 6600 as the default, no password.
Reply


Forum Jump: