zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.79k stars 748 forks source link

Windows: error while playing a sound file #549

Open JArthurJohnston opened 5 years ago

JArthurJohnston commented 5 years ago

Im trying to play some sound files in my app. Its working in iOS and android, but when I run it in a windows app I get the following

error

and heres the code that plays the sound... function* playSound(action) { Sound.setCategory('Playback'); var sound = new Sound(action.soundName, Sound.MAIN_BUNDLE, (error) => { if (error) { return; } sound.play(); }, {}); }

action.soundName is just a string with the sound file name.

In iOS and android I needed to copy or add the sound files into the native project. do I have to do the same in windows?

any help is greatly appreciated