nstudio / nativescript-audio

:microphone: NativeScript plugin to record and play audio :musical_note:
Other
149 stars 104 forks source link

Using seekTo while playing from url terminates the playback #189

Open zangarmarsh opened 3 years ago

zangarmarsh commented 3 years ago

I want to play a mp3 file from a URL. Its size can be between 30MB and 200/300 MB. Playing/Pausing works fine, but every time I seek to a specific time, instead of pausing for buffering, it stops as if it had finished playing back the audio.

I tried either with a whole mp3 file and with a chunked one with several 206 responses, which works fine in the browser, but using nativescript-audio stops. The latter solution - the chunked one - would be the best one because of the aforementioned potential big size the mp3 might reach. Anyway, any solution would be very appreciated.

Thank you in advance for any tip/suggestion.

Bezlepkin commented 2 years ago

according to the seekTo method, the track should not be stopped. But here's what I noticed for myself. I tried to make a player on Flutter today, seekTo works faster there. although NativeScript plugin uses native method for iOS:

https://developer.apple.com/documentation/avfoundation/avplayer/1385953-seek