StreamURL not getting set

Hi,

I’ve followed the documentation and I’m calling a getLocalStream function in my componentDidMount().
However, inside that function mediaDevices.enumeratedDevices() and mediaDevices.getUserMedia() are not being called. My console.logs in either are not being called. I do know that getLocalStream is being called. As such my RTCView is just a white box as there’s no streamURL.


This shows console logs for the application one running on an emulated device - android/ios - and the other on a physical android device. The media stream is returned only in the simulated devices.

That’s very bizarre. Don’t you get any other error? Does it happen both for Android and iOS?

I can’t test the app on an iPhone device. It builds but when it opens it shows the react native screen then immediately closes. And I get an Xcode error saying failed to launch. No build or runtime errors in the logs though.

No errors show for the android device. My only thought is it’s quite an old phone from my university department so I’m going to go try it on a more modern android phone.

I tested it on my housemate’s Android phone running 8.0.0 and it has worked Its now finding the local stream and displaying properly in the RTCView, and my socket.io server is pinging correctly. Next step is learning how to connect peers.

The university phone was running 4.1.1

Still not sure what the iOS error is caused by.

Thanks.

4.1.1 is ancient and not very well supported by WebRTC. In fact support for it will be going away soon.

What would you suggest as a minimum viable android version?

5.0 or API level 19. If you can, 6.0 or API level 21 would be even better.

Awesome thank you!

One final question regarding iOS. I managed to get the app launching on my phone and it’s logging correctly that it’s getting the streaming etc. However when it tries to set the url it gets this error? doesn’t occur on the emulator, I assume due to the fact that it doesn’t access the camera only audio. My thought is that it’s to do with the constraints from looking at the repository and googling.

Thanks

What iOS version is that?

12.1.4 is that too modern?

No, that should just work.

How did you integrate this plugin into your project?

Followed the documentation. I’ll go through it again.