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
Sound.setCategory('Playback');
var whoosh = new Sound('http://42.81.26.4/mp3.9ku.com/hot/2012/05-14/467165.mp3', Sound.MAIN_BUNDLE, (error) => {
if (error) {
console.log('failed to load the sound', error);
return;
}
console.log('duration in seconds: ' + whoosh.getDuration() + 'number of channels: ' + whoosh.getNumberOfChannels());
whoosh.play((success) => {
if (success) {
console.log('successfully finished playing');
} else {
console.log('playback failed due to audio decoding errors');
// reset the player to its uninitialized state (android only)
// this is the only option to recover after an error occured and use the player again
whoosh.reset();
}
});
});
The text was updated successfully, but these errors were encountered:
使用Github文档下的方式运行发现没有播放音乐成功。
尝试以下写法:
The text was updated successfully, but these errors were encountered: