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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-aglive

v1.0.0

Published

aglive

Readme

react-native-aglive

功能介绍

  • 支持 iOS、Android 声网Agora多人互动直播
  • 支持 免费的基础美颜:美白、磨皮、红润等

安装使用

npm install --save react-native-aglive

Then link with:

react-native link react-native-aglive

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-aglive/ios/RCTAgora/Frameworks/AgoraSDK/libcrypto.a
node_modules/react-native-aglive/ios/RCTAgora/Frameworks/AgoraSDK/AgoraRtcCryptoLoader.framework
node_modules/react-native-aglive/ios/RCTAgora/Frameworks/AgoraSDK/AgoraRtcEngineKit.framework
node_modules/react-native-aglive/ios/RCTAgora/Frameworks/AgoraSDK/videoprp.framework

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

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

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

"$(SRCROOT)/../node_modules/react-native-aglive/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) |