<live-pusher
id="livePusher"
ref="livePusher"
class="live-pusher"
:aspect="'16:9'"
:mode="'RTC'"
:device-position="'front'"
:audioVolumeType="'media'"
:remote-mirror="true"
:style="{ top: safeHeight + 44 + 'px' }"
:url="livePusherUrl"
@statechange="livePusherStateChange"
@netstatus="livePusherNetstatus"
@error="livePusherError"
></live-pusher>
其中:device-position="'front'"在官方文档中指明默认为front,前置摄像头。
测试中发现在安卓手机中推流画面默认是后置摄像头,而在ios上是前置摄像头。
5 个回复
ONBURN
我也遇到了同样的问题@DCloud_heavensoft ,目前是根据当前运行的系统进行判断并调用切换方法
上风下云 (作者)
是不是这个设置目前只能在小程序端生效?
ONBURN
文档上写着微信小程序2.7.0,应该是把... 我还以为是微信需要2.7.0支持,其它都支持呢
2020-06-01 10:11
DCloud_uni-ad_HDX
HBuilderX 2.7.11 alpha版 已修复
s***@163.com
hbuilderX3.1.13版本的设置默认摄像头是后置的,android没问题,ios的还是前置摄像头
2021-06-18 17:02
6***@qq.com
正式版还没有修复这个问题吗?
2021-06-29 21:12
1***@163.com
回复 s***@163.com: 这个问题你怎么解决的?
2021-11-23 17:47
2***@qq.com
没有修复啊
2021-12-23 20:30
y***@gmail.com
ios的一直是前置摄像头,不管是front还是back, 怎么解决?
未设置昵称
初始化的时候 // 摄像头切换
// this.context.switchCamera()
jtshushu
plus.navigator.setFullscreen(true); //全屏
let currentWebview = this.$scope.$getAppWebview();
const pusher = new plus.video.LivePusher("pusher", {
top: '0',
left: '0',
width: '100%',
height: '100%',
muted: true
});
currentWebview.append(pusher);
pusher.switchCamera();
这样吗
2022-05-07 11:50
3***@qq.com
回复 jtshushu: 请问有办法绑定在一个标签上吗?
2024-03-10 18:09