Media stream track error

I followed very carefully every steps from the readme to install react-native-webrtc for IOS and I’m pretty sure I didn’t make any mistake, but I still end up having this TypeError : " _reactNativeWebrtc.MediaStreamTrack.getSources is not a function".

Does anybody encounter this before ? I’m using :
“react”: “16.11.0” / “react-native”: “0.62.2” / “react-native-webrtc”: “^1.75.3”
Xcode Version 11.4.1 with a real device (iphone 8)

My Xcode build is succeeding, the app launches and then crashes with this error. Any tip would be very welcome since I’ve been scratching my head on this for several evenings now. I reinstalled all packages, tried different xcode build configurations, and almost know by heart everything you need to do to install react-native-webrtc on ios :sweat_smile:

Thank you !!

I did not genuinely found why this was causing an error but I commented it in the janus file I am using. It seems the way react-native-webrtc mediastreamtrack was called wasn’t correct.

emm… as i saw in MediaStreamTrack.js , the object does not have a method named getSources.
so, i am wondering if you write the code yourself?

Hey @zotille

I actually took the part that initially threw errors from there, to use janus :

for the package.json that atyenoria is using is his own repository and the MediaStreamTrack.js has some little difference :grinning:.
He addedin a static function in line 29: