Skip to content

ozinc/react-native-agora-rawdata

 
 

Repository files navigation

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

About

The rawdata plugin for react-native-agora

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 92.6%
  • Objective-C++ 2.0%
  • Java 2.0%
  • Objective-C 1.2%
  • Ruby 0.6%
  • TypeScript 0.5%
  • Other 1.1%