CustomStreamTrack

Represents a custom audio or video track created via the VideoSDK factory methods.

Custom tracks allow you to configure encoding parameters, optimization mode, and multi-stream (simulcast) settings before passing them to the meeting.

Create custom tracks using:

Code Example:


val videoTrack = VideoSDK.createCameraVideoTrack(
    "h720p_w1280p",                        // encoder config (resolution)
    "front",                                // facing mode
    CustomStreamTrack.VideoMode.MOTION,     // optimization mode
    true,                                   // multi-stream (simulcast)
    context,                                // Android context
    null,                                   // video device (default camera)
    3,                                      // max simulcast layers
    BitrateMode.BALANCED                    // bitrate mode
)
meeting.enableWebcam(videoTrack)

See also

VideoSDK.createAudioTrack()

Types

Link copied to clipboard
Defines the video content optimization mode.

Properties

Link copied to clipboard
The encoder configuration string — such as "h720p_w1280p" — controlling resolution and frame rate.
Link copied to clipboard
The camera facing direction ("front" or "back") for this track.
Link copied to clipboard
The video content optimization mode hint for the encoder.
Link copied to clipboard
val track: MediaStreamTrack
The underlying MediaStreamTrack for this custom track.

Functions

Link copied to clipboard
fun getHeight(): Int
This method can be used to get the video height based on the encoder configuration.
Link copied to clipboard
fun getWidth(): Int
This method can be used to get the video width based on the encoder configuration.
Link copied to clipboard
This method can be used to check whether multi-stream (simulcast) is enabled.