详细问题描述
(DCloud产品不会有明显的bug,所以你遇到的问题大都是在特定环境下才能重现的问题,请仔细描述你的环境和重现方式,否则DCloud很难排查解决你的问题)
[内容]
【报Bug】音频uni.getBackgroundAudioManager() paused异常
重现步骤
[步骤]
var bgAudioMannager = uni.getBackgroundAudioManager();
bgAudioMannager.title = '致爱丽丝';
bgAudioMannager.singer = '暂无';
bgAudioMannager.coverImgUrl = 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.jpg';
bgAudioMannager.src = 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3';
setTimeout(function(){
console.log(bgAudioMannager.duration)
console.log(bgAudioMannager.currentTime)
console.log(bgAudioMannager.paused)
console.log(bgAudioMannager.src)
console.log(bgAudioMannager.startTime)
console.log(bgAudioMannager.buffered)
console.log(bgAudioMannager.title)
console.log(bgAudioMannager.protocol)
console.log(bgAudioMannager.singer)
},3000)
[结果]
17:08:01.371 [Number] 21.995 at pages\index\index.vue:52
17:08:01.392 [Number] 1.606 at pages\index\index.vue:53
17:08:01.413 function (){return o.execSync2("Audio","AudioSyncExecMethod",["getPaused",[this._Audio_PlayerUUID]])} at pages\index\index.vue:54
17:08:01.433 https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3 at pages\index\index.vue:55
17:08:01.454 [Number] 0 at pages\index\index.vue:56
17:08:01.475 [Number] 21.995 at pages\index\index.vue:57
17:08:01.495 致爱丽丝 at pages\index\index.vue:58
17:08:01.516 http at pages\index\index.vue:59
17:08:01.537 暂无 at pages\index\index.vue:60
[期望]
bgAudioMannager.paused返回false
[如果语言难以表述清晰,拍一个视频或截图,有图有真相]
IDE运行环境说明
[HBuilder 或 HBuilderX。如果你用其他工具开发uni-app,也需要在此说明]
[IDE版本号]
[windows版本号]
[mac版本号]
uni-app运行环境说明
[运行端是h5或app或某个小程序?]
[运行端版本号]
[项目是cli创建的还是HBuilderX创建的?如果是cli创建的,请更新到最新版cli再试]
[编译模式是老模板模式还是新的自定义组件模式?]
App运行环境说明
[Android版本号]
[iOS版本号]
[手机型号]
[模拟器型号]
附件
[IDE问题请提供HBuilderX运行日志。菜单帮助-查看运行日志,点右键打开文件所在目录,将log文件压缩成zip包上传]
[App问题请提供可重现问题的代码片段,你补充的细一点,问题就解决的快一点]
[App安装包或H5地址]
[可重现代码片段]
联系方式
[QQ]
3 个回复
追影和糖糖 (作者)
有没有大哥告诉我是我写错了还是Bug啊,之前的版本paused总是返回true,这下更新了版本后就变成这样了。
追影和糖糖 (作者)
我发现了,这是v3模式下的问题,非v3下还是永远返回true
m***@mayihezi.com
我也是遇到这个问题了,但我看到有用uni.createInnerAudioContext的也报这个了.官方说HBuilderX 2.6.12 修复,我猜getBackgroundAudioManager的原因也一样
那个帖子的连接
追影和糖糖 (作者)
好像是吧,到时候试试
2020-04-16 13:34