agora_rtc_engine
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
See the required device permissions from the AndroidManifest.xml file.
<manifest>
...
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<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" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
tools:ignore="ProtectedPermissions" />
...
</manifest>
iOS & macOS
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.
Multiple Platforms
The agora_rtc_engine supports Android/iOS/macOS/Windows, but not support Web yet.
API Reference Resources
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.
Download source on GitHub
Flutter plugin of Agora RTC SDK for Android/iOS/macOS/Windows https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK 446 forks. 796 stars. 76 open issues. Recent commits: ci: remove post-release consumer smoke workflow (#2739)Remove Release Consumer Smoke, its dedicated consumer-build script and the metadata handoff used only by that workflow. Keep publication/documentation jobs and workflow inputs/outputs unchanged.Validation: workflow YAML, release contract parity, job dependencies, Bash syntax, removed references and diff checks passed. The consumer workflow was already disabled in GitHub. , GitHub ci: preserve Apple package identity when syncing Shengwang (#2729)Shengwang conversion renamed the Dart package but left Apple SwiftPMdirectories/products and CI references under agora_rtc_engine. It alsocopied Agora's MY_APP_ID default into a repository that uses APP_ID.Convert Apple package/source/header directories, manifest identities,podspec source paths and CI references together. The Demo gate reads theSDK plugin name from pubspec.yaml. Shengwang workflows default to APP_IDand require that configured App ID secret. Existing native and Irisdependency selections are preserved.Validation:- Seven Demo gate regression cases and the completeconversion/idempotency/symlink test pass. The existing dependencyupdater suite passes all 56 tests, with identical updater/test blobs onboth Shengwang branches. Both Apple manifests parse successfully.- main Demo:https://github.com/AgoraIO-Extensions/Shengwang-Flutter-SDK/actions/runs/44671900445— default APP_ID selected, CocoaPods and SwiftPM checks passed, 53.8 MBSwiftPM IPA exported, exactly one artifact uploaded.- General PR CI remains separate from these targeted Demo runs; pendingplatform checks are not claimed as passed.Current Native dependency status: publisher #593 repaired the artifactsand tag 4.6.4-rc.2 points to 6d1b9dc65b18e137822d561529b3cc979194c8c4.Fresh workstation downloads verify all 23 Native/Iris/AOSL ZIPs, and all21 Native payloads match original Agora build 61214.Remaining blocker is inconsistent CloudFront cached responses.Diagnostic runhttps://github.com/AgoraIO-Extensions/Shengwang-Flutter-SDK/actions/runs/44679870071shows ORD56-P6 serving the correct archives while PHX52-P3 returnspre-repair archives with X-Cache: Hit from cloudfront and Age about 8930seconds. Normal URL, no-cache headers and unique query strings allreturn the stale PHX content; a separate SwiftPM resolve with freshcache/scratch paths also fails. This is not evidence that #593 was neverperformed.The post-repair Agora Demohttps://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/actions/runs/44678413952and Shengwang Demohttps://github.com/AgoraIO-Extensions/Shengwang-Flutter-SDK/actions/runs/44678408450both still failed on those stale downloads. The affected CloudFrontpaths need invalidation and consumer-side revalidation beforerelease/6.6 packaging can be called healthy:/swiftpm/AgoraRtcEngine_iOS/4.6.4-rc.2/* . No SDK dependency selectionor native artifacts were changed by this CDN investigation. , GitHub ci: gate iOS Demo artifacts on CocoaPods and SwiftPM builds (#2727)iOS Demo builds used CocoaPods only, so a successful QA IPA could missbroken native SwiftPM artifacts. The iOS job now runs clean CocoaPodsand SwiftPM builds of the same checkout, verifies both SDK plugins usethe requested integration, and exports one SwiftPM IPA only after bothpaths pass. Dependency or checksum failures stop archiving and artifactupload.A separate iOS Flutter version defaults to the existing SwiftPM-tested3.44.4, preserving configured versions for other platforms. Checks comefrom the workflow revision so older target branches and tags can also bevalidated.Validation:- Six executable regression checks pass; workflow YAML and embedded Bashsyntax checks pass.- Positive control:https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/actions/runs/44666554765— CocoaPods and SwiftPM checks both passed, a 53.8 MB IPA was exported,and exactly one artifact was uploaded.- Known failing tag:https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/actions/runs/44666578017— CocoaPods passed, SwiftPM reported the 19 checksum mismatches, theDemo job failed, and zero artifacts were uploaded. , GitHub feat(android): add useAndroidSurfaceViewHdr for HDR video rendering (#2715)## SummaryAdd an opt-in `useAndroidSurfaceViewHdr` option (default `false`) soAndroid apps can show HDR (PQ / HLG) video with `AgoraVideoView`. Appsthat do not set it keep `initAndroidView` and need noAndroidManifest.xml change.## ProblemOn Android the video view is created with `initAndroidView`, either as aTextureView (default, composed as 8-bit SDR) or as a SurfaceView insidea Virtual Display (SDR as well). HDR only reaches the display when theSurfaceView is a separate SurfaceFlinger layer, as in native apps. iOSis not affected.## Two ways to get HDR| | HCPP only (recommended) | HCPP + HC ||—|—|—|| Plugin option | existing `useAndroidSurfaceView: true` | new`useAndroidSurfaceViewHdr: true` (no need to set`useAndroidSurfaceView`) || App manifest | `EnableHcpp` meta-data | `EnableHcpp` meta-data(recommended) || Flutter | 3.44+ | any version; HCPP needs 3.44+ || Device supports HCPP (Android 14+, Impeller Vulkan) | HCPP, HDR |HCPP, HDR || Device does not support HCPP | Virtual Display, SDR | falls back toHybrid Composition (HC), HDR |HC has performance and rendering-residue compatibility issues, soenabling HCPP is recommended in both ways. The plugin does not choosethe mode: Flutter decides at run time from the app's manifest and thedevice. `EnableHcpp` applies to every platform view in the app (WebView,maps, etc.).## Change- New option `useAndroidSurfaceViewHdr` on `VideoViewController`,`VideoViewController.remote` and `MediaPlayerController`.- When `true`, the video is rendered with a SurfaceView as if`useAndroidSurfaceView` were `true`, and the view is created with`PlatformViewLink` + `AndroidViewSurface` + `initSurfaceAndroidView`.- `useFlutterTexture: true` still wins and the option is ignored. Theoption is read when the view is created and is part of `isSame`.- Native plugin code, iris and the native SDK are unchanged.- Example: Android-only switches "Android SurfaceView (HCPP only)" and"Android SurfaceView HDR (HCPP + HC)" on the MediaPlayer page.AndroidManifest.xml carries the `EnableHcpp` meta-data as acommented-out block that explains both ways; it is off in the examplebecause it applies to every platform view.| `useFlutterTexture` | `useAndroidSurfaceView` |`useAndroidSurfaceViewHdr` | Android view | HDR ||—|—|—|—|—|| false | false | false (default) | `initAndroidView`, TextureView | no(unchanged) || false | true | false | `initAndroidView`, SurfaceView | only with HCPP|| false | any | true | `initSurfaceAndroidView`, SurfaceView | yes(HCPP, or HC as fallback) || true | any | any | Flutter `Texture` | no (unchanged) |“`dartVideoViewController( rtcEngine: engine, canvas: const VideoCanvas(uid: 0), useAndroidSurfaceViewHdr: true,);“`## Flutter and Android Gradle Plugin (AGP)- AGP 9 (recommended): Flutter 3.50.0. The app must set`ext.compileSdkVersion = 36` in its root `build.gradle`, because thisplugin and `iris_method_channel` default to compileSdk 31 and AGP 9 alsochecks library modules against the Flutter embedding's androidxdependencies (34).- AGP 8: Flutter 3.47.9, the last version that builds with AGP 8 (needsAGP 8.11.1, Gradle 8.14). The example in this repo stays on AGP 8 /Flutter 3.47.9; this PR does not change the repository toolchain.- Flutter 3.44.5+ has the HCPP rotation / exit crash fix(flutter/flutter#187237); 3.50.0 has more HCPP fixes (#190638, #190612,#192606, #192969). #196394 (Android 10 to 13 with Impeller Vulkan and`EnableHcpp`) is only on master.- The plugin is compiled with the app's Flutter SDK, so these versionsare chosen by the app, not by this repo's CI.Cost when HC is used: Flutter frames are composed on the platformthread, and the video does not fade with route transitions (opacity isnot applied to a SurfaceView).## Testing- `flutter test` (20 tests, 9 new in`test/agora_video_view_android_surface_view_hdr_test.dart`) and `flutteranalyze` pass on Flutter 3.24.5. The new tests also pass on 3.16.9,3.41.2, 3.44.9 and 3.47.9.- Galaxy S21 Ultra (Android 14), MediaPlayer, PQ HEVC Main10: defaulthas no HDR layer; with the option the SurfaceView is a `BT2020_PQ` layeron the physical display (system HDR boost 2.2, same as a native app).- Same device with Flutter 3.44.9 / 3.47.9 + `EnableHcpp`: Flutter drawsinto `ImpellerSurface` layers, no stale UI before the first frame, HDRworks. Without the flag, or with Impeller off: falls back to HC, HDRworks.- vivo V2126 (Android 12, no HDR display): plays normally with theoption on and off, PQ shown as SDR.- Not verified: HC fallback on Android 13 or earlier with an HDRdisplay, Flutter 3.7, other devices and apps with other platform views,performance numbers.———Co-authored-by: zhuzhenhuan <zhuzhenhuan@agora.io> , GitHub fix(ci): run update-deps on macos-latest (#2716)The `macos-14` GitHub-hosted runner image has been retired, so `run:update dependencies` can no longer start on it(`macos-14-arm64-us-default` is not supported).This switches the `update_deps` job in`.github/workflows/run_update_deps.yml` to `macos-latest`. No otherworkflow in this branch still uses `macos-14`.Shengwang-Flutter-SDK is synced from this repository(`run_sync_shengwang.yml`) and then runs this workflow to update itsdependencies, so the fix is needed here before the next sync. The samechange was verified on Shengwang-Flutter-SDK `main` (#33), where theworkflow then ran successfully. , GitHub
Provides the list of the opensource Flutter apps collection with GitHub repository.