plexMusicPlayer icon indicating copy to clipboard operation
plexMusicPlayer copied to clipboard

Pause and resume

Open jim-moore-sp opened this issue 9 years ago • 3 comments

Thoughts on supporting pause and resume of tracks across listening sessions? I'd love to be able to use this to play audiobooks and resume where I left off in the previous listening session.

jim-moore-sp avatar Jan 23 '17 17:01 jim-moore-sp

This should normally be possible, as we can save the offset of an audio track (thus the place where you stopped) and normally resume at that point again (when you want to restart). It would be the easiest to just save a single audio file and resume where it left off, but that wouldn't be really dynamic as you would only be able to save a single audiobook's progress. I think the following scenarios should be applicable:

SAVING PROGRESS

*Audiobook is Playing*
Req: "Alexa, ask plexmusic to save my progress."
--> Application stores track-id + offset
Resp: "Your progress for *trackname* has been saved."

RESTORING PROGRESS

Req: "Alexa, ask plexmusic to play *trackname*"
--> Application checks if progress is saved, if so, play from saved offset
Resp: "Resuming *trackname*."
*Audiobook resumes Playing*

Another thing that should be accounted for, would be the Resume intent (where the offset should be reset, aka, saved progress deleted)

So all by all, I enact this as certainly possible! Do you agree with the proposed scenarios? I'll have more time in a few weeks to further work on this project, so I'll be sure to implement this feature then!

Tyzer34 avatar Jan 24 '17 08:01 Tyzer34

Thanks for following up!

Thinking through this a little more I think it may be a bit more complex. An audiobook is really more of a playlist than a single track -- a book is often divided into 12 or more files, with the break often coming in the middle of chapters, etc (i.e. based on file size rather than some logical divider in the book).

You probably want to trigger it by saying something like "Alexa, ask plexmusic to read 1984 by George Orwell", not "Alexa, ask plexmusic to play 1984 - Track 7 by George Orwell." Following from this, I think you'd need to save not only the stopping point in the current file, but also the playlist somehow so that Alexa will flow seamlessly from one track to the next when reading.

On Tue, Jan 24, 2017 at 2:32 AM, Bjorn Vuylsteker [email protected] wrote:

This should normally be possible, as we can save the offset of an audio track (thus the place where you stopped) and normally resume at that point again (when you want to restart). It would be the easiest to just save a single audio file and resume where it left off, but that wouldn't be really dynamic as you would only be able to save a single audiobook's progress. I think the following scenarios should be applicable:

SAVING PROGRESS

Audiobook is Playing Req: "Alexa, ask plexmusic to save my progress." --> Application stores track-id + offset Resp: "Your progress for trackname has been saved."

RESTORING PROGRESS

Req: "Alexa, ask plexmusic to play trackname" --> Application checks if progress is saved, if so, play from saved offset Resp: "Resuming trackname." Audiobook resumes Playing

Another thing that should be accounted for, would be the Resume intent (where the offset should be reset, aka, saved progress deleted)

So all by all, I enact this as certainly possible! Do you agree with the proposed scenarios? I'll have more time in a few weeks to further work on this project, so I'll be sure to implement this feature then!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Tyzer34/plexMusicPlayer/issues/14#issuecomment-274740246, or mute the thread https://github.com/notifications/unsubscribe-auth/ANIPliMFxjy7jKAjoQarGIg_dhyn3vJhks5rVbc4gaJpZM4LrVPo .

-- Jim Moore Vice President, Engineering, IdentityNow and Identity Analytics

mobile 949.542.9497 [email protected]

jim-moore-sp avatar Jan 25 '17 18:01 jim-moore-sp

Ah okay, this indeed makes it a little bit more complex. This could still be implemented as a feature, however, it is not that easy as Plex itself does not make a distinction between a song and an audio book. What could be done is, if you would set your audiobook as a playlist for example, save the progress of the playlist, which would lead back to the different methods I explained beforehand. This way, "Alexa, ask plexmusic to read 1984 by George Orwell" should look for a playlist in your Plex library called "1984 by George Orwell" (or whatever you want to call it), which will initialize the playback based on where you last left off.

Tyzer34 avatar Jan 25 '17 18:01 Tyzer34