'Play a sound frequently in React Native App

I'm working on a React Native App. I need to play a beep every 500ms. I already have a mp3 file to play and can it play on click. But after clicking the button a few times, it breaks. I used the example code from expo av. I used the snack from playing audio sounds.
I also could use another mp3 file which is longer, but has to start replaying immediately after ending.

What's the best way to play the beep every 500ms? Using a longer file and replay after ending? Or frequently use the single beep? How can I achieve that?



Solution 1:[1]

If you are using react-native-sound library, have a look at the link below: link

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 manosk