You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OK guys I solved it so it was about my android simulator had no sound itself.. If you will have a similar problem like me you can check first your android simulator's sound.. It works easily and nicely! Thank you again for this :))
@losheredos would you mind sharing the steps you have followed to solve this issue. I am using expo and getting the same error. I don't know how to get rid of it. Thank you.
My codes :
import SoundPlayer from 'react-native-sound-player';
playTrack(){
try {
SoundPlayer.playSoundFile('free', 'mp3');
} catch (e) {
console.log(
cannot play the sound file
, e);}
}
When I call this function I get error in console log;
"cannot play the sound file TypeError: Cannot read property 'playSoundFile' of undefined"
What I should do ?.. I checked all options again and again, I linked correctly, mp3 files are located in raw.. I dont know what else I can do .
Edit: I run react-native run-android to compile the project again now its not giving error but I dont hear any sounds..
The text was updated successfully, but these errors were encountered: