All Projects → midas-gufei → react-native-agoraio

midas-gufei / react-native-agoraio

Licence: other
声网agora.io React-Native模块封装 支持iOS / Android

Programming Languages

C++
36643 projects - #6 most used programming language
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
swift
15916 projects
Objective-C++
1391 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-agoraio

Agora-Token-Generator
📦 Agora-Token-Generator Agora 声网 Token 生成器
Stars: ✭ 117 (+431.82%)
Mutual labels:  agoraio, agora-sdk
comfy-channel
A 24/7 live video broadcast with automatic content selection and overlays using FFMPEG and Python!
Stars: ✭ 37 (+68.18%)
Mutual labels:  live
ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+35309.09%)
Mutual labels:  live
flutter-p2p-engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 93 (+322.73%)
Mutual labels:  live
tiktok-download-userscript
Browser userscripts to download TikTok videos without watermark and get livestream URLs (to play in VLC).
Stars: ✭ 42 (+90.91%)
Mutual labels:  live
kiel-live
This app allows you to view live updates of bus arrivals.
Stars: ✭ 20 (-9.09%)
Mutual labels:  live
node-reactive-postgres
Reactive queries for PostgreSQL
Stars: ✭ 28 (+27.27%)
Mutual labels:  live
pixiv func android
功能齐全的Pixiv第三方客户端 免代理 支持查看动图查看直播
Stars: ✭ 167 (+659.09%)
Mutual labels:  live
SuperCTF
A multiplayer capture the flag game made in Godot with love and blood. Running live at www.superctf.com
Stars: ✭ 26 (+18.18%)
Mutual labels:  live
muun
🐦 Live Twitter Dashboard
Stars: ✭ 43 (+95.45%)
Mutual labels:  live
github-actions
Repository for CDS specific GitHub actions
Stars: ✭ 63 (+186.36%)
Mutual labels:  live
LiveHiddenCamera
Live Hidden Camera is a library which record live video and audio from Android device without displaying a preview.
Stars: ✭ 69 (+213.64%)
Mutual labels:  live
Ant-Live
【基于JAVA开发的在线直播平台】Ant Live;腾讯云直播服务;直播鉴黄;礼物;支付宝充值提现;弹幕聊天室;前端后分离;SpringBoot;直播平台开发;
Stars: ✭ 28 (+27.27%)
Mutual labels:  live
janus-gateway-live
RTMP edge speed with janus-gateway
Stars: ✭ 38 (+72.73%)
Mutual labels:  live
craft-youtubeliveembed
This plugin allows you to embed a YouTube live stream and/or live chat on your webpage
Stars: ✭ 14 (-36.36%)
Mutual labels:  live
vil
Vulkan Layer for Live Introspection & Debugging. Allows to view all vulkan state live inside your application.
Stars: ✭ 39 (+77.27%)
Mutual labels:  live
react-runner
Run your React code on the go
Stars: ✭ 308 (+1300%)
Mutual labels:  live
open-securekos
Open Secure-K OS is an operating system booting from a USB key in which you can safely create and store your personal and private data. It is a next generation live operating system following liveng patterns. Please refer to Resilient Linux, a fork of Open Secure-K OS which is actively developed.
Stars: ✭ 23 (+4.55%)
Mutual labels:  live
node-rtmp-hls
NodeJS live stream server with HLS ABR support
Stars: ✭ 55 (+150%)
Mutual labels:  live
live-graph
Simple live graph with Flask and SocketIO
Stars: ✭ 17 (-22.73%)
Mutual labels:  live

react-native-agoraio

npm version npm Platform - Android and iOS MIT

Author           E-mail    
gufei         [email protected]
  • 广告:Udacity课程优惠券:邀请码: 67D6DA2E,立减 300 元

功能介绍

  • 支持 iOS、Android 声网Agora多人互动直播
  • 支持 免费的基础美颜:美白、磨皮、红润等
  • 高级美颜功能,请自行接入Kiwi、Sentime、FaceU等服务商的SDK
  • 由于github受限上传大小,请自行官网更新 AgoraRtcEngineKit.framework、AgoraRtcCryptoLoader.framework、libcrypto.a

安装使用

