createVideoTrack

fun createVideoTrack(name: String = "", capturer: VideoCapturer, options: LocalVideoTrackOptions = videoTrackCaptureDefaults.copy(), videoProcessor: VideoProcessor? = null): LocalVideoTrack

Creates a video track, recording video through the supplied capturer.

This method will call VideoCapturer.initialize and handle the lifecycle of SurfaceTextureHelper.

Parameters

name

The name of the track.

capturer

The capturer to use for this track.

options

The capture options to use for this track, or Room.videoTrackCaptureDefaults if none is passed.

videoProcessor

A video processor to attach to this track that can modify the frames before publishing.


fun createVideoTrack(name: String = "", options: LocalVideoTrackOptions = videoTrackCaptureDefaults.copy(), videoProcessor: VideoProcessor? = null): LocalVideoTrack

Creates a video track, recording video through the camera with the given options.

Parameters

name

The name of the track

options

The capture options to use for this track, or Room.videoTrackCaptureDefaults if none is passed.

videoProcessor

A video processor to attach to this track that can modify the frames before publishing.

Throws

will be thrown if Manifest.permission.CAMERA permission is missing.