dmix icon indicating copy to clipboard operation
dmix copied to clipboard

Play locally played song on remote MPD

Open jkufner opened this issue 8 years ago • 3 comments

Scenario: I'm walking home and listening some music using some local player on my phone (no network connections, no MPD). When I arrive home, I want to put away headphones and continue listening the same song on my big speakers and MPD.

Currently, I have to lookup the song, which is playing on my phone, in the MPD's playlist (or add it to the playlist), seek to correct time and hit play. Or wait for a next song on the playlist and switch the players later.

The feature I miss is a button, which would do this: First, MPDroid would ask locally playing music player which song is playing (track name, artist, album, year). Then MPDroid would lookup this song in a current playlist on a MPD server. If found, MPDroid would seek to the exact time as local player is currently playing and start playback on the server. And finally, MPD would pause/stop local playback on the phone. There may be a second or two gap, but otherwise it should be way more smooth transition than syncing the players manually.

If the local song is not on remote playlist, MPDroid should report an error, or try to find the song in the music library and offer a simple way to add the album to the playlist. If song is not found in the library, then it should simply say so and fail.

To make user experience better and transition even smoother, there may be some trick involving volume control to smoothly cross fade the song from local player to remote MPD, but that is the next level.

This feature request is not about streaming local song to remote MPD. The goal is to smoothly switch from local player to remote MPD and turn off the local player.

What do you think?

jkufner avatar May 30 '16 09:05 jkufner

I agree that it would be nice, yeah :)

abarisain avatar May 30 '16 09:05 abarisain

Some related links I found (but have not tested myself):

  • https://web.archive.org/web/20140223074625/http://blog.dexetra.com/post/47690372822/2010-09-get-current-playing-track-info-from-html
  • http://stackoverflow.com/questions/3616956/how-to-get-current-playing-song-details-from-mediaplayer
  • http://sudarmuthu.com/blog/finding-the-songtrack-which-is-currently-playing-in-android/

I hope it will help.

jkufner avatar May 30 '16 09:05 jkufner

To be honest, the thing we really lack to do that is time :/ It would also be nice to fetch the current playlist/queue and try to feed MPD as much songs as possible

abarisain avatar May 30 '16 09:05 abarisain