1.0.1 • Published 3 years ago

agora-rtc-react-wrapper-test v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Agora RTC SDK React Wrapper

NPM

A react wrapper for Agora RTC NG SDK

Install

npm install --save agora-rtc-react-wrapper

Usage

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

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

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

  return (
    ready && <AgoraVideoPlayer videoTrack={tracks[1]} />
  )
}

An example using the wrapper can be gound here.

You can also view the API reference.

License

MIT © EkaanshArora

1.0.1

3 years ago

1.0.0

3 years ago