react-native-agora-rawdata
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

react-native-agora-rawdata

The rawdata plugin for react-native-agora.

Important

The plugin only exports four methods to the javascript layer that can register or unregister the observer.

type AgoraRawdataType = {
  registerAudioFrameObserver(engineHandle: number): Promise<void>;

  unregisterAudioFrameObserver(): Promise<void>;

  registerVideoFrameObserver(engineHandle: number): Promise<void>;

  unregisterVideoFrameObserver(): Promise<void>;
};

The plugin changes the color of the video stream by the default:

  • Change local video to green
  • Change remote video to pink

You can find the code at:

If you can program with C++, you should process raw data on the C++ layer to improve performance and remove code about calling Android and iOS.

You can find the code at:

Installation

npm install react-native-agora-rawdata

You should fork this repository, and modify the code to implement your requirement, such as use third-party beauty SDK.

Usage

import AgoraRawdata from "react-native-agora-rawdata";
import RtcEngine from 'react-native-agora';

const agora = await RtcEngine.create(appId);
await AgoraRawdata.registerAudioFrameObserver(
  await agora.getNativeHandle()
);
await AgoraRawdata.registerVideoFrameObserver(
  await agora.getNativeHandle()
);

Resources

  • Doc for react-native-agora
  • Doc for Android raw video data
  • Doc for iOS raw video data

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i react-native-agora-rawdata

    Weekly Downloads

    3

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    9.22 MB

    Total Files

    395

    Last publish

    Collaborators

    • sda_rob
    • guoxianzhe
    • luxuhui
    • agora.io
    • agorabuilder