Every time playing audio ,

success is always false
have already been solved
@jYh1014 how?
move it to inside "new Sound"
playback failed due to audio decoding errors
I am having issue
Move the pay action into the success part of loading the sound file like so
var sound = new Sound(require('./sound.mp3'), (error) => {
if (error) {
console.log('failed to load the sound', error);
return;
}
// loaded successfully
sound.play((success) => {
if (success) {
console.log('successfully finished playing');
} else {
console.log('playback failed due to audio decoding errors');
sound.release();
}
});
});
Most helpful comment
move it to inside "new Sound"