Bug 456516

Summary: Media Player applet says 'No media playing' when I play specific videos with Celluloid or Totem players
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: Media PlayerAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: bharadwaj.raju777, kde, nate
Priority: NOR    
Version: 5.25.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.26.1
Sentry Crash Report:
Attachments: video file

Description Patrick Silva 2022-07-09 14:49:08 UTC
Created attachment 150501 [details]
video file

SUMMARY
For some reason, Media Player applet says 'No media playing' when I play specific .avi and .mpg videos with Celluloid or Totem players.


STEPS TO REPRODUCE
1. download the attached video
2. play the downloaded video with Celluloid or Totem (default player of Gnome)
3. click on Media Player applet in the system tray

OBSERVED RESULT
Media Player applet says 'No media playing' despite the playback is controllable as expected

EXPECTED RESULT
do not say 'No media playing' while a video is playing

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 1 Bharadwaj Raju 2022-09-30 10:15:16 UTC
Do Celluloid and Totem have MPRIS2 support? You can check with either QDbusViewer (search for "mpris"), or with command-line tools like playerctl. If they don't have MPRIS2 support, we can't really do anything.
Comment 2 Bharadwaj Raju 2022-09-30 10:16:31 UTC
Correction: I meant to ask, do these players expose an MPRIS2 interface when these specific videos are playing? If they don't, it would be a bug in those players.
Comment 3 Patrick Silva 2022-09-30 14:10:50 UTC
I'm unable to reproduce with Celluloid player. But it's still reproducible with Totem despite it is controllable via mpris.

$ playerctl -l
totem

Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 4 Bharadwaj Raju 2022-09-30 14:19:30 UTC
Thanks. I think I've figured out why it is. Totem does provide an MPRIS interface, but it is very rudimentary: it allows you to play/pause, but doesn't provide any metadata like title, artist, filename, URL, etc.

So the applet takes this lack of information as "No media playing", but that's incorrect. I guess in that case we should just show an icon without saying "No media playing". I'll make an MR for that.
Comment 5 Bug Janitor Service 2022-09-30 14:35:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2179
Comment 6 Bharadwaj Raju 2022-10-08 09:48:06 UTC
Git commit 62e5bb37a2c4751d5298aba8b4937feef31af9c9 by Bharadwaj Raju.
Committed on 08/10/2022 at 09:48.
Pushed by bharadwaj-raju into branch 'master'.

If an app is playing media but hasn't provided a title, say as much instead of "No media playing"

Certain apps, like GNOME's Totem, provide a very rudimentary MPRIS interface with next-to-no
metadata. Currently the applet and lockscreen show "No media playing" when these apps play something, which is
inaccurate. Change the message in case of (playing || paused) && !title to "No title".

M  +1    -1    applets/mediacontroller/contents/ui/AlbumArtStackView.qml
M  +5    -1    lookandfeel/org.kde.breeze/contents/lockscreen/MediaControls.qml

https://invent.kde.org/plasma/plasma-workspace/commit/62e5bb37a2c4751d5298aba8b4937feef31af9c9
Comment 7 Bharadwaj Raju 2022-10-08 09:51:48 UTC
Git commit 40b2226c92ba9dcc59b3c66cb4cacb58788b08a4 by Bharadwaj Raju.
Committed on 08/10/2022 at 09:51.
Pushed by bharadwaj-raju into branch 'Plasma/5.26'.

If an app is playing media but hasn't provided a title, say as much instead of "No media playing"

Certain apps, like GNOME's Totem, provide a very rudimentary MPRIS interface with next-to-no
metadata. Currently the applet and lockscreen show "No media playing" when these apps play something, which is
inaccurate. Change the message in case of (playing || paused) && !title to "No title".


(cherry picked from commit 62e5bb37a2c4751d5298aba8b4937feef31af9c9)

M  +1    -1    applets/mediacontroller/contents/ui/AlbumArtStackView.qml
M  +5    -1    lookandfeel/org.kde.breeze/contents/lockscreen/MediaControls.qml

https://invent.kde.org/plasma/plasma-workspace/commit/40b2226c92ba9dcc59b3c66cb4cacb58788b08a4