Add MPRIS support
Open, WishlistPublic

Description

fringring laid out how he added support for controlling gwenview and okular using kdeconnect+MPRIS in this blogpost: https://frinring.wordpress.com/2018/03/15/present-your-images-from-the-couch-with-gwenview-mpris-kde-connect/

The same should be possible for kpa's image viewer. Add good place to start should be the patch for okular (D11250).

Quoting frinring on irc on kde-devel:

what basically is done: there is a single proxy object which implements the
D-Bus object that is exposed for the MPRIS service.

it gets two subchild
objects, one per currently implemented D-Bus interface (you might want to
quickly read up on D-Bus if this sounds strange :) ) and those two interface
classes basically just forward/proxy the "slideshow" state of the app and
actions invoked from remote on it to understand the patch, best use as
entrypoint the change to app/mainwindow.cpp, where the d->mMpris2Service = new
Mpris2Service(...) is created, then look at that class to see what it does, and
then the two interface classes

to add some confusion, there is also code to watch for screenlock state to hide
the mpris service in that case :)

perhaps more simple right now might be the patch for okular but to answer also
your question: no, should be relative simple to add, does not need extra
resources. it only requires some properly modelled internal state of the
slideshow or image browsing (incl. change signals), so the state can be simply
mapped in the proxy object/interfaces as well as actions on the model from
remote passed through

johanneszarl triaged this task as Wishlist priority.