react-native-sound
react-native-sound copied to clipboard
Network file not always loading
trafficstars
When getting a new Sound from the network it doesn't always load and the callback isn't fired. This is what I have right now:
if (!this.audio) {
var audio = new Sound("http://www.noiseaddicts.com/samples_1w72b820/130.mp3", undefined, (e) => {
if (e) {
console.log('error', e);
return;
} else {
console.log("success");
console.log('sound: duration in seconds: ' + audio.getDuration());
}
}, {loadSync:true} );
this.audio = audio;
}
`loadSync:true` is because I'm using #318
Does this happen to with larger files?
@trepidity it's very inconsistent but it seems to happen more often on larger files
较大的文件会发生这种情况吗?
yeah, do you solve it ?