cordova-rtc / cordova-plugin-iosrtc

Cordova iOS plugin exposing the WebRTC W3C API
MIT License
690 stars 338 forks source link

use the same MediaStreamTrack on RTCRtpSender #773

Closed jerry2013 closed 1 year ago

jerry2013 commented 1 year ago

this took me lots of time to track down.

under iosrtc, for local media tracks, the normal flow goes:

the patch here uses a global map to maintain all "active" tracks, so that the async callback can find the existing tracks.

still, this is a quick and dirty workaround to addresses my own usage.