5.0.16-react-native • Published 8 months ago

@apirtc/react-native-apirtc v5.0.16-react-native

Weekly downloads
-
License
ICS
Repository
-
Last release
8 months ago

ApiRTC

ApiRTC is real time web communication library. It will enable you to easily add communication (chat, audio, video, file transfer, drawings) into your application.

ApiRTC makes web communication easy as a breeze using ApiRTC's infrastructure and WebRTC technology.

One of main avantage of ApiRTC is to be compatible with lot of differents browsers and versions. ApiRTC keeps evolving with the support of new APIs and features on web browsers.

Changelog available on github.

This library is based on apiRTC.js with some adaptation for React Native.

Feature Overview

AndroidiOS
Audio/Video:heavy_check_mark::heavy_check_mark:
Switch camera:heavy_check_mark::heavy_check_mark:
Conversation record:heavy_check_mark::heavy_check_mark:
Chat:heavy_check_mark::heavy_check_mark:
Screen sharing:heavy_check_mark::x:

Dependencies

"@config-plugins/react-native-webrtc": "^6.0.0",

"@notifee/react-native": "^7.8.0",

"react-native-device-info": "^10.6.0",

"react-native-webrtc": "^111.0.1",

"socket.io-client": "4.6.2",

Installation

npm i @apirtc/react-native-apirtc --save

or

yarn add @apirtc/react-native-apirtc

Usage

Module

import '@apirtc/react-native-apirtc';

Eg:

let ua = new apiRTC.UserAgent({
    cloudUrl: "https://cloud.apirtc.com",
    uri: "apzkey:myDemoApiKey",
});

ua.register()
    .then((session) => {
        console.log("User registered with session: ", session);
    })
    .catch((error) => {
        console.error("User agent registration failed", error);
    });

Note

Use static method by adding apiRTC before object :

apiRTC.Stream.getStream(streamId);

Example

Example running app for Android / iOS can be found on : github/apiRTC

Issues

Provide issues on github

Documentation

If you want to get started, you should take a look at our Getting started guide and API Quick start guide

We have also prepared a number of tutorials & samples to simplify the ApiRTC integration in your application.

API Reference Documentation