html52.com
我爱小程序-开发者交流社区

点读时,点下一个音频时,上一个音频停了,放下个音频?

if(p){
      p.text && wx.showToast({
        title: p.text,
        icon:'none',
        success(res) {
          //这里操作
          const innerAudioContext = wx.createInnerAudioContext()
          innerAudioContext.autoplay = true
          innerAudioContext.src = p.mp3url//调用音源
          innerAudioContext.onPlay(() => {
            console.log('开始播放')
          })
          innerAudioContext.onError((res) => {
            console.log(res.errMsg)
            console.log(res.errCode)
          })

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付