In IOS it works without issue, in android, its again fine in debug mode, but in release mode its not working
this is the error message, but not makes sense.. {extra: -2147483648, what: 1}.
here is the code:
const Sound = require('react-native-sound')
Sound.setCategory('Ambient')
const music = new Sound('game.mp3', Sound.MAIN_BUNDLE, error => {
if (error) {
alert(JSON.stringify(error))/prompts: {extra: -2147483648, what: 1}
console.log('failed to create sound', error)
return
}
alert('load successfully')
})
music.setNumberOfLoops(-1)
package.json:
..
"react-native": "0.63.4",
"react-native-sound": "^0.11.0",
EDIT: if I refactor code like this; it works.
let localSound = require('./game.mp3')
Sound.setCategory('Ambient')
const music = new Sound(localSound, Sound.MAIN_BUNDLE, error => {
why its not getting sound file from '../res/raw/game.mp3' (file is there..)
how to fix this weird issue?