npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zego-express-engine-whiteboard-reactnative

v3.16.2-40121-whiteboard

Published

React Native Zego Express Video (White board) for Android & iOS

Downloads

14

Readme

zego-express-engine-whiteboard-reactnative

English | 中文

ZegoExpressEngine Audio/Video ReactNative SDK is a react-native wrapper based on ZegoExpressEngine native Android / iOS SDK, providing live video and real-time audio/video services. It only needs 4 lines of code and can be easily accessed in 30 minutes.

Learn more about the solution: https://www.zego.im

1️⃣ Apply for ZEGO AppID

Log in to ZEGO Official Website to register an account, select a scenario according to your actual business needs, and obtain AppID and App Sign for initializing the SDK.

2️⃣ Import zego-express-engine-whiteboard-reactnative (only support react-native >= 0.60)

In your project, you can type in:

npm install zego-express-engine-whiteboard-reactnative --save

or

yarn add zego-express-engine-whiteboard-reactnative

Next, In iOS, you should cd to ios folder, and execute this command:

pod install

Now, you can use zego-express-engine-whiteboard-reactnative module in your project by using javascript or typescript(recommended)

3️⃣ Add device permissions

Android

Open the file app/src/main/AndroidManifest.xml, and add the following contents:

    <!-- Permissions required by the SDK -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- Permissions required by the App -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

Note: Because Android 6.0 requires dynamic permissions for some of the more important permissions, you cannot apply for static permissions only through the AndroidMainfest.xml file. Therefore, you need to refer to the following code

import {PermissionsAndroid} from 'react-native';

const granted = PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.CAMERA,
                                        PermissionsAndroid.RECORD_AUDIO);
granted.then((data)=>{

        if(!data) {
            const permissions = [PermissionsAndroid.PERMISSIONS.RECORD_AUDIO, PermissionsAndroid.PERMISSIONS.CAMERA];
            PermissionsAndroid.requestMultiple(permissions);
        }
    }).catch((err)=>{
    console.log(err.toString());
    })
}

iOS

Choose the option TARGETS -> Info -> Custom iOS Target Properties

Add iOS Privacy

Click the + Add button to add camera and microphone permissions.

  1. Privacy - Camera Usage Description

  2. Privacy - Microphone Usage Description

After adding permissions, it will be as shown:

Add iOS Privacy Done

4️⃣ Init SDK

import React, { Component } from 'react';
import ZegoExpressEngine from 'zego-express-engine-whiteboard-reactnative';

export default class App extends Component<{}> {

    componentDidMount() {
        ZegoExpressEngine.createEngineWithProfile({appID: 1234567890, scenario: ZegoScenario.General}).then((engine) => {
            if(engine != undefined)
                console.log("init sdk success");
            else
                console.log("init sdk failed");
        });
    }
}

5️⃣ FAQ

1. Can I integrate SDK with versions below 0.60?

No. zego-express-engine-whiteboard-reactnative only supports ReactNative versions of 0.60 or above, otherwise, please upgrade your project version.

Do I need a manual link this native module?

No. Automatic Link is supported in versions 0.60 or above, so you don't need to execute this command:

react-native link zego-express-engine-whiteboard-reactnative