From 2c4a1330ce754797cde552b5dd4beee7fe886f91 Mon Sep 17 00:00:00 2001
From: Littlegnal <8847263+littleGnAl@users.noreply.github.com>
Date: Mon, 21 Feb 2022 22:30:17 +0800
Subject: [PATCH] feat: Support flutter desktop (#600)
---
.github/workflows/build.yml | 128 +-
.gitmodules | 6 +
.metadata | 4 +-
.pubignore | 1 +
CHANGELOG.md | 34 +
CONTRIBUTING.md | 18 +-
README.md | 175 +-
README.zh.md | 127 +-
analysis_options.yaml | 2 +
android/build.gradle | 14 +-
android/gradle.properties | 1 -
.../main/java/io/agora/rtc/base/.gitignore | 1 -
.../java/io/agora/rtc/base/Annotations.java | 991 --
.../java/io/agora/rtc/base/BeanCovertor.kt | 271 -
.../main/java/io/agora/rtc/base/Callback.kt | 41 -
.../java/io/agora/rtc/base/EnumCovertor.kt | 97 -
.../main/java/io/agora/rtc/base/Extensions.kt | 172 -
.../java/io/agora/rtc/base/MediaObserver.kt | 40 -
.../main/java/io/agora/rtc/base/RtcChannel.kt | 486 -
.../java/io/agora/rtc/base/RtcChannelEvent.kt | 443 -
.../main/java/io/agora/rtc/base/RtcEngine.kt | 1379 --
.../java/io/agora/rtc/base/RtcEngineEvent.kt | 718 -
.../java/io/agora/rtc/base/RtcSurfaceView.kt | 112 -
.../java/io/agora/rtc/base/RtcTextureView.kt | 86 -
.../agora_rtc_engine/AgoraPlatformView.kt | 82 +
.../agora_rtc_engine/AgoraRtcChannelPlugin.kt | 71 +-
.../agora_rtc_engine/AgoraRtcEnginePlugin.kt | 185 +-
.../AgoraSurfaceViewFactory.kt | 111 +-
.../AgoraTextureViewFactory.kt | 87 +-
.../agora/agora_rtc_engine/ResultCallback.kt | 16 -
ci/run_flutter_integration_test.sh | 15 +
ci/run_flutter_macos_integration_test.sh | 22 +
example/.gitignore | 6 +-
example/.metadata | 4 +-
example/README.md | 32 +-
example/README.zh.md | 17 +-
example/android/.gitignore | 4 +
example/android/app/build.gradle | 8 +-
.../android/app/src/main/AndroidManifest.xml | 4 +-
.../app/src/main/res/values/styles.xml | 10 +-
.../RtcEnginePluginTest.kt | 168 +-
example/android/build.gradle | 4 +-
example/android/gradle.properties | 1 -
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
example/android/settings.gradle | 4 -
.../audio_mixing/Agora.io-Interactions.mp3 | Bin 0 -> 2437297 bytes
example/ios/Podfile | 2 +
example/ios/Runner.xcodeproj/project.pbxproj | 109 +-
.../xcshareddata/xcschemes/Runner.xcscheme | 2 +-
example/ios/Runner/AppDelegate.swift | 1 +
.../RunnerTests/FakeAgoraRtcEngineKit.swift | 3 -
example/ios/RunnerTests/RunnerTests.swift | 177 +-
example/lib/config/agora.config.dart | 23 +-
.../advanced/audio_mixing/audio_mixing.dart | 262 +
.../channel_media_relay.dart | 176 +-
.../device_manager/device_manager.dart | 207 +
example/lib/examples/advanced/index.dart | 34 +-
.../join_multiple_channel.dart | 133 +-
.../rtmp_streaming/rtmp_streaming.dart | 266 +
.../screen_sharing/screen_sharing.dart | 251 +
.../set_encryption/set_encryption.dart | 199 +
.../set_video_encoder_configuration.dart | 241 +
.../stream_message/stream_message.dart | 123 +-
.../advanced/voice_changer/voice_changer.dart | 699 +-
.../join_channel_audio.dart | 136 +-
.../join_channel_video.dart | 99 +-
.../examples/basic/string_uid/string_uid.dart | 43 +-
example/lib/examples/log_sink.dart | 164 +
example/lib/main.dart | 11 +-
example/linux/flutter/CMakeLists.txt | 3 +
example/macos/Flutter/Flutter-Debug.xcconfig | 2 +-
.../macos/Flutter/Flutter-Release.xcconfig | 2 +-
.../Flutter/GeneratedPluginRegistrant.swift | 2 +
example/macos/Podfile | 2 +
.../macos/Runner.xcodeproj/project.pbxproj | 68 +-
.../xcshareddata/xcschemes/Runner.xcscheme | 14 +-
.../xcshareddata/WorkspaceSettings.xcsettings | 8 +
example/macos/Runner/Configs/AppInfo.xcconfig | 2 +-
.../macos/Runner/DebugProfile.entitlements | 10 +
example/macos/Runner/Info.plist | 4 +
example/macos/Runner/Release.entitlements | 12 +
...agora_rtc_engine_exampleDebug.entitlements | 0
.../custom_capture_audio_api.dart | 0
example/pubspec.yaml | 3 +-
example/web/AgoraRtcWrapper.bundle.js | 2 +
example/web/index.html | 1 +
example/windows/flutter/CMakeLists.txt | 2 +
.../flutter/generated_plugin_registrant.cc | 3 +
.../windows/flutter/generated_plugins.cmake | 1 +
example/windows/runner/Runner.rc | 2 +-
integration_test_app/.gitignore | 46 +
integration_test_app/.metadata | 10 +
integration_test_app/README.md | 16 +
integration_test_app/analysis_options.yaml | 29 +
integration_test_app/android/.gitignore | 14 +
integration_test_app/android/app/build.gradle | 83 +
.../android/app/src/debug/AndroidManifest.xml | 7 +
.../android/app/src/main/AndroidManifest.xml | 42 +
.../integration_test_app/MainActivity.kt | 12 +
.../TestRtcEnginePlugin.kt | 63 +
.../res/drawable-v21/launch_background.xml | 12 +
.../main/res/drawable/launch_background.xml | 12 +
.../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes
.../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes
.../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes
.../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes
.../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes
.../app/src/main/res/values-night/styles.xml | 18 +
.../app/src/main/res/values/styles.xml | 18 +
.../app/src/profile/AndroidManifest.xml | 7 +
integration_test_app/android/build.gradle | 29 +
.../android/gradle.properties | 3 +
.../gradle/wrapper/gradle-wrapper.properties | 6 +
.../android/libs/x86_64/libAgoraRtcWrapper.so | Bin 0 -> 2788008 bytes
integration_test_app/android/settings.gradle | 11 +
.../agora_render_view_smoke_test.dart | 444 +
.../agora_rtc_channel_api_test.dart | 901 ++
...ra_rtc_channel_event_handler_api_test.dart | 993 ++
..._rtc_channel_event_handler_smoke_test.dart | 9 +
...el_event_handler_smoke_test.generated.dart | 853 ++
...ora_rtc_device_manager_api_smoke_test.dart | 41 +
...vice_manager_api_smoke_test.generated.dart | 662 +
.../agora_rtc_engine_api_smoke_test.dart | 231 +
.../agora_rtc_engine_api_test.dart | 3279 +++++
...ora_rtc_engine_event_handler_api_test.dart | 1773 +++
...a_rtc_engine_event_handler_smoke_test.dart | 10 +
...ne_event_handler_smoke_test.generated.dart | 2326 ++++
..._rtc_engine_subprocess_api_smoke_test.dart | 10 +
...e_subprocess_api_smoke_test.generated.dart | 4244 ++++++
.../rtc_engine_plugin_test.dart | 86 +
integration_test_app/ios/.gitignore | 33 +
.../ios/Flutter/AppFrameworkInfo.plist | 26 +
.../ios/Flutter/Debug.xcconfig | 2 +
.../ios/Flutter/Release.xcconfig | 2 +
integration_test_app/ios/Podfile | 51 +
.../ios/Runner.xcodeproj/project.pbxproj | 557 +
.../contents.xcworkspacedata | 7 +
.../xcshareddata/IDEWorkspaceChecks.plist | 8 +
.../xcshareddata/WorkspaceSettings.xcsettings | 8 +
.../xcshareddata/xcschemes/Runner.xcscheme | 91 +
.../contents.xcworkspacedata | 10 +
.../xcshareddata/IDEWorkspaceChecks.plist | 8 +
.../xcshareddata/WorkspaceSettings.xcsettings | 8 +
.../ios/Runner/AppDelegate.swift | 16 +
.../AppIcon.appiconset/Contents.json | 122 +
.../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes
.../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 564 bytes
.../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 1283 bytes
.../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 1588 bytes
.../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 1025 bytes
.../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 1716 bytes
.../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 1920 bytes
.../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 1283 bytes
.../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 1895 bytes
.../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 2665 bytes
.../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 2665 bytes
.../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 3831 bytes
.../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 1888 bytes
.../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 3294 bytes
.../Icon-App-83.5x83.5@2x.png | Bin 0 -> 3612 bytes
.../LaunchImage.imageset/Contents.json | 23 +
.../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes
.../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes
.../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes
.../LaunchImage.imageset/README.md | 5 +
.../Runner/Base.lproj/LaunchScreen.storyboard | 37 +
.../ios/Runner/Base.lproj/Main.storyboard | 26 +
integration_test_app/ios/Runner/Info.plist | 45 +
.../ios/Runner/Runner-Bridging-Header.h | 10 +
.../ios/Runner/TestRtcEnginePlugin.h | 11 +
.../ios/Runner/TestRtcEnginePlugin.m | 57 +
.../Info.plist | Bin 0 -> 720 bytes
.../Resources/Info.plist | 44 +
.../Versions/A/Resources/Info.plist | 44 +
.../Versions/A/_CodeSignature/CodeResources | 128 +
.../Versions/A/iris_integration_test | Bin 0 -> 332096 bytes
.../Versions/Current/Resources/Info.plist | 44 +
.../Current/_CodeSignature/CodeResources | 128 +
.../Versions/Current/iris_integration_test | Bin 0 -> 332096 bytes
.../iris_integration_test | Bin 0 -> 318800 bytes
.../ios/Runner/iris_integration_test.podspec | 17 +
.../iris_integration_test/.gitignore | 1 +
.../iris_integration_test/.gitmodules | 3 +
.../iris_integration_test/CMakeLists.txt | 123 +
.../iris_integration_test/README.md | 2 +
.../iris_integration_test/build-android.sh | 40 +
.../iris_integration_test/build-ios.sh | 30 +
.../iris_integration_test/build-macos.sh | 26 +
.../iris_integration_test/ios.toolchain.cmake | 927 ++
.../src/fake_rtc_engine.h | 83 +
.../src/fake_rtc_engine_internal.h | 575 +
.../src/iris_rtc_engine_call_api_recorder.cc | 114 +
.../src/iris_rtc_engine_call_api_recorder.h | 84 +
...is_rtc_engine_integration_test_delegate.cc | 221 +
...ris_rtc_engine_integration_test_delegate.h | 94 +
...is_rtc_engine_integration_test_helplers.cc | 114 +
...ris_rtc_engine_integration_test_helplers.h | 111 +
.../src/rtc_event_handler_test.cc | 623 +
.../src/rtc_event_handler_test.h | 25 +
.../agora/rtc/include/AgoraAudioFrame.h | 276 +
.../third_party/agora/rtc/include/AgoraBase.h | 805 ++
.../agora/rtc/include/AgoraConstants.h | 91 +
.../agora/rtc/include/AgoraEnumerates.h | 2354 ++++
.../agora/rtc/include/AgoraLogWriter.h | 33 +
.../agora/rtc/include/AgoraMediaIO.h | 301 +
.../agora/rtc/include/AgoraMediaMetadata.h | 68 +
.../agora/rtc/include/AgoraObjects.h | 1947 +++
.../agora/rtc/include/AgoraRtcChannel.h | 1604 +++
.../agora/rtc/include/AgoraRtcEngineKit.h | 6727 +++++++++
.../agora/rtc/include/AgoraVideoFrame.h | 280 +
.../third_party/agora/rtc/include/IAgoraLog.h | 34 +
.../agora/rtc/include/IAgoraMediaEngine.h | 1042 ++
.../agora/rtc/include/IAgoraRtcChannel.h | 1686 +++
.../agora/rtc/include/IAgoraRtcEngine.h | 11354 ++++++++++++++++
.../agora/rtc/include/IAgoraRtcEngine2.h | 52 +
.../agora/rtc/include/IAgoraService.h | 73 +
.../third_party/googletest | 1 +
.../third_party/iris/iris_audio_processor.h | 30 +
.../third_party/iris/iris_base.h | 140 +
.../third_party/iris/iris_delegate.h | 33 +
.../third_party/iris/iris_event_handler.h | 44 +
.../third_party/iris/iris_media_base.h | 198 +
.../third_party/iris/iris_rtc_base.h | 323 +
.../third_party/iris/iris_rtc_c_api.h | 161 +
.../third_party/iris/iris_rtc_channel.h | 76 +
.../iris/iris_rtc_device_manager.h | 78 +
.../third_party/iris/iris_rtc_engine.h | 78 +
.../third_party/iris/iris_rtc_raw_data.h | 98 +
.../iris/iris_rtc_raw_data_plugin.h | 90 +
.../iris/iris_rtc_raw_data_plugin_manager.h | 52 +
.../third_party/iris/iris_video_processor.h | 171 +
.../unittest/CMakeLists.txt | 32 +
...ngine_integration_test_helpers_unittest.cc | 726 +
.../iris_integration_test/unittest/main.cc | 6 +
integration_test_app/lib/main.dart | 115 +
integration_test_app/lib/src/configs.dart | 14 +
.../lib/src/event_handler_tester.dart | 40 +
.../lib/src/fake_iris_rtc_engine.dart | 630 +
integration_test_app/macos/.gitignore | 6 +
.../macos/Flutter/Flutter-Debug.xcconfig | 2 +
.../macos/Flutter/Flutter-Release.xcconfig | 2 +
.../Flutter/GeneratedPluginRegistrant.swift | 12 +
integration_test_app/macos/Podfile | 44 +
.../macos/Runner.xcodeproj/project.pbxproj | 619 +
.../xcshareddata/IDEWorkspaceChecks.plist | 8 +
.../xcshareddata/xcschemes/Runner.xcscheme | 89 +
.../contents.xcworkspacedata | 10 +
.../xcshareddata/IDEWorkspaceChecks.plist | 8 +
.../macos/Runner/AppDelegate.swift | 9 +
.../AppIcon.appiconset/Contents.json | 68 +
.../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 46993 bytes
.../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 3276 bytes
.../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 1429 bytes
.../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 5933 bytes
.../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1243 bytes
.../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 14800 bytes
.../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 1874 bytes
.../macos/Runner/Base.lproj/MainMenu.xib | 339 +
.../macos/Runner/Configs/AppInfo.xcconfig | 14 +
.../macos/Runner/Configs/Debug.xcconfig | 2 +
.../macos/Runner/Configs/Release.xcconfig | 2 +
.../macos/Runner/Configs/Warnings.xcconfig | 13 +
.../macos/Runner/DebugProfile.entitlements | 20 +
integration_test_app/macos/Runner/Info.plist | 36 +
.../macos/Runner/MainFlutterWindow.swift | 15 +
.../macos/Runner/Release.entitlements | 18 +
.../Resources/Info.plist | 44 +
.../Versions/A/Resources/Info.plist | 44 +
.../Versions/A/_CodeSignature/CodeResources | 128 +
.../Versions/A/iris_integration_test | Bin 0 -> 338416 bytes
.../Versions/Current/Resources/Info.plist | 44 +
.../Current/_CodeSignature/CodeResources | 128 +
.../Versions/Current/iris_integration_test | Bin 0 -> 338416 bytes
.../iris_integration_test | Bin 0 -> 338416 bytes
.../Runner/iris_integration_test.podspec | 17 +
integration_test_app/macos/Runner/src | 1 +
integration_test_app/pubspec.yaml | 92 +
integration_test_app/test/widget_test.dart | 30 +
.../integration_test_cases_generator.dart | 1337 ++
integration_test_app/windows/.gitignore | 17 +
integration_test_app/windows/CMakeLists.txt | 100 +
.../windows/flutter/CMakeLists.txt | 103 +
.../flutter/generated_plugin_registrant.cc | 14 +
.../flutter/generated_plugin_registrant.h | 15 +
.../windows/flutter/generated_plugins.cmake | 16 +
.../windows/runner/CMakeLists.txt | 18 +
integration_test_app/windows/runner/Runner.rc | 121 +
.../windows/runner/flutter_window.cpp | 61 +
.../windows/runner/flutter_window.h | 33 +
integration_test_app/windows/runner/main.cpp | 43 +
.../windows/runner/resource.h | 16 +
.../windows/runner/resources/app_icon.ico | Bin 0 -> 33772 bytes
.../windows/runner/runner.exe.manifest | 20 +
integration_test_app/windows/runner/utils.cpp | 64 +
integration_test_app/windows/runner/utils.h | 19 +
.../windows/runner/win32_window.cpp | 245 +
.../windows/runner/win32_window.h | 98 +
ios/Classes/AgoraRtcChannelPlugin.h | 10 +
ios/Classes/AgoraRtcChannelPlugin.mm | 64 +
ios/Classes/AgoraRtcChannelPlugin.swift | 89 -
ios/Classes/AgoraRtcEnginePlugin.h | 2 +-
ios/Classes/AgoraRtcEnginePlugin.m | 15 -
ios/Classes/AgoraRtcEnginePlugin.mm | 120 +
ios/Classes/AgoraSurfaceViewFactory.h | 14 +
ios/Classes/AgoraSurfaceViewFactory.mm | 187 +
ios/Classes/AgoraSurfaceViewFactory.swift | 105 -
ios/Classes/AgoraTextureViewFactory.h | 14 +
ios/Classes/AgoraTextureViewFactory.mm | 192 +
ios/Classes/Base/.gitignore | 1 -
ios/Classes/Base/AgoraRtcEngineKit.h | 119 -
ios/Classes/Base/BeanCovertor.swift | 456 -
ios/Classes/Base/Callback.swift | 41 -
ios/Classes/Base/Extensions.swift | 208 -
ios/Classes/Base/MediaObserver.swift | 49 -
ios/Classes/Base/RtcChannel.swift | 403 -
ios/Classes/Base/RtcChannelEvent.swift | 249 -
ios/Classes/Base/RtcEngine.swift | 1228 --
ios/Classes/Base/RtcEngineEvent.swift | 536 -
ios/Classes/Base/RtcEnginePlugin.h | 2 +-
ios/Classes/Base/RtcEnginePluginRegistrant.h | 25 +
ios/Classes/Base/RtcEnginePluginRegistrant.mm | 15 +
.../Base/RtcEnginePluginRegistrant.swift | 22 -
ios/Classes/Base/RtcEngineRegistry.h | 24 +
ios/Classes/Base/RtcEngineRegistry.mm | 53 +
ios/Classes/Base/RtcEngineRegistry.swift | 61 -
ios/Classes/Base/RtcSurfaceView.swift | 98 -
ios/Classes/CallApiMethodCallHandler.h | 24 +
ios/Classes/CallApiMethodCallHandler.mm | 104 +
ios/Classes/FlutterIrisEventHandler.h | 20 +
ios/Classes/FlutterIrisEventHandler.mm | 130 +
ios/Classes/ResultCallback.swift | 25 -
ios/Classes/SwiftAgoraRtcEnginePlugin.swift | 99 -
ios/agora_rtc_engine.podspec | 9 +-
lib/agora_rtc_engine_web.dart | 225 +-
lib/agora_rtc_engine_web.ng.dart | 1122 ++
lib/rtc_engine.dart | 3 +-
lib/rtc_local_view.dart | 38 +
lib/rtc_remote_view.dart | 10 +-
lib/src/agora_media_recorder.dart | 124 +
lib/src/api_types.dart | 256 +
lib/src/classes.dart | 1589 ++-
lib/src/classes.g.dart | 121 +-
lib/src/enum_converter.dart | 39 +-
lib/src/enum_converter.g.dart | 73 +-
lib/src/enums.dart | 2671 ++--
lib/src/events.dart | 2414 ++--
lib/src/rtc_channel.dart | 1340 +-
lib/src/rtc_device_manager.dart | 437 +
lib/src/rtc_engine.dart | 4321 +++---
lib/src/rtc_engine_extension.dart | 176 +-
lib/src/rtc_engine_extension_web.dart | 23 +
lib/src/rtc_render_view.dart | 443 +-
macos/Classes/AgoraRtcChannelPlugin.h | 7 +
macos/Classes/AgoraRtcChannelPlugin.mm | 43 +
macos/Classes/AgoraRtcDeviceManagerPlugin.h | 10 +
macos/Classes/AgoraRtcDeviceManagerPlugin.mm | 54 +
macos/Classes/AgoraRtcEnginePlugin.h | 4 +
macos/Classes/AgoraRtcEnginePlugin.mm | 152 +
macos/Classes/AgoraRtcEnginePlugin.swift | 19 -
macos/Classes/AgoraTextureViewFactory.h | 9 +
macos/Classes/AgoraTextureViewFactory.mm | 185 +
macos/Classes/CallApiMethodCallHandler.h | 34 +
macos/Classes/CallApiMethodCallHandler.mm | 133 +
macos/Classes/File.swift | 2 +
macos/Classes/FlutterIrisEventHandler.h | 20 +
macos/Classes/FlutterIrisEventHandler.mm | 147 +
macos/agora_rtc_engine.podspec | 24 +-
pubspec.yaml | 17 +-
scripts/build-internal-testing-macos.sh | 17 +
scripts/build-internal-testing.sh | 23 +
scripts/build-iris-all.sh | 14 +
scripts/build-iris-android.sh | 21 +
scripts/build-iris-ios.sh | 26 +
scripts/build-iris-macos.sh | 21 +
scripts/build-iris-windows.sh | 29 +
web | 1 +
windows/.gitignore | 3 +
windows/CMakeLists.txt | 39 +-
windows/PluginInfo.props | 14 -
windows/agora_rtc_channel_plugin.cc | 164 +
windows/agora_rtc_device_manager_plugin.cc | 134 +
windows/agora_rtc_engine_plugin.cc | 257 +
windows/agora_rtc_engine_plugin.cpp | 89 -
windows/agora_rtc_engine_plugin.h | 23 -
windows/agora_texture_view_factory.cc | 177 +
windows/call_api_method_call_handler.cc | 114 +
windows/cmake/DownloadSDK.cmake | 32 +
.../agora_rtc_channel_plugin.h | 12 +
.../agora_rtc_device_manager_plugin.h | 12 +
.../agora_texture_view_factory.h | 67 +
.../call_api_method_call_handler.h | 25 +
windows/plugin.vcxproj | 247 -
windows/plugin.vcxproj.filters | 45 -
393 files changed, 74521 insertions(+), 15018 deletions(-)
create mode 100644 .gitmodules
create mode 100644 .pubignore
delete mode 100644 android/src/main/java/io/agora/rtc/base/.gitignore
delete mode 100644 android/src/main/java/io/agora/rtc/base/Annotations.java
delete mode 100644 android/src/main/java/io/agora/rtc/base/BeanCovertor.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/Callback.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/EnumCovertor.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/Extensions.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/MediaObserver.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/RtcChannel.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/RtcChannelEvent.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/RtcEngine.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/RtcEngineEvent.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/RtcSurfaceView.kt
delete mode 100644 android/src/main/java/io/agora/rtc/base/RtcTextureView.kt
create mode 100644 android/src/main/kotlin/io/agora/agora_rtc_engine/AgoraPlatformView.kt
delete mode 100644 android/src/main/kotlin/io/agora/agora_rtc_engine/ResultCallback.kt
create mode 100644 ci/run_flutter_integration_test.sh
create mode 100644 ci/run_flutter_macos_integration_test.sh
create mode 100644 example/assets/audio_mixing/Agora.io-Interactions.mp3
create mode 100644 example/lib/examples/advanced/audio_mixing/audio_mixing.dart
create mode 100644 example/lib/examples/advanced/device_manager/device_manager.dart
create mode 100644 example/lib/examples/advanced/rtmp_streaming/rtmp_streaming.dart
create mode 100644 example/lib/examples/advanced/screen_sharing/screen_sharing.dart
create mode 100644 example/lib/examples/advanced/set_encryption/set_encryption.dart
create mode 100644 example/lib/examples/advanced/set_video_encoder_configuration/set_video_encoder_configuration.dart
create mode 100644 example/lib/examples/log_sink.dart
create mode 100644 example/macos/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
create mode 100644 example/macos/Runner/agora_rtc_engine_exampleDebug.entitlements
rename example/{lib/examples/advanced => pigeons}/custom_capture_audio/custom_capture_audio_api.dart (100%)
create mode 100644 example/web/AgoraRtcWrapper.bundle.js
create mode 100644 integration_test_app/.gitignore
create mode 100644 integration_test_app/.metadata
create mode 100644 integration_test_app/README.md
create mode 100644 integration_test_app/analysis_options.yaml
create mode 100644 integration_test_app/android/.gitignore
create mode 100644 integration_test_app/android/app/build.gradle
create mode 100644 integration_test_app/android/app/src/debug/AndroidManifest.xml
create mode 100644 integration_test_app/android/app/src/main/AndroidManifest.xml
create mode 100644 integration_test_app/android/app/src/main/kotlin/io/agora/integration_test_app/integration_test_app/MainActivity.kt
create mode 100644 integration_test_app/android/app/src/main/kotlin/io/agora/integration_test_app/integration_test_app/TestRtcEnginePlugin.kt
create mode 100644 integration_test_app/android/app/src/main/res/drawable-v21/launch_background.xml
create mode 100644 integration_test_app/android/app/src/main/res/drawable/launch_background.xml
create mode 100644 integration_test_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
create mode 100644 integration_test_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
create mode 100644 integration_test_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
create mode 100644 integration_test_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
create mode 100644 integration_test_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
create mode 100644 integration_test_app/android/app/src/main/res/values-night/styles.xml
create mode 100644 integration_test_app/android/app/src/main/res/values/styles.xml
create mode 100644 integration_test_app/android/app/src/profile/AndroidManifest.xml
create mode 100644 integration_test_app/android/build.gradle
create mode 100644 integration_test_app/android/gradle.properties
create mode 100644 integration_test_app/android/gradle/wrapper/gradle-wrapper.properties
create mode 100644 integration_test_app/android/libs/x86_64/libAgoraRtcWrapper.so
create mode 100644 integration_test_app/android/settings.gradle
create mode 100644 integration_test_app/integration_test/agora_render_view_smoke_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_channel_api_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_channel_event_handler_api_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_channel_event_handler_smoke_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_channel_event_handler_smoke_test.generated.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_device_manager_api_smoke_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_device_manager_api_smoke_test.generated.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_api_smoke_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_api_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_event_handler_api_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_event_handler_smoke_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_event_handler_smoke_test.generated.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_subprocess_api_smoke_test.dart
create mode 100644 integration_test_app/integration_test/agora_rtc_engine_subprocess_api_smoke_test.generated.dart
create mode 100644 integration_test_app/integration_test/rtc_engine_plugin_test.dart
create mode 100644 integration_test_app/ios/.gitignore
create mode 100644 integration_test_app/ios/Flutter/AppFrameworkInfo.plist
create mode 100644 integration_test_app/ios/Flutter/Debug.xcconfig
create mode 100644 integration_test_app/ios/Flutter/Release.xcconfig
create mode 100644 integration_test_app/ios/Podfile
create mode 100644 integration_test_app/ios/Runner.xcodeproj/project.pbxproj
create mode 100644 integration_test_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
create mode 100644 integration_test_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
create mode 100644 integration_test_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
create mode 100644 integration_test_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
create mode 100644 integration_test_app/ios/Runner.xcworkspace/contents.xcworkspacedata
create mode 100644 integration_test_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
create mode 100644 integration_test_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
create mode 100644 integration_test_app/ios/Runner/AppDelegate.swift
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
create mode 100644 integration_test_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
create mode 100644 integration_test_app/ios/Runner/Base.lproj/LaunchScreen.storyboard
create mode 100644 integration_test_app/ios/Runner/Base.lproj/Main.storyboard
create mode 100644 integration_test_app/ios/Runner/Info.plist
create mode 100644 integration_test_app/ios/Runner/Runner-Bridging-Header.h
create mode 100644 integration_test_app/ios/Runner/TestRtcEnginePlugin.h
create mode 100644 integration_test_app/ios/Runner/TestRtcEnginePlugin.m
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.framework/Info.plist
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.framework/Resources/Info.plist
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.framework/Versions/A/Resources/Info.plist
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.framework/Versions/A/_CodeSignature/CodeResources
create mode 100755 integration_test_app/ios/Runner/iris_integration_test.framework/Versions/A/iris_integration_test
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.framework/Versions/Current/Resources/Info.plist
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.framework/Versions/Current/_CodeSignature/CodeResources
create mode 100755 integration_test_app/ios/Runner/iris_integration_test.framework/Versions/Current/iris_integration_test
create mode 100755 integration_test_app/ios/Runner/iris_integration_test.framework/iris_integration_test
create mode 100644 integration_test_app/ios/Runner/iris_integration_test.podspec
create mode 100644 integration_test_app/iris_integration_test/.gitignore
create mode 100644 integration_test_app/iris_integration_test/.gitmodules
create mode 100644 integration_test_app/iris_integration_test/CMakeLists.txt
create mode 100644 integration_test_app/iris_integration_test/README.md
create mode 100644 integration_test_app/iris_integration_test/build-android.sh
create mode 100644 integration_test_app/iris_integration_test/build-ios.sh
create mode 100644 integration_test_app/iris_integration_test/build-macos.sh
create mode 100644 integration_test_app/iris_integration_test/ios.toolchain.cmake
create mode 100644 integration_test_app/iris_integration_test/src/fake_rtc_engine.h
create mode 100644 integration_test_app/iris_integration_test/src/fake_rtc_engine_internal.h
create mode 100644 integration_test_app/iris_integration_test/src/iris_rtc_engine_call_api_recorder.cc
create mode 100644 integration_test_app/iris_integration_test/src/iris_rtc_engine_call_api_recorder.h
create mode 100644 integration_test_app/iris_integration_test/src/iris_rtc_engine_integration_test_delegate.cc
create mode 100644 integration_test_app/iris_integration_test/src/iris_rtc_engine_integration_test_delegate.h
create mode 100644 integration_test_app/iris_integration_test/src/iris_rtc_engine_integration_test_helplers.cc
create mode 100644 integration_test_app/iris_integration_test/src/iris_rtc_engine_integration_test_helplers.h
create mode 100644 integration_test_app/iris_integration_test/src/rtc_event_handler_test.cc
create mode 100644 integration_test_app/iris_integration_test/src/rtc_event_handler_test.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraAudioFrame.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraBase.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraConstants.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraEnumerates.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraLogWriter.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraMediaIO.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraMediaMetadata.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraObjects.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraRtcChannel.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraRtcEngineKit.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/AgoraVideoFrame.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/IAgoraLog.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/IAgoraMediaEngine.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/IAgoraRtcChannel.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/IAgoraRtcEngine.h
create mode 100755 integration_test_app/iris_integration_test/third_party/agora/rtc/include/IAgoraRtcEngine2.h
create mode 100644 integration_test_app/iris_integration_test/third_party/agora/rtc/include/IAgoraService.h
create mode 160000 integration_test_app/iris_integration_test/third_party/googletest
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_audio_processor.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_base.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_delegate.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_event_handler.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_media_base.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_base.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_c_api.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_channel.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_device_manager.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_engine.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_raw_data.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_raw_data_plugin.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_rtc_raw_data_plugin_manager.h
create mode 100644 integration_test_app/iris_integration_test/third_party/iris/iris_video_processor.h
create mode 100644 integration_test_app/iris_integration_test/unittest/CMakeLists.txt
create mode 100644 integration_test_app/iris_integration_test/unittest/iris_rtc_engine_integration_test_helpers_unittest.cc
create mode 100644 integration_test_app/iris_integration_test/unittest/main.cc
create mode 100644 integration_test_app/lib/main.dart
create mode 100644 integration_test_app/lib/src/configs.dart
create mode 100644 integration_test_app/lib/src/event_handler_tester.dart
create mode 100644 integration_test_app/lib/src/fake_iris_rtc_engine.dart
create mode 100644 integration_test_app/macos/.gitignore
create mode 100644 integration_test_app/macos/Flutter/Flutter-Debug.xcconfig
create mode 100644 integration_test_app/macos/Flutter/Flutter-Release.xcconfig
create mode 100644 integration_test_app/macos/Flutter/GeneratedPluginRegistrant.swift
create mode 100644 integration_test_app/macos/Podfile
create mode 100644 integration_test_app/macos/Runner.xcodeproj/project.pbxproj
create mode 100644 integration_test_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
create mode 100644 integration_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
create mode 100644 integration_test_app/macos/Runner.xcworkspace/contents.xcworkspacedata
create mode 100644 integration_test_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
create mode 100644 integration_test_app/macos/Runner/AppDelegate.swift
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
create mode 100644 integration_test_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
create mode 100644 integration_test_app/macos/Runner/Base.lproj/MainMenu.xib
create mode 100644 integration_test_app/macos/Runner/Configs/AppInfo.xcconfig
create mode 100644 integration_test_app/macos/Runner/Configs/Debug.xcconfig
create mode 100644 integration_test_app/macos/Runner/Configs/Release.xcconfig
create mode 100644 integration_test_app/macos/Runner/Configs/Warnings.xcconfig
create mode 100644 integration_test_app/macos/Runner/DebugProfile.entitlements
create mode 100644 integration_test_app/macos/Runner/Info.plist
create mode 100644 integration_test_app/macos/Runner/MainFlutterWindow.swift
create mode 100644 integration_test_app/macos/Runner/Release.entitlements
create mode 100644 integration_test_app/macos/Runner/iris_integration_test.framework/Resources/Info.plist
create mode 100644 integration_test_app/macos/Runner/iris_integration_test.framework/Versions/A/Resources/Info.plist
create mode 100644 integration_test_app/macos/Runner/iris_integration_test.framework/Versions/A/_CodeSignature/CodeResources
create mode 100755 integration_test_app/macos/Runner/iris_integration_test.framework/Versions/A/iris_integration_test
create mode 100644 integration_test_app/macos/Runner/iris_integration_test.framework/Versions/Current/Resources/Info.plist
create mode 100644 integration_test_app/macos/Runner/iris_integration_test.framework/Versions/Current/_CodeSignature/CodeResources
create mode 100755 integration_test_app/macos/Runner/iris_integration_test.framework/Versions/Current/iris_integration_test
create mode 100755 integration_test_app/macos/Runner/iris_integration_test.framework/iris_integration_test
create mode 100644 integration_test_app/macos/Runner/iris_integration_test.podspec
create mode 120000 integration_test_app/macos/Runner/src
create mode 100644 integration_test_app/pubspec.yaml
create mode 100644 integration_test_app/test/widget_test.dart
create mode 100644 integration_test_app/tools/integration_test_cases_generator.dart
create mode 100644 integration_test_app/windows/.gitignore
create mode 100644 integration_test_app/windows/CMakeLists.txt
create mode 100644 integration_test_app/windows/flutter/CMakeLists.txt
create mode 100644 integration_test_app/windows/flutter/generated_plugin_registrant.cc
create mode 100644 integration_test_app/windows/flutter/generated_plugin_registrant.h
create mode 100644 integration_test_app/windows/flutter/generated_plugins.cmake
create mode 100644 integration_test_app/windows/runner/CMakeLists.txt
create mode 100644 integration_test_app/windows/runner/Runner.rc
create mode 100644 integration_test_app/windows/runner/flutter_window.cpp
create mode 100644 integration_test_app/windows/runner/flutter_window.h
create mode 100644 integration_test_app/windows/runner/main.cpp
create mode 100644 integration_test_app/windows/runner/resource.h
create mode 100644 integration_test_app/windows/runner/resources/app_icon.ico
create mode 100644 integration_test_app/windows/runner/runner.exe.manifest
create mode 100644 integration_test_app/windows/runner/utils.cpp
create mode 100644 integration_test_app/windows/runner/utils.h
create mode 100644 integration_test_app/windows/runner/win32_window.cpp
create mode 100644 integration_test_app/windows/runner/win32_window.h
create mode 100644 ios/Classes/AgoraRtcChannelPlugin.h
create mode 100644 ios/Classes/AgoraRtcChannelPlugin.mm
delete mode 100644 ios/Classes/AgoraRtcChannelPlugin.swift
delete mode 100644 ios/Classes/AgoraRtcEnginePlugin.m
create mode 100644 ios/Classes/AgoraRtcEnginePlugin.mm
create mode 100644 ios/Classes/AgoraSurfaceViewFactory.h
create mode 100644 ios/Classes/AgoraSurfaceViewFactory.mm
delete mode 100644 ios/Classes/AgoraSurfaceViewFactory.swift
create mode 100644 ios/Classes/AgoraTextureViewFactory.h
create mode 100644 ios/Classes/AgoraTextureViewFactory.mm
delete mode 100644 ios/Classes/Base/.gitignore
delete mode 100644 ios/Classes/Base/AgoraRtcEngineKit.h
delete mode 100644 ios/Classes/Base/BeanCovertor.swift
delete mode 100644 ios/Classes/Base/Callback.swift
delete mode 100644 ios/Classes/Base/Extensions.swift
delete mode 100644 ios/Classes/Base/MediaObserver.swift
delete mode 100644 ios/Classes/Base/RtcChannel.swift
delete mode 100644 ios/Classes/Base/RtcChannelEvent.swift
delete mode 100644 ios/Classes/Base/RtcEngine.swift
delete mode 100644 ios/Classes/Base/RtcEngineEvent.swift
create mode 100644 ios/Classes/Base/RtcEnginePluginRegistrant.h
create mode 100644 ios/Classes/Base/RtcEnginePluginRegistrant.mm
delete mode 100644 ios/Classes/Base/RtcEnginePluginRegistrant.swift
create mode 100644 ios/Classes/Base/RtcEngineRegistry.h
create mode 100644 ios/Classes/Base/RtcEngineRegistry.mm
delete mode 100644 ios/Classes/Base/RtcEngineRegistry.swift
delete mode 100644 ios/Classes/Base/RtcSurfaceView.swift
create mode 100644 ios/Classes/CallApiMethodCallHandler.h
create mode 100644 ios/Classes/CallApiMethodCallHandler.mm
create mode 100644 ios/Classes/FlutterIrisEventHandler.h
create mode 100644 ios/Classes/FlutterIrisEventHandler.mm
delete mode 100644 ios/Classes/ResultCallback.swift
delete mode 100644 ios/Classes/SwiftAgoraRtcEnginePlugin.swift
create mode 100644 lib/agora_rtc_engine_web.ng.dart
create mode 100644 lib/src/agora_media_recorder.dart
create mode 100644 lib/src/api_types.dart
create mode 100644 lib/src/rtc_device_manager.dart
create mode 100644 lib/src/rtc_engine_extension_web.dart
create mode 100644 macos/Classes/AgoraRtcChannelPlugin.h
create mode 100644 macos/Classes/AgoraRtcChannelPlugin.mm
create mode 100644 macos/Classes/AgoraRtcDeviceManagerPlugin.h
create mode 100644 macos/Classes/AgoraRtcDeviceManagerPlugin.mm
create mode 100644 macos/Classes/AgoraRtcEnginePlugin.h
create mode 100644 macos/Classes/AgoraRtcEnginePlugin.mm
delete mode 100644 macos/Classes/AgoraRtcEnginePlugin.swift
create mode 100644 macos/Classes/AgoraTextureViewFactory.h
create mode 100644 macos/Classes/AgoraTextureViewFactory.mm
create mode 100644 macos/Classes/CallApiMethodCallHandler.h
create mode 100644 macos/Classes/CallApiMethodCallHandler.mm
create mode 100644 macos/Classes/File.swift
create mode 100644 macos/Classes/FlutterIrisEventHandler.h
create mode 100644 macos/Classes/FlutterIrisEventHandler.mm
create mode 100644 scripts/build-internal-testing-macos.sh
create mode 100644 scripts/build-internal-testing.sh
create mode 100644 scripts/build-iris-all.sh
create mode 100644 scripts/build-iris-android.sh
create mode 100644 scripts/build-iris-ios.sh
create mode 100644 scripts/build-iris-macos.sh
create mode 100644 scripts/build-iris-windows.sh
create mode 160000 web
delete mode 100644 windows/PluginInfo.props
create mode 100644 windows/agora_rtc_channel_plugin.cc
create mode 100644 windows/agora_rtc_device_manager_plugin.cc
create mode 100644 windows/agora_rtc_engine_plugin.cc
delete mode 100644 windows/agora_rtc_engine_plugin.cpp
delete mode 100644 windows/agora_rtc_engine_plugin.h
create mode 100644 windows/agora_texture_view_factory.cc
create mode 100644 windows/call_api_method_call_handler.cc
create mode 100644 windows/cmake/DownloadSDK.cmake
create mode 100644 windows/include/agora_rtc_engine/agora_rtc_channel_plugin.h
create mode 100644 windows/include/agora_rtc_engine/agora_rtc_device_manager_plugin.h
create mode 100644 windows/include/agora_rtc_engine/agora_texture_view_factory.h
create mode 100644 windows/include/agora_rtc_engine/call_api_method_call_handler.h
delete mode 100644 windows/plugin.vcxproj
delete mode 100644 windows/plugin.vcxproj.filters
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9aae8be88..05a2e36da 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,10 +1,23 @@
name: CI
on:
+ # pull_request_target:
+ # types: [opened, synchronize]
+ # branches:
+ # - master
+ # # Temporarily allow check on dev/flutter2-iris branch
+ # - 'dev/flutter2-iris'
+
push:
- branches: [ master ]
+ branches:
+ - master
+ # Temporarily allow check on dev/flutter2-iris branch
+ - 'dev/flutter2-iris'
pull_request:
- branches: [ master ]
+ branches:
+ - master
+ # Temporarily allow check on dev/flutter2-iris branch
+ - 'dev/flutter2-iris'
jobs:
# DO NOT run flutter test as this time, because the unit test is broken, will re-enable it
@@ -19,13 +32,80 @@ jobs:
# java-version: '11'
# - uses: subosito/flutter-action@v1
# with:
- # flutter-version: '2.5.3'
+ # flutter-version: '2.10.0'
# - run: flutter pub get
# - run: flutter test
+ integration_test_android:
+ name: Run Flutter Android Integration Tests
+ runs-on: macos-11
+ timeout-minutes: 60
+ env:
+ TEST_APP_ID: ${{ secrets.MY_APP_ID }}
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-java@v1
+ with:
+ java-version: '11'
+ - uses: subosito/flutter-action@v1
+ with:
+ flutter-version: '2.10.0'
+ - name: run flutter android integration tests
+ uses: reactivecircus/android-emulator-runner@v2.21.0
+ with:
+ api-level: 31
+ arch: x86_64
+ profile: Nexus 6
+ script: bash ci/run_flutter_integration_test.sh
+
+ integration_test_ios:
+ name: Run Flutter iOS Integration Tests
+ runs-on: macos-11
+ timeout-minutes: 60
+ env:
+ TEST_APP_ID: ${{ secrets.MY_APP_ID }}
+ steps:
+ - uses: actions/checkout@v1
+ - uses: subosito/flutter-action@v1
+ with:
+ flutter-version: '2.10.0'
+ - uses: futureware-tech/simulator-action@v1
+ with:
+ model: 'iPhone 13 Pro Max'
+ - run: bash ci/run_flutter_integration_test.sh
+
+ integration_test_macos:
+ name: Run Flutter macOS Integration Tests
+ runs-on: macos-11
+ timeout-minutes: 60
+ env:
+ TEST_APP_ID: ${{ secrets.MY_APP_ID }}
+ steps:
+ - uses: actions/checkout@v1
+ - uses: subosito/flutter-action@v1
+ with:
+ flutter-version: '2.10.0'
+ - run: flutter config --enable-macos-desktop
+ - run: bash ci/run_flutter_macos_integration_test.sh
+
+ integration_test_windows:
+ name: Run Flutter Windows Integration Tests
+ runs-on: windows-2019
+ timeout-minutes: 60
+ env:
+ TEST_APP_ID: ${{ secrets.MY_APP_ID }}
+ steps:
+ - uses: actions/checkout@v1
+ - uses: subosito/flutter-action@v1
+ with:
+ flutter-version: '2.10.0'
+ - run: flutter config --enable-windows-desktop
+ - run: bash ci/run_flutter_macos_integration_test.sh
+
unittest_android:
name: Run Android Unit Test
runs-on: ubuntu-latest
+ timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
@@ -33,47 +113,47 @@ jobs:
java-version: '11'
- uses: subosito/flutter-action@v1
with:
- flutter-version: '2.5.3'
+ flutter-version: '2.10.0'
- run: flutter pub get
- run: bash ci/run_android_test.sh
unittest_ios:
name: Run iOS Unit Test
runs-on: macos-11
+ timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
- flutter-version: '2.5.3'
+ flutter-version: '2.10.0'
- run: flutter pub get
- run: bash ci/run_ios_test.sh
- # Temporay disable the android build since it will fail cause by
- # "No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi" error on ci.
- # This issue can be refer: https://github.com/gradle/gradle/issues/12440#issuecomment-606188282
- # TODO(littlegnal): Upgrade the AGP version to solve this issue, and re-enable this build.
- # build_android:
- # name: Build Android
- # runs-on: ubuntu-latest
- # steps:
- # - uses: actions/checkout@v1
- # - uses: actions/setup-java@v1
- # with:
- # java-version: '11'
- # with:
- # flutter-version: '2.5.3'
- # - run: flutter pub get
- # - name: Run flutter build apk
- # run: flutter build apk
- # working-directory: example
+
+ build_android:
+ name: Build Android
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-java@v1
+ with:
+ java-version: '11'
+ - uses: subosito/flutter-action@v1
+ with:
+ flutter-version: '2.10.0'
+ - run: flutter pub get
+ - name: Run flutter build apk
+ run: flutter build apk
+ working-directory: example
build_ios:
name: Build iOS
runs-on: macos-11
+ timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
- flutter-version: '2.5.3'
+ flutter-version: '2.10.0'
- run: flutter pub get
- name: Run flutter build ios --no-codesign
run: flutter build ios --no-codesign
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..f143fb338
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "web"]
+ path = web
+ url = https://github.com/AgoraIO-Community/Iris-Rtc-Web.git
+[submodule "integration_test_app/iris_integration_test/third_party/googletest"]
+ path = integration_test_app/iris_integration_test/third_party/googletest
+ url = https://github.com/google/googletest.git
diff --git a/.metadata b/.metadata
index fbc1f3952..4d5f4ab5f 100644
--- a/.metadata
+++ b/.metadata
@@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
- revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
- channel: beta
+ revision: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
+ channel: stable
project_type: plugin
diff --git a/.pubignore b/.pubignore
new file mode 100644
index 000000000..8afce0990
--- /dev/null
+++ b/.pubignore
@@ -0,0 +1 @@
+integration_test_app/
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d67f6253..2283f7d4d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -75,6 +75,20 @@
* add RtcEngineContext instead of RtcEngineConfig ([5dd294f](https://github.com/AgoraIO/Flutter-SDK/commit/5dd294fa95799dcc19d69775c19a13aeed61e2a2))
* support native SDK 3.4.5 ([d1d8433](https://github.com/AgoraIO/Flutter-SDK/commit/d1d84330c9fcc1367cfe8160fe8c6d593c7bac9c))
+# [4.1.0-alpha.2](https://github.com/AgoraIO/Flutter-SDK/compare/v4.1.0-alpha.1...v4.1.0-alpha.2) (2021-06-16)
+
+
+### Bug Fixes
+
+* web build error ([8c57eae](https://github.com/AgoraIO/Flutter-SDK/commit/8c57eae792e3d02cedeb52b87c5350e65a6be7f9))
+
+# [4.1.0-alpha.1](https://github.com/AgoraIO/Flutter-SDK/compare/v4.1.0-alpha.0...v4.1.0-alpha.1) (2021-06-16)
+
+
+### Features
+
+* support screen share for desktop
+
## [4.0.2](https://github.com/AgoraIO/Flutter-SDK/compare/v4.0.1...v4.0.2) (2021-06-09)
@@ -83,6 +97,26 @@
* Android build error ([3af4476](https://github.com/AgoraIO/Flutter-SDK/commit/3af44762ad765cde99024e2b080d4c88f34cfc09))
* enum type cast bug, close [#345](https://github.com/AgoraIO/Flutter-SDK/issues/345) ([85d720d](https://github.com/AgoraIO/Flutter-SDK/commit/85d720d1f13a7ff340419135a9d397be798b750f))
+# [4.1.0-alpha.0](https://github.com/AgoraIO/Flutter-SDK/compare/v4.0.1...v4.1.0-alpha.0) (2021-06-04)
+
+
+### Bug Fixes
+
+* Android build error ([3af4476](https://github.com/AgoraIO/Flutter-SDK/commit/3af44762ad765cde99024e2b080d4c88f34cfc09))
+* build error ([8c80c1e](https://github.com/AgoraIO/Flutter-SDK/commit/8c80c1e43f86de3d62b281473f92f217513e139a))
+* mac render crash ([dee5ab9](https://github.com/AgoraIO/Flutter-SDK/commit/dee5ab9d0245859113b3411adfab60baad6ac7b4))
+* mobile `RtcStats` key error ([70cb58e](https://github.com/AgoraIO/Flutter-SDK/commit/70cb58efcfce21352f3f77076abe8c3f62998d6c))
+* remove unless import ([668650f](https://github.com/AgoraIO/Flutter-SDK/commit/668650f95fc052089f37898e6a7b5a735f08a3b5))
+* render error ([f409099](https://github.com/AgoraIO/Flutter-SDK/commit/f409099398f8d7d51c449bba00a0128fde90b113))
+* Web call `Platform` API error ([d760093](https://github.com/AgoraIO/Flutter-SDK/commit/d760093a5e3368108e54f9995c1956d9caaa8460))
+
+
+### Features
+
+* add `rtc_device_manager.dart` ([94e27c9](https://github.com/AgoraIO/Flutter-SDK/commit/94e27c91fb2efe630751551d1cfddc1ba657a735))
+* add device manager for Web ([18b5d90](https://github.com/AgoraIO/Flutter-SDK/commit/18b5d90ec320bff090dcb01cc8717c0781dd5a38))
+* add DeviceManager for windows ([dcf5630](https://github.com/AgoraIO/Flutter-SDK/commit/dcf56308c04b9d6da0aba31b5a3c04b4087db388))
+
## [4.0.1](https://github.com/AgoraIO/Flutter-SDK/compare/v4.0.0...v4.0.1) (2021-05-19)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c1dbe8761..ee1c08495 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,18 +1,18 @@
# Contribute your code
-We are glad you are here! Everyone is welcome to contribute code
-via pull requests, to help people asking for
-help, to add to our documentation, or to help out in any other way.
+We are glad you are here! Everyone is welcome to contribute code via pull requests, to help people who ask for help, to add to our documentation, or to help out in any other way.
-This document briefly describes some guidance on how you can contribute
-to this repository.
+This document briefly describes some guidance on how you can contribute to this repository.
## Source code structures
-1. **[lib/rtc_engine.dart](lib/rtc_engine.dart)**: Dart APIs wrapper, api message channels to native modules.
-2. **[example](example)**: Example demo for quick start/showcase.
-3. **[ios/Classes/AgoraRtcEnginePlugin.m](ios/Classes/AgoraRtcEnginePlugin.m)**: iOS native implementation to handle dart message channel api calls.
-4. **[android/src/main/kotlin/io/agora/agora_rtc_engine/AgoraRtcEnginePlugin.kt](android/src/main/kotlin/io/agora/agora_rtc_engine/AgoraRtcEnginePlugin.kt)**: Android native implementation to handle dart message channel api calls.
+1. **[lib/rtc_engine.dart](lib/rtc_engine.dart)**: The entry of Dart API.
+2. **[example](example)**: API Examples.
+3. **[android](android)**: Android native implementation.
+4. **[ios](ios)**: iOS native implementation.
+5. **[macos](macos)**: Mac native implementation.
+6. **[windows](windows)**: Windows native implementation.
+7. **[web](lib/agora_rtc_engine_web.dart)**: Web implementation.
While creating PR, below materials could be helpful:
diff --git a/README.md b/README.md
index 5600dbd70..745d1eba7 100644
--- a/README.md
+++ b/README.md
@@ -3,57 +3,125 @@
![pub package](https://img.shields.io/pub/v/agora_rtc_engine.svg?include_prereleases)
[中文](README.zh.md)
-[日本語](README.jp.md)
-This Flutter plugin is a wrapper for [Agora Video SDK](https://docs.agora.io/en/Interactive%20Broadcast/product_live?platform=All%20Platforms).
+This Flutter plugin is a wrapper
+for [Agora Video SDK](https://docs.agora.io/en/Interactive%20Broadcast/product_live?platform=All%20Platforms)
+.
-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.
+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.
## Usage
-To use this plugin, add `agora_rtc_engine` as a dependency in your [pubspec.yaml](https://flutter.dev/docs/development/packages-and-plugins/using-packages) file.
+To use this plugin, please add `agora_rtc_engine` as a dependency to
+your [pubspec.yaml](https://flutter.dev/docs/development/packages-and-plugins/using-packages) file.
## Getting Started
-* See the [example](example) directory for a sample about one to one video chat app which using `agora_rtc_engine`.
-* Or checkout this [Tutorial](https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart) for a sample about live broadcasting app which using `agora_rtc_engine`.
+* Get some basic and advanced examples from the [example](example/lib/examples) folder.
-## Device Permission
+### Privacy Permission
-Agora Video SDK requires `camera` and `microphone` permission to start video call.
+Agora Video SDK requires `Camera` and `Microphone` permission to start a video call.
-### Android
+#### Android
-Open the `AndroidManifest.xml` file and add the required device permissions to the file.
+See the required device permissions from
+the [AndroidManifest.xml](android/src/main/AndroidManifest.xml) file.
```xml
+
- ...
-
-
-
-
-
-
-
-
-
- ...
+ ...
+
+
+
+
+
+
+
+
+
+
+
+ ...
```
-### iOS
+#### iOS & macOS
Open the `Info.plist` and add:
-- `Privacy - Microphone Usage Description`, and add a note in the Value column.
-- `Privacy - Camera Usage Description`, and add a note in the Value column.
+- `Privacy - Microphone Usage Description`,and add some description into the `Value` column.
+- `Privacy - Camera Usage Description`, and add some description into the `Value` column.
+
+## Flutter2 support
+
+### Null Safety
+
+We have supported null safety at
+the [4.0.1](https://pub.dev/packages/agora_rtc_engine/versions/4.0.1) version already. This version
+is not downward compatible, your project needs to be migrated to null safety, please refer
+to [Migrating to null safety](https://dart.dev/null-safety/migration-guide).
+
+### Multiple Platforms
+
+#### Linux
+
+Not support yet.
+
+#### macOS
-Your application can still run the voice call when it is switched to the background if the background mode is enabled. Select the app target in Xcode, click the **Capabilities** tab, enable **Background Modes**, and check **Audio, AirPlay, and Picture in Picture**.
+You can get more info from the [agora_rtc_engine.podspec](macos/agora_rtc_engine.podspec) file, such
+as dependency Libraries on macOS.
+
+#### Windows
+
+You can get more info from the [CMakeLists.text](windows/CMakeLists.txt) file, such as dependency
+Libraries on Windows.
+
+#### Web
+
+We use the [js](https://pub.dev/packages/js) library to call JavaScript from the dart layer.
+
+We have a wrapper library named [AgoraRtcWrapper.bundle.js](example/web/AgoraRtcWrapper.bundle.js)
+for the Web SDK, so you should add it to your `index.html`, you can refer
+to [example/web/index.html](example/web/index.html).
+
+```html
+
+
+```
+
+This wrapper library is the output of the open-source
+repository [Iris-Rtc-Web](https://github.com/AgoraIO-Community/Iris-Rtc-Web). The repository attempt
+to mapping the API from Web SDK as Native SDK, we make it open-source to help developer positioning
+and troubleshooting.
+
+We have imported it as a Git submodule, you can find it in the [web](web) folder.
## Interact with RtcEngine/AgoraRtcEngineKit on Android/iOS
-`agora_rtc_engine` has not implemented all the features of agora native (Android/iOS) sdk, due to performance reasons, such as [Custom Audio Source and Renderer](https://docs.agora.io/en/Video/custom_audio_android?platform=Android), [Custom Video Source and Renderer](https://docs.agora.io/en/Video/custom_video_android?platform=Android), [Raw Audio Data](https://docs.agora.io/en/Video/raw_data_audio_android?platform=Android), etc. `agora_rtc_engine` provides [RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h), allowing you to to interact with the [RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart) created on the Flutter side in the Android/iOS code, you can implement your own plugin by inheriting [RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h), and get the [RtcEngine](https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html)/[AgoraRtcEngineKit](https://docs.agora.io/en/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html) in the `onRtcEngineCreated` callback. Please note that you should not call the [RtcEngine.destroy](https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#afb808cdc9025a77af7dd2bce98311bfe)/[AgoraRtcEngineKit.destroy](https://docs.agora.io/en/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/destroy) function on Android/iOS code, because it will affect the [RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart) on the Flutter side. To see how to use `RtcEnginePlugin`, please check the custom audio source example:
+`agora_rtc_engine` has not implemented all the features of agora native (Android/iOS) sdk, due to
+performance reasons, such
+as [Custom Audio Source and Renderer](https://docs.agora.io/en/Video/custom_audio_android?platform=Android)
+, [Custom Video Source and Renderer](https://docs.agora.io/en/Video/custom_video_android?platform=Android)
+, [Raw Audio Data](https://docs.agora.io/en/Video/raw_data_audio_android?platform=Android),
+etc. `agora_rtc_engine`
+provides [RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h)
+, allowing you to to interact with
+the [RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart)
+created on the Flutter side in the Android/iOS code, you can implement your own plugin by
+inheriting [RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h)
+, and get
+the [RtcEngine](https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html)/[AgoraRtcEngineKit](https://docs.agora.io/en/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html)
+in the `onRtcEngineCreated` callback. Please note that you should not call
+the [RtcEngine.destroy](https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#afb808cdc9025a77af7dd2bce98311bfe)/[AgoraRtcEngineKit.destroy](https://docs.agora.io/en/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/destroy)
+function on Android/iOS code, because it will affect
+the [RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart) on
+the Flutter side. To see how to use `RtcEnginePlugin`, please check the custom audio source example:
Android:[CustomAudioPlugin.kt](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/example/android/app/src/main/kotlin/io/agora/agora_rtc_engine_example/custom_audio_source/CustomAudioPlugin.kt)
@@ -61,34 +129,67 @@ iOS:[CustmoAudioSourcePlugin.swift](https://github.com/AgoraIO/Agora-Flutter-S
## Error handling
-### Android build error
+Please check **Pinned issues** and search
+in [Issues](https://github.com/AgoraIO/Agora-Flutter-SDK/issues) first.
+
+### [Background mode #28](https://github.com/AgoraIO/Agora-Flutter-SDK/issues/28)
+
+#### Android
+
+[Android 9.0 Background Capture](https://docs.agora.io/en/Interactive%20Broadcast/faq/android_background?platform=Android)
+
+#### iOS
+
+Select your **TARGET** in Xcode, and click the `Signing & Capabilities` tab, then
+enable `Background Modes` and check `Audio, AirPlay, and Picture in Picture`.
+
+### [RawData #183](https://github.com/AgoraIO/Agora-Flutter-SDK/issues/183)
+
+Only support Android and iOS yet.
+
+### [Using flutter assets #181](https://github.com/AgoraIO/Agora-Flutter-SDK/issues/181)
+
+### Screen Sharing
+
+Only support Web, macOS and Windows yet, not support for Android and iOS.
+
+**Important**
-The error log like `Could not find com.github.agorabuilder:native-full-sdk:3.4.2.`
+You should set `AppGroup` on macOS and set as parameter before calling `getScreenShareHelper`.
-pls refer to https://github.com/AgoraIO/Agora-Flutter-SDK/issues/321#issuecomment-843913064
+You can refer
+to [screen_sharing.dart](example/lib/examples/advanced/screen_sharing/screen_sharing.dart)
+and [Apple doc](https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW21)
## API
-* [Flutter API](https://docs.agora.io/en/All/api-ref?platform=Flutter)
+* [Flutter API](https://docs.agora.io/en/Video/API%20Reference/flutter/index.html)
* [Android API](https://docs.agora.io/en/Video/API%20Reference/java/index.html)
-* [iOS API](https://docs.agora.io/en/Video/API%20Reference/oc/docs/headers/Agora-Objective-C-API-Overview.html)
+* [iOS/Mac API](https://docs.agora.io/en/Video/API%20Reference/oc/docs/headers/Agora-Objective-C-API-Overview.html)
+* [Windows API](https://docs.agora.io/en/Video/API%20Reference/cpp/index.html)
+* [Web API](https://docs.agora.io/en/Video/API%20Reference/web_ng/index.html)
## Feedback
-If you have any problems or suggestions regarding the sample projects, feel free to file an [issue](https://github.com/AgoraIO/Agora-Flutter-SDK/issues).
+If you have any problems or suggestions regarding the sample projects, feel free to file
+an [issue](https://github.com/AgoraIO/Agora-Flutter-SDK/issues).
## How to contribute
-To help work on this sdk, see our [contributor guide](https://github.com/AgoraIO/Flutter-SDK/blob/master/CONTRIBUTING.md).
+To help work on this sdk, please refer
+to [CONTRIBUTING.md](https://github.com/AgoraIO/Flutter-SDK/blob/master/CONTRIBUTING.md).
## Related resources
- Check our [FAQ](https://docs.agora.io/en/faq) to see if your issue has been recorded.
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
-- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
-- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
-- If you encounter problems during integration, feel free to ask questions in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
+- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use
+ case
+- Repositories managed by developer communities can be found
+ at [Agora Community](https://github.com/AgoraIO-Community)
+- If you encounter problems during integration, feel free to ask questions
+ in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
## License
-The sample projects are under the MIT license.
\ No newline at end of file
+The sample projects are under the MIT license.
diff --git a/README.zh.md b/README.zh.md
index 62e12d795..db24f8774 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -3,57 +3,100 @@
![pub package](https://img.shields.io/pub/v/agora_rtc_engine.svg?include_prereleases)
[English](README.md)
-[日本語](README.jp.md)
-此 Flutter 插件 是对 [Agora 视频 SDK](https://docs.agora.io/cn/Interactive%20Broadcast/product_live?platform=All%20Platforms) 的包装。
+此 Flutter 插件
+是对 [Agora 视频 SDK](https://docs.agora.io/cn/Interactive%20Broadcast/product_live?platform=All%20Platforms)
+的包装。
Agora.io 通过一个简单而强大的 SDK 为您提供了添加实时语音和视频通信的构建块。您可以集成此 SDK 以便在您自己的应用程序中快速实现实时通信。
## 如何使用
-为了使用此插件, 添加 `agora_rtc_engine` 到您的 [pubspec.yaml](https://flutter.dev/docs/development/packages-and-plugins/using-packages) 文件中。
+为了使用此插件, 请添加 `agora_rtc_engine`
+到您的 [pubspec.yaml](https://flutter.dev/docs/development/packages-and-plugins/using-packages) 文件中。
## 快速开始
-* 参阅 [example](example) 目录,这是一个一对一视频聊天的示例。
-* 或者检出 [Tutorial](https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart) ,这是一个直播场景的示例.
+* 从 [example](example/lib/examples) 目录获取一些基础和高阶的参考示例。
-## 设备权限
+### 隐私权限
Agora 视频 SDK 需要 `摄像头` 和 `麦克风` 权限来开始视频通话。
-### Android
+#### Android
-打开 `AndroidManifest.xml` 文件并且添加必备的权限到此文件中.
+查看 [AndroidManifest.xml](android/src/main/AndroidManifest.xml) 文件中已声明的权限。
```xml
+
- ...
-
-
-
-
-
-
-
-
-
- ...
+ ...
+
+
+
+
+
+
+
+
+
+
+
+ ...
```
-### iOS
+#### iOS 和 macOS
-打开 `info.plist` 文件并且添加:
+打开 `Info.plist` 文件并且添加:
- `Privacy - Microphone Usage Description`,并且在 `Value` 列中添加描述。
- `Privacy - Camera Usage Description`, 并且在 `Value` 列中添加描述。
-您的程序可以在后台运行音视频通话,前提是您开启了后台模式。在 Xcode 中选择您的 app target,点击 **Capabilities** 标签,开启 **Background Modes**,并且检查 **Audio、AirPlay 和 Picture in Picture**。
+## Flutter2 支持
+
+### 空安全
+
+我们在 [4.0.1](https://pub.dev/packages/agora_rtc_engine/versions/4.0.1) 版本已经正式支持了空安全。
+此版本不向下兼容,需要您的工程迁移至空安全,具体参考 [迁移至空安全](https://dart.cn/null-safety/migration-guide) 。
+
+### 多平台
+
+#### Linux
+
+暂不支持。
+
+#### macOS
+
+您可以从 [agora_rtc_engine.podspec](macOS/agora_rtc_engine.podspec) 文件中获取更多信息, 比如在 macOS 上的依赖库。
+
+#### Windows
+
+您可以从 [CMakeLists.text](windows/CMakeLists.txt) 文件中获取更多信息, 比如在 Windows 上的依赖库。
+
+#### Web
+
+我们使用 [js](https://pub.dev/packages/js) 库实现 dart 对 JavaScript 的调用。
+
+我们针对 Web SDK 有一个 [AgoraRtcWrapper.bundle.js](example/web/AgoraRtcWrapper.bundle.js)
+包装库,所以需要在您的 `index.html` 中添加引用,可以参考 [example/web/index.html](example/web/index.html) 。
+
+```html
+
+
+```
+
+此包装库是 [Iris-Rtc-Web](https://github.com/AgoraIO-Community/Iris-Rtc-Web) 开源库的编译产物,它尝试将 Web SDK 接口映射成
+Native SDK 接口,我们将其开源以便开发者定位和排查问题。
+
+我们已将其作为 Git Submodule 导入到工程中,您可以在 [web](web) 目录中找到它。
## 在Android/iOS中与[RtcEngine](https://docs.agora.io/cn/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html)/[AgoraRtcEngineKit](https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html)交互
-由于性能原因,`agora_rtc_engine`暂时没有实现agora native(Android/iOS) sdk的所有功能,如[自定义音频采集和渲染](hhttps://docs.agora.io/cn/Video/custom_audio_android?platform=Android),[自定义视频采集和渲染](https://docs.agora.io/cn/Video/custom_video_android?platform=Android),[原始音频数据](https://docs.agora.io/cn/Video/raw_data_audio_android?platform=Android)等功能,`agora_rtc_engine`提供[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h),允许你在Android/iOS代码中与Flutter端创建的[RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart)交互,你可以继承[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h)实现自己的插件,在`onRtcEngineCreated`回调中获取[RtcEngine](https://docs.agora.io/cn/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html)/[AgoraRtcEngineKit](https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html),请注意不要在Android/iOS中调用[RtcEngine.destroy](https://docs.agora.io/cn/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#afb808cdc9025a77af7dd2bce98311bfe)/[AgoraRtcEngineKit.destroy](https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/destroy)方法,因为这会影响Flutter端的[RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart)功能。如何使用`RtcEnginePlugin`,请查看我们提供的音频自采集demo:
+由于性能原因,`agora_rtc_engine`暂时没有实现agora native(Android/iOS)
+sdk的所有功能,如[自定义音频采集和渲染](hhttps://docs.agora.io/cn/Video/custom_audio_android?platform=Android)
+,[自定义视频采集和渲染](https://docs.agora.io/cn/Video/custom_video_android?platform=Android),[原始音频数据](https://docs.agora.io/cn/Video/raw_data_audio_android?platform=Android)等功能,`agora_rtc_engine`提供[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h),允许你在Android/iOS代码中与Flutter端创建的[RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart)交互,你可以继承[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/android/src/main/java/io/agora/rtc/base/RtcEnginePlugin.kt)/[RtcEnginePlugin](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/ios/Classes/Base/RtcEnginePlugin.h)实现自己的插件,在`onRtcEngineCreated`回调中获取[RtcEngine](https://docs.agora.io/cn/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html)/[AgoraRtcEngineKit](https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html),请注意不要在Android/iOS中调用[RtcEngine.destroy](https://docs.agora.io/cn/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#afb808cdc9025a77af7dd2bce98311bfe)/[AgoraRtcEngineKit.destroy](https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/destroy)方法,因为这会影响Flutter端的[RtcEngine](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/lib/src/rtc_engine.dart)功能。如何使用`RtcEnginePlugin`,请查看我们提供的音频自采集demo:
Android:[CustomAudioPlugin.kt](https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/example/android/app/src/main/kotlin/io/agora/agora_rtc_engine_example/custom_audio_source/CustomAudioPlugin.kt)
@@ -61,21 +104,43 @@ iOS:[CustmoAudioSourcePlugin.swift](https://github.com/AgoraIO/Agora-Flutter-S
## 常见问题
-### iOS 无法显示视频(Android 是好的)
+请优先查看 **Pinned issues** 和在 [Issues](https://github.com/AgoraIO/Agora-Flutter-SDK/issues) 中搜索。
+
+### [后台采集](https://github.com/AgoraIO/Agora-Flutter-SDK/issues/28)
+
+#### Android
+
+[Android 9.0 后台采集无效](https://docs.agora.io/cn/Interactive%20Broadcast/faq/android_background?platform=Android)
+
+#### iOS
+
+在 Xcode 中选择您的 **TARGET**,点击 `Signing & Capabilities` 标签,开启 `Background Modes`
+,并且勾选 `Audio, AirPlay, and Picture in Picture`。
+
+### [获取裸数据](https://github.com/AgoraIO/Agora-Flutter-SDK/issues/183)
+
+目前仅支持 Android 和 iOS。
+
+### [使用 flutter assets 作为路径](https://github.com/AgoraIO/Agora-Flutter-SDK/issues/181)
+
+### 屏幕共享
-我们的 SDK 使用 `PlatformView`,您需要设置 `io.flutter.embedded_views_preview` 为 `YES` 在您的 **info.plist** 中。
+目前仅支持 Web、macOS 和 Windows,暂不支持 Android 和 iOS。
-### iOS 内存泄漏
+**重要信息**
-如果您使用 `stable` 版本的 `flutter`,`PlatformView` 会导致内存泄漏,您可以运行 `flutter channel beta`
+在 macOS 平台上你需要设置 `AppGroup` 并且作为参数在你调用 `getScreenShareHelper` 之前。
-您可以参考这个 [pull request](https://github.com/flutter/engine/pull/14326)
+你可以参考 [screen_sharing.dart](example/lib/examples/advanced/screen_sharing/screen_sharing.dart)
+和 [Apple doc](https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW21)
## API
-* [Flutter API](https://docs.agora.io/cn/All/api-ref?platform=Flutter)
-* [Android API](https://docs.agora.io/en/Video/API%20Reference/java/index.html)
-* [iOS API](https://docs.agora.io/en/Video/API%20Reference/oc/docs/headers/Agora-Objective-C-API-Overview.html)
+* [Flutter API](https://docs.agora.io/cn/Video/API%20Reference/flutter/index.html)
+* [Android API](https://docs.agora.io/cn/Video/API%20Reference/java/index.html)
+* [iOS/Mac API](https://docs.agora.io/cn/Video/API%20Reference/oc/docs/headers/Agora-Objective-C-API-Overview.html)
+* [Windows API](https://docs.agora.io/cn/Video/API%20Reference/cpp/index.html)
+* [Web API](https://docs.agora.io/cn/Video/API%20Reference/web_ng/index.html)
## 反馈
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 3a657c0e2..ae7d15e9c 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -4,6 +4,8 @@ analyzer:
# Ignore generated files
- '**/*.g.dart'
- 'lib/src/generated/*.dart'
+ errors:
+ undefined_prefixed_name: ignore
linter:
rules:
- public_member_api_docs
diff --git a/android/build.gradle b/android/build.gradle
index b1691be3f..f97e66d8f 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,7 +6,8 @@ def safeExtGet(prop, fallback) {
}
buildscript {
- def kotlin_version = rootProject.ext.has('kotlin_version') ? rootProject.ext.get('kotlin_version') : '1.3.72'
+ ext.agora_rtc_engine_kt_version = '1.5.31'
+ def kotlin_version = rootProject.ext.has('kotlin_version') ? rootProject.ext.get('kotlin_version') : "$agora_rtc_engine_kt_version"
repositories {
mavenCentral()
@@ -30,12 +31,12 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
- compileSdkVersion safeExtGet('compileSdkVersion', 28)
- buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
+ compileSdkVersion safeExtGet('compileSdkVersion', 31)
+ buildToolsVersion safeExtGet('buildToolsVersion', '31.0.0')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
- targetSdkVersion safeExtGet('targetSdkVersion', 28)
+ targetSdkVersion safeExtGet('targetSdkVersion', 31)
consumerProguardFiles 'consumer-rules.pro'
}
@@ -50,7 +51,6 @@ android {
}
dependencies {
- api 'com.github.agorabuilder:native-full-sdk:3.5.2'
-
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${safeExtGet('kotlin_version', '1.3.72')}"
+ api 'com.github.agorabuilder:iris-rtc:3.5.2'
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${safeExtGet('kotlin_version', "$agora_rtc_engine_kt_version")}"
}
diff --git a/android/gradle.properties b/android/gradle.properties
index 38c8d4544..94adc3a3f 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
-android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
diff --git a/android/src/main/java/io/agora/rtc/base/.gitignore b/android/src/main/java/io/agora/rtc/base/.gitignore
deleted file mode 100644
index 9f11b755a..000000000
--- a/android/src/main/java/io/agora/rtc/base/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.idea/
diff --git a/android/src/main/java/io/agora/rtc/base/Annotations.java b/android/src/main/java/io/agora/rtc/base/Annotations.java
deleted file mode 100644
index a4fc0fbba..000000000
--- a/android/src/main/java/io/agora/rtc/base/Annotations.java
+++ /dev/null
@@ -1,991 +0,0 @@
-package io.agora.rtc.base;
-
-import androidx.annotation.IntDef;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import io.agora.rtc.Constants;
-import io.agora.rtc.IRtcEngineEventHandler;
-import io.agora.rtc.RtcEngineConfig;
-import io.agora.rtc.video.BeautyOptions;
-import io.agora.rtc.video.VideoCanvas;
-import io.agora.rtc.video.VirtualBackgroundSource;
-
-@SuppressWarnings("deprecation")
-public class Annotations {
- @IntDef({
- AgoraRtcAppType.NATIVE,
- AgoraRtcAppType.COCOS,
- AgoraRtcAppType.UNITY,
- AgoraRtcAppType.ELECTRON,
- AgoraRtcAppType.FLUTTER,
- AgoraRtcAppType.UNREAL,
- AgoraRtcAppType.XAMARIN,
- AgoraRtcAppType.API_CLOUD,
- AgoraRtcAppType.REACT_NATIVE,
- AgoraRtcAppType.PYTHON,
- AgoraRtcAppType.COCOS_CREATOR,
- AgoraRtcAppType.RUST,
- AgoraRtcAppType.C_SHARP,
- AgoraRtcAppType.CEF,
- AgoraRtcAppType.UNI_APP,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraRtcAppType {
- int NATIVE = 0;
- int COCOS = 1;
- int UNITY = 2;
- int ELECTRON = 3;
- int FLUTTER = 4;
- int UNREAL = 5;
- int XAMARIN = 6;
- int API_CLOUD = 7;
- int REACT_NATIVE = 8;
- int PYTHON = 9;
- int COCOS_CREATOR = 10;
- int RUST = 11;
- int C_SHARP = 12;
- int CEF = 13;
- int UNI_APP = 14;
- }
-
- @IntDef({
- AgoraAudioCodecProfileType.LC_AAC,
- AgoraAudioCodecProfileType.HE_AAC,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioCodecProfileType {
- int LC_AAC = 0;
- int HE_AAC = 1;
- }
-
- @IntDef({
- Constants.AUDIO_EQUALIZATION_BAND_31,
- Constants.AUDIO_EQUALIZATION_BAND_62,
- Constants.AUDIO_EQUALIZATION_BAND_125,
- Constants.AUDIO_EQUALIZATION_BAND_250,
- Constants.AUDIO_EQUALIZATION_BAND_500,
- Constants.AUDIO_EQUALIZATION_BAND_1K,
- Constants.AUDIO_EQUALIZATION_BAND_2K,
- Constants.AUDIO_EQUALIZATION_BAND_4K,
- Constants.AUDIO_EQUALIZATION_BAND_8K,
- Constants.AUDIO_EQUALIZATION_BAND_16K,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioEqualizationBandFrequency {
- }
-
- @IntDef({
- Constants.LOCAL_AUDIO_STREAM_ERROR_OK,
- Constants.LOCAL_AUDIO_STREAM_ERROR_FAILURE,
- Constants.LOCAL_AUDIO_STREAM_ERROR_DEVICE_NO_PERMISSION,
- Constants.LOCAL_AUDIO_STREAM_ERROR_DEVICE_BUSY,
- Constants.LOCAL_AUDIO_STREAM_ERROR_CAPTURE_FAILURE,
- Constants.LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE,
- Constants.LOCAL_AUDIO_STREAM_ERROR_INTERRUPTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioLocalError {
- }
-
- @IntDef({
- Constants.LOCAL_AUDIO_STREAM_STATE_STOPPED,
- Constants.LOCAL_AUDIO_STREAM_STATE_CAPTURING,
- Constants.LOCAL_AUDIO_STREAM_STATE_ENCODING,
- Constants.LOCAL_AUDIO_STREAM_STATE_FAILED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioLocalState {
- }
-
- @IntDef({
- Constants.AUDIO_MIXING_REASON_CAN_NOT_OPEN,
- Constants.AUDIO_MIXING_REASON_TOO_FREQUENT_CALL,
- Constants.AUDIO_MIXING_REASON_INTERRUPTED_EOF,
- Constants.AUDIO_MIXING_REASON_STARTED_BY_USER,
- Constants.AUDIO_MIXING_REASON_ONE_LOOP_COMPLETED,
- Constants.AUDIO_MIXING_REASON_START_NEW_LOOP,
- Constants.AUDIO_MIXING_REASON_ALL_LOOPS_COMPLETED,
- Constants.AUDIO_MIXING_REASON_STOPPED_BY_USER,
- Constants.AUDIO_MIXING_REASON_PAUSED_BY_USER,
- Constants.AUDIO_MIXING_REASON_RESUMED_BY_USER,
- AgoraAudioMixingReason.MEDIA_ENGINE_AUDIO_ERROR_OK,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioMixingReason {
- int MEDIA_ENGINE_AUDIO_ERROR_OK = 0;
- }
-
- @IntDef({
- Constants.MEDIA_ENGINE_AUDIO_EVENT_MIXING_PLAY,
- Constants.MEDIA_ENGINE_AUDIO_EVENT_MIXING_PAUSED,
- Constants.MEDIA_ENGINE_AUDIO_EVENT_MIXING_RESTART,
- Constants.MEDIA_ENGINE_AUDIO_EVENT_MIXING_STOPPED,
- Constants.MEDIA_ENGINE_AUDIO_EVENT_MIXING_ERROR,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioMixingStateCode {
- }
-
- @IntDef({
- Constants.AUDIO_ROUTE_DEFAULT,
- Constants.AUDIO_ROUTE_HEADSET,
- Constants.AUDIO_ROUTE_EARPIECE,
- Constants.AUDIO_ROUTE_HEADSETNOMIC,
- Constants.AUDIO_ROUTE_SPEAKERPHONE,
- Constants.AUDIO_ROUTE_LOUDSPEAKER,
- Constants.AUDIO_ROUTE_HEADSETBLUETOOTH,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioOutputRouting {
- }
-
- @IntDef({
- Constants.AUDIO_PROFILE_DEFAULT,
- Constants.AUDIO_PROFILE_SPEECH_STANDARD,
- Constants.AUDIO_PROFILE_MUSIC_STANDARD,
- Constants.AUDIO_PROFILE_MUSIC_STANDARD_STEREO,
- Constants.AUDIO_PROFILE_MUSIC_HIGH_QUALITY,
- Constants.AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioProfile {
- }
-
- @IntDef({
- Constants.AUDIO_RECORDING_QUALITY_LOW,
- Constants.AUDIO_RECORDING_QUALITY_MEDIUM,
- Constants.AUDIO_RECORDING_QUALITY_HIGH,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioRecordingQuality {
- }
-
- @IntDef({
- Constants.REMOTE_AUDIO_STATE_STOPPED,
- Constants.REMOTE_AUDIO_STATE_STARTING,
- Constants.REMOTE_AUDIO_STATE_DECODING,
- Constants.REMOTE_AUDIO_STATE_FROZEN,
- Constants.REMOTE_AUDIO_STATE_FAILED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioRemoteState {
- }
-
- @IntDef({
- Constants.REMOTE_AUDIO_REASON_INTERNAL,
- Constants.REMOTE_AUDIO_REASON_NETWORK_CONGESTION,
- Constants.REMOTE_AUDIO_REASON_NETWORK_RECOVERY,
- Constants.REMOTE_AUDIO_REASON_LOCAL_MUTED,
- Constants.REMOTE_AUDIO_REASON_LOCAL_UNMUTED,
- Constants.REMOTE_AUDIO_REASON_REMOTE_MUTED,
- Constants.REMOTE_AUDIO_REASON_REMOTE_UNMUTED,
- Constants.REMOTE_AUDIO_REASON_REMOTE_OFFLINE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioRemoteStateReason {
- }
-
- @IntDef({
- Constants.AUDIO_REVERB_OFF,
- Constants.AUDIO_REVERB_POPULAR,
- Constants.AUDIO_REVERB_RNB,
- Constants.AUDIO_REVERB_ROCK,
- Constants.AUDIO_REVERB_HIPHOP,
- Constants.AUDIO_REVERB_VOCAL_CONCERT,
- Constants.AUDIO_REVERB_KTV,
- Constants.AUDIO_REVERB_STUDIO,
- Constants.AUDIO_REVERB_FX_KTV,
- Constants.AUDIO_REVERB_FX_VOCAL_CONCERT,
- Constants.AUDIO_REVERB_FX_UNCLE,
- Constants.AUDIO_REVERB_FX_SISTER,
- Constants.AUDIO_REVERB_FX_STUDIO,
- Constants.AUDIO_REVERB_FX_POPULAR,
- Constants.AUDIO_REVERB_FX_RNB,
- Constants.AUDIO_REVERB_FX_PHONOGRAPH,
- Constants.AUDIO_VIRTUAL_STEREO,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioReverbPreset {
- }
-
- @IntDef({
- Constants.AUDIO_REVERB_DRY_LEVEL,
- Constants.AUDIO_REVERB_WET_LEVEL,
- Constants.AUDIO_REVERB_ROOM_SIZE,
- Constants.AUDIO_REVERB_WET_DELAY,
- Constants.AUDIO_REVERB_STRENGTH,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioReverbType {
- }
-
- @IntDef({
- AgoraAudioSampleRateType.TYPE_32000,
- AgoraAudioSampleRateType.TYPE_44100,
- AgoraAudioSampleRateType.TYPE_48000,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioSampleRateType {
- int TYPE_32000 = 32000;
- int TYPE_44100 = 44100;
- int TYPE_48000 = 48000;
- }
-
- @IntDef({
- Constants.AUDIO_SCENARIO_DEFAULT,
- Constants.AUDIO_SCENARIO_CHATROOM_ENTERTAINMENT,
- Constants.AUDIO_SCENARIO_EDUCATION,
- Constants.AUDIO_SCENARIO_GAME_STREAMING,
- Constants.AUDIO_SCENARIO_SHOWROOM,
- Constants.AUDIO_SCENARIO_CHATROOM_GAMING,
- Constants.AUDIO_SCENARIO_IOT,
- Constants.AUDIO_SCENARIO_MEETING,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioScenario {
- }
-
- @IntDef({
- Constants.VOICE_CHANGER_OFF,
- Constants.VOICE_CHANGER_OLDMAN,
- Constants.VOICE_CHANGER_BABYBOY,
- Constants.VOICE_CHANGER_BABYGIRL,
- Constants.VOICE_CHANGER_ZHUBAJIE,
- Constants.VOICE_CHANGER_ETHEREAL,
- Constants.VOICE_CHANGER_HULK,
- Constants.VOICE_BEAUTY_VIGOROUS,
- Constants.VOICE_BEAUTY_DEEP,
- Constants.VOICE_BEAUTY_MELLOW,
- Constants.VOICE_BEAUTY_FALSETTO,
- Constants.VOICE_BEAUTY_FULL,
- Constants.VOICE_BEAUTY_CLEAR,
- Constants.VOICE_BEAUTY_RESOUNDING,
- Constants.VOICE_BEAUTY_RINGING,
- Constants.VOICE_BEAUTY_SPACIAL,
- Constants.GENERAL_BEAUTY_VOICE_MALE_MAGNETIC,
- Constants.GENERAL_BEAUTY_VOICE_FEMALE_FRESH,
- Constants.GENERAL_BEAUTY_VOICE_FEMALE_VITALITY,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioVoiceChanger {
- }
-
- @IntDef({
- AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_AUTO,
- AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE,
- AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_PREVIEW,
- AgoraCameraCaptureOutputPreference.CAPTURER_OUTPUT_PREFERENCE_MANUAL,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraCameraCaptureOutputPreference {
- int CAPTURER_OUTPUT_PREFERENCE_AUTO = 0;
- int CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE = 1;
- int CAPTURER_OUTPUT_PREFERENCE_PREVIEW = 2;
- int CAPTURER_OUTPUT_PREFERENCE_MANUAL = 3;
- }
-
- @IntDef({
- AgoraCameraDirection.CAMERA_REAR,
- AgoraCameraDirection.CAMERA_FRONT,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraCameraDirection {
- int CAMERA_REAR = 0;
- int CAMERA_FRONT = 1;
- }
-
- @IntDef({
- Constants.RELAY_OK,
- Constants.RELAY_ERROR_SERVER_ERROR_RESPONSE,
- Constants.RELAY_ERROR_SERVER_NO_RESPONSE,
- Constants.RELAY_ERROR_NO_RESOURCE_AVAILABLE,
- Constants.RELAY_ERROR_FAILED_JOIN_SRC,
- Constants.RELAY_ERROR_FAILED_JOIN_DEST,
- Constants.RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC,
- Constants.RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST,
- Constants.RELAY_ERROR_SERVER_CONNECTION_LOST,
- Constants.RELAY_ERROR_INTERNAL_ERROR,
- Constants.RELAY_ERROR_SRC_TOKEN_EXPIRED,
- Constants.RELAY_ERROR_DEST_TOKEN_EXPIRED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraChannelMediaRelayError {
- }
-
- @IntDef({
- Constants.RELAY_EVENT_NETWORK_DISCONNECTED,
- Constants.RELAY_EVENT_NETWORK_CONNECTED,
- Constants.RELAY_EVENT_PACKET_JOINED_SRC_CHANNEL,
- Constants.RELAY_EVENT_PACKET_JOINED_DEST_CHANNEL,
- Constants.RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL,
- Constants.RELAY_EVENT_PACKET_RECEIVED_VIDEO_FROM_SRC,
- Constants.RELAY_EVENT_PACKET_RECEIVED_AUDIO_FROM_SRC,
- Constants.RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL,
- Constants.RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_REFUSED,
- Constants.RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE,
- Constants.RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_IS_NULL,
- Constants.RELAY_EVENT_VIDEO_PROFILE_UPDATE,
- Constants.RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS,
- Constants.RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_FAILED,
- Constants.RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS,
- Constants.RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_FAILED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraChannelMediaRelayEvent {
- }
-
- @IntDef({
- Constants.RELAY_STATE_IDLE,
- Constants.RELAY_STATE_CONNECTING,
- Constants.RELAY_STATE_RUNNING,
- Constants.RELAY_STATE_FAILURE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraChannelMediaRelayState {
- }
-
- @IntDef({
- Constants.CHANNEL_PROFILE_COMMUNICATION,
- Constants.CHANNEL_PROFILE_LIVE_BROADCASTING,
- Constants.CHANNEL_PROFILE_GAME,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraChannelProfile {
- }
-
- @IntDef({
- Constants.CLIENT_ROLE_BROADCASTER,
- Constants.CLIENT_ROLE_AUDIENCE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraClientRole {
- }
-
- @IntDef({
- Constants.CONNECTION_CHANGED_CONNECTING,
- Constants.CONNECTION_CHANGED_JOIN_SUCCESS,
- Constants.CONNECTION_CHANGED_INTERRUPTED,
- Constants.CONNECTION_CHANGED_BANNED_BY_SERVER,
- Constants.CONNECTION_CHANGED_JOIN_FAILED,
- Constants.CONNECTION_CHANGED_LEAVE_CHANNEL,
- Constants.CONNECTION_CHANGED_INVALID_APP_ID,
- Constants.CONNECTION_CHANGED_INVALID_CHANNEL_NAME,
- Constants.CONNECTION_CHANGED_INVALID_TOKEN,
- Constants.CONNECTION_CHANGED_TOKEN_EXPIRED,
- Constants.CONNECTION_CHANGED_REJECTED_BY_SERVER,
- Constants.CONNECTION_CHANGED_SETTING_PROXY_SERVER,
- Constants.CONNECTION_CHANGED_RENEW_TOKEN,
- Constants.CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED,
- Constants.CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT,
- Constants.CONNECTION_CHANGED_PROXY_SERVER_INTERRUPTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraConnectionChangedReason {
- }
-
- @IntDef({
- Constants.CONNECTION_STATE_DISCONNECTED,
- Constants.CONNECTION_STATE_CONNECTING,
- Constants.CONNECTION_STATE_CONNECTED,
- Constants.CONNECTION_STATE_RECONNECTING,
- Constants.CONNECTION_STATE_FAILED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraConnectionStateType {
- }
-
- @IntDef({
- AgoraDegradationPreference.MAINTAIN_QUALITY,
- AgoraDegradationPreference.MAINTAIN_FRAMERATE,
- AgoraDegradationPreference.MAINTAIN_BALANCED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraDegradationPreference {
- int MAINTAIN_QUALITY = 0;
- int MAINTAIN_FRAMERATE = 1;
- int MAINTAIN_BALANCED = 2;
- }
-
- @IntDef({
- AgoraEncryptionMode.NONE,
- AgoraEncryptionMode.AES128XTS,
- AgoraEncryptionMode.AES128ECB,
- AgoraEncryptionMode.AES256XTS,
- AgoraEncryptionMode.SM4128ECB,
- AgoraEncryptionMode.AES128GCM,
- AgoraEncryptionMode.AES256GCM,
- AgoraEncryptionMode.AES128GCM2,
- AgoraEncryptionMode.AES256GCM2,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraEncryptionMode {
- int NONE = 0;
- int AES128XTS = 1;
- int AES128ECB = 2;
- int AES256XTS = 3;
- int SM4128ECB = 4;
- int AES128GCM = 5;
- int AES256GCM = 6;
- int AES128GCM2 = 7;
- int AES256GCM2 = 8;
- }
-
- @IntDef({
- Constants.ERR_OK,
- Constants.ERR_FAILED,
- Constants.ERR_INVALID_ARGUMENT,
- Constants.ERR_NOT_READY,
- Constants.ERR_NOT_SUPPORTED,
- Constants.ERR_REFUSED,
- Constants.ERR_BUFFER_TOO_SMALL,
- Constants.ERR_NOT_INITIALIZED,
- Constants.ERR_NO_PERMISSION,
- Constants.ERR_TIMEDOUT,
- Constants.ERR_CANCELED,
- Constants.ERR_TOO_OFTEN,
- Constants.ERR_BIND_SOCKET,
- Constants.ERR_NET_DOWN,
- Constants.ERR_NET_NOBUFS,
- Constants.ERR_JOIN_CHANNEL_REJECTED,
- Constants.ERR_LEAVE_CHANNEL_REJECTED,
- Constants.ERR_ALREADY_IN_USE,
- Constants.ERR_INVALID_APP_ID,
- Constants.ERR_INVALID_CHANNEL_NAME,
- Constants.ERR_NO_SERVER_RESOURCES,
- Constants.ERR_TOKEN_EXPIRED,
- Constants.ERR_INVALID_TOKEN,
- Constants.ERR_CONNECTION_INTERRUPTED,
- Constants.ERR_CONNECTION_LOST,
- Constants.ERR_NOT_IN_CHANNEL,
- Constants.ERR_SIZE_TOO_LARGE,
- Constants.ERR_BITRATE_LIMIT,
- Constants.ERR_TOO_MANY_DATA_STREAMS,
- Constants.ERR_DECRYPTION_FAILED,
- Constants.ERR_CLIENT_IS_BANNED_BY_SERVER,
- Constants.ERR_WATERMARK_PARAM,
- Constants.ERR_WATERMARK_PATH,
- Constants.ERR_WATERMARK_PNG,
- Constants.ERR_WATERMARKR_INFO,
- Constants.ERR_WATERMARK_ARGB,
- Constants.ERR_WATERMARK_READ,
- Constants.ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISHED,
- Constants.ERR_INVALID_USER_ACCOUNT,
- Constants.ERR_PUBLISH_STREAM_CDN_ERROR,
- Constants.ERR_PUBLISH_STREAM_NUM_REACH_LIMIT,
- Constants.ERR_PUBLISH_STREAM_NOT_AUTHORIZED,
- Constants.ERR_PUBLISH_STREAM_INTERNAL_SERVER_ERROR,
- Constants.ERR_PUBLISH_STREAM_NOT_FOUND,
- Constants.ERR_PUBLISH_STREAM_FORMAT_NOT_SUPPORTED,
- Constants.ERR_MODULE_NOT_FOUND,
- Constants.ERR_ALREADY_IN_RECORDING,
- Constants.ERR_LOAD_MEDIA_ENGINE,
- Constants.ERR_START_CALL,
- Constants.ERR_START_CAMERA,
- Constants.ERR_START_VIDEO_RENDER,
- Constants.ERR_ADM_GENERAL_ERROR,
- Constants.ERR_ADM_JAVA_RESOURCE,
- Constants.ERR_ADM_SAMPLE_RATE,
- Constants.ERR_ADM_INIT_PLAYOUT,
- Constants.ERR_ADM_START_PLAYOUT,
- Constants.ERR_ADM_STOP_PLAYOUT,
- Constants.ERR_ADM_INIT_RECORDING,
- Constants.ERR_ADM_START_RECORDING,
- Constants.ERR_ADM_STOP_RECORDING,
- Constants.ERR_ADM_RUNTIME_PLAYOUT_ERROR,
- Constants.ERR_ADM_RUNTIME_RECORDING_ERROR,
- Constants.ERR_ADM_RECORD_AUDIO_FAILED,
- Constants.ERR_ADM_INIT_LOOPBACK,
- Constants.ERR_ADM_START_LOOPBACK,
- Constants.ERR_AUDIO_BT_SCO_FAILED,
- Constants.ERR_ADM_NO_RECORDING_DEVICE,
- Constants.ERR_ADM_NO_PLAYOUT_DEVICE,
- Constants.ERR_VDM_CAMERA_NOT_AUTHORIZED,
- Constants.ERR_VCM_UNKNOWN_ERROR,
- Constants.ERR_VCM_ENCODER_INIT_ERROR,
- Constants.ERR_VCM_ENCODER_ENCODE_ERROR,
- Constants.ERR_VCM_ENCODER_SET_ERROR,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraErrorCode {
- }
-
- @IntDef({
- Constants.INJECT_STREAM_STATUS_START_SUCCESS,
- Constants.INJECT_STREAM_STATUS_START_ALREADY_EXISTS,
- Constants.INJECT_STREAM_STATUS_START_UNAUTHORIZED,
- Constants.INJECT_STREAM_STATUS_START_TIMEDOUT,
- Constants.INJECT_STREAM_STATUS_START_FAILED,
- Constants.INJECT_STREAM_STATUS_STOP_SUCCESS,
- Constants.INJECT_STREAM_STATUS_STOP_NOT_FOUND,
- Constants.INJECT_STREAM_STATUS_STOP_UNAUTHORIZED,
- Constants.INJECT_STREAM_STATUS_STOP_TIMEDOUT,
- Constants.INJECT_STREAM_STATUS_STOP_FAILED,
- Constants.INJECT_STREAM_STATUS_BROKEN,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraInjectStreamStatus {
- }
-
- @IntDef({
- Constants.LASTMILE_PROBE_RESULT_COMPLETE,
- Constants.LASTMILE_PROBE_RESULT_INCOMPLETE_NO_BWE,
- Constants.LASTMILE_PROBE_RESULT_UNAVAILABLE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraLastmileProbeResultState {
- }
-
- @IntDef({
- BeautyOptions.LIGHTENING_CONTRAST_LOW,
- BeautyOptions.LIGHTENING_CONTRAST_NORMAL,
- BeautyOptions.LIGHTENING_CONTRAST_HIGH,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraLighteningContrastLevel {
- }
-
- @IntDef({
- Constants.LOCAL_VIDEO_STREAM_ERROR_OK,
- Constants.LOCAL_VIDEO_STREAM_ERROR_FAILURE,
- Constants.LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION,
- Constants.LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY,
- Constants.LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE,
- Constants.LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE,
- Constants.LOCAL_VIDEO_STREAM_ERROR_DEVICE_NOT_FOUND
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraLocalVideoStreamError {
- }
-
- @IntDef({
- Constants.LOCAL_VIDEO_STREAM_STATE_STOPPED,
- Constants.LOCAL_VIDEO_STREAM_STATE_CAPTURING,
- Constants.LOCAL_VIDEO_STREAM_STATE_ENCODING,
- Constants.LOCAL_VIDEO_STREAM_STATE_FAILED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraLocalVideoStreamState {
- }
-
- @IntDef({
- Constants.LOG_FILTER_OFF,
- Constants.LOG_FILTER_DEBUG,
- Constants.LOG_FILTER_INFO,
- Constants.LOG_FILTER_WARNING,
- Constants.LOG_FILTER_ERROR,
- Constants.LOG_FILTER_CRITICAL,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraLogFilter {
- }
-
- @IntDef({
- Constants.QUALITY_UNKNOWN,
- Constants.QUALITY_EXCELLENT,
- Constants.QUALITY_GOOD,
- Constants.QUALITY_POOR,
- Constants.QUALITY_BAD,
- Constants.QUALITY_VBAD,
- Constants.QUALITY_DOWN,
- Constants.QUALITY_UNSUPPORTED,
- Constants.QUALITY_DETECTING,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraNetworkQuality {
- }
-
- @IntDef({
- Constants.NETWORK_TYPE_UNKNOWN,
- Constants.NETWORK_TYPE_DISCONNECTED,
- Constants.NETWORK_TYPE_LAN,
- Constants.NETWORK_TYPE_WIFI,
- Constants.NETWORK_TYPE_MOBILE_2G,
- Constants.NETWORK_TYPE_MOBILE_3G,
- Constants.NETWORK_TYPE_MOBILE_4G,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraNetworkType {
- }
-
- @IntDef({
- Constants.RTMP_STREAM_PUBLISH_ERROR_OK,
- Constants.RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT,
- Constants.RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED,
- Constants.RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT,
- Constants.RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR,
- Constants.RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR,
- Constants.RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN,
- Constants.RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT,
- Constants.RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED,
- Constants.RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND,
- Constants.RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED,
- Constants.RTMP_STREAM_UNPUBLISH_ERROR_OK,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraRtmpStreamingErrorCode {
- }
-
- @IntDef({
- Constants.RTMP_STREAM_PUBLISH_STATE_IDLE,
- Constants.RTMP_STREAM_PUBLISH_STATE_CONNECTING,
- Constants.RTMP_STREAM_PUBLISH_STATE_RUNNING,
- Constants.RTMP_STREAM_PUBLISH_STATE_RECOVERING,
- Constants.RTMP_STREAM_PUBLISH_STATE_FAILURE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraRtmpStreamingState {
- }
-
- @IntDef({
- Constants.STREAM_FALLBACK_OPTION_DISABLED,
- Constants.STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW,
- Constants.STREAM_FALLBACK_OPTION_AUDIO_ONLY,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraStreamFallbackOptions {
- }
-
- @IntDef({
- Constants.USER_OFFLINE_QUIT,
- Constants.USER_OFFLINE_DROPPED,
- Constants.USER_OFFLINE_BECOME_AUDIENCE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraUserOfflineReason {
- }
-
- @IntDef({
- Constants.USER_PRIORITY_HIGH,
- Constants.USER_PRIORITY_NORMAL,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraUserPriority {
- }
-
- @IntDef({
- AgoraVideoCodecProfileType.BASELINE,
- AgoraVideoCodecProfileType.MAIN,
- AgoraVideoCodecProfileType.HIGH,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoCodecProfileType {
- int BASELINE = 66;
- int MAIN = 77;
- int HIGH = 100;
- }
-
- @IntDef({
- AgoraVideoFrameRate.FRAME_RATE_FPS_1,
- AgoraVideoFrameRate.FRAME_RATE_FPS_7,
- AgoraVideoFrameRate.FRAME_RATE_FPS_10,
- AgoraVideoFrameRate.FRAME_RATE_FPS_15,
- AgoraVideoFrameRate.FRAME_RATE_FPS_24,
- AgoraVideoFrameRate.FRAME_RATE_FPS_30,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoFrameRate {
- int FRAME_RATE_FPS_1 = 1;
- int FRAME_RATE_FPS_7 = 7;
- int FRAME_RATE_FPS_10 = 10;
- int FRAME_RATE_FPS_15 = 15;
- int FRAME_RATE_FPS_24 = 24;
- int FRAME_RATE_FPS_30 = 30;
- }
-
- @IntDef({
- Constants.VIDEO_MIRROR_MODE_AUTO,
- Constants.VIDEO_MIRROR_MODE_ENABLED,
- Constants.VIDEO_MIRROR_MODE_DISABLED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoMirrorMode {
- }
-
- @IntDef({
- AgoraVideoOutputOrientationMode.ORIENTATION_MODE_ADAPTIVE,
- AgoraVideoOutputOrientationMode.ORIENTATION_MODE_FIXED_LANDSCAPE,
- AgoraVideoOutputOrientationMode.ORIENTATION_MODE_FIXED_PORTRAIT,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoOutputOrientationMode {
- int ORIENTATION_MODE_ADAPTIVE = 0;
- int ORIENTATION_MODE_FIXED_LANDSCAPE = 1;
- int ORIENTATION_MODE_FIXED_PORTRAIT = 2;
- }
-
- @IntDef({
- Constants.ADAPT_NONE,
- Constants.ADAPT_UP_BANDWIDTH,
- Constants.ADAPT_DOWN_BANDWIDTH,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoQualityAdaptIndication {
- }
-
- @IntDef({
- Constants.REMOTE_VIDEO_STATE_STOPPED,
- Constants.REMOTE_VIDEO_STATE_STARTING,
- Constants.REMOTE_VIDEO_STATE_DECODING,
- Constants.REMOTE_VIDEO_STATE_FROZEN,
- Constants.REMOTE_VIDEO_STATE_FAILED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoRemoteState {
- }
-
- @IntDef({
- Constants.REMOTE_VIDEO_STATE_REASON_INTERNAL,
- Constants.REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION,
- Constants.REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY,
- Constants.REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED,
- Constants.REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED,
- Constants.REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED,
- Constants.REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED,
- Constants.REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE,
- Constants.REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK,
- Constants.REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoRemoteStateReason {
- }
-
- @IntDef({
- VideoCanvas.RENDER_MODE_HIDDEN,
- VideoCanvas.RENDER_MODE_FIT,
- VideoCanvas.RENDER_MODE_ADAPTIVE,
- VideoCanvas.RENDER_MODE_FILL,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoRenderMode {
- }
-
- @IntDef({
- Constants.VIDEO_STREAM_HIGH,
- Constants.VIDEO_STREAM_LOW,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVideoStreamType {
- }
-
- @IntDef({
- Constants.WARN_INVALID_VIEW,
- Constants.WARN_INIT_VIDEO,
- Constants.WARN_PENDING,
- Constants.WARN_NO_AVAILABLE_CHANNEL,
- Constants.WARN_LOOKUP_CHANNEL_TIMEOUT,
- Constants.WARN_LOOKUP_CHANNEL_REJECTED,
- Constants.WARN_OPEN_CHANNEL_TIMEOUT,
- Constants.WARN_OPEN_CHANNEL_REJECTED,
- Constants.WARN_SWITCH_LIVE_VIDEO_TIMEOUT,
- Constants.WARN_SET_CLIENT_ROLE_TIMEOUT,
- Constants.WARN_SET_CLIENT_ROLE_NOT_AUTHORIZED,
- Constants.WARN_OPEN_CHANNEL_INVALID_TICKET,
- Constants.WARN_OPEN_CHANNEL_TRY_NEXT_VOS,
- Constants.WARN_AUDIO_MIXING_OPEN_ERROR,
- Constants.WARN_ADM_RUNTIME_PLAYOUT_WARNING,
- Constants.WARN_ADM_RUNTIME_RECORDING_WARNING,
- Constants.WARN_ADM_RECORD_AUDIO_SILENCE,
- Constants.WARN_ADM_PLAYOUT_ABNORMAL_FREQUENCY,
- Constants.WARN_ADM_RECORD_ABNORMAL_FREQUENCY,
- Constants.WARN_ADM_CALL_INTERRUPTION,
- Constants.WARN_ADM_RECORD_AUDIO_LOWLEVEL,
- Constants.WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL,
- Constants.WARN_ADM_RECORD_IS_OCCUPIED,
- Constants.WARN_APM_HOWLING,
- Constants.WARN_ADM_GLITCH_STATE,
- Constants.WARN_APM_RESIDUAL_ECHO,
- Constants.WARN_SUPER_RESOLUTION_STREAM_OVER_LIMITATION,
- Constants.WARN_SUPER_RESOLUTION_USER_COUNT_OVER_LIMITATION,
- Constants.WARN_SUPER_RESOLUTION_DEVICE_NOT_SUPPORTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraWarningCode {
- }
-
- @IntDef({
- RtcEngineConfig.AreaCode.AREA_CODE_CN,
- RtcEngineConfig.AreaCode.AREA_CODE_NA,
- RtcEngineConfig.AreaCode.AREA_CODE_EU,
- RtcEngineConfig.AreaCode.AREA_CODE_AS,
- RtcEngineConfig.AreaCode.AREA_CODE_JP,
- RtcEngineConfig.AreaCode.AREA_CODE_IN,
- RtcEngineConfig.AreaCode.AREA_CODE_GLOB,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAreaCode {
- }
-
- @IntDef({
- Constants.SUB_STATE_IDLE,
- Constants.SUB_STATE_NO_SUBSCRIBED,
- Constants.SUB_STATE_SUBSCRIBING,
- Constants.SUB_STATE_SUBSCRIBED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraStreamSubscribeState {
- }
-
- @IntDef({
- Constants.PUB_STATE_IDLE,
- Constants.PUB_STATE_NO_PUBLISHED,
- Constants.PUB_STATE_PUBLISHING,
- Constants.PUB_STATE_PUBLISHED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraStreamPublishState {
- }
-
- @IntDef({
- Constants.RTMP_STREAMING_EVENT_FAILED_LOAD_IMAGE,
- Constants.RTMP_STREAMING_EVENT_URL_ALREADY_IN_USE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraRtmpStreamingEvent {
- }
-
- @IntDef({
- Constants.AUDIO_EFFECT_OFF,
- Constants.ROOM_ACOUSTICS_KTV,
- Constants.ROOM_ACOUSTICS_VOCAL_CONCERT,
- Constants.ROOM_ACOUSTICS_STUDIO,
- Constants.ROOM_ACOUSTICS_PHONOGRAPH,
- Constants.ROOM_ACOUSTICS_VIRTUAL_STEREO,
- Constants.ROOM_ACOUSTICS_SPACIAL,
- Constants.ROOM_ACOUSTICS_ETHEREAL,
- Constants.ROOM_ACOUSTICS_3D_VOICE,
- Constants.VOICE_CHANGER_EFFECT_UNCLE,
- Constants.VOICE_CHANGER_EFFECT_OLDMAN,
- Constants.VOICE_CHANGER_EFFECT_BOY,
- Constants.VOICE_CHANGER_EFFECT_SISTER,
- Constants.VOICE_CHANGER_EFFECT_GIRL,
- Constants.VOICE_CHANGER_EFFECT_PIGKING,
- Constants.VOICE_CHANGER_EFFECT_HULK,
- Constants.STYLE_TRANSFORMATION_RNB,
- Constants.STYLE_TRANSFORMATION_POPULAR,
- Constants.PITCH_CORRECTION,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudioEffectPreset {
- }
-
- @IntDef({
- Constants.VOICE_BEAUTIFIER_OFF,
- Constants.CHAT_BEAUTIFIER_MAGNETIC,
- Constants.CHAT_BEAUTIFIER_FRESH,
- Constants.CHAT_BEAUTIFIER_VITALITY,
- Constants.SINGING_BEAUTIFIER,
- Constants.TIMBRE_TRANSFORMATION_VIGOROUS,
- Constants.TIMBRE_TRANSFORMATION_DEEP,
- Constants.TIMBRE_TRANSFORMATION_MELLOW,
- Constants.TIMBRE_TRANSFORMATION_FALSETTO,
- Constants.TIMBRE_TRANSFORMATION_FULL,
- Constants.TIMBRE_TRANSFORMATION_CLEAR,
- Constants.TIMBRE_TRANSFORMATION_RESOUNDING,
- Constants.TIMBRE_TRANSFORMATION_RINGING,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVoiceBeautifierPreset {
- }
-
- @IntDef({
- Constants.AUDIENCE_LATENCY_LEVEL_LOW_LATENCY,
- Constants.AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraAudienceLatencyLevelType {
- }
-
- @IntDef({
- Constants.TRANSPORT_TYPE_NONE_PROXY,
- Constants.TRANSPORT_TYPE_UDP_PROXY,
- Constants.TRANSPORT_TYPE_TCP_PROXY,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraCloudProxyType {
- }
-
- @IntDef({
- AgoraLogLevel.LOG_LEVEL_NONE,
- AgoraLogLevel.LOG_LEVEL_INFO,
- AgoraLogLevel.LOG_LEVEL_WARN,
- AgoraLogLevel.LOG_LEVEL_ERROR,
- AgoraLogLevel.LOG_LEVEL_FATAL,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraLogLevel {
- int LOG_LEVEL_NONE = 0;
- int LOG_LEVEL_INFO = 1;
- int LOG_LEVEL_WARN = 2;
- int LOG_LEVEL_ERROR = 4;
- int LOG_LEVEL_FATAL = 8;
- }
-
- @IntDef({
- Constants.CAPTURE_BRIGHTNESS_LEVEL_INVALID,
- Constants.CAPTURE_BRIGHTNESS_LEVEL_NORMAL,
- Constants.CAPTURE_BRIGHTNESS_LEVEL_BRIGHT,
- Constants.CAPTURE_BRIGHTNESS_LEVEL_DARK,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraCaptureBrightnessLevelType {
- }
-
- @IntDef({
- IRtcEngineEventHandler.UploadErrorReason.UPLOAD_SUCCESS,
- IRtcEngineEventHandler.UploadErrorReason.UPLOAD_NET_ERROR,
- IRtcEngineEventHandler.UploadErrorReason.UPLOAD_SERVER_ERROR,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraUploadErrorReason {
- }
-
- @IntDef({
- IRtcEngineEventHandler.ExperienceQuality.EXPERIENCE_GOOD,
- IRtcEngineEventHandler.ExperienceQuality.EXPERIENCE_BAD,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraExperienceQualityType {
- }
-
- @IntDef({
- IRtcEngineEventHandler.ExperiencePoorReason.EXPERIENCE_REASON_NONE,
- IRtcEngineEventHandler.ExperiencePoorReason.REMOTE_NETWORK_QUALITY_POOR,
- IRtcEngineEventHandler.ExperiencePoorReason.LOCAL_NETWORK_QUALITY_POOR,
- IRtcEngineEventHandler.ExperiencePoorReason.WIRELESS_SIGNAL_POOR,
- IRtcEngineEventHandler.ExperiencePoorReason.WIFI_BLUETOOTH_COEXIST,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraExperiencePoorReason {
- }
-
- @IntDef({
- Constants.SR_STATE_REASON_SUCCESS,
- Constants.SR_STATE_REASON_STREAM_OVER_LIMITATION,
- Constants.SR_STATE_REASON_USER_COUNT_OVER_LIMITATION,
- Constants.SR_STATE_REASON_DEVICE_NOT_SUPPORTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraSuperResolutionStateReason {
- }
-
- @IntDef({
- VirtualBackgroundSource.BACKGROUND_COLOR,
- VirtualBackgroundSource.BACKGROUND_IMG,
- VirtualBackgroundSource.BACKGROUND_BLUR,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVirtualBackgroundSourceType {
- }
-
- @IntDef({
- Constants.VBS_STATE_REASON_SUCCESS,
- Constants.VBS_STATE_REASON_IMAGE_NOT_EXIST,
- Constants.VBS_STATE_REASON_COLOR_FORMAT_NOT_SUPPORTED,
- Constants.VBS_STATE_REASON_DEVICE_NOT_SUPPORTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AgoraVirtualBackgroundSourceStateReason {
- }
-}
diff --git a/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt b/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt
deleted file mode 100644
index f72b2b3dd..000000000
--- a/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt
+++ /dev/null
@@ -1,271 +0,0 @@
-package io.agora.rtc.base
-
-import io.agora.rtc.RtcEngineConfig
-import io.agora.rtc.audio.AgoraRhythmPlayerConfig
-import io.agora.rtc.audio.AudioRecordingConfiguration
-import io.agora.rtc.internal.EncryptionConfig
-import io.agora.rtc.internal.LastmileProbeConfig
-import io.agora.rtc.live.LiveInjectStreamConfig
-import io.agora.rtc.live.LiveTranscoding
-import io.agora.rtc.live.LiveTranscoding.TranscodingUser
-import io.agora.rtc.models.ChannelMediaOptions
-import io.agora.rtc.models.ClientRoleOptions
-import io.agora.rtc.models.DataStreamConfig
-import io.agora.rtc.models.EchoTestConfiguration
-import io.agora.rtc.video.*
-
-fun mapToVideoDimensions(map: Map<*, *>): VideoEncoderConfiguration.VideoDimensions {
- return VideoEncoderConfiguration.VideoDimensions().apply {
- (map["width"] as? Number)?.let { width = it.toInt() }
- (map["height"] as? Number)?.let { height = it.toInt() }
- }
-}
-
-fun mapToVideoEncoderConfiguration(map: Map<*, *>): VideoEncoderConfiguration {
- return VideoEncoderConfiguration().apply {
- (map["dimensions"] as? Map<*, *>)?.let { dimensions = mapToVideoDimensions(it) }
- (map["frameRate"] as? Number)?.let { frameRate = it.toInt() }
- (map["minFrameRate"] as? Number)?.let { minFrameRate = it.toInt() }
- (map["bitrate"] as? Number)?.let { bitrate = it.toInt() }
- (map["minBitrate"] as? Number)?.let { minBitrate = it.toInt() }
- (map["orientationMode"] as? Number)?.let { orientationMode = intToOrientationMode(it.toInt()) }
- (map["degradationPrefer"] as? Number)?.let {
- degradationPrefer = intToDegradationPreference(it.toInt())
- }
- (map["mirrorMode"] as? Number)?.let { mirrorMode = it.toInt() }
- }
-}
-
-fun mapToBeautyOptions(map: Map<*, *>): BeautyOptions {
- return BeautyOptions().apply {
- (map["lighteningContrastLevel"] as? Number)?.let { lighteningContrastLevel = it.toInt() }
- (map["lighteningLevel"] as? Number)?.let { lighteningLevel = it.toFloat() }
- (map["smoothnessLevel"] as? Number)?.let { smoothnessLevel = it.toFloat() }
- (map["rednessLevel"] as? Number)?.let { rednessLevel = it.toFloat() }
- }
-}
-
-fun mapToAgoraImage(map: Map<*, *>): AgoraImage {
- return AgoraImage().apply {
- (map["url"] as? String)?.let { url = it }
- (map["x"] as? Number)?.let { x = it.toInt() }
- (map["y"] as? Number)?.let { y = it.toInt() }
- (map["width"] as? Number)?.let { width = it.toInt() }
- (map["height"] as? Number)?.let { height = it.toInt() }
- }
-}
-
-fun mapToTranscodingUser(map: Map<*, *>): TranscodingUser {
- return TranscodingUser().apply {
- (map["uid"] as? Number)?.let { uid = it.toNativeUInt() }
- (map["x"] as? Number)?.let { x = it.toInt() }
- (map["y"] as? Number)?.let { y = it.toInt() }
- (map["width"] as? Number)?.let { width = it.toInt() }
- (map["height"] as? Number)?.let { height = it.toInt() }
- (map["zOrder"] as? Number)?.let { zOrder = it.toInt() }
- (map["alpha"] as? Number)?.let { alpha = it.toFloat() }
- (map["audioChannel"] as? Number)?.let { audioChannel = it.toInt() }
- }
-}
-
-fun mapToColor(map: Map<*, *>): Int {
- return ((map["red"] as Number).toInt() shl 16) + ((map["green"] as Number).toInt() shl 8) + (map["blue"] as Number).toInt()
-}
-
-fun mapToLiveTranscoding(map: Map<*, *>): LiveTranscoding {
- return LiveTranscoding().apply {
- (map["width"] as? Number)?.let { width = it.toInt() }
- (map["height"] as? Number)?.let { height = it.toInt() }
- (map["videoBitrate"] as? Number)?.let { videoBitrate = it.toInt() }
- (map["videoFramerate"] as? Number)?.let { videoFramerate = it.toInt() }
- (map["lowLatency"] as? Boolean)?.let { lowLatency = it }
- (map["videoGop"] as? Number)?.let { videoGop = it.toInt() }
- (map["watermark"] as? Map<*, *>)?.let { watermark = mapToAgoraImage(it) }
- (map["backgroundImage"] as? Map<*, *>)?.let { backgroundImage = mapToAgoraImage(it) }
- (map["audioSampleRate"] as? Number)?.let {
- audioSampleRate = intToLiveTranscodingAudioSampleRate(it.toInt())
- }
- (map["audioBitrate"] as? Number)?.let { audioBitrate = it.toInt() }
- (map["audioChannels"] as? Number)?.let { audioChannels = it.toInt() }
- (map["audioCodecProfile"] as? Number)?.let {
- audioCodecProfile = intToAudioCodecProfile(it.toInt())
- }
- (map["videoCodecProfile"] as? Number)?.let {
- videoCodecProfile = intToVideoCodecProfile(it.toInt())
- }
- (map["backgroundColor"] as? Map<*, *>)?.let { backgroundColor = mapToColor(it) }
- (map["userConfigExtraInfo"] as? String)?.let { userConfigExtraInfo = it }
- (map["transcodingUsers"] as? List<*>)?.let { list ->
- list.forEach { item ->
- (item as? Map<*, *>)?.let {
- addUser(mapToTranscodingUser(it))
- }
- }
- }
- }
-}
-
-fun mapToChannelMediaInfo(map: Map<*, *>): ChannelMediaInfo {
- return ChannelMediaInfo(
- map["channelName"] as? String,
- map["token"] as? String,
- (map["uid"] as Number).toNativeUInt()
- )
-}
-
-fun mapToChannelMediaRelayConfiguration(map: Map<*, *>): ChannelMediaRelayConfiguration {
- return ChannelMediaRelayConfiguration().apply {
- (map["srcInfo"] as? Map<*, *>)?.let { setSrcChannelInfo(mapToChannelMediaInfo(it)) }
- (map["destInfos"] as? List<*>)?.let { list ->
- list.forEach { item ->
- (item as? Map<*, *>)?.let {
- val info = mapToChannelMediaInfo(it)
- setDestChannelInfo(info.channelName, info)
- }
- }
- }
- }
-}
-
-fun mapToLastmileProbeConfig(map: Map<*, *>): LastmileProbeConfig {
- return LastmileProbeConfig().apply {
- (map["probeUplink"] as? Boolean)?.let { probeUplink = it }
- (map["probeDownlink"] as? Boolean)?.let { probeDownlink = it }
- (map["expectedUplinkBitrate"] as? Number)?.let { expectedUplinkBitrate = it.toInt() }
- (map["expectedDownlinkBitrate"] as? Number)?.let { expectedUplinkBitrate = it.toInt() }
- }
-}
-
-fun mapToRectangle(map: Map<*, *>): WatermarkOptions.Rectangle {
- return WatermarkOptions.Rectangle().apply {
- (map["x"] as? Number)?.let { x = it.toInt() }
- (map["y"] as? Number)?.let { y = it.toInt() }
- (map["width"] as? Number)?.let { width = it.toInt() }
- (map["height"] as? Number)?.let { height = it.toInt() }
- }
-}
-
-fun mapToWatermarkOptions(map: Map<*, *>): WatermarkOptions {
- return WatermarkOptions().apply {
- (map["visibleInPreview"] as? Boolean)?.let { visibleInPreview = it }
- (map["positionInLandscapeMode"] as? Map<*, *>)?.let {
- positionInLandscapeMode = mapToRectangle(it)
- }
- (map["positionInPortraitMode"] as? Map<*, *>)?.let {
- positionInPortraitMode = mapToRectangle(it)
- }
- }
-}
-
-fun mapToLiveInjectStreamConfig(map: Map<*, *>): LiveInjectStreamConfig {
- return LiveInjectStreamConfig().apply {
- (map["width"] as? Number)?.let { width = it.toInt() }
- (map["height"] as? Number)?.let { height = it.toInt() }
- (map["videoGop"] as? Number)?.let { videoGop = it.toInt() }
- (map["videoFramerate"] as? Number)?.let { videoFramerate = it.toInt() }
- (map["videoBitrate"] as? Number)?.let { videoBitrate = it.toInt() }
- (map["audioSampleRate"] as? Number)?.let {
- audioSampleRate = intToLiveInjectStreamConfigAudioSampleRate(it.toInt())
- }
- (map["audioBitrate"] as? Number)?.let { audioBitrate = it.toInt() }
- (map["audioChannels"] as? Number)?.let { audioChannels = it.toInt() }
- }
-}
-
-fun mapToRhythmPlayerConfig(map: Map<*, *>): AgoraRhythmPlayerConfig {
- return AgoraRhythmPlayerConfig().apply {
- (map["beatsPerMeasure"] as? Number)?.let { beatsPerMeasure = it.toInt() }
- (map["beatsPerMinute"] as? Number)?.let { beatsPerMinute = it.toInt() }
- (map["publish"] as? Boolean)?.let { publish = it }
- }
-}
-
-fun mapToCameraCapturerConfiguration(map: Map<*, *>): CameraCapturerConfiguration {
- return CameraCapturerConfiguration(
- intToCapturerOutputPreference((map["preference"] as Number).toInt()),
- intToCameraDirection((map["cameraDirection"] as Number).toInt())
- ).apply {
- dimensions = CameraCapturerConfiguration.CaptureDimensions()
- (map["captureWidth"] as? Number)?.toInt()?.let { dimensions.width = it }
- (map["captureHeight"] as? Number)?.toInt()?.let { dimensions.height = it }
- }
-}
-
-fun mapToChannelMediaOptions(map: Map<*, *>): ChannelMediaOptions {
- return ChannelMediaOptions().apply {
- (map["autoSubscribeAudio"] as? Boolean)?.let { autoSubscribeAudio = it }
- (map["autoSubscribeVideo"] as? Boolean)?.let { autoSubscribeVideo = it }
- (map["publishLocalAudio"] as? Boolean)?.let { publishLocalAudio = it }
- (map["publishLocalVideo"] as? Boolean)?.let { publishLocalVideo = it }
- }
-}
-
-fun mapToRtcEngineConfig(map: Map<*, *>): RtcEngineConfig {
- return RtcEngineConfig().apply {
- mAppId = map["appId"] as String
- (map["areaCode"] as? Number)?.toInt()?.let { mAreaCode = it }
- (map["logConfig"] as? Map<*, *>)?.let { mLogConfig = mapToLogConfig(it) }
- }
-}
-
-fun mapToAudioRecordingConfiguration(map: Map<*, *>): AudioRecordingConfiguration {
- return AudioRecordingConfiguration().apply {
- (map["filePath"] as? String)?.let { filePath = it }
- (map["recordingQuality"] as? Number)?.let { recordingQuality = it.toInt() }
- (map["recordingPosition"] as? Number)?.let { recordingPosition = it.toInt() }
- (map["recordingSampleRate"] as? Number)?.let { recordingSampleRate = it.toInt() }
- }
-}
-
-fun mapToEncryptionConfig(map: Map<*, *>): EncryptionConfig {
- return EncryptionConfig().apply {
- (map["encryptionMode"] as? Number)?.let { encryptionMode = intToEncryptionMode(it.toInt()) }
- (map["encryptionKey"] as? String)?.let { encryptionKey = it }
- (map["encryptionKdfSalt"] as? List<*>)?.let { list ->
- for (i in list.indices) {
- (list[i] as? Number)?.let {
- encryptionKdfSalt[i] = it.toByte()
- }
- }
- }
- }
-}
-
-fun mapToClientRoleOptions(map: Map<*, *>): ClientRoleOptions {
- return ClientRoleOptions().apply {
- (map["audienceLatencyLevel"] as? Number)?.let { audienceLatencyLevel = it.toInt() }
- }
-}
-
-fun mapToLogConfig(map: Map<*, *>): RtcEngineConfig.LogConfig {
- return RtcEngineConfig.LogConfig().apply {
- (map["filePath"] as? String)?.let { filePath = it }
- (map["fileSize"] as? Number)?.let { fileSize = it.toInt() }
- (map["level"] as? Number)?.let { level = it.toInt() }
- }
-}
-
-fun mapToDataStreamConfig(map: Map<*, *>): DataStreamConfig {
- return DataStreamConfig().apply {
- (map["syncWithAudio"] as? Boolean)?.let { syncWithAudio = it }
- (map["ordered"] as? Boolean)?.let { ordered = it }
- }
-}
-
-fun mapToVirtualBackgroundSource(map: Map<*, *>): VirtualBackgroundSource {
- return VirtualBackgroundSource().apply {
- (map["backgroundSourceType"] as? Number)?.let { backgroundSourceType = it.toInt() }
- (map["color"] as? Map<*, *>)?.let { color = mapToColor(it) }
- (map["source"] as? String)?.let { source = it }
- (map["blur_degree"] as? Int)?.let { blur_degree = it }
- }
-}
-
-fun mapToEchoTestConfiguration(map: Map<*, *>): EchoTestConfiguration {
- return EchoTestConfiguration().apply {
- (map["enableAudio"] as? Boolean)?.let { enableAudio = it }
- (map["enableVideo"] as? Boolean)?.let { enableVideo = it }
- (map["token"] as? String)?.let { token = it }
- (map["channelId"] as? String)?.let { channelId = it }
- }
-}
diff --git a/android/src/main/java/io/agora/rtc/base/Callback.kt b/android/src/main/java/io/agora/rtc/base/Callback.kt
deleted file mode 100644
index 0d9b69378..000000000
--- a/android/src/main/java/io/agora/rtc/base/Callback.kt
+++ /dev/null
@@ -1,41 +0,0 @@
-package io.agora.rtc.base
-
-import io.agora.rtc.Constants
-import io.agora.rtc.RtcEngine
-import kotlin.math.abs
-
-abstract class Callback {
- fun code(code: Int?, runnable: ((Int?) -> Any?)? = null) {
- if (code == null || code < 0) {
- val newCode = abs(code ?: Constants.ERR_NOT_INITIALIZED)
- failure(newCode.toString(), RtcEngine.getErrorDescription(newCode))
- return
- }
-
- val res = if (runnable != null) runnable(code) else Unit
- if (res is Unit) {
- success(null)
- } else {
- success(res)
- }
- }
-
- fun resolve(source: T?, runnable: (T) -> Any?) {
- if (source == null) {
- val code = Constants.ERR_NOT_INITIALIZED
- failure(code.toString(), RtcEngine.getErrorDescription(code))
- return
- }
-
- val res = runnable(source)
- if (res is Unit) {
- success(null)
- } else {
- success(res)
- }
- }
-
- abstract fun success(data: Any?)
-
- abstract fun failure(code: String, message: String)
-}
diff --git a/android/src/main/java/io/agora/rtc/base/EnumCovertor.kt b/android/src/main/java/io/agora/rtc/base/EnumCovertor.kt
deleted file mode 100644
index ea423ce69..000000000
--- a/android/src/main/java/io/agora/rtc/base/EnumCovertor.kt
+++ /dev/null
@@ -1,97 +0,0 @@
-package io.agora.rtc.base
-
-import io.agora.rtc.internal.EncryptionConfig
-import io.agora.rtc.live.LiveInjectStreamConfig
-import io.agora.rtc.live.LiveTranscoding
-import io.agora.rtc.video.CameraCapturerConfiguration
-import io.agora.rtc.video.VideoEncoderConfiguration
-
-fun intToFrameRate(@Annotations.AgoraVideoFrameRate intValue: Int): VideoEncoderConfiguration.FRAME_RATE {
- for (value in VideoEncoderConfiguration.FRAME_RATE.values()) {
- if (value.value == intValue) {
- return value
- }
- }
- throw RuntimeException("VideoEncoderConfiguration.FRAME_RATE not contains $intValue")
-}
-
-fun intToOrientationMode(@Annotations.AgoraVideoOutputOrientationMode intValue: Int): VideoEncoderConfiguration.ORIENTATION_MODE {
- for (value in VideoEncoderConfiguration.ORIENTATION_MODE.values()) {
- if (value.value == intValue) {
- return value
- }
- }
- throw RuntimeException("VideoEncoderConfiguration.ORIENTATION_MODE not contains $intValue")
-}
-
-fun intToDegradationPreference(@Annotations.AgoraDegradationPreference intValue: Int): VideoEncoderConfiguration.DEGRADATION_PREFERENCE {
- for (value in VideoEncoderConfiguration.DEGRADATION_PREFERENCE.values()) {
- if (value.value == intValue) {
- return value
- }
- }
- throw RuntimeException("VideoEncoderConfiguration.DEGRADATION_PREFERENCE not contains $intValue")
-}
-
-fun intToLiveTranscodingAudioSampleRate(@Annotations.AgoraAudioSampleRateType intValue: Int): LiveTranscoding.AudioSampleRateType {
- for (value in LiveTranscoding.AudioSampleRateType.values()) {
- if (LiveTranscoding.AudioSampleRateType.getValue(value) == intValue) {
- return value
- }
- }
- throw RuntimeException("LiveTranscoding.AudioSampleRateType not contains $intValue")
-}
-
-fun intToLiveInjectStreamConfigAudioSampleRate(@Annotations.AgoraAudioSampleRateType intValue: Int): LiveInjectStreamConfig.AudioSampleRateType {
- for (value in LiveInjectStreamConfig.AudioSampleRateType.values()) {
- if (LiveInjectStreamConfig.AudioSampleRateType.getValue(value) == intValue) {
- return value
- }
- }
- throw RuntimeException("LiveInjectStreamConfig.AudioSampleRateType not contains $intValue")
-}
-
-fun intToAudioCodecProfile(@Annotations.AgoraAudioCodecProfileType intValue: Int): LiveTranscoding.AudioCodecProfileType {
- for (value in LiveTranscoding.AudioCodecProfileType.values()) {
- if (LiveTranscoding.AudioCodecProfileType.getValue(value) == intValue) {
- return value
- }
- }
- throw RuntimeException("LiveTranscoding.AudioCodecProfileType not contains $intValue")
-}
-
-fun intToVideoCodecProfile(@Annotations.AgoraVideoCodecProfileType intValue: Int): LiveTranscoding.VideoCodecProfileType {
- for (value in LiveTranscoding.VideoCodecProfileType.values()) {
- if (LiveTranscoding.VideoCodecProfileType.getValue(value) == intValue) {
- return value
- }
- }
- throw RuntimeException("LiveTranscoding.VideoCodecProfileType not contains $intValue")
-}
-
-fun intToCapturerOutputPreference(@Annotations.AgoraCameraCaptureOutputPreference intValue: Int): CameraCapturerConfiguration.CAPTURER_OUTPUT_PREFERENCE {
- for (value in CameraCapturerConfiguration.CAPTURER_OUTPUT_PREFERENCE.values()) {
- if (value.value == intValue) {
- return value
- }
- }
- throw RuntimeException("CameraCapturerConfiguration.CAPTURER_OUTPUT_PREFERENCE not contains $intValue")
-}
-
-fun intToCameraDirection(@Annotations.AgoraCameraDirection intValue: Int): CameraCapturerConfiguration.CAMERA_DIRECTION {
- for (value in CameraCapturerConfiguration.CAMERA_DIRECTION.values()) {
- if (value.value == intValue) {
- return value
- }
- }
- throw RuntimeException("CameraCapturerConfiguration.CAMERA_DIRECTION not contains $intValue")
-}
-
-fun intToEncryptionMode(@Annotations.AgoraEncryptionMode intValue: Int): EncryptionConfig.EncryptionMode {
- for (value in EncryptionConfig.EncryptionMode.values()) {
- if (value.value == intValue) {
- return value
- }
- }
- throw RuntimeException("EncryptionConfig.EncryptionMode not contains $intValue")
-}
diff --git a/android/src/main/java/io/agora/rtc/base/Extensions.kt b/android/src/main/java/io/agora/rtc/base/Extensions.kt
deleted file mode 100644
index cb24c448c..000000000
--- a/android/src/main/java/io/agora/rtc/base/Extensions.kt
+++ /dev/null
@@ -1,172 +0,0 @@
-package io.agora.rtc.base
-
-import android.graphics.Rect
-import io.agora.rtc.IRtcEngineEventHandler.*
-import io.agora.rtc.models.UserInfo
-
-fun UserInfo.toMap(): Map {
- return hashMapOf(
- "uid" to uid.toUInt().toLong(),
- "userAccount" to userAccount
- )
-}
-
-fun LocalAudioStats.toMap(): Map {
- return hashMapOf(
- "numChannels" to numChannels,
- "sentSampleRate" to sentSampleRate,
- "sentBitrate" to sentBitrate,
- "txPacketLossRate" to txPacketLossRate
- )
-}
-
-fun RtcStats.toMap(): Map {
- return hashMapOf(
- "duration" to totalDuration,
- "txBytes" to txBytes,
- "rxBytes" to rxBytes,
- "txAudioBytes" to txAudioBytes,
- "txVideoBytes" to txVideoBytes,
- "rxAudioBytes" to rxAudioBytes,
- "rxVideoBytes" to rxVideoBytes,
- "txKBitRate" to txKBitRate,
- "rxKBitRate" to rxKBitRate,
- "txAudioKBitRate" to txAudioKBitRate,
- "rxAudioKBitRate" to rxAudioKBitRate,
- "txVideoKBitRate" to txVideoKBitRate,
- "rxVideoKBitRate" to rxVideoKBitRate,
- "userCount" to users,
- "lastmileDelay" to lastmileDelay,
- "txPacketLossRate" to txPacketLossRate,
- "rxPacketLossRate" to rxPacketLossRate,
- "cpuTotalUsage" to cpuTotalUsage,
- "cpuAppUsage" to cpuAppUsage,
- "gatewayRtt" to gatewayRtt,
- "memoryAppUsageRatio" to memoryAppUsageRatio,
- "memoryTotalUsageRatio" to memoryTotalUsageRatio,
- "memoryAppUsageInKbytes" to memoryAppUsageInKbytes
- )
-}
-
-fun Rect.toMap(): Map {
- return hashMapOf(
- "left" to left,
- "top" to top,
- "right" to right,
- "bottom" to bottom
- )
-}
-
-fun RemoteAudioStats.toMap(): Map {
- return hashMapOf(
- "uid" to uid.toUInt().toLong(),
- "quality" to quality,
- "networkTransportDelay" to networkTransportDelay,
- "jitterBufferDelay" to jitterBufferDelay,
- "audioLossRate" to audioLossRate,
- "numChannels" to numChannels,
- "receivedSampleRate" to receivedSampleRate,
- "receivedBitrate" to receivedBitrate,
- "totalFrozenTime" to totalFrozenTime,
- "frozenRate" to frozenRate,
- "totalActiveTime" to totalActiveTime,
- "publishDuration" to publishDuration,
- "qoeQuality" to qoeQuality,
- "qualityChangedReason" to qualityChangedReason,
- "mosValue" to mosValue
- )
-}
-
-fun LocalVideoStats.toMap(): Map {
- return hashMapOf(
- "sentBitrate" to sentBitrate,
- "sentFrameRate" to sentFrameRate,
- "encoderOutputFrameRate" to encoderOutputFrameRate,
- "rendererOutputFrameRate" to rendererOutputFrameRate,
- "targetBitrate" to targetBitrate,
- "targetFrameRate" to targetFrameRate,
- "qualityAdaptIndication" to qualityAdaptIndication,
- "encodedBitrate" to encodedBitrate,
- "encodedFrameWidth" to encodedFrameWidth,
- "encodedFrameHeight" to encodedFrameHeight,
- "encodedFrameCount" to encodedFrameCount,
- "codecType" to codecType,
- "txPacketLossRate" to txPacketLossRate,
- "captureFrameRate" to captureFrameRate,
- "captureBrightnessLevel" to captureBrightnessLevel
- )
-}
-
-fun RemoteVideoStats.toMap(): Map {
- return hashMapOf(
- "uid" to uid.toUInt().toLong(),
- "delay" to delay,
- "width" to width,
- "height" to height,
- "receivedBitrate" to receivedBitrate,
- "decoderOutputFrameRate" to decoderOutputFrameRate,
- "rendererOutputFrameRate" to rendererOutputFrameRate,
- "packetLossRate" to packetLossRate,
- "rxStreamType" to rxStreamType,
- "totalFrozenTime" to totalFrozenTime,
- "frozenRate" to frozenRate,
- "totalActiveTime" to totalActiveTime,
- "publishDuration" to publishDuration
- )
-}
-
-fun AudioVolumeInfo.toMap(): Map {
- return hashMapOf(
- "uid" to uid.toUInt().toLong(),
- "volume" to volume,
- "vad" to vad,
- "channelId" to channelId
- )
-}
-
-fun Array.toMapList(): List