addTrack method

  1. @override
Future<RTCRtpSender> addTrack(
  1. MediaStreamTrack track, [
  2. MediaStream? stream
])
override

Implementation

@override
Future<RTCRtpSender> addTrack(MediaStreamTrack track,
    [MediaStream? stream]) async {
  var jStream = (stream as MediaStreamWeb).jsStream;
  var jsTrack = (track as MediaStreamTrackWeb).jsTrack;
  var sender = _jsPc.addTrack(jsTrack, jStream);
  return RTCRtpSenderWeb.fromJsSender(sender);
}