IosAudioTrack

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

iOS-specific implementation of an audio track that wraps RTCMediaStreamTrack.

Handles audio-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 audio stream track used under the hood. Use it with caution.

fun WebRtcMedia.AudioTrack.getNative(): RTCAudioTrack

Returns implementation of the native audio 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.