hyochan / hyochan/react-native-nitro-sound

How to stop player at a precise point in time?

Open
#368 2 comments 2 reactions 0 assignees View on GitHub
🍗 enhancement 🤖 ai-managed
Dominant language
TypeScript
Stars
962
Forks
254
Avg merge
1d 4h
Merged PRs (30d)
1

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.