setTrack method
Implementation
@override
Future<void> setTrack(MediaStreamTrack track,
{bool takeOwnership = true}) async {
try {
await WebRTC.invokeMethod('rtpSenderSetTrack', <String, dynamic>{
'peerConnectionId': _peerConnectionId,
'rtpSenderId': _id,
'trackId': track.id,
'takeOwnership': takeOwnership,
});
} on PlatformException catch (e) {
throw 'Unable to RTCRtpSender::setTrack: ${e.message}';
}
}