Error calling JitsiMeetJS.createLocalTracks() in react native app


i am incorporating lib-jitsi-meet into a react native app but I am getting an error when creating local tracks:


The error is:

TypeError: r.getUserMedia is not a function


[modules/RTC/RTCUtils.js] <>: failed to obtain audio stream - stop


r {gum: Object, name: “gum.general”, message: “r.getUserMedia is not a function”, stack: “TypeError: r.getUserMedia is not a function at…”}


I import lib-jisti-meet.min from:

“lib-jitsi-meet”: “github:jitsi/lib-jitsi-meet#4a28a196160411d657518022de8bded7c02ad679”,

has anyone see this before?



In jitsi-meet the implementation of getUserMedia comes from react-native-webrtc and then gets polyfilled for the purposes of lib-jitsi-meet in react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js. Please make sure that either you’re doing the polyfills yourself or better yet that you’re using the correct revision of react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js that matches your lib-jitsi-meet.


Zdravei ( your name looks very bulgarian :slight_smile: )

Thanks for your reply. I think i am using the right version of lib-jitsi-meet and polyfills-webrtc.js. I created a small project with ignite boilerplate to play with the library but still get the same error ( ). I am calling the jitsi meet api from a redux saga ( ).

Do you have any other ideas what might be going on?

“lib-jitsi-meet”: “github:jitsi/lib-jitsi-meet#4a28a196160411d657518022de8bded7c02ad679”

and i copied polyfills-webrtc.js from the jitsi-meet repository

Thanks for your time


The thing is that recently both jitsi-meet and lib-jitsi-meet got updated with respect to getUserMedia. I think you’re using lib-jitsi-meet before the update. Then you should be using a polyfills-webrtc.js from jitsi-meet which has a line mentioning getUserMedia explicitly. Once the WebRTC polyfill is correct and executes before lib-jitsi-meet tries to call the function there’s no reason for it to not exist.


updating lib-jitsi-meet and the polyfills file did it, thanks!!