VideoTrack

The VideoTrack class provides functionalities for configuration, control, and rendering of video content.

Properties

Link copied to clipboard
val kind: TrackType

Returns the type of the track, indicating whether it is an audio track or a video track.

Link copied to clipboard
var name: String?

Retrieves the name associated with the track.

Functions

Link copied to clipboard
fun removeVideoSink(videoSink: VideoSink): Boolean

Remove a given VideoSink from the VideoTrack.

Link copied to clipboard
open override fun setEnabled(enable: Boolean)

Enables or disables the video track. A disabled video track produces black frames.

Link copied to clipboard
fun setRenderer(renderer: VideoRenderer)

Associates a specific video renderer with the video track.

Link copied to clipboard
fun setVideoSink(videoSink: VideoSink): Boolean

Sets a video sink to the current video track. Before SDK 1.7, only one video sink could be attached. In SDK 1.7 and later, it is possible to attach multiple video sinks and detach them by calling the method removeRenderer(VideoSink).