Reputation: 51
I am developing with react-native webrtc app. When get local stream, have a bug as below:
Undefined is not an object(evaluating 'WebRTCModule.mediaStreamTrackGetSources')
This MediaStreamTrack
object is an object of react-native-webrtc
lib. Can someone suggest me? Thanks in advance!
Image: https://i.sstatic.net/gSeQR.png
Upvotes: 4
Views: 2717
Reputation: 1315
I got a similar error on iOS. I found I had failed to link libRCTWebRTC.a
. Covered in more detail in step #4 here: https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/iOSInstallation.md#step-4-linkinclude-necessary-libraries
For Android, the process is covered here: https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/AndroidInstallation.md
Upvotes: 3
Reputation: 51
I found the answer by adding WebRTCModule
from react-native-webrtc
lib to all settings and .java file as settings.gradle, build.gradle, manifest file and MainApplication.java.
Upvotes: 0