1.0.1 • Published 3 years ago
agora-rtc-react-wrapper-test v1.0.1
Agora RTC SDK React Wrapper
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