react-native-audio-recorder-player icon indicating copy to clipboard operation
react-native-audio-recorder-player copied to clipboard

How to stop player at a precise point in time?

Open maidul98 opened this issue 4 years ago • 1 comments

I don't think there is a way to stop playing at a certain point. For example, if I wanted the player to stop playing at 3 seconds but the callback rate is every 5 seconds then I won't know that the player has hit 3 seconds before 5 seconds. To fix this I would have to set the call back rate to one second. However, this means that if I want to stop at a even more precise time then I would have to increase the callback rate further. Is there a better way to stop at a precise time?

I think what I am looking for is: https://developer.apple.com/documentation/avfoundation/avplayer/1388027-addboundarytimeobserver ?

Could you help me expose this method in react native as I am not a swift developer? I would really appreciate it. Thank you!

maidul98 avatar Aug 09 '21 17:08 maidul98

Same problem here

hjKangIB avatar Sep 16 '21 05:09 hjKangIB