开启本地视频的预览画面。
| 参数名称 | 参数描述 | 参数类型 |
|---|---|---|
| frontCamera | 是否是前置摄像头 | bool |
使用:
由于视频输入输出属于视频视图相关内容,所以不能直接使用 TencentRtcPlugin 类来进行接口调用,而是需要在 build 中创建一个视图组件,然后通过视图组件的 controller 进行调用方法,例如:
TencentRtcVideoView(onViewCreated: (TencentRtcVideoViewController controller) async {if (await Permission.camera.request().isGranted) {controller.startLocalPreview(frontCamera: false);}},)
该案例中包含了,权限检测、开启本地预览,在拥有相机权限后则会开启本地预览。
