addTrack method
Adds the given MediaStreamTrack to this MediaStream.
Implementation
@override
Future<void> addTrack(MediaStreamTrack track,
{bool addToNative = true}) async {
if (track.kind == 'audio') {
_audioTracks.add(track);
} else {
_videoTracks.add(track);
}
if (addToNative) {
await WebRTC.invokeMethod('mediaStreamAddTrack',
<String, dynamic>{'streamId': id, 'trackId': track.id});
}
}