RTCMultiConnection icon indicating copy to clipboard operation
RTCMultiConnection copied to clipboard

React Native Support

Open vahid263 opened this issue 7 years ago • 5 comments

Did anybody check RTCMultiConnection server with React Native? is it possible to use RTCMultiConnection functions in React Native?

vahid263 avatar Jan 14 '18 14:01 vahid263

Ok, I have an idea but I'm not sure if it's practically valid, I would love to see where this could lead though. If you go to react-native-webrtc repo, you see that you can import RTCPeerConnection, RTCSessionDescription, etc. to the javaScript realm, which theoretically should expose all webRTC APIs to JS, Right! They even hinted to that by saying.

Anything about using RTCPeerConnection, RTCSessionDescription and RTCIceCandidate is like browser.Support most WebRTC APIs.

Alright ! in your react-native directory you hit

npm install rtcmulticonnection

So you import RTCMulticonnection to your react-native app like this:

`import {
  RTCPeerConnection,
  RTCIceCandidate,
  RTCSessionDescription,
  RTCView,
  MediaStream,
  MediaStreamTrack,
  getUserMedia,
} from 'react-native-webrtc';
import RTCMultiConnection from 'RTCMultiConnection';
`

Now, I know that this might come very wrong and you're probably yelling at me now, but "WHAT-IF". of course you'd also get rid of browser specific functionalities as the webRTC api will running now on the Native Realm when Components render, nonetheless , it should be easier than implementing the whole work flow by your own.

bilobom avatar Dec 19 '18 15:12 bilobom

have you try ?

ihwf avatar May 13 '20 08:05 ihwf

Something new here?

danielehrhardt avatar Oct 31 '20 20:10 danielehrhardt

is this work?

gateisbug avatar Jan 26 '21 02:01 gateisbug

Just tried but the app doesn't fire up at all, complaining about a TypeError: undefined is not an object (evaluating 'navigator:userAgent.indexOf')

Does anyone have any success with RN?

Recluse58 avatar Jan 28 '21 16:01 Recluse58