CameraView

class CameraView : TUIVideoView

When starting camera test, the camera rendering view will be displayed on this CameraView.

Overview

CameraView Camera preview view for displaying the rendering view during camera testing. CameraView inherits from TUIVideoView and is a view component specifically designed to display camera preview. When starting camera test, the camera rendering view will be displayed on this view.

Key Features

  • Camera Preview:Used to display real-time view during camera testing

  • Multiple Construction Methods:Supports multiple constructors for different use cases

Note: This class is only available on Android platform and inherits from TUIVideoView.

Usage Example

// Method 1: Create via Context
val cameraView = CameraView(context)

// Method 2: Create via SurfaceView
val surfaceView = SurfaceView(context)
val cameraView = CameraView(surfaceView)

// Method 3: Use in XML layout
// <io.trtc.tuikit.atomicxcore.api.view.CameraView
// android:id="@+id/camera_view"
// android:layout_width="match_parent"
// android:layout_height="match_parent" />

Topics

Creating Instance

  • CameraView(Context)

  • CameraView(SurfaceView)

  • CameraView(Context, AttributeSet)

  • CameraView(Context, AttributeSet, SurfaceView)

See Also

  • TUIVideoView

Constructors

Link copied to clipboard
constructor(context: Context?)

Create CameraView instance via Context

constructor(surfaceView: SurfaceView)

Create CameraView instance via SurfaceView

constructor(context: Context?, attrs: AttributeSet?)

Create CameraView instance via Context and AttributeSet (for XML layout)

constructor(context: Context?, attrs: AttributeSet?, surfaceView: SurfaceView?)

Create CameraView instance via Context, AttributeSet and SurfaceView