- 当前 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)
机型:iphone6s plus 操作系统版本12.2 iphone6s版本12.2 微信版本:7.0.4 ,录视频语速慢点勉强能对上,语速说快了完全对不上。
<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)
https://developers.weixin.qq.com/s/RtrAXBms7C8l
用了wx.createCameraContext()录制的视频没有声音怎么解决
麻烦重新发帖提问