背景音乐循环播放(小程序)

js

const back = wx.getBackgroundAudioManager();Page({data: {},backmusic:function(){player();function player(){back.title = "此时此刻";back.src = "http://sc1.111ttt.cn/2017/1/11/11/304112002347.mp3";back.onEnded(() => {player();})}},onLoad: function (options) {this.backmusic();},})

注:ios播放必须要加title

文章转载:http://www.gehut.cn/

(0)

相关推荐