// 方式一:通过 Context 创建val cameraView = CameraView(context)// 方式二:通过 SurfaceView 创建val surfaceView = SurfaceView(context)val cameraView = CameraView(surfaceView)// 方式三:在 XML 布局中使用// <io.trtc.tuikit.atomicxcore.api.view.CameraView// android:id="@+id/camera_view"// android:layout_width="match_parent"// android:layout_height="match_parent" />
文档反馈