>  Q&A  >  본문

재생을 클릭해도 응답이 없으며 음악 재생에 쓰지 않으면 오류가 보고되지 않으며 음악 상태를 얻을 수 없습니다.

playerMusicTap:function(event){

var that = this;

//获取音乐播放状态

wx.getBackgroundAudioPlayerState({

success:function(res) {

const status = res.status;

if(status != 1){

wx.playBackgroundAudio({

dataUrl: newsData.initData[that.data.newsid].music.url,

title: newsData.initData[that.data.newsid].music .title,

coverImgUrl: ''

})

that.setData({

isPlayer:true

})

}else{

wx.pauseBackgroundAudio();

that.setData({

isPlayer: false

})

}

}

})


}


杨茹杨茹2087일 전1218

모든 응답(0)나는 대답할 것이다

답장 없음
  • 취소회신하다