wx.createInnerAudioContext的volume设置问题
发布于 4 年前 作者 huangwei 11608 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

wx.createInnerAudioContext后把volume改为1再调用play播放时,音量没有变大

  • 预期表现

音量调到最大。

  • 复现路径
  • 提供一个最简复现 Demo
4 回复

app.globalData.audioContext = wx.createInnerAudioContext();

app.globalData.audioContext.src = http://www.kdware.cn:5003/test

app.globalData.audioContext.loop = true;

app.globalData.audioContext.volume = 1;

app.globalData.audioContext.obeyMuteSwitch = false;

app.globalData.audioContext.autoplay = true;

app.globalData.audioContext.onPlay(() => {

console.log(‘开始播放5’);

})

app.globalData.audioContext.onError((res) => {

console.log(res.errMsg)

console.log(res.errCode)

})

这样是可以播放,但是volume没有起到效果。

回到顶部