# StreamURL not getting set

**URL:** <https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46>\
**Category:** Uncategorized\
**Created:** [March 2, 2019, 1:17pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46 "2019-03-02T13:17:57Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 2, 2019, 1:17pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/1 "2019-03-02T13:17:57Z")

</div>

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.

 ![36](https://global.discourse-cdn.com/free1/uploads/reactnativewebrtc1/original/1X/3147abfbdf5a7002fab0156da0c810720e74e5b8.png)  
 ![32](https://global.discourse-cdn.com/free1/uploads/reactnativewebrtc1/original/1X/3422d62ee185b2fca7a25b4a43ed9053e1053837.png)

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 5, 2019, 1:17pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/2 "2019-03-05T13:17:11Z")

</div>

![47](https://global.discourse-cdn.com/free1/uploads/reactnativewebrtc1/original/1X/b221f14dc24f3a56031c93cfb998d7f34f754acd.png) ![42](https://global.discourse-cdn.com/free1/uploads/reactnativewebrtc1/original/1X/524368bf13942f5ac9b89cf0bb42c4cb9cbf0fe6.png)

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.

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 5, 2019, 1:30pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/3 "2019-03-05T13:30:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 5, 2019, 3:34pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/4 "2019-03-05T15:34:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 5, 2019, 4:08pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/5 "2019-03-05T16:08:09Z")

</div>

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](http://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.

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 5, 2019, 4:36pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/6 "2019-03-05T16:36:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 5, 2019, 6:28pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/7 "2019-03-05T18:28:23Z")

</div>

What would you suggest as a minimum viable android version?

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 5, 2019, 6:33pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/8 "2019-03-05T18:33:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 6, 2019, 12:19pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/9 "2019-03-06T12:19:00Z")

</div>

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.

 ![40](https://global.discourse-cdn.com/free1/uploads/reactnativewebrtc1/original/1X/7ceeaa3b2111ad74a56d9ac2aa5fb72e705ff025.png)

Thanks

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 6, 2019, 4:19pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/10 "2019-03-06T16:19:01Z")

</div>

What iOS version is that?

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 6, 2019, 5:24pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/11 "2019-03-06T17:24:27Z")

</div>

12.1.4 is that too modern?

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 6, 2019, 7:42pm UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/12 "2019-03-06T19:42:38Z")

</div>

No, that should just work.

How did you integrate this plugin into your project?

---

<div class="post-metadata">

**Author:** ![ldb](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@ldb](https://react-native-webrtc.discourse.group/u/ldb)\
**Post date:** [March 7, 2019, 9:27am UTC](https://react-native-webrtc.discourse.group/t/streamurl-not-getting-set/46/13 "2019-03-07T09:27:21Z")

</div>

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