webrtc-kmp icon indicating copy to clipboard operation
webrtc-kmp copied to clipboard

Add factory method to get JS media stream as library MediaStream

Open DFedonnikov opened this issue 1 year ago • 0 comments

Lately I've encountered use case when I needed to stream from a file. Actual class MediaStream have an internal constructor, so I wasn't able to create it with JS stream. Would it be possible to add some kind of factory method to JS implementation of MediaStream? For example:

MediaStream.fromSource(stream: org.w3c.dom.mediacapture.MediaStream): MediaStream { return MediaStream(stream) }

DFedonnikov avatar Sep 03 '23 11:09 DFedonnikov