kossebau created this revision. kossebau added a reviewer: Okular. Restricted Application added a project: Okular. kossebau requested review of this revision.
REVISION SUMMARY 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. TEST PLAN Load a document, enter presentation mode and see Okular appear in the KDE Connect Multimedia Remote Control, following commands or updating the states. REPOSITORY R223 Okular BRANCH addmprisservice REVISION DETAIL https://phabricator.kde.org/D11250 AFFECTED FILES CMakeLists.txt mpris2/dbusabstractadaptor.cpp mpris2/dbusabstractadaptor.h mpris2/mpris2service.cpp mpris2/mpris2service.h mpris2/mprismediaplayer2.cpp mpris2/mprismediaplayer2.h mpris2/mprismediaplayer2player.cpp mpris2/mprismediaplayer2player.h ui/presentationwidget.cpp ui/presentationwidget.h To: kossebau, #okular Cc: #kde_connect, michaelweghorn, ngraham, aacid