We have moved to a new Sailfish OS Forum. Please start new discussions there.
75

Add DBus interface to stock music player [released]

asked 2013-12-24 17:40:27 +0200

Elleo gravatar image

updated 2014-12-18 18:04:15 +0200

chemist gravatar image

I'm working on porting Rockwatch, an app which allows users to connect their phones with Pebble smart watches, to Sailfish, however currently the music player doesn't appear to have any way to control it externally (one of the watch's functions). So a DBus service like that offered by MAFW on MeeGo would be a big help. Ideally it needs to at least make it possible to retrieve the currently playing song information and to control playing, pausing, and skipping forwards/backwards.

Thanks!

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by smoku
close date 2014-12-18 17:24:44.084961

Comments

2

This would also be useful for scrobbling clients (last.fm, libre.fm, etc.)

Elleo ( 2013-12-31 22:56:44 +0200 )edit

4 Answers

Sort by » oldest newest most voted
7

answered 2014-02-11 23:58:07 +0200

rcg gravatar image

updated 2014-02-12 17:31:21 +0200

Edit: I changed to a better solution. This solution leverages org.nemomobile.dbus to actually send data via dbus. I also changed the mediaplayer patch accordingly. The new patch is much less "hackish" than the previous one. You can find the new patch here:

https://github.com/ruedigergad/SkippingStones/blob/master/audioplayer_dbus.patch

For an example on how I use this, have a look at the following file:

https://github.com/ruedigergad/SkippingStones/blob/master/qml/MainPage.qml

Edit2: The patch has to be applied to file "/usr/lib/qt5/qml/com/jolla/mediaplayer/AudioPlayer.qml".

edit flag offensive delete publish link more

Comments

any way to also add a reference to the full file in nowPlaying?

sebsauer ( 2014-02-13 23:43:03 +0200 )edit

@sebsauer It looks like that there are "url" and "duration" properties as well. So, just modify the patch accordingly and give it a try. Please note that I didn't try it. I just briefly grepped through the code in "/usr/lib/qt5/qml/com/jolla/mediaplayer/".

rcg ( 2014-02-15 18:33:37 +0200 )edit
6

answered 2013-12-24 20:17:19 +0200

lbt gravatar image

We're thinking about it :)
This non-answer just stops vote questions from clogging up the 'Unanswered' section

edit flag offensive delete publish link more

Comments

Great, thanks :)

Elleo ( 2013-12-24 20:21:39 +0200 )edit
1

answered 2014-11-27 12:37:59 +0200

smoku gravatar image

This should be implemented using MPRIS specification.

And if so, this duplicates https://together.jolla.com/question/50901/please-add-mpris-support-to-media-player/

edit flag offensive delete publish link more
1

answered 2014-12-18 17:23:34 +0200

smoku gravatar image

Update10 (1.1.1.26, Vaarainjärvi) brings MPRIS2 support to stock Media Player.

https://together.jolla.com/question/71741/release-notes-software-version-11126-vaarainjarvi/

edit flag offensive delete publish link more

Question tools

Follow
13 followers

Stats

Asked: 2013-12-24 17:40:27 +0200

Seen: 1,652 times

Last updated: Dec 18 '14