addTrack method

  1. @override
Future<void> addTrack(
  1. MediaStreamTrack track, {
  2. bool addToNative = true,
})
override

Adds the given MediaStreamTrack to this MediaStream.

Implementation

@override
Future<void> addTrack(MediaStreamTrack track, {bool addToNative = true}) {
  if (addToNative) {
    var _native = track as MediaStreamTrackWeb;
    jsStream.addTrack(_native.jsTrack);
  }
  return Future.value();
}