0.0.29 • Published 8 years ago

react-native-agora-videochat v0.0.29

Weekly downloads
30
License
MIT
Repository
github
Last release
8 years ago

react-native-agora-videochat

正在开发中...

最近公司项目APP大更新,赶的比较紧,这个也碰到一个bug在解决。公司APP今明两天应该能结束,然后我会继续这个项目的开发。

进度:安卓视频呼入0.0.1 -- ios视频呼入0.0.1 -- 安卓视频呼出0.0.1 -- ios视频呼出0.0.1 -- 安卓视频通信0.0.1 -- ios视频通信0.0.0

npm version

android视频呼入 ios视频呼入 android视频呼出 ios视频呼出 android视频通话

Getting started

$ npm install react-native-agora-videochat --save

ios使用说明

1.需在你所在的项目Build PhasesLink Binary with Libraries添加如下图的库(其中AgoraRtcEngineKit.framework声网ios库)(请先暂时使用我上传的sdk,现在还暂未适配到最新的sdk)

ios库

2.更改Build Setting中的Enable BitcodeNO;

3.在 info.plist 进行授权操作:

将 Privacy - Camera Usage Description 设置为 use camera to start video call

将 Privacy - Microphone Usage Description 设置为 use microphone to start video call

Mostly automatic installation

$ react-native link react-native-agora-videochat

Documentation

Params

KeyDescriptionTypeDefault
remoteName对方的名称string""
remoteHeader对方的头像地址string""
channelKey声网的channelkeystring""
channelName声网的channelNamestring""
appId声网的appidstring""
callState呼叫状态(呼入'inCome'/呼出'outPut')string""
netStatus网络状态('wifi'/'others')string""
introText呼叫时显示的介绍文字string""
backgroundImage呼入界面的背景图地址urlstring""
hanginImage接听图片地址urlstring""
hangupImage挂断图片地址urlstring""
muteImage允许自己声音的图片地址urlstring""
unmuteImage不允许自己声音的图片urlstring""
switchcameraImage切换摄像头的图片urlstring""
hangin接听视频呼叫function
hangup视频内终止视频function
hangupIncome拒绝视频呼叫function
hangupCalling终止呼叫视频function
hangupByPeer视频内对方终止视频function

Methods

NameDescriptionTypeDefault
initinit and pass parameters to viewer
toggleshow or hide viewer
showshow viewer
hidehide viewer
isViewerShowget status of viewer, return a boolean

Usage

import Viewer from 'react-native-agora-videochat';

Viewer.init({
    remoteName:'张小凡',
    remoteHeader: '',
    channelKey: '',
    channelName: '',
    appId: '',
    callState: 'inCome',
    netStatus: 'wifi',
    introText: '邀请你视频',
    backgroundImage:'',
    hanginImage:'',
    hangupImage:'',
    muteImage:'',
    unmuteImage:'',
    switchcameraImage:'',
    hangin:(data)=>{
        console.log('---1---',data);
    },
    hangup:(data)=>{
        console.log('---2---',data);
        Viewer.hide();
    },
    hangupIncome:(data)=>{
        console.log('---3---',data);
        Viewer.hide();
    },
    hangupCalling:(data)=>{
        console.log('---4---',data);
        Viewer.hide();
    },
    hangupByPeer:(data)=>{
        console.log('---5---',data);
    },
});
Viewer.show();
0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago