// 创建推流对象
this.context = uni.createLivePusherContext("livePusher", this)
//context 对象获取正常
// 开启直播预览
this.context.startPreview({
success:a=>{
console.log(a)
},
fail:error=> {
console.log(error)
}
})
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: macOS 12.6
HBuilderX类型: 正式
HBuilderX版本号: 3.6.2
手机系统: Android
手机系统版本号: Android 12
手机厂商: Google
手机机型: Pixel 5a
页面类型: nvue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
// 创建推流对象
this.context = uni.createLivePusherContext("livePusher", this)
//context 对象获取正常
// 开启直播预览
this.context.startPreview({
success:a=>{
console.log(a)
},
fail:error=> {
console.log(error)
}
})
创建推流对象
开启直播预览
开启直播预览
无直播预览也无报错
手机系统: Android 13(无法选择 13 所以选了 Android 12)
在 4g 网络下,无法开启摄像头预览
// 创建推流对象
this.context = uni.createLivePusherContext("livePusher", this)
//context 对象获取正常
// 开启直播预览
this.context.startPreview({
success:a=>{
console.log(a)
},
fail:error=> {
console.log(error)
}
})
无论是 success 还是 fail 都没有回调
在 Wi-Fi 下没有问题
1 个回复
DCloud_Android_YJC
HBuilderX3.6.10-alpha已修复