- 当前 Bug 的表现(可附上截图)
- 预期表现
- 复现路径
- 提供一个最简复现 Demo
使用camera 组件录像遇到视频和声音不同步有延时,录了一段自拍视频,播放是看到说话的口型和声音不匹配,声音提前放了一秒,视频中说话的口型慢一秒,请问怎么解决,谢谢!
<view class=“weui-camera-wrap uuid_1538754350_3256-0”>
<camera class=“weui-camera” mode=“normal” device-position=“back” flash=“off”></camera>
<rich-text nodes=’<br />’></rich-text>
<button class=“weui-btn weui-btn_primary” type=“primary” size=“default” bindtap=“startRecord”>
<text decode=“true”>开始录像</text>
</button>
<button class=“weui-btn weui-btn_primary” type=“primary” size=“default” bindtap=“stopRecord”>
<text decode=“true”>结束录像</text>
</button>
<button class=“weui-btn weui-btn_primary” type=“primary” size=“default” bindtap=“saveRecord”>
<text decode=“true”>保存到相册</text>
</button>
<text class=“uuid_1538754350_1223-1” decode=“true”>预览录像</text>
<video class=“weui-camera-video-preview” src="{{videoSrc}}" wx:if="{{videoSrc}}"></video>
</view>
Page({
data: {},
onLoad: function(e) {
var that = this;
// 初始化摄像头对象
this.cameraCtx = wx.createCameraContext()
},
startRecord: function() {
// 开始录像
this.cameraCtx.startRecord({
success: function(res) {
wx.showToast({
title: “正在录像”,
icon: “loading”
})
}
})
},
stopRecord: function() {
var that = this;
// 结束录像
this.cameraCtx.stopRecord({
success: function(res) {
that.setData({
src: res.tempThumbPath,
videoSrc: res.tempVideoPath
});
wx.showToast({
title: “录像结束”
});
}
})
},
saveRecord: function() {
var that = this;
// 保存录像到相册
wx.saveVideoToPhotosAlbum({
filePath: that.data.videoSrc,
success: function(e) {
wx.showToast({
title: “视频保存成功”
})
}
})
}
})
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)