Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agora-react-uikit

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agora-react-uikit

A React based UIKit for the Agora Web SDK

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-32.99%
Maintainers
1
Weekly downloads
 
Created
Source

Agora React Web UIKit

Instantly integrate Agora video calling or streaming into your web application using a React based UIKit for the Agora Web SDK.

NPM JavaScript Style Guide

Getting started

Requirements

You can also use the UIKit outside a React project (for example in a vanilla-js project) using web-components. Find out more in the /web-component directory.

Installation

To a react application, add the following:

npm i agora-react-uikit

Usage

This UIKit contains a high level component called AgoraUIKit. You can check out code explanation here.

A simple sample app integrating Agora UI Kit:

import React, {useState} from 'react';
import AgoraUIKit from 'agora-react-uikit';

const App = () => {
  const [videoCall, setVideoCall] = useState(true);
  const rtcProps = {
    appId: '<Agora App ID>',
    channel: 'test', // your agora channel
    token: '<Your channel Token>' // use null or skip if using app in testing mode
  };
  const callbacks = {
    EndCall: () => setVideoCall(false),
  };
  return videoCall ? (
    <div style={{display: 'flex', width: '100vw', height: '100vh'}}>
      <AgoraUIKit rtcProps={rtcProps} callbacks={callbacks} />
    </div>
  ) : (
    <h3 onClick={() => setVideoCall(true)}>Start Call</h3>
  );
};

export default App;

Insert your Agora AppID and Token.

Demo Project

There's a demo project in the repo here.

Instructions for running the demo:

  1. Add your Agora App ID to /example/src/App.tsx
  2. Run npm start to start the bundler to build the library
  3. Execute cd example && npm start to run the example app

Documentation

For full documentation, see our docs page.

You can visit the wiki for other examples and in depth guide.

UIKits

The plan is to grow this library and have similar offerings across all supported platforms. There are already similar libraries for Android, iOS, React Native, and Flutter, so be sure to check them out.

FAQs

Package last updated on 01 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc