live-pusher中的属性,device-position不支持动态设置吗?

发布于 8 年前作者 tianmin6894 次浏览最后编辑 8 年前来自 issues

如题,设置为静态值(front/back)的时候,是正常的。但是在liver-pusher初始化之后,再动态改变device-position是没效果的吗?

1 回复
jing50
jing501 楼6 年前

支持,但是需要用到pusherContext的方法实现:

https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.switchCamera.html

你可能需要自己维护前后摄像头的状态,切换时使用api方法做切换操作。这个属性值不支持动态设置。