Taking the abstraction "Media" in "Media Player Remote Interfacing
Specification" (MPRIS) into use, a plain slide in a slideshow can be seen
to be the same as e.g. a still picture in a movie without any sound.
Following that, a slideshow with pictures and videos as in the UI model
of Gwenview can be roughly mapped onto the concept of a list of tracks as
with in the data model of MPRIS.
This patch exposes the list of images/movies in the current folder and
the related slideshow feature as MPRIS D-Bus object, implementing for a
start the interfaces
- "org.mpris.MediaPlayer2"
- "org.mpris.MediaPlayer2.Player"
trying to map those to the Gwenview UX closely.
This allows the slideshow and some other navigation to be controlled
by any MPRIS controllers, which includes e.g.
- keyboard mediakeys (Play/Pause, Stop, Next, Previous), as handled by Plasma MPRIS dataengine
- KDE Connect media player controller plugin
Additionally the MRPIS D-Bus object is unregistered while the workspace
lockscreen is activated. Because at least the Plasma lockscreen has
the feature to show controls for any currently running MPRIS players,
which for one does not make sense currently for an image player as all
displays are locked, and then also can be surprising for some users and
result in data leaks via the image metadata used.
Future:
The great plan is to enhance the MPRIS spec to also work well for
presentation-like media shows. So there can and will be cross-app
rich (remote) controllers also for classical presentation application
instead of only per-app ones.
Supporting the existing MPRIS interfaces, even if slightly bending the
semantics, is a first step into that direction and already adds value
as it allows reuse of existing MPRIS controllers e.g. for remote control.
So follow-up work will be to also implement the other MPRIS interfaces
like org.mpris.MediaPlayer2.TrackList, for exposing the whole set of
"slides". This will enable MPRIS controllers to show the user a complete
visual list and e.g. navigate directly to a given slide or give a preview
for the next/previous slides.
CCBUG: 359381