bgAudioMannager.title = l_audiosList [index].name;
bgAudioMannager.singer = l_audiosList [index].author;
bgAudioMannager.coverImgUrl = l_audiosList [index].img;
if(l_audiosList [index].tempFilePath && l_audiosList [index].tempFilePath!="fail"){
bgAudioMannager.src = l_audiosList [index].tempFilePath;
}else{
bgAudioMannager.src = "https://wx.mybible.cn/static/upload/2022-06/20220620172716.mp3";
}
if(currentTime){
bgAudioMannager.seek(currentTime)
}
if(si_pause){
bgAudioMannager.pause()
}else{
bgAudioMannager.play()
}
console.log(bgAudioMannager)
bgAudioMannager.onPlay(() => {
monplayState=0
uni.$emit('play_pause',{'play_pause':true,'monplayState':2})
})
bgAudioMannager.onTimeUpdate(() => {
console.log(bgAudioMannager.buffered+"buffered")
console.log(bgAudioMannager.currentTime+"currentTime")
// var mon_currentTime = Math.floor(bgAudioMannager.currentTime);
console.log(bgAudioMannager.duration+"duration")
uni.setStorageSync('currentTime', bgAudioMannager.currentTime);
})
bgAudioMannager.onPause(() => {
uni.$emit('play_pause',{'play_pause':false,'monplayState':1})
})
bgAudioMannager.onEnded(() => {
var new_playway=3
if(uni.getStorageSync('playway') || uni.getStorageSync('playway')==0){
new_playway=uni.getStorageSync('playway');
}
next(new_playway,index,l_audiosList,that)
})
bgAudioMannager.onError(function() {
console.log("错误mom")
})
bgAudioMannager.onWaiting(function() {
console.log("加载中mon")
monplayState=2
})
bgAudioMannager.onCanplay(function() {
})