Mariusmssj / harbour-vlc-remote

VLC Remote client for SailfishOS
4 stars 4 forks source link

Introduce basic MPRIS support #3

Closed eras closed 8 years ago

eras commented 8 years ago

Hello,

I added MPRIS (http://specifications.freedesktop.org/mpris-spec/latest/) support to the player for the purpose of controlling this program via my Pebble (I'm running https://github.com/smokku/pebble/ on my Jolla, which also support MPRIS). The changes are small, as most of the work is done by https://github.com/nemomobile/qtmpris. Largest changes come from consolidating the multiple places to control the player into one place. A more proper solution would be to have a separate component for controlling VLC, but that can be refactored in later.. :)

I guess this may be useful for other cases as well. Not sure if there is any particular MPRIS support in the client side in Jolla though. But at least this OpenRepos package seems relevant: sailfishos-lockscreen-player-patch-0.0.10-1.armv7hl.

The volume thingy is a bit iffy. I just put the 10 there to stop too big sound changes. Maybe the range is 0..100. Doesn't seem to be documented.

I've only tried this on my system ;-), and in particular I'm wondering if it will compile out-of-the box on other systems (I initially manually installed qtpris5 and qtpris5-dev packages on my build environment).

The biggest thing missing is the track list/play list support, but they are still in mpris-qt5's TODO list..

Mariusmssj commented 8 years ago

Hi Erkki. Big thanks for the contribution :) It's very much appreciated. I don't get much time to work on this at all these days due to high work load but it's very nice to see that people are using this application and have a need for it. I do apologise about the code and how messy it is feel free to make any changes/improvements you like.

Mariusmssj commented 8 years ago

I will test this on openrepos but I cannot submit this to the Jolla store as "ERROR [/usr/share/harbour-vlc_remote/qml/pages/FirstPage.qml] Import 'org.nemomobile.mpris 1.0' is not allowed"

But I am sure many people will like this feature :)

eras commented 8 years ago

I suppose it's understandable that the mpris isn't allowed, because I guess the module isn't yet feature-complete enough to be considered stable. Well, maybe in the future, now that Jolla got some monies ;-).

I guess for the store there would need to be a separate branch. And a way to minimize the differences between the two branches.

Mariusmssj commented 8 years ago

You are right. Also I uploaded the compiled .rpm it to openrepos: https://openrepos.net/content/mariusmssj/vlc-remote