扫描后调用声音,苹果没有声音?安卓有声音。

您所在的位置:网站首页 苹果手机为什么没有返回键声音 扫描后调用声音,苹果没有声音?安卓有声音。

扫描后调用声音,苹果没有声音?安卓有声音。

2024-07-06 19:23| 来源: 网络整理| 查看: 265

  scanBtn() {      wx.scanCode({       success: (res) => {       this.voice()       },       fail: (res) => {       }     })  //wx.scanCode   },      voice: function () {     let _this=this     const innerAudioContext = wx.createInnerAudioContext()     innerAudioContext.autoplay = true     innerAudioContext.obeyMuteSwitch = false     innerAudioContext.src = "https://xcx.yearconsports.com/s.mp3"     innerAudioContext.play()     innerAudioContext.onPlay(() => {       console.log('开始播放')     })     // innerAudioContext.play();     innerAudioContext.onError((e) => {       console.log(e.errMsg)       console.log(e.errCode)       _this.voice()     })   },

上面这段代码苹果手机在【真机调试】下有声音,在【预览或发布体验版或上线】的时候没声音。为什么?

代码片段:https://developers.weixin.qq.com/s/qlXLXKmK75it



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3