背景音乐循环播放(小程序)
const musicBack = wx.getBackgroundAudioManager();
Page({
data: {
},
backmusic(url=''){
musicBack .title = "此时此刻";
musicBack .src = "http://gn.sycdn.kuwo.cn/080c9d4c9d2aad33eac13b7ce496031f/60892992/resource/n2/92/3/2239627769.mp3";
musicBack .onEnded(() => {
this.backmusic();
})
},
onLoad: function (options) {
this.backmusic();
},
})