Closed bogo closed 3 years ago
Hey, I'm glad you find this library useful.
I haven't got a chance to look at this in depth. But I would add a new play method that takes both the url and a seek offset. Then I would make the required changes to the RemoteAudioEntry class to support this functionality.
It shouldn't be that hard to be honest.
Have a look at it if you have the time and feel free to create a PR.
First of all - thank you so much for this library! It's really helpful in the project I'm working at right now.
I noticed that the API for
AudioPlayer
has separateplay(url:)
andseek(to:)
methods. I would love to be able to merge these two and ask theAudioPlayer
to start playing back the item at a specific location. (i.e.play(url:at:)
)When I tried to simulate this behavior by calling
play
andseek
in a sequential order, the seek command seemed to be ignored, unless I delay it slightly viaDispatchQueue
. I assume it's due to the time it takes for the item to enteraudioPlayingEntry
.How would you go about implementing playback at a specific time interval? Happy to look into this and try to make a PR out of it, but would appreciate some guidance! :)