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

audio 音频播放错误?

使用API: wx.createInnerAudioContext,

InnerAudioContext.onError

预期效果:在不同手机上都可以正常播放,事件监听正常

实际效果:在不同手机上同样的音频存在兼容性,报错日志显示如下。

1:

音频地址:https://yyashow-1255660808.file.myqcloud.com/book/audio/5e3d2dde78b9e.mp3

音频报错信息: errCode":10001,"errMsg":"errCode:62, err:load or init native decode so fail

报错机型: {"screenWidth":360,"locationEnabled":false,"statusBarHeight":18,"notificationAuthorized":true,"screenTop":61,"pixelRatio":2,"safeArea":{"height":640,"width":360,"bottom":640,"top":0,"left":0,"right":360},"system":"Android 5.1","benchmarkLevel":5,"cameraAuthorized":true,"bluetoothEnabled":false,"deviceOrientation":"portrait","windowWidth":360,"brand":"OPPO","fontSizeSetting":16,"version":"7.0.10","screenHeight":640,"locationAuthorized":true,"language":"zh_CN","wifiEnabled":true,"microphoneAuthorized":true,"windowHeight":579,"model":"OPPO A37m","platform":"android","SDKVersion":"2.10.3","devicePixelRatio":2}

2:

音频地址:https://yyashow-1255660808.file.myqcloud.com/book/audio/5e3a35d3190b8.mp3

音频报错信息: errCode":10001,"errMsg":"errCode:67, err:decode audio fail

报错机型: {"locationEnabled":true,"screenWidth":360,"benchmarkLevel":12,"screenHeight":742,"windowHeight":674,"bluetoothEnabled":false,"language":"zh_CN","microphoneAuthorized":true,"version":"7.0.10","cameraAuthorized":true,"system":"Android 9","fontSizeSetting":16,"locationAuthorized":false,"pixelRatio":3,"notificationAuthorized":true,"model":"HLK-AL00","statusBarHeight":24,"deviceOrientation":"portrait","wifiEnabled":true,"safeArea":{"width":360,"right":360,"top":0,"left":0,"bottom":742,"height":742},"brand":"HONOR","windowWidth":360,"screenTop":68,"platform":"android","SDKVersion":"2.10.3","devicePixelRatio":3}

3:

音频地址:https://yyashow-1255660808.file.myqcloud.com/book/audio/5e54dc32ae2af.mp3

报错信息: errCode":10004,"errMsg":"errCode:55, err:unknow format

4: 还有一些,同一个音频我这边会播放两次,但往往第二次播放有时会报错。后来我们联系了用户,用户说从4g切换wifi时候就可以,播放没问题,不懂这里什么错误。

等等还有很多诸如类似的错误

期望结果:尽快修复,或者 告知正确的音频需要的具体要求:格式,采样速率,音频声道信息等



网友回复

社区技术运营专员-灵芝:

你好,麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

评论 抢沙发

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

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

云免签H5支付