• Skip to Search
  • Skip to Content
  • Skip to Side Navigation
Getting StartedSDK ReferenceGlossary
  • Home
  • Getting Started
  • SDK Reference
  • Portal
  • How-To
  • Troubleshooting
  • FAQs
  • Reference
  • Glossary
REST API
Web SDK
Android SDK
iOS SDK
Unity SDK
React Native SDK
EdgeAuth SDK
  • Overview
  • Web SDK
  • Examples

React Native with the Web SDK

In order to use the Phenix Web SDK with React Native, first shim WebRTC via react-native-webrtc and then shim the Web SDK.

We support only Pure React Native apps. Expo will not work.

For a full example, see our Example

Shim the webrtc globals

JavaScript
1import {
2 RTCPeerConnection,
3 RTCIceCandidate,
4 RTCSessionDescription,
5 RTCView,
6 MediaStream,
7 MediaStreamTrack,
8 getUserMedia,
9} from 'react-native-webrtc';
10
11global = Object.assign(global, {
12 RTCPeerConnection,
13 RTCIceCandidate,
14 RTCSessionDescription,
15 RTCView,
16 MediaStream,
17 MediaStreamTrack,
18 getUserMedia,
19});

After that you need to include the Web SDK and shim the environment

JavaScript
1import sdk from 'phenix-web-sdk/dist/phenix-web-sdk-react-native.min';
2
3sdk.util.RTC.shim();
4// use sdk
Page Content
    Copyright 2023 © Phenix RTS
    Privacy Policy | Terms of Service
    v2023-01-31T21:25:10