IosVideoTrack

class IosVideoTrack(nativeTrack: RTCMediaStreamTrack, onDispose: () -> Unit = {}) : WebRtcMedia.VideoTrack, IosMediaTrack(source)

iOS-specific implementation of a video track that wraps RTCMediaStreamTrack.

Handles video-specific functionality and provides proper resource cleanup when disposed. Call close to properly dispose of native resources when the track is no longer needed.

Report a problem

Constructors

Link copied to clipboard
constructor(nativeTrack: RTCMediaStreamTrack, onDispose: () -> Unit = {})

Properties

Link copied to clipboard
open val enabled: Boolean

Current enabled state of the track

Link copied to clipboard
open val id: String

Unique identifier for this track

Link copied to clipboard

Type of media track (audio or video)

Functions

Link copied to clipboard
open fun close()
Link copied to clipboard
open fun enable(enabled: Boolean)

Enables or disables the track.

Link copied to clipboard

Returns implementation of the native video stream track used under the hood. Use it with caution.

fun WebRtcMedia.VideoTrack.getNative(): RTCVideoTrack

Returns implementation of the native video stream track used under the hood. Use it with caution.

fun WebRtcMedia.Track.getNative(): MediaStreamTrack

Returns implementation of the native media stream track used under the hood. Use it with caution.