custom-agora-rtc-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Agora RTC SDK React Wrapper

A react (react.js) wrapper for Agora RTC NG SDK.

This wrapper supports React >= v16.8

Install

npm install git://github.com/AgoraIO-Community/agora-rtc-react#v1.0.1

Usage

import React from "react";
import { AgoraVideoPlayer, createClient, createMicrophoneAndCameraTracks } from "agora-rtc-react";

const config = {mode: "rtc", codec: "vp8"}

const useClient = createClient(config);
const useMicrophoneAndCameraTracks = createMicrophoneAndCameraTracks();

const App = () => {
  const client = useClient();
  const { ready, tracks } = useMicrophoneAndCameraTracks();

  return (
    ready && <AgoraVideoPlayer videoTrack={tracks[1]} style={{height: '100%', width: '100%'}} />
  )
}

Example

A full videocall example using the wrapper can be found here.

Reference

You can view the methods in the wrapper here.

Readme

Keywords

none

Package Sidebar

Install

npm i custom-agora-rtc-react

Weekly Downloads

1

Version

1.0.0

License

none

Unpacked Size

47.9 kB

Total Files

9

Last publish

Collaborators

  • burhanyilmaz_