Player for streaming audio not showing metadata
-
I installed Ubuntu Touch 20.04 (OTA-7) on a Fairphone 4, to renew my involvement in the open source community, and I started to explore UT to see in what way I could contribute - there is a lot to choose from.
As the radio alarm on my old Android phone was never really reliable, I looked for a UT alternative (which does not exist, does it?), and then at alarms and streaming radio.From the (focal) radio apps in the store, the Radio app (by patrickjane) is fine. Information on the music which playing is initially visible in a scrolling label, but after starting and stopping the player a couple of times, the label only says 'Playing'. Somehow, that became worse, so currently, I never get the music information anymore. So I did the following:
- I downloaded the source and stripped it down to the essentials, used 'clickable' to build and install it on the phone. The metadata never displays, because the onMetadataChanged signal handler is never triggered. On the desktop (Ubuntu 20.04, 'clickabe desktop'), it works as expected (in a Docker container).
- I checked other audio streaming apps for Focal, but none present metadata. From the old Xenial apps (found here), only flas presents metadata, but flas accesses the metadata property of QML Mediaplayer directly, not through a signaling mechanism.
- I have monitored the D-bus on the phone and I see that metadata is presented to the bus by media-hub. It also seems (I'm not sure) that the Radio app listens to the MediaHub Service session which is sending PropertiesChanged signals. These signals contain metadata including titles.
- I also checked apparmor log entries (using journalctl). There are about 15 apparmor="DENIED" entries for a single run of the app (opening, playin a station for some time, stopping the player, closing the app). Two originate from the dbus-daemon, for interface "com.lomiri.content.dbus.Service" and member "HandlerActive", I have no idea if that is related to this bug.
Remarkably, the sound indicator shows music titles on both devices. A 2021 post mentions the issue, with the sound indicator as a workaround. That may work for a user, but from a developer perspective that adds to the riddle.
So I also took a look at the sound indicator. If I understand correctly, audio players can register to the Ayatana sound indicator so that they are displayed in a very minimal way. I did not find any further information on how that works. I have been looking at the source of mediahub and the Ayatana sound indicator to find out, but I get lost.So I am curious as to what is going on here:
-
What difference between the FP4 and the Docker container on the desktop may cause the metadata signaling mechanism to work differently on both? How can I find out?
-
How do audio players, the sound indicator and the media-hub interact? Does the Radio app register to the sound indicator? And if it registers, why do music titles appear in the indicator, and not in the app itself? If it is a different player that registers to the indicator, which one is that? And how could this player take over the stream playing in the Radio app? Or has it always been there, as a kind of a pass-through player, which is shown by the sound indicator, but then fails to pass on the metadata?