React-native-sound: The operation couldn’t be completed. (OSStatus error -10875.)

Created on 8 May 2017  Â·  2Comments  Â·  Source: zmxv/react-native-sound

Use the react-native-audio recording to give the following error in the address given in react-native-sound:
0acfe5ec-7a0b-40c9-81c5-ae3a68a14b45
Here's my code:

var sound = new Sound(this.state.audioPath, Sound.MAIN_BUNDLE, (error) => {
if (error) {
console.log('failed to load the sound', error);
return
}else{
console.log('duration in seconds: ' + sound.getDuration() + 'number of channels: ' + sound.getNumberOfChannels());
sound.play((success) => {
if (success) {
console.log('successfully finished playing');
} else {
console.log('playback failed due to audio decoding errors');
}
});
}

    });

this.state.audioPath : /var/mobile/Containers/Data/Application/C5A0D128-16CF-4713-AC8C-056C37F4DD26/Documents/audio1494239940000.aac

Most helpful comment

It would be really helpful if you post a comment on how did you solve the problem, so others can find it

All 2 comments

It would be really helpful if you post a comment on how did you solve the problem, so others can find it

Just wrap basePath in encodeURIComponent and everything will work

var SOUND_PRESS = new Sound(getSoundName('sound_press'), encodeURIComponent(Sound.MAIN_BUNDLE));
Was this page helpful?
0 / 5 - 0 ratings

Related issues

onepiece-dz picture onepiece-dz  Â·  15Comments

facuacostag picture facuacostag  Â·  10Comments

FatemeKhodayari picture FatemeKhodayari  Â·  12Comments

dereksweet picture dereksweet  Â·  11Comments

zkeyword picture zkeyword  Â·  19Comments