artberry
artberry

Reputation: 909

react-native-webrtc unable to create RTCPeerConnection

I am trying to create a basic RN app with react-native-webrtc, but I am unable to create a RTCPeerConnection class instance.

import {RTCPeerConnection} from 'react-native-webrtc';

const App: () => React$Node = () => {
   const configuration = { "iceServers": [{ "url": "stun:stun.l.google.com:19302" }] };
   const pc = new RTCPeerConnection(configuration);
   ...
   return(<>)
}

Having the error: enter image description here

What could be a reason for not being able to create an instance of RTCPeerConnection class? All dependencies have been installed.

Upvotes: 1

Views: 853

Answers (1)

DMakeev
DMakeev

Reputation: 159

Note, that { "url": ... } is deprecated, you should use { "urls": ... } instead.

Upvotes: 0

Related Questions