cordova-plugin-streaming-media icon indicating copy to clipboard operation
cordova-plugin-streaming-media copied to clipboard

Is it possible to save the current location from the player, and restart from that point later?

Open viking2917 opened this issue 5 years ago • 2 comments

What version of Streaming-Meda-Cordova-Plugin are you using? V2.2

What version of Cordova are you using? N/a

What devices are affected? n/a

Please describe the issue in detail, with relevant code samples

Is it possible to obtain the current location of the audio player? And later, to restart the audio player from that location? (e.g. as one of the options like:

var options = {
    bgColor: "#FFFFFF",
    startLocation: "12s",   // twelve seconds in
}

The use case here would be to "bookmark" a location in a long-running piece of audio (imagine an audioBook for instance), then come back at a later time and restart from the saved location.

I cannot find any documentation of this and it's not apparent from looking at the code.

What did you expect to happen?

What actually happened?

viking2917 avatar May 14 '19 21:05 viking2917

I think it's possible not as an explicit user action but as storage of the last point the user was at before they exited. If that's satisfactory then I think it could eventually be done. The play function would need to have an argument added to start the video back from and the cleanup (exit) function would need an argument for the time it exited

the reason it's difficult to say, add a bookmark button, is because we're using the native video players of ios and android and neither of those have their own bookmark buttons. so we'd need to customize those video players and that's somewhat beyond the scope of this humble plugin

shamilovtim avatar Jun 25 '19 16:06 shamilovtim

Thanks @shamilovtim. I had in mind some kind of api call I could make to the plugin at a time of my choosing (for example I would have my own "bookmark" UI, rather than needing a modification to the native players). Not sure whether the underlying players expose an api for that.. I've had to step away from what I was working on for awhile but when I get back to it if I discover anything will post again. thanks!

viking2917 avatar Jul 03 '19 19:07 viking2917