开启本地视频的预览画面。

    参数名称 参数描述 参数类型
    frontCamera 是否是前置摄像头 bool

    使用:
    由于视频输入输出属于视频视图相关内容,所以不能直接使用 TencentRtcPlugin 类来进行接口调用,而是需要在 build 中创建一个视图组件,然后通过视图组件的 controller 进行调用方法,例如:

    1. TencentRtcVideoView(
    2. onViewCreated: (TencentRtcVideoViewController controller) async {
    3. if (await Permission.camera.request().isGranted) {
    4. controller.startLocalPreview(frontCamera: false);
    5. }
    6. },
    7. )

    该案例中包含了,权限检测、开启本地预览,在拥有相机权限后则会开启本地预览。