guyuewuren
guyuewuren
  • 发布:2018-08-23 17:21
  • 更新:2019-03-23 17:45
  • 阅读:1792

【报Bug】hello uni-app项目的接口 媒体 录音和背景音频有兼容性问题

分类:uni-app

详细问题描述
[内容]官方演示项目中接口新增的录音和背景音频无法使用,出错的手机是魅蓝 note3,安卓版本7.0,后面用iPhone 7 Plus测试正常,错误看截图,5秒钟的录音无法播放,时间到了15秒后手动停止,背景音频无法正常播放

重现步骤

[步骤]
[结果]
[期望]

运行环境 魅族 note3
[系统版本]安卓7.0
[浏览器版本]
[IDE版本]0.1.47.20180821
[mui版本]

附件
[代码片段]
[安装包]

联系方式
[QQ]
[电话]

2018-08-23 17:21 负责人:无 分享
已邀请:
guyuewuren

guyuewuren (作者)

估计是兼容性问题,其他手机没测试

  • RunUpApp

    不是兼容性问题测试了华为荣耀9 和小米9都一样

    2019-03-20 09:58

DCloud_App_Array

DCloud_App_Array

请提供下HBuilderX的版本号。

  • guyuewuren (作者)

    0.1.47.20180821

    2018-08-25 21:37

DCloud_Android_ST

DCloud_Android_ST

请用0.1.47.20180823版本在测试一下

  • guyuewuren (作者)

    好的,我试下

    2018-08-25 21:22

  • guyuewuren (作者)

    试过了,背景音频正常播放,但是录音不行,录音失败无法播放

    2018-08-26 01:31

guyuewuren

guyuewuren (作者)

你们的hbuilderx更新系统有问题,老是无法更新,现在最新版本20180823但是点更新没反应,出了新版又得重新下载,感觉可能是你们软件更新推送太慢,每次软件实际更新日期和更新描述文件里标的日期都有出入,也无法主动获取更新。你们看张截图,这个版本之前下载的0810版本,应该是更新过一次了更新自述文件里面写的是0821版,但是关于里面写的又是0818,搞得有点头晕,希望能改进

RunUpApp

RunUpApp

同样遇到录音无法播放。这个bug一直存在

p***@163.com

p***@163.com - 在薄情的世界里,深情的活着~

一样的,我在uni-app官网复制录音管理里面的
<template>
<view>
<button @tap="startRecord">开始录音</button>
<button @tap="endRecord">停止录音</button>
<button @tap="playVoice">播放录音</button>
</view>
</template>
<script>
const recorderManager = uni.getRecorderManager();
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
export default {
data: { text: 'uni-app', voicePath: '' },
onLoad() {
let self = this;
recorderManager.onStop(function(res) {
console.log('recorder stop' + JSON.stringify(res));
self.voicePath = res.tempFilePath;
});
},
methods: {
startRecord() {
console.log('开始录音');
recorderManager.start();
},
endRecord() {
console.log('录音结束');
recorderManager.stop();
},
playVoice() {
console.log('播放录音');
if (this.voicePath) {
innerAudioContext.src = this.voicePath;
innerAudioContext.play();
}
}
}
};
</script>

<style></style>
测试手机为华为p20和荣耀畅玩7C,下面是显示的错误信息,请问有没有解决方案
17:36:12.482 开始录音 at pages/tabbar/tabbar-1/tabbar-1.vue:23
17:36:16.735 录音结束 at pages/tabbar/tabbar-1/tabbar-1.vue:27
17:36:16.828 recorder stop{"tempFilePath":"_doc/uniapp_temp_1553333952072/recorder/1553333957221.aac"} at pages/tabbar/tabbar-1/tabbar-1.vue:17
17:36:20.086 播放录音 at pages/tabbar/tabbar-1/tabbar-1.vue:31
17:36:20.148 Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found. at __uniappservice.html:0

  • RunUpApp

    解决了吗?老哥

    2019-04-13 14:08

  • p***@163.com

    回复 RunUpApp: 官方回复我说“先改成Mp3解决,后期再处理”

    2019-05-09 18:04

该问题目前已经被锁定, 无法添加新回复