When going into presentation mode, a D-Bus object is created that
implements MPRIS spec and exposes control to the presentation.
By that any existing MPRIS controllers can be used next to the existing
direct control by Okular UI itself.
This includes e.g.
- keyboard mediakeys (Play/Pause, Stop, Next, Previous), as handled by Plasma mpris dataengine
- KDE Connect MPris plugin
Motivation:
For giving a presentation and not having to stand next to the computer
which runs Okular, one can use wireless input controllers.
Sometimes though one would like more rich remote controllers, e.g.
with a display showing notes for the current page, giving a preview
of the next/previous page, or allowing to jump to a page directly
without everyone following on the big screen the search in the pages list.
Such a rich remote controller could be done e.g. by an app for a mobile,
which then connects to Okular.
Instead of writing a custom controller app and designing a custom protocol,
another option is to use the MPRIS spec and map the concepts of the
Okular document and its pages onto the MPRIS tracklist and tracks.
After all the "media player" in MPRIS is an abstraction, and to a good
degree it is possible to make the Okular presentation mode an
instantiation of it.
While the current version 2 of MPRIS seems done rather with typical
music players or movie players in mind, a future version shall also
take presentation shows more into the design.
This initial patch already enables simple Play/Pause/Next/Previous
remote control, which is handy for remote controlling via KDE Connect.
Future patches should also implement tracklist support, so a controller
is e.g. able to show the complete list of tracks^Wpages as thumbnails.