搜索插件、代码仓与 APP 分类

插件详情v6.6.4

agora_rtc_engine

Agora RTC SDK 的 Flutter 插件,只需几行代码即可轻松将 Agora 视频通话或实时视频流集成到您的应用中。

AndroidiOSWebmacOSWindows
近 30 天下载
7.4万
喜欢数
881
Pub 分数
140

安装插件

flutter pub add agora_rtc_engine

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Agora RTC Engine 是一个 Flutter 插件,可实现将实时视频通话和直播视频流无缝集成到移动和桌面应用程序中。通过极少的代码,开发者即可利用 Agora 可扩展的基础架构添加高质量的音视频通信功能。该插件支持 Android、iOS、Web、macOS 和 Windows 等多个平台,非常适合跨平台实时应用。它提供低延迟、高清晰度的媒体传输,并支持屏幕共享和自定义音频处理等高级功能。

适合场景

  • 视频会议应用
  • 直播流媒体平台
  • 远程辅导服务
  • 虚拟活动托管
  • 实时客户支持

主要特点

  • 低延迟视频和音频
  • 跨平台兼容性
  • 屏幕共享支持
  • 只需几行代码即可轻松集成
  • 可扩展的实时通信

适合对象

  • 开发实时通信应用的开发者
  • 需要视频互动的教育平台
  • 企业协作工具
  • 实时内容创作者
  • 需要安全的点对点或基于服务器的流媒体的应用程序

使用建议

  • 需要 Agora 账户和应用 ID
  • 网络带宽影响通话质量
  • Web 支持的功能可能相比原生平台有所限制
  • 生产部署需要额外配置

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

agora_rtc_engine

Pub.dev likes Pub.dev points
latest version Platform License RTE Dev Slack Link

This Flutter plugin is a wrapper for Agora Video SDK

Agora.io provides building blocks for you to add real-time voice and video communications through a simple and powerful SDK. You can integrate the Agora SDK to enable real-time communications in your own application quickly.

NOTE: The main branch is major update base on the Agora Native SDK 4.x, which introduces some break changes. previous releases please see the following branches(the version < 6.0.0):

Usage

To use this plugin, please add agora_rtc_engine as a dependency to your pubspec.yaml file.

Getting Started

  • Get some basic and advanced examples from the example folder.
Privacy Permission

Agora Video SDK requires Camera and Microphone permission to start a video call.

Android

For the latest permission settings, please refer to the documentation at https://docs.agora.io/en/video-calling/get-started/get-started-sdk?platform=android#project-setup

See the required device permissions from the AndroidManifest.xml file.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<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_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices. -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- For Android 12 and above devices, the following permission is also required. -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
iOS & macOS

For the latest permission settings, please refer to the documentation at https://docs.agora.io/en/video-calling/get-started/get-started-sdk?platform=ios#project-setup

Open the Info.plist and add:

  • Privacy - Microphone Usage Description,and add some description into the Value column.
  • Privacy - Camera Usage Description, and add some description into the Value column.
Web (alpha)

The agora_rtc_engine for web is currently in alpha stage, and the documentation is incomplete and it has only been tested on desktop web at this time.

The agora_rtc_engine web is built on top of iris_web, a wrapper for the Agora Web SDK 4.x. This helps align the Native SDK (Android/iOS/macOS/Windows) APIs through the Agora Web SDK 4.x. Please note that the agora_rtc_engine web utilizes the Agora Web SDK 4.x underneath, so only a subset of the Native SDK APIs can be implemented on the web. If the APIs return AgoraRtcException with a -4 error code, this means these APIs are not supported at this time.

Download the iris_web(see the link below) artifact and include it as a <script /> tag in your <your-project>/web/index.html file. For example:

Project structure

<your-project>
|__web
   |__index.html
   |__iris-web-rtc_<x.y.z>.js
<!-- <your-project>/web/index.html -->
<!DOCTYPE html>
<html>
...
<body>
  ...
  <script src="iris-web-rtc_<x.y.z>.js"></script>
</body>
</html>

Download: https://download.agora.io/sdk/release/iris-web-rtc_n450_w4220_0.8.6.js

For Testing Purposes

You can directly depend on the Agora CDN for testing purposes:

<!-- <your-project>/web/index.html -->
<!DOCTYPE html>
<html>
...
<body>
  ...
  <script src="https://download.agora.io/sdk/release/iris-web-rtc_n450_w4220_0.8.6.js"></script>
</body>
</html>
Interact with Agora RTC Native SDK(Android/iOS only)

NOTE: This feature requires agora_rtc_engine >= 6.3.0

Due to performance constraints, direct implementation of advanced features like video and audio raw data processing is not currently feasible in Flutter side.

We enable you to create an RtcEngine within Flutter by utilizing the native handle from the RtcEngine(Android) or AgoraRtcEngineKit(iOS) of the Agora RTC Native SDK. This approach enables your application to directly utilize the advanced features of the Agora RTC Native SDK through the agora_rtc_engine package, bridging the gap between native capabilities and Flutter's environment.

More detail, please check the ProcessVideoRawData example for reference.

Known issues
iOS not work on release mode

If you experience issues with iOS not working in release mode, you may need to set the configuration below to avoid stripping symbols.

Please refer to the Flutter documentation for more information.

API Reference Resources

Integration document

Feedback

If you have any problems or suggestions regarding the sample projects, feel free to file an issue OR pull request.

How to contribute

To help work on this sdk, please refer to CONTRIBUTING.md.

Related resources

License

The project is under the MIT license.

所属分类

依赖

依赖清单 7 项

源码仓库

使用此插件的项目