commonMain.io.dyte.webrtc.MediaStream.kt Maven / Gradle / Ivy
package io.dyte.webrtc
expect class MediaStream {
val id: String
val tracks: List
fun addTrack(track: MediaStreamTrack)
fun getTrackById(id: String): MediaStreamTrack?
fun removeTrack(track: MediaStreamTrack)
fun release()
}
val MediaStream.audioTracks: List
get() = tracks.mapNotNull { it as? AudioStreamTrack }
val MediaStream.videoTracks: List
get() = tracks.mapNotNull { it as? VideoStreamTrack }