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

@tencentcloud/call-uikit-react-native

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tencentcloud/call-uikit-react-native

An Open-source Voice & Video Calling UI Component Based on Tencent Cloud Service.

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

TUICallKit

TUICallKit is a UIKit component for audio and video calls.

NPM verison NPM downloads Documents Stars

Introduction

TUICallKit is a UIKit component for audio and video calls developed by Tencent Cloud. By integrating this component, you can easily add video calling functionality to your app with just a few lines of code.

Install

yarn add @tencentcloud/call-uikit-react-native

Activate Service

  • copy the debug directory to your project directory src/debug, it is necessary when generating userSig locally.
    # macOS
    cp -r node_modules/@tencentcloud/call-uikit-react-native/src/debug ./src
    
    # windows
    xcopy node_modules\@tencentcloud\call-uikit-react\src\debug .\src\debug /i /e
    
  • Go to the Activate Service page and get the SDKAppID and SDKSecretKey, then fill them in the GenerateTestUserSig-es.js file.

Usage

import { TUICallKit, MediaType, TUICallEvent } from "@tencentcloud/call-uikit-react-native";
import { genTestUserSig } from '../../debug/GenerateTestUserSig-es';

TUICallKit.login

const handleLogin = () => {
  const userID = 'Alice'
  const { SDKAppID, userSig } = genTestUserSig({ userID });

  TUICallKit.login(
    {
      sdkAppId: SDKAppID,
      userId: userID,
      userSig,
    },
    (res) => {
      console.log('login success', res);
    },
    (errCode, errMsg) => {
      console.log('login error', errCode, errMsg);
    }
  );
};

TUICallKit.call

const call = () => {
  TUICallKit.call(
    {
      userId: 'denny',
      mediaType: MediaType.Video,
    },
    () => {
      console.log('call success');
    },
    () => {
      console.log('call error');
    }
  );
};

TUICallKit.groupCall

const groupCall = () => {
  TUICallKit.groupCall(
    {
      userIdList: ['mike', 'denny'],
      mediaType: MediaType.Video,
      groupId: 'xxx',
    },
    (res) => {
      console.log('groupCall success', res);
    },
    (errCode, errMsg) => {
      console.log('groupCall error', errCode, errMsg);
    }
  );
};

FAQs

Keywords

FAQs

Package last updated on 31 Dec 2024

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