npm install --save react-native-agoraio

Then link with:

react-native link react-native-agoraio

iOS

TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,选择

libresolv.tbd
libc++.tbd
AVFoundation.framework
AudioToolbox.framework
VideoToolbox.framework
CoreMotion.framework
CoreMedia.framework
CoreTelephony.framework

TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择

node_modules/react-native-agoraio/ios/RCTAgora/Frameworks/AgoraSDK/libcrypto.a
node_modules/react-native-agoraio/ios/RCTAgora/Frameworks/AgoraSDK/AgoraRtcCryptoLoader.framework
node_modules/react-native-agoraio/ios/RCTAgora/Frameworks/AgoraSDK/AgoraRtcEngineKit.framework
node_modules/react-native-agoraio/ios/RCTAgora/Frameworks/AgoraSDK/videoprp.framework

TARGETS->Build Settings->Search Paths->Framework Search Paths添加

"$(SRCROOT)/../node_modules/react-native-agoraio/ios/RCTAgora/Frameworks/AgoraSDK"

TARGETS->Build Settings->Search Paths->Library Search Paths添加

"$(SRCROOT)/../node_modules/react-native-agoraio/ios/RCTAgora/Frameworks/AgoraSDK"

TARGETS->Build Settings->Enable Bitcode设置为No

TARGETS->Capabilities->Background Modes->Modes勾选Audio,AirPlay,and Picture In Picture

项目目录->Info.plist->增加2项

"Privacy - Camera Usage Description":"use camera to start video call"
"Privacy - Microphone Usage Description":"use microphone to start video call"

Android

Add following to AndroidManifest.xml

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

当您在写混淆代码时,请添加以下代码:

-keep class io.agora.**{*;}

Documentation

声网API

RtcEngine方法
Property Type Description
init
{
appid: 'agora注册的应用id',
channelProfile: '频道模式',
videoProfile: '视频模式',
clientRole: '角色',
swapWidthAndHeight: 'bool值'
}
初始化Agora引擎
joinChannel string: channelName(房间名称)
number: uid(uid=0系统自动分配)
加入房间
leaveChannel 离开频道
changeRole 切换角色
destroy 销毁引擎实例
configPublisher object{} config参数请前往Agora文档查看 配置旁路直播推流方法
setLocalRenderMode number: mode (1 2 3) 设置本地视频显示模式
setRemoteRenderMode number: uid
number: mode (1 2 3)
设置远端视频显示模式
enableAudioVolumeIndication number: interval (时间间隔)
number: smooth(平滑系数,可以设置为3)
启用说话者音量提示
startPreview 开启视频预览
stopPreview 关闭视频预览
switchCamera 切换(前置/后置)摄像头
enableVideo 开启视频模式
disableVideo 关闭视频
setCameraAutoFocusFaceModeEnabled 开/关 人脸对焦功能
setDefaultAudioRouteToSpeakerphone 修改默认的语音路由
setCameraTorchOn 开/关 闪光灯
setEnableSpeakerphone bool 开/关 扬声器
muteLocalAudioStream bool (default false) 将自己静音
muteAllRemoteAudioStreams bool (default false) 静音所有远端音频
muteRemoteAudioStream number: uid(用户uid)
bool: mute(是否静音)
静音指定用户音频
muteLocalVideoStream bool (default false) 暂停发送本地视频流
enableLocalVideo bool (default false) 禁用本地视频功能
muteAllRemoteVideoStreams bool (default false) 暂停所有远端视频流
muteRemoteVideoStream number: uid(用户uid)
bool: mute(是否暂停)
暂停指定远端视频流
startRecordingService (iOS only) string: recordingKey 启动服务端录制服务
stopRecordingService (iOS only) string: recordingKey 停止服务端录制服务
getSdkVersion callback 获取版本号
openBeautityFace 打开美颜
closeBeautityFace 关闭美颜
原生通知事件
RtcEngine.eventEmitter({
  onFirstRemoteVideoDecoded: data => {},
  onFirstRemoteVideoFrameOfUid: data => {},
  onFirstLocalVideoFrameWithSize: data => {},
  onJoinChannelSuccess: data => {},
  onReJoinChannelSuccess: data => {},
  onUserOffline: data => {},
  onUserJoined: data => {},
  onError: data => {},
  onWarning: data => {},
  onLeaveChannel: data => {},
  onAudioVolumeIndication: data => {},
  onConnectionDidInterrupted: data => {},
  onConnectionDidLost: data => {},
  onConnectionDidBanned: data => {}
})
Name Description
onFirstRemoteVideoDecoded 远端首帧视频接收解码回调
onFirstRemoteVideoFrameOfUid 远端首帧视频显示回调
onFirstLocalVideoFrameWithSize 本地首帧视频显示回调
onJoinChannelSuccess 加入频道成功的回调
onReJoinChannelSuccess 重新加入频道回调
onUserOffline 其他用户离开当前频道
onUserJoined 其他用户加入当前频道
onError 错误信息
onWarning 警告
onLeaveChannel 退出频道
onAudioVolumeIndication 音量提示回调
onConnectionDidInterrupted 网络连接中断回调
onConnectionDidLost 网络连接丢失回调
onConnectionDidBanned 连接已被禁止回调
AgoraView 组件
Name Description
showLocalVideo 是否显示本地视频(bool)
remoteUid 显示远程视频(number 传入uid)
zOrderMediaOverlay (Android only) 多视频界面覆盖 设置为true优先在上层(bool)

