Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.08 KB

react-native.md

File metadata and controls

29 lines (17 loc) · 1.08 KB

React Native

SimpleUser class

The SimpleUser class will not work with React Native (it depends on the DOM).

API framework

In order to use the API framework in React Native (for building Android and iOS apps):

By calling registerGlobals(), classes required by WebRTC such as RTCPeerConnection and MediaStream (among others) will be exposed in the global scope which is required by the default WebRTC SessionDescriptionHandler.

For example...

import { registerGlobals } from 'react-native-webrtc';
import { UserAgent } from 'sip.js';

registerGlobals();

const ua = new UserAgent(/* configuration options here */);

Core library

The Core library works with React Native out of the box.