Skip to main content
The Ant Media Server React Native SDK enables ultra-low latency WebRTC streaming in React Native applications. Write once, deploy to both iOS and Android.

Installation

NPM

Install the SDK via npm:

Yarn

Or install with yarn:

iOS Setup

Install CocoaPods dependencies:
Add permissions to ios/YourApp/Info.plist:

Android Setup

Add permissions to android/app/src/main/AndroidManifest.xml:

Basic Usage

Import Components

Setup Provider

Wrap your app with AntMediaProvider:

Publishing a Stream

Playing a Stream

Conference Room

Join a multi-party conference room:

Camera Controls

Control camera and media settings:

Data Channels

Send and receive real-time data:

Event Listeners

Listen to SDK events:

Configuration Options

Media Constraints

Customize video and audio settings:

Video Resolution

Set video resolution:

Runtime Permissions

Request camera and microphone permissions:

Resources

React Native SDK Repository

View source code, sample apps, and contribute on GitHub

Requirements

  • React Native 0.60 or higher
  • iOS 12.0 or later
  • Android 5.0 (API level 21) or higher
  • Ant Media Server with SSL/TLS configured
Make sure to test on both iOS and Android devices as WebRTC behavior may differ between platforms.

Next Steps

Flutter SDK

Build with Flutter for cross-platform apps

Authentication

Secure streams with token authentication