运行示例

Example
Experience Package

   

更新信息

2.2.0 版:发布于 2018 年 5 月 4 日

  • 为更好地提升用户体验,Agora SDK 在 2.1 版本中对动态秘钥进行了升级。 如果你当前使用的 SDK 是 2.1 之前的版本,并希望升级到 2.1 或更高版本,请务必参考 动态秘钥升级说明 。

  • 新增功能

    1. 音效混响进频道
    1. 服务端部署代理服务器
    1. 获取远端视频状态
    1. 直播添加视频水印
  • 改进功能

    1. 当前说话者音量提示
    1. 频道内网络质量监测
    1. 进入频道前网络条件监测
    1. 提升音乐场景下的音质
    1. 支持 Bitcode
  • 问题修复

  • 修复了某些 iOS 设备横屏时,偶现的其他用户看 iOS 设备画面异常的问题

  • 修复了大量用户同时直播连麦时,偶发的抖屏现象

  • 修复了某些 iOS 设备导致频道内其他端的回音问题

2.1.1 版 : 发布于 2018 年 3 月 16 日

  • 请正在或已集成 2.1 SDK 的客户尽快升级更新! 本次发版修复了一个的系统风险,请尽快升级以免对服务造成影响。

2.0.0

  • andoid && iOS自带基础美颜功能
  • android新增切换角色方法

1.10.12

  • 集成Kiwi人脸跟踪及特效(贴纸、美颜、滤镜、哈哈镜) - iOS版
  • 新增切换角色方法

1.10.10

  • 重新加入频道回调

  • 本地首帧视频显示回调

  • 远端首帧视频显示回调

  • 主播离线回调

  • 网络连接中断回调

  • 网络连接丢失回调

  • 连接已被禁止回调

1.10.6

  • 更新Agora SDK为2.2.0

  • 新增方法 是否开启人脸对焦功能 setCameraAutoFocusFaceModeEnabled

  • 新增方法 修改默认的语音路由 setDefaultAudioRouteToSpeakerphone

  • 新增方法 是否打开闪光灯 setCameraTorchOn

  • 修复 Android 说话者音量提示bug

1.0.8

  • 更新Agora SDK为1.12

  • init 不再默认开启视频预览 根据自己需求和时机调用startPreview

  • init options 新增参数 是否交换宽和高 swapWidthAndHeight 默认false

  • 新增方法 配置旁路直播推流方法 configPublisher

  • 新增方法 设置本地视频显示模式 setLocalRenderMode

  • 新增方法 设置远端视频显示模式 setRemoteRenderMode

  • 新增方法 启用说话者音量提示 enableAudioVolumeIndication

  • 新增音量提示回调 onAudioVolumeIndication

  • Android AgoraView 新增zOrderMediaOverlay属性 解决多视频界面覆盖 设置为true优先在上层

